com.yelp.nrtsearch.server.grpc.Facet 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.Facet}
*/
public final class Facet extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.Facet)
FacetOrBuilder {
private static final long serialVersionUID = 0L;
// Use Facet.newBuilder() to construct.
private Facet(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Facet() {
dim_ = "";
paths_ =
com.google.protobuf.LazyStringArrayList.emptyList();
numericRange_ = java.util.Collections.emptyList();
labels_ =
com.google.protobuf.LazyStringArrayList.emptyList();
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Facet();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_Facet_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_Facet_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.Facet.class, com.yelp.nrtsearch.server.grpc.Facet.Builder.class);
}
private int bitField0_;
public static final int DIM_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object dim_ = "";
/**
*
*Dimension (field)
*
*
* string dim = 1;
* @return The dim.
*/
@java.lang.Override
public java.lang.String getDim() {
java.lang.Object ref = dim_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
dim_ = s;
return s;
}
}
/**
*
*Dimension (field)
*
*
* string dim = 1;
* @return The bytes for dim.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDimBytes() {
java.lang.Object ref = dim_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
dim_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PATHS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList paths_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*Prefix path to facet 'under'
*
*
* repeated string paths = 2;
* @return A list containing the paths.
*/
public com.google.protobuf.ProtocolStringList
getPathsList() {
return paths_;
}
/**
*
*Prefix path to facet 'under'
*
*
* repeated string paths = 2;
* @return The count of paths.
*/
public int getPathsCount() {
return paths_.size();
}
/**
*
*Prefix path to facet 'under'
*
*
* repeated string paths = 2;
* @param index The index of the element to return.
* @return The paths at the given index.
*/
public java.lang.String getPaths(int index) {
return paths_.get(index);
}
/**
*
*Prefix path to facet 'under'
*
*
* repeated string paths = 2;
* @param index The index of the value to return.
* @return The bytes of the paths at the given index.
*/
public com.google.protobuf.ByteString
getPathsBytes(int index) {
return paths_.getByteString(index);
}
public static final int NUMERICRANGE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private java.util.List numericRange_;
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
@java.lang.Override
public java.util.List getNumericRangeList() {
return numericRange_;
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
@java.lang.Override
public java.util.List extends com.yelp.nrtsearch.server.grpc.NumericRangeTypeOrBuilder>
getNumericRangeOrBuilderList() {
return numericRange_;
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
@java.lang.Override
public int getNumericRangeCount() {
return numericRange_.size();
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.NumericRangeType getNumericRange(int index) {
return numericRange_.get(index);
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.NumericRangeTypeOrBuilder getNumericRangeOrBuilder(
int index) {
return numericRange_.get(index);
}
public static final int USEORDSCACHE_FIELD_NUMBER = 4;
private boolean useOrdsCache_ = false;
/**
*
* True if the ordinals cache should be used
*
*
* bool useOrdsCache = 4;
* @return The useOrdsCache.
*/
@java.lang.Override
public boolean getUseOrdsCache() {
return useOrdsCache_;
}
public static final int LABELS_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList labels_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* Specific facet labels to retrieve
*
*
* repeated string labels = 5;
* @return A list containing the labels.
*/
public com.google.protobuf.ProtocolStringList
getLabelsList() {
return labels_;
}
/**
*
* Specific facet labels to retrieve
*
*
* repeated string labels = 5;
* @return The count of labels.
*/
public int getLabelsCount() {
return labels_.size();
}
/**
*
* Specific facet labels to retrieve
*
*
* repeated string labels = 5;
* @param index The index of the element to return.
* @return The labels at the given index.
*/
public java.lang.String getLabels(int index) {
return labels_.get(index);
}
/**
*
* Specific facet labels to retrieve
*
*
* repeated string labels = 5;
* @param index The index of the value to return.
* @return The bytes of the labels at the given index.
*/
public com.google.protobuf.ByteString
getLabelsBytes(int index) {
return labels_.getByteString(index);
}
public static final int TOPN_FIELD_NUMBER = 6;
private int topN_ = 0;
/**
*
*How many top facets to return
*
*
* int32 topN = 6;
* @return The topN.
*/
@java.lang.Override
public int getTopN() {
return topN_;
}
public static final int SCRIPT_FIELD_NUMBER = 7;
private com.yelp.nrtsearch.server.grpc.Script script_;
/**
*
*FacetScript definition to use in place of index facet
*
*
* .luceneserver.Script script = 7;
* @return Whether the script field is set.
*/
@java.lang.Override
public boolean hasScript() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*FacetScript definition to use in place of index facet
*
*
* .luceneserver.Script script = 7;
* @return The script.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Script getScript() {
return script_ == null ? com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance() : script_;
}
/**
*
*FacetScript definition to use in place of index facet
*
*
* .luceneserver.Script script = 7;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.ScriptOrBuilder getScriptOrBuilder() {
return script_ == null ? com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance() : script_;
}
public static final int SAMPLETOPDOCS_FIELD_NUMBER = 8;
private int sampleTopDocs_ = 0;
/**
*
*Facet over the top N ranked documents, instead of all hits. Only works with field doc values.
*
*
* int32 sampleTopDocs = 8;
* @return The sampleTopDocs.
*/
@java.lang.Override
public int getSampleTopDocs() {
return sampleTopDocs_;
}
public static final int NAME_FIELD_NUMBER = 9;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*Name for this facet
*
*
* string name = 9;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
*Name for this facet
*
*
* string name = 9;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dim_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, dim_);
}
for (int i = 0; i < paths_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, paths_.getRaw(i));
}
for (int i = 0; i < numericRange_.size(); i++) {
output.writeMessage(3, numericRange_.get(i));
}
if (useOrdsCache_ != false) {
output.writeBool(4, useOrdsCache_);
}
for (int i = 0; i < labels_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, labels_.getRaw(i));
}
if (topN_ != 0) {
output.writeInt32(6, topN_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(7, getScript());
}
if (sampleTopDocs_ != 0) {
output.writeInt32(8, sampleTopDocs_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, name_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dim_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, dim_);
}
{
int dataSize = 0;
for (int i = 0; i < paths_.size(); i++) {
dataSize += computeStringSizeNoTag(paths_.getRaw(i));
}
size += dataSize;
size += 1 * getPathsList().size();
}
for (int i = 0; i < numericRange_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, numericRange_.get(i));
}
if (useOrdsCache_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(4, useOrdsCache_);
}
{
int dataSize = 0;
for (int i = 0; i < labels_.size(); i++) {
dataSize += computeStringSizeNoTag(labels_.getRaw(i));
}
size += dataSize;
size += 1 * getLabelsList().size();
}
if (topN_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(6, topN_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getScript());
}
if (sampleTopDocs_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(8, sampleTopDocs_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, name_);
}
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.Facet)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.Facet other = (com.yelp.nrtsearch.server.grpc.Facet) obj;
if (!getDim()
.equals(other.getDim())) return false;
if (!getPathsList()
.equals(other.getPathsList())) return false;
if (!getNumericRangeList()
.equals(other.getNumericRangeList())) return false;
if (getUseOrdsCache()
!= other.getUseOrdsCache()) return false;
if (!getLabelsList()
.equals(other.getLabelsList())) return false;
if (getTopN()
!= other.getTopN()) return false;
if (hasScript() != other.hasScript()) return false;
if (hasScript()) {
if (!getScript()
.equals(other.getScript())) return false;
}
if (getSampleTopDocs()
!= other.getSampleTopDocs()) return false;
if (!getName()
.equals(other.getName())) 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();
hash = (37 * hash) + DIM_FIELD_NUMBER;
hash = (53 * hash) + getDim().hashCode();
if (getPathsCount() > 0) {
hash = (37 * hash) + PATHS_FIELD_NUMBER;
hash = (53 * hash) + getPathsList().hashCode();
}
if (getNumericRangeCount() > 0) {
hash = (37 * hash) + NUMERICRANGE_FIELD_NUMBER;
hash = (53 * hash) + getNumericRangeList().hashCode();
}
hash = (37 * hash) + USEORDSCACHE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getUseOrdsCache());
if (getLabelsCount() > 0) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + getLabelsList().hashCode();
}
hash = (37 * hash) + TOPN_FIELD_NUMBER;
hash = (53 * hash) + getTopN();
if (hasScript()) {
hash = (37 * hash) + SCRIPT_FIELD_NUMBER;
hash = (53 * hash) + getScript().hashCode();
}
hash = (37 * hash) + SAMPLETOPDOCS_FIELD_NUMBER;
hash = (53 * hash) + getSampleTopDocs();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.Facet parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.Facet 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.Facet parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.Facet 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.Facet parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.Facet 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.Facet parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.Facet 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.Facet parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.Facet 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.Facet 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.Facet 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.Facet 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.Facet}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.Facet)
com.yelp.nrtsearch.server.grpc.FacetOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_Facet_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_Facet_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.Facet.class, com.yelp.nrtsearch.server.grpc.Facet.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.Facet.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getNumericRangeFieldBuilder();
getScriptFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
dim_ = "";
paths_ =
com.google.protobuf.LazyStringArrayList.emptyList();
if (numericRangeBuilder_ == null) {
numericRange_ = java.util.Collections.emptyList();
} else {
numericRange_ = null;
numericRangeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000004);
useOrdsCache_ = false;
labels_ =
com.google.protobuf.LazyStringArrayList.emptyList();
topN_ = 0;
script_ = null;
if (scriptBuilder_ != null) {
scriptBuilder_.dispose();
scriptBuilder_ = null;
}
sampleTopDocs_ = 0;
name_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_Facet_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Facet getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.Facet.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Facet build() {
com.yelp.nrtsearch.server.grpc.Facet result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Facet buildPartial() {
com.yelp.nrtsearch.server.grpc.Facet result = new com.yelp.nrtsearch.server.grpc.Facet(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.yelp.nrtsearch.server.grpc.Facet result) {
if (numericRangeBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
numericRange_ = java.util.Collections.unmodifiableList(numericRange_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.numericRange_ = numericRange_;
} else {
result.numericRange_ = numericRangeBuilder_.build();
}
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.Facet result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.dim_ = dim_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
paths_.makeImmutable();
result.paths_ = paths_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.useOrdsCache_ = useOrdsCache_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
labels_.makeImmutable();
result.labels_ = labels_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.topN_ = topN_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000040) != 0)) {
result.script_ = scriptBuilder_ == null
? script_
: scriptBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.sampleTopDocs_ = sampleTopDocs_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.name_ = name_;
}
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.Facet) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.Facet)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.Facet other) {
if (other == com.yelp.nrtsearch.server.grpc.Facet.getDefaultInstance()) return this;
if (!other.getDim().isEmpty()) {
dim_ = other.dim_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.paths_.isEmpty()) {
if (paths_.isEmpty()) {
paths_ = other.paths_;
bitField0_ |= 0x00000002;
} else {
ensurePathsIsMutable();
paths_.addAll(other.paths_);
}
onChanged();
}
if (numericRangeBuilder_ == null) {
if (!other.numericRange_.isEmpty()) {
if (numericRange_.isEmpty()) {
numericRange_ = other.numericRange_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureNumericRangeIsMutable();
numericRange_.addAll(other.numericRange_);
}
onChanged();
}
} else {
if (!other.numericRange_.isEmpty()) {
if (numericRangeBuilder_.isEmpty()) {
numericRangeBuilder_.dispose();
numericRangeBuilder_ = null;
numericRange_ = other.numericRange_;
bitField0_ = (bitField0_ & ~0x00000004);
numericRangeBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getNumericRangeFieldBuilder() : null;
} else {
numericRangeBuilder_.addAllMessages(other.numericRange_);
}
}
}
if (other.getUseOrdsCache() != false) {
setUseOrdsCache(other.getUseOrdsCache());
}
if (!other.labels_.isEmpty()) {
if (labels_.isEmpty()) {
labels_ = other.labels_;
bitField0_ |= 0x00000010;
} else {
ensureLabelsIsMutable();
labels_.addAll(other.labels_);
}
onChanged();
}
if (other.getTopN() != 0) {
setTopN(other.getTopN());
}
if (other.hasScript()) {
mergeScript(other.getScript());
}
if (other.getSampleTopDocs() != 0) {
setSampleTopDocs(other.getSampleTopDocs());
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000100;
onChanged();
}
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: {
dim_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
java.lang.String s = input.readStringRequireUtf8();
ensurePathsIsMutable();
paths_.add(s);
break;
} // case 18
case 26: {
com.yelp.nrtsearch.server.grpc.NumericRangeType m =
input.readMessage(
com.yelp.nrtsearch.server.grpc.NumericRangeType.parser(),
extensionRegistry);
if (numericRangeBuilder_ == null) {
ensureNumericRangeIsMutable();
numericRange_.add(m);
} else {
numericRangeBuilder_.addMessage(m);
}
break;
} // case 26
case 32: {
useOrdsCache_ = input.readBool();
bitField0_ |= 0x00000008;
break;
} // case 32
case 42: {
java.lang.String s = input.readStringRequireUtf8();
ensureLabelsIsMutable();
labels_.add(s);
break;
} // case 42
case 48: {
topN_ = input.readInt32();
bitField0_ |= 0x00000020;
break;
} // case 48
case 58: {
input.readMessage(
getScriptFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 58
case 64: {
sampleTopDocs_ = input.readInt32();
bitField0_ |= 0x00000080;
break;
} // case 64
case 74: {
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000100;
break;
} // case 74
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.lang.Object dim_ = "";
/**
*
*Dimension (field)
*
*
* string dim = 1;
* @return The dim.
*/
public java.lang.String getDim() {
java.lang.Object ref = dim_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
dim_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Dimension (field)
*
*
* string dim = 1;
* @return The bytes for dim.
*/
public com.google.protobuf.ByteString
getDimBytes() {
java.lang.Object ref = dim_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
dim_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Dimension (field)
*
*
* string dim = 1;
* @param value The dim to set.
* @return This builder for chaining.
*/
public Builder setDim(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
dim_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*Dimension (field)
*
*
* string dim = 1;
* @return This builder for chaining.
*/
public Builder clearDim() {
dim_ = getDefaultInstance().getDim();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*Dimension (field)
*
*
* string dim = 1;
* @param value The bytes for dim to set.
* @return This builder for chaining.
*/
public Builder setDimBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
dim_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList paths_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensurePathsIsMutable() {
if (!paths_.isModifiable()) {
paths_ = new com.google.protobuf.LazyStringArrayList(paths_);
}
bitField0_ |= 0x00000002;
}
/**
*
*Prefix path to facet 'under'
*
*
* repeated string paths = 2;
* @return A list containing the paths.
*/
public com.google.protobuf.ProtocolStringList
getPathsList() {
paths_.makeImmutable();
return paths_;
}
/**
*
*Prefix path to facet 'under'
*
*
* repeated string paths = 2;
* @return The count of paths.
*/
public int getPathsCount() {
return paths_.size();
}
/**
*
*Prefix path to facet 'under'
*
*
* repeated string paths = 2;
* @param index The index of the element to return.
* @return The paths at the given index.
*/
public java.lang.String getPaths(int index) {
return paths_.get(index);
}
/**
*
*Prefix path to facet 'under'
*
*
* repeated string paths = 2;
* @param index The index of the value to return.
* @return The bytes of the paths at the given index.
*/
public com.google.protobuf.ByteString
getPathsBytes(int index) {
return paths_.getByteString(index);
}
/**
*
*Prefix path to facet 'under'
*
*
* repeated string paths = 2;
* @param index The index to set the value at.
* @param value The paths to set.
* @return This builder for chaining.
*/
public Builder setPaths(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensurePathsIsMutable();
paths_.set(index, value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*Prefix path to facet 'under'
*
*
* repeated string paths = 2;
* @param value The paths to add.
* @return This builder for chaining.
*/
public Builder addPaths(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensurePathsIsMutable();
paths_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*Prefix path to facet 'under'
*
*
* repeated string paths = 2;
* @param values The paths to add.
* @return This builder for chaining.
*/
public Builder addAllPaths(
java.lang.Iterable values) {
ensurePathsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, paths_);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*Prefix path to facet 'under'
*
*
* repeated string paths = 2;
* @return This builder for chaining.
*/
public Builder clearPaths() {
paths_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);;
onChanged();
return this;
}
/**
*
*Prefix path to facet 'under'
*
*
* repeated string paths = 2;
* @param value The bytes of the paths to add.
* @return This builder for chaining.
*/
public Builder addPathsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensurePathsIsMutable();
paths_.add(value);
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.util.List numericRange_ =
java.util.Collections.emptyList();
private void ensureNumericRangeIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
numericRange_ = new java.util.ArrayList(numericRange_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.NumericRangeType, com.yelp.nrtsearch.server.grpc.NumericRangeType.Builder, com.yelp.nrtsearch.server.grpc.NumericRangeTypeOrBuilder> numericRangeBuilder_;
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public java.util.List getNumericRangeList() {
if (numericRangeBuilder_ == null) {
return java.util.Collections.unmodifiableList(numericRange_);
} else {
return numericRangeBuilder_.getMessageList();
}
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public int getNumericRangeCount() {
if (numericRangeBuilder_ == null) {
return numericRange_.size();
} else {
return numericRangeBuilder_.getCount();
}
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public com.yelp.nrtsearch.server.grpc.NumericRangeType getNumericRange(int index) {
if (numericRangeBuilder_ == null) {
return numericRange_.get(index);
} else {
return numericRangeBuilder_.getMessage(index);
}
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public Builder setNumericRange(
int index, com.yelp.nrtsearch.server.grpc.NumericRangeType value) {
if (numericRangeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNumericRangeIsMutable();
numericRange_.set(index, value);
onChanged();
} else {
numericRangeBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public Builder setNumericRange(
int index, com.yelp.nrtsearch.server.grpc.NumericRangeType.Builder builderForValue) {
if (numericRangeBuilder_ == null) {
ensureNumericRangeIsMutable();
numericRange_.set(index, builderForValue.build());
onChanged();
} else {
numericRangeBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public Builder addNumericRange(com.yelp.nrtsearch.server.grpc.NumericRangeType value) {
if (numericRangeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNumericRangeIsMutable();
numericRange_.add(value);
onChanged();
} else {
numericRangeBuilder_.addMessage(value);
}
return this;
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public Builder addNumericRange(
int index, com.yelp.nrtsearch.server.grpc.NumericRangeType value) {
if (numericRangeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNumericRangeIsMutable();
numericRange_.add(index, value);
onChanged();
} else {
numericRangeBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public Builder addNumericRange(
com.yelp.nrtsearch.server.grpc.NumericRangeType.Builder builderForValue) {
if (numericRangeBuilder_ == null) {
ensureNumericRangeIsMutable();
numericRange_.add(builderForValue.build());
onChanged();
} else {
numericRangeBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public Builder addNumericRange(
int index, com.yelp.nrtsearch.server.grpc.NumericRangeType.Builder builderForValue) {
if (numericRangeBuilder_ == null) {
ensureNumericRangeIsMutable();
numericRange_.add(index, builderForValue.build());
onChanged();
} else {
numericRangeBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public Builder addAllNumericRange(
java.lang.Iterable extends com.yelp.nrtsearch.server.grpc.NumericRangeType> values) {
if (numericRangeBuilder_ == null) {
ensureNumericRangeIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, numericRange_);
onChanged();
} else {
numericRangeBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public Builder clearNumericRange() {
if (numericRangeBuilder_ == null) {
numericRange_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
numericRangeBuilder_.clear();
}
return this;
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public Builder removeNumericRange(int index) {
if (numericRangeBuilder_ == null) {
ensureNumericRangeIsMutable();
numericRange_.remove(index);
onChanged();
} else {
numericRangeBuilder_.remove(index);
}
return this;
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public com.yelp.nrtsearch.server.grpc.NumericRangeType.Builder getNumericRangeBuilder(
int index) {
return getNumericRangeFieldBuilder().getBuilder(index);
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public com.yelp.nrtsearch.server.grpc.NumericRangeTypeOrBuilder getNumericRangeOrBuilder(
int index) {
if (numericRangeBuilder_ == null) {
return numericRange_.get(index); } else {
return numericRangeBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public java.util.List extends com.yelp.nrtsearch.server.grpc.NumericRangeTypeOrBuilder>
getNumericRangeOrBuilderList() {
if (numericRangeBuilder_ != null) {
return numericRangeBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(numericRange_);
}
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public com.yelp.nrtsearch.server.grpc.NumericRangeType.Builder addNumericRangeBuilder() {
return getNumericRangeFieldBuilder().addBuilder(
com.yelp.nrtsearch.server.grpc.NumericRangeType.getDefaultInstance());
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public com.yelp.nrtsearch.server.grpc.NumericRangeType.Builder addNumericRangeBuilder(
int index) {
return getNumericRangeFieldBuilder().addBuilder(
index, com.yelp.nrtsearch.server.grpc.NumericRangeType.getDefaultInstance());
}
/**
*
*Custom numeric ranges. Field must be indexed with facet=numericRange.
*
*
* repeated .luceneserver.NumericRangeType numericRange = 3;
*/
public java.util.List
getNumericRangeBuilderList() {
return getNumericRangeFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.NumericRangeType, com.yelp.nrtsearch.server.grpc.NumericRangeType.Builder, com.yelp.nrtsearch.server.grpc.NumericRangeTypeOrBuilder>
getNumericRangeFieldBuilder() {
if (numericRangeBuilder_ == null) {
numericRangeBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.NumericRangeType, com.yelp.nrtsearch.server.grpc.NumericRangeType.Builder, com.yelp.nrtsearch.server.grpc.NumericRangeTypeOrBuilder>(
numericRange_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
numericRange_ = null;
}
return numericRangeBuilder_;
}
private boolean useOrdsCache_ ;
/**
*
* True if the ordinals cache should be used
*
*
* bool useOrdsCache = 4;
* @return The useOrdsCache.
*/
@java.lang.Override
public boolean getUseOrdsCache() {
return useOrdsCache_;
}
/**
*
* True if the ordinals cache should be used
*
*
* bool useOrdsCache = 4;
* @param value The useOrdsCache to set.
* @return This builder for chaining.
*/
public Builder setUseOrdsCache(boolean value) {
useOrdsCache_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* True if the ordinals cache should be used
*
*
* bool useOrdsCache = 4;
* @return This builder for chaining.
*/
public Builder clearUseOrdsCache() {
bitField0_ = (bitField0_ & ~0x00000008);
useOrdsCache_ = false;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList labels_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureLabelsIsMutable() {
if (!labels_.isModifiable()) {
labels_ = new com.google.protobuf.LazyStringArrayList(labels_);
}
bitField0_ |= 0x00000010;
}
/**
*
* Specific facet labels to retrieve
*
*
* repeated string labels = 5;
* @return A list containing the labels.
*/
public com.google.protobuf.ProtocolStringList
getLabelsList() {
labels_.makeImmutable();
return labels_;
}
/**
*
* Specific facet labels to retrieve
*
*
* repeated string labels = 5;
* @return The count of labels.
*/
public int getLabelsCount() {
return labels_.size();
}
/**
*
* Specific facet labels to retrieve
*
*
* repeated string labels = 5;
* @param index The index of the element to return.
* @return The labels at the given index.
*/
public java.lang.String getLabels(int index) {
return labels_.get(index);
}
/**
*
* Specific facet labels to retrieve
*
*
* repeated string labels = 5;
* @param index The index of the value to return.
* @return The bytes of the labels at the given index.
*/
public com.google.protobuf.ByteString
getLabelsBytes(int index) {
return labels_.getByteString(index);
}
/**
*
* Specific facet labels to retrieve
*
*
* repeated string labels = 5;
* @param index The index to set the value at.
* @param value The labels to set.
* @return This builder for chaining.
*/
public Builder setLabels(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureLabelsIsMutable();
labels_.set(index, value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Specific facet labels to retrieve
*
*
* repeated string labels = 5;
* @param value The labels to add.
* @return This builder for chaining.
*/
public Builder addLabels(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureLabelsIsMutable();
labels_.add(value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Specific facet labels to retrieve
*
*
* repeated string labels = 5;
* @param values The labels to add.
* @return This builder for chaining.
*/
public Builder addAllLabels(
java.lang.Iterable values) {
ensureLabelsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, labels_);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Specific facet labels to retrieve
*
*
* repeated string labels = 5;
* @return This builder for chaining.
*/
public Builder clearLabels() {
labels_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);;
onChanged();
return this;
}
/**
*
* Specific facet labels to retrieve
*
*
* repeated string labels = 5;
* @param value The bytes of the labels to add.
* @return This builder for chaining.
*/
public Builder addLabelsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureLabelsIsMutable();
labels_.add(value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private int topN_ ;
/**
*
*How many top facets to return
*
*
* int32 topN = 6;
* @return The topN.
*/
@java.lang.Override
public int getTopN() {
return topN_;
}
/**
*
*How many top facets to return
*
*
* int32 topN = 6;
* @param value The topN to set.
* @return This builder for chaining.
*/
public Builder setTopN(int value) {
topN_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*How many top facets to return
*
*
* int32 topN = 6;
* @return This builder for chaining.
*/
public Builder clearTopN() {
bitField0_ = (bitField0_ & ~0x00000020);
topN_ = 0;
onChanged();
return this;
}
private com.yelp.nrtsearch.server.grpc.Script script_;
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_;
/**
*
*FacetScript definition to use in place of index facet
*
*
* .luceneserver.Script script = 7;
* @return Whether the script field is set.
*/
public boolean hasScript() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*FacetScript definition to use in place of index facet
*
*
* .luceneserver.Script script = 7;
* @return The script.
*/
public com.yelp.nrtsearch.server.grpc.Script getScript() {
if (scriptBuilder_ == null) {
return script_ == null ? com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance() : script_;
} else {
return scriptBuilder_.getMessage();
}
}
/**
*
*FacetScript definition to use in place of index facet
*
*
* .luceneserver.Script script = 7;
*/
public Builder setScript(com.yelp.nrtsearch.server.grpc.Script value) {
if (scriptBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
script_ = value;
} else {
scriptBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*FacetScript definition to use in place of index facet
*
*
* .luceneserver.Script script = 7;
*/
public Builder setScript(
com.yelp.nrtsearch.server.grpc.Script.Builder builderForValue) {
if (scriptBuilder_ == null) {
script_ = builderForValue.build();
} else {
scriptBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*FacetScript definition to use in place of index facet
*
*
* .luceneserver.Script script = 7;
*/
public Builder mergeScript(com.yelp.nrtsearch.server.grpc.Script value) {
if (scriptBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0) &&
script_ != null &&
script_ != com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance()) {
getScriptBuilder().mergeFrom(value);
} else {
script_ = value;
}
} else {
scriptBuilder_.mergeFrom(value);
}
if (script_ != null) {
bitField0_ |= 0x00000040;
onChanged();
}
return this;
}
/**
*
*FacetScript definition to use in place of index facet
*
*
* .luceneserver.Script script = 7;
*/
public Builder clearScript() {
bitField0_ = (bitField0_ & ~0x00000040);
script_ = null;
if (scriptBuilder_ != null) {
scriptBuilder_.dispose();
scriptBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*FacetScript definition to use in place of index facet
*
*
* .luceneserver.Script script = 7;
*/
public com.yelp.nrtsearch.server.grpc.Script.Builder getScriptBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getScriptFieldBuilder().getBuilder();
}
/**
*
*FacetScript definition to use in place of index facet
*
*
* .luceneserver.Script script = 7;
*/
public com.yelp.nrtsearch.server.grpc.ScriptOrBuilder getScriptOrBuilder() {
if (scriptBuilder_ != null) {
return scriptBuilder_.getMessageOrBuilder();
} else {
return script_ == null ?
com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance() : script_;
}
}
/**
*
*FacetScript definition to use in place of index facet
*
*
* .luceneserver.Script script = 7;
*/
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) {
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>(
getScript(),
getParentForChildren(),
isClean());
script_ = null;
}
return scriptBuilder_;
}
private int sampleTopDocs_ ;
/**
*
*Facet over the top N ranked documents, instead of all hits. Only works with field doc values.
*
*
* int32 sampleTopDocs = 8;
* @return The sampleTopDocs.
*/
@java.lang.Override
public int getSampleTopDocs() {
return sampleTopDocs_;
}
/**
*
*Facet over the top N ranked documents, instead of all hits. Only works with field doc values.
*
*
* int32 sampleTopDocs = 8;
* @param value The sampleTopDocs to set.
* @return This builder for chaining.
*/
public Builder setSampleTopDocs(int value) {
sampleTopDocs_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*Facet over the top N ranked documents, instead of all hits. Only works with field doc values.
*
*
* int32 sampleTopDocs = 8;
* @return This builder for chaining.
*/
public Builder clearSampleTopDocs() {
bitField0_ = (bitField0_ & ~0x00000080);
sampleTopDocs_ = 0;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
*
*Name for this facet
*
*
* string name = 9;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Name for this facet
*
*
* string name = 9;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Name for this facet
*
*
* string name = 9;
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
name_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*Name for this facet
*
*
* string name = 9;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000100);
onChanged();
return this;
}
/**
*
*Name for this facet
*
*
* string name = 9;
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000100;
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.Facet)
}
// @@protoc_insertion_point(class_scope:luceneserver.Facet)
private static final com.yelp.nrtsearch.server.grpc.Facet DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.Facet();
}
public static com.yelp.nrtsearch.server.grpc.Facet getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Facet 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.Facet getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}