com.yelp.nrtsearch.server.grpc.MinCollector 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;
/**
*
*Definition of collector to find a min double value over documents. Currently only allows for script based value production.
*
*
* Protobuf type {@code luceneserver.MinCollector}
*/
public final class MinCollector extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.MinCollector)
MinCollectorOrBuilder {
private static final long serialVersionUID = 0L;
// Use MinCollector.newBuilder() to construct.
private MinCollector(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MinCollector() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MinCollector();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MinCollector_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MinCollector_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.MinCollector.class, com.yelp.nrtsearch.server.grpc.MinCollector.Builder.class);
}
private int valueSourceCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object valueSource_;
public enum ValueSourceCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
SCRIPT(1),
VALUESOURCE_NOT_SET(0);
private final int value;
private ValueSourceCase(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 ValueSourceCase valueOf(int value) {
return forNumber(value);
}
public static ValueSourceCase forNumber(int value) {
switch (value) {
case 1: return SCRIPT;
case 0: return VALUESOURCE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ValueSourceCase
getValueSourceCase() {
return ValueSourceCase.forNumber(
valueSourceCase_);
}
public static final int SCRIPT_FIELD_NUMBER = 1;
/**
*
*Script to produce a double value
*
*
* .luceneserver.Script script = 1;
* @return Whether the script field is set.
*/
@java.lang.Override
public boolean hasScript() {
return valueSourceCase_ == 1;
}
/**
*
*Script to produce a double value
*
*
* .luceneserver.Script script = 1;
* @return The script.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Script getScript() {
if (valueSourceCase_ == 1) {
return (com.yelp.nrtsearch.server.grpc.Script) valueSource_;
}
return com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance();
}
/**
*
*Script to produce a double value
*
*
* .luceneserver.Script script = 1;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.ScriptOrBuilder getScriptOrBuilder() {
if (valueSourceCase_ == 1) {
return (com.yelp.nrtsearch.server.grpc.Script) valueSource_;
}
return com.yelp.nrtsearch.server.grpc.Script.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 (valueSourceCase_ == 1) {
output.writeMessage(1, (com.yelp.nrtsearch.server.grpc.Script) valueSource_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (valueSourceCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (com.yelp.nrtsearch.server.grpc.Script) valueSource_);
}
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.MinCollector)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.MinCollector other = (com.yelp.nrtsearch.server.grpc.MinCollector) obj;
if (!getValueSourceCase().equals(other.getValueSourceCase())) return false;
switch (valueSourceCase_) {
case 1:
if (!getScript()
.equals(other.getScript())) 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 (valueSourceCase_) {
case 1:
hash = (37 * hash) + SCRIPT_FIELD_NUMBER;
hash = (53 * hash) + getScript().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.MinCollector parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.MinCollector 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.MinCollector parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.MinCollector 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.MinCollector parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.MinCollector 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.MinCollector parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.MinCollector 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.MinCollector parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.MinCollector 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.MinCollector 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.MinCollector 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.MinCollector 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;
}
/**
*
*Definition of collector to find a min double value over documents. Currently only allows for script based value production.
*
*
* Protobuf type {@code luceneserver.MinCollector}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.MinCollector)
com.yelp.nrtsearch.server.grpc.MinCollectorOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MinCollector_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MinCollector_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.MinCollector.class, com.yelp.nrtsearch.server.grpc.MinCollector.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.MinCollector.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (scriptBuilder_ != null) {
scriptBuilder_.clear();
}
valueSourceCase_ = 0;
valueSource_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MinCollector_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MinCollector getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.MinCollector.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MinCollector build() {
com.yelp.nrtsearch.server.grpc.MinCollector result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MinCollector buildPartial() {
com.yelp.nrtsearch.server.grpc.MinCollector result = new com.yelp.nrtsearch.server.grpc.MinCollector(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.MinCollector result) {
int from_bitField0_ = bitField0_;
}
private void buildPartialOneofs(com.yelp.nrtsearch.server.grpc.MinCollector result) {
result.valueSourceCase_ = valueSourceCase_;
result.valueSource_ = this.valueSource_;
if (valueSourceCase_ == 1 &&
scriptBuilder_ != null) {
result.valueSource_ = scriptBuilder_.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.MinCollector) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.MinCollector)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.MinCollector other) {
if (other == com.yelp.nrtsearch.server.grpc.MinCollector.getDefaultInstance()) return this;
switch (other.getValueSourceCase()) {
case SCRIPT: {
mergeScript(other.getScript());
break;
}
case VALUESOURCE_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(
getScriptFieldBuilder().getBuilder(),
extensionRegistry);
valueSourceCase_ = 1;
break;
} // case 10
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 valueSourceCase_ = 0;
private java.lang.Object valueSource_;
public ValueSourceCase
getValueSourceCase() {
return ValueSourceCase.forNumber(
valueSourceCase_);
}
public Builder clearValueSource() {
valueSourceCase_ = 0;
valueSource_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Script, com.yelp.nrtsearch.server.grpc.Script.Builder, com.yelp.nrtsearch.server.grpc.ScriptOrBuilder> scriptBuilder_;
/**
*
*Script to produce a double value
*
*
* .luceneserver.Script script = 1;
* @return Whether the script field is set.
*/
@java.lang.Override
public boolean hasScript() {
return valueSourceCase_ == 1;
}
/**
*
*Script to produce a double value
*
*
* .luceneserver.Script script = 1;
* @return The script.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Script getScript() {
if (scriptBuilder_ == null) {
if (valueSourceCase_ == 1) {
return (com.yelp.nrtsearch.server.grpc.Script) valueSource_;
}
return com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance();
} else {
if (valueSourceCase_ == 1) {
return scriptBuilder_.getMessage();
}
return com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance();
}
}
/**
*
*Script to produce a double value
*
*
* .luceneserver.Script script = 1;
*/
public Builder setScript(com.yelp.nrtsearch.server.grpc.Script value) {
if (scriptBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
valueSource_ = value;
onChanged();
} else {
scriptBuilder_.setMessage(value);
}
valueSourceCase_ = 1;
return this;
}
/**
*
*Script to produce a double value
*
*
* .luceneserver.Script script = 1;
*/
public Builder setScript(
com.yelp.nrtsearch.server.grpc.Script.Builder builderForValue) {
if (scriptBuilder_ == null) {
valueSource_ = builderForValue.build();
onChanged();
} else {
scriptBuilder_.setMessage(builderForValue.build());
}
valueSourceCase_ = 1;
return this;
}
/**
*
*Script to produce a double value
*
*
* .luceneserver.Script script = 1;
*/
public Builder mergeScript(com.yelp.nrtsearch.server.grpc.Script value) {
if (scriptBuilder_ == null) {
if (valueSourceCase_ == 1 &&
valueSource_ != com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance()) {
valueSource_ = com.yelp.nrtsearch.server.grpc.Script.newBuilder((com.yelp.nrtsearch.server.grpc.Script) valueSource_)
.mergeFrom(value).buildPartial();
} else {
valueSource_ = value;
}
onChanged();
} else {
if (valueSourceCase_ == 1) {
scriptBuilder_.mergeFrom(value);
} else {
scriptBuilder_.setMessage(value);
}
}
valueSourceCase_ = 1;
return this;
}
/**
*
*Script to produce a double value
*
*
* .luceneserver.Script script = 1;
*/
public Builder clearScript() {
if (scriptBuilder_ == null) {
if (valueSourceCase_ == 1) {
valueSourceCase_ = 0;
valueSource_ = null;
onChanged();
}
} else {
if (valueSourceCase_ == 1) {
valueSourceCase_ = 0;
valueSource_ = null;
}
scriptBuilder_.clear();
}
return this;
}
/**
*
*Script to produce a double value
*
*
* .luceneserver.Script script = 1;
*/
public com.yelp.nrtsearch.server.grpc.Script.Builder getScriptBuilder() {
return getScriptFieldBuilder().getBuilder();
}
/**
*
*Script to produce a double value
*
*
* .luceneserver.Script script = 1;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.ScriptOrBuilder getScriptOrBuilder() {
if ((valueSourceCase_ == 1) && (scriptBuilder_ != null)) {
return scriptBuilder_.getMessageOrBuilder();
} else {
if (valueSourceCase_ == 1) {
return (com.yelp.nrtsearch.server.grpc.Script) valueSource_;
}
return com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance();
}
}
/**
*
*Script to produce a double value
*
*
* .luceneserver.Script script = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Script, com.yelp.nrtsearch.server.grpc.Script.Builder, com.yelp.nrtsearch.server.grpc.ScriptOrBuilder>
getScriptFieldBuilder() {
if (scriptBuilder_ == null) {
if (!(valueSourceCase_ == 1)) {
valueSource_ = com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance();
}
scriptBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Script, com.yelp.nrtsearch.server.grpc.Script.Builder, com.yelp.nrtsearch.server.grpc.ScriptOrBuilder>(
(com.yelp.nrtsearch.server.grpc.Script) valueSource_,
getParentForChildren(),
isClean());
valueSource_ = null;
}
valueSourceCase_ = 1;
onChanged();
return scriptBuilder_;
}
@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.MinCollector)
}
// @@protoc_insertion_point(class_scope:luceneserver.MinCollector)
private static final com.yelp.nrtsearch.server.grpc.MinCollector DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.MinCollector();
}
public static com.yelp.nrtsearch.server.grpc.MinCollector getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MinCollector 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.MinCollector getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}