com.yelp.nrtsearch.server.grpc.LastHitInfo 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;
/**
*
* Last Hit info for search after
*
*
* Protobuf type {@code luceneserver.LastHitInfo}
*/
public final class LastHitInfo extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.LastHitInfo)
LastHitInfoOrBuilder {
private static final long serialVersionUID = 0L;
// Use LastHitInfo.newBuilder() to construct.
private LastHitInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LastHitInfo() {
lastFieldValues_ =
com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new LastHitInfo();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_LastHitInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_LastHitInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.LastHitInfo.class, com.yelp.nrtsearch.server.grpc.LastHitInfo.Builder.class);
}
public static final int LASTFIELDVALUES_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList lastFieldValues_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
* repeated string lastFieldValues = 1;
* @return A list containing the lastFieldValues.
*/
public com.google.protobuf.ProtocolStringList
getLastFieldValuesList() {
return lastFieldValues_;
}
/**
* repeated string lastFieldValues = 1;
* @return The count of lastFieldValues.
*/
public int getLastFieldValuesCount() {
return lastFieldValues_.size();
}
/**
* repeated string lastFieldValues = 1;
* @param index The index of the element to return.
* @return The lastFieldValues at the given index.
*/
public java.lang.String getLastFieldValues(int index) {
return lastFieldValues_.get(index);
}
/**
* repeated string lastFieldValues = 1;
* @param index The index of the value to return.
* @return The bytes of the lastFieldValues at the given index.
*/
public com.google.protobuf.ByteString
getLastFieldValuesBytes(int index) {
return lastFieldValues_.getByteString(index);
}
public static final int LASTDOCID_FIELD_NUMBER = 2;
private int lastDocId_ = 0;
/**
* int32 lastDocId = 2;
* @return The lastDocId.
*/
@java.lang.Override
public int getLastDocId() {
return lastDocId_;
}
public static final int LASTSCORE_FIELD_NUMBER = 3;
private float lastScore_ = 0F;
/**
* float lastScore = 3;
* @return The lastScore.
*/
@java.lang.Override
public float getLastScore() {
return lastScore_;
}
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 < lastFieldValues_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, lastFieldValues_.getRaw(i));
}
if (lastDocId_ != 0) {
output.writeInt32(2, lastDocId_);
}
if (java.lang.Float.floatToRawIntBits(lastScore_) != 0) {
output.writeFloat(3, lastScore_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < lastFieldValues_.size(); i++) {
dataSize += computeStringSizeNoTag(lastFieldValues_.getRaw(i));
}
size += dataSize;
size += 1 * getLastFieldValuesList().size();
}
if (lastDocId_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, lastDocId_);
}
if (java.lang.Float.floatToRawIntBits(lastScore_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(3, lastScore_);
}
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.LastHitInfo)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.LastHitInfo other = (com.yelp.nrtsearch.server.grpc.LastHitInfo) obj;
if (!getLastFieldValuesList()
.equals(other.getLastFieldValuesList())) return false;
if (getLastDocId()
!= other.getLastDocId()) return false;
if (java.lang.Float.floatToIntBits(getLastScore())
!= java.lang.Float.floatToIntBits(
other.getLastScore())) 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 (getLastFieldValuesCount() > 0) {
hash = (37 * hash) + LASTFIELDVALUES_FIELD_NUMBER;
hash = (53 * hash) + getLastFieldValuesList().hashCode();
}
hash = (37 * hash) + LASTDOCID_FIELD_NUMBER;
hash = (53 * hash) + getLastDocId();
hash = (37 * hash) + LASTSCORE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getLastScore());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.LastHitInfo parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.LastHitInfo 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.LastHitInfo parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.LastHitInfo 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.LastHitInfo parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.LastHitInfo 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.LastHitInfo parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.LastHitInfo 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.LastHitInfo parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.LastHitInfo 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.LastHitInfo 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.LastHitInfo 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.LastHitInfo 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;
}
/**
*
* Last Hit info for search after
*
*
* Protobuf type {@code luceneserver.LastHitInfo}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.LastHitInfo)
com.yelp.nrtsearch.server.grpc.LastHitInfoOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_LastHitInfo_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_LastHitInfo_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.LastHitInfo.class, com.yelp.nrtsearch.server.grpc.LastHitInfo.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.LastHitInfo.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
lastFieldValues_ =
com.google.protobuf.LazyStringArrayList.emptyList();
lastDocId_ = 0;
lastScore_ = 0F;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_LastHitInfo_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.LastHitInfo getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.LastHitInfo.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.LastHitInfo build() {
com.yelp.nrtsearch.server.grpc.LastHitInfo result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.LastHitInfo buildPartial() {
com.yelp.nrtsearch.server.grpc.LastHitInfo result = new com.yelp.nrtsearch.server.grpc.LastHitInfo(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.LastHitInfo result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
lastFieldValues_.makeImmutable();
result.lastFieldValues_ = lastFieldValues_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.lastDocId_ = lastDocId_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.lastScore_ = lastScore_;
}
}
@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.LastHitInfo) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.LastHitInfo)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.LastHitInfo other) {
if (other == com.yelp.nrtsearch.server.grpc.LastHitInfo.getDefaultInstance()) return this;
if (!other.lastFieldValues_.isEmpty()) {
if (lastFieldValues_.isEmpty()) {
lastFieldValues_ = other.lastFieldValues_;
bitField0_ |= 0x00000001;
} else {
ensureLastFieldValuesIsMutable();
lastFieldValues_.addAll(other.lastFieldValues_);
}
onChanged();
}
if (other.getLastDocId() != 0) {
setLastDocId(other.getLastDocId());
}
if (other.getLastScore() != 0F) {
setLastScore(other.getLastScore());
}
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: {
java.lang.String s = input.readStringRequireUtf8();
ensureLastFieldValuesIsMutable();
lastFieldValues_.add(s);
break;
} // case 10
case 16: {
lastDocId_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
case 29: {
lastScore_ = input.readFloat();
bitField0_ |= 0x00000004;
break;
} // case 29
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.google.protobuf.LazyStringArrayList lastFieldValues_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureLastFieldValuesIsMutable() {
if (!lastFieldValues_.isModifiable()) {
lastFieldValues_ = new com.google.protobuf.LazyStringArrayList(lastFieldValues_);
}
bitField0_ |= 0x00000001;
}
/**
* repeated string lastFieldValues = 1;
* @return A list containing the lastFieldValues.
*/
public com.google.protobuf.ProtocolStringList
getLastFieldValuesList() {
lastFieldValues_.makeImmutable();
return lastFieldValues_;
}
/**
* repeated string lastFieldValues = 1;
* @return The count of lastFieldValues.
*/
public int getLastFieldValuesCount() {
return lastFieldValues_.size();
}
/**
* repeated string lastFieldValues = 1;
* @param index The index of the element to return.
* @return The lastFieldValues at the given index.
*/
public java.lang.String getLastFieldValues(int index) {
return lastFieldValues_.get(index);
}
/**
* repeated string lastFieldValues = 1;
* @param index The index of the value to return.
* @return The bytes of the lastFieldValues at the given index.
*/
public com.google.protobuf.ByteString
getLastFieldValuesBytes(int index) {
return lastFieldValues_.getByteString(index);
}
/**
* repeated string lastFieldValues = 1;
* @param index The index to set the value at.
* @param value The lastFieldValues to set.
* @return This builder for chaining.
*/
public Builder setLastFieldValues(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureLastFieldValuesIsMutable();
lastFieldValues_.set(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* repeated string lastFieldValues = 1;
* @param value The lastFieldValues to add.
* @return This builder for chaining.
*/
public Builder addLastFieldValues(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureLastFieldValuesIsMutable();
lastFieldValues_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* repeated string lastFieldValues = 1;
* @param values The lastFieldValues to add.
* @return This builder for chaining.
*/
public Builder addAllLastFieldValues(
java.lang.Iterable values) {
ensureLastFieldValuesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, lastFieldValues_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
* repeated string lastFieldValues = 1;
* @return This builder for chaining.
*/
public Builder clearLastFieldValues() {
lastFieldValues_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);;
onChanged();
return this;
}
/**
* repeated string lastFieldValues = 1;
* @param value The bytes of the lastFieldValues to add.
* @return This builder for chaining.
*/
public Builder addLastFieldValuesBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureLastFieldValuesIsMutable();
lastFieldValues_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int lastDocId_ ;
/**
* int32 lastDocId = 2;
* @return The lastDocId.
*/
@java.lang.Override
public int getLastDocId() {
return lastDocId_;
}
/**
* int32 lastDocId = 2;
* @param value The lastDocId to set.
* @return This builder for chaining.
*/
public Builder setLastDocId(int value) {
lastDocId_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
* int32 lastDocId = 2;
* @return This builder for chaining.
*/
public Builder clearLastDocId() {
bitField0_ = (bitField0_ & ~0x00000002);
lastDocId_ = 0;
onChanged();
return this;
}
private float lastScore_ ;
/**
* float lastScore = 3;
* @return The lastScore.
*/
@java.lang.Override
public float getLastScore() {
return lastScore_;
}
/**
* float lastScore = 3;
* @param value The lastScore to set.
* @return This builder for chaining.
*/
public Builder setLastScore(float value) {
lastScore_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
* float lastScore = 3;
* @return This builder for chaining.
*/
public Builder clearLastScore() {
bitField0_ = (bitField0_ & ~0x00000004);
lastScore_ = 0F;
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.LastHitInfo)
}
// @@protoc_insertion_point(class_scope:luceneserver.LastHitInfo)
private static final com.yelp.nrtsearch.server.grpc.LastHitInfo DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.LastHitInfo();
}
public static com.yelp.nrtsearch.server.grpc.LastHitInfo getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LastHitInfo 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.LastHitInfo getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}