All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yelp.nrtsearch.server.grpc.TermsCollector Maven / Gradle / Ivy

There is a newer version: 1.0.0-beta.1
Show newest version
// 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 term aggregating collector.
 * 
* * Protobuf type {@code luceneserver.TermsCollector} */ public final class TermsCollector extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:luceneserver.TermsCollector) TermsCollectorOrBuilder { private static final long serialVersionUID = 0L; // Use TermsCollector.newBuilder() to construct. private TermsCollector(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private TermsCollector() { } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new TermsCollector(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_TermsCollector_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_TermsCollector_fieldAccessorTable .ensureFieldAccessorsInitialized( com.yelp.nrtsearch.server.grpc.TermsCollector.class, com.yelp.nrtsearch.server.grpc.TermsCollector.Builder.class); } private int bitField0_; private int termsSourceCase_ = 0; @SuppressWarnings("serial") private java.lang.Object termsSource_; public enum TermsSourceCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { FIELD(1), SCRIPT(2), TERMSSOURCE_NOT_SET(0); private final int value; private TermsSourceCase(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 TermsSourceCase valueOf(int value) { return forNumber(value); } public static TermsSourceCase forNumber(int value) { switch (value) { case 1: return FIELD; case 2: return SCRIPT; case 0: return TERMSSOURCE_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public TermsSourceCase getTermsSourceCase() { return TermsSourceCase.forNumber( termsSourceCase_); } public static final int FIELD_FIELD_NUMBER = 1; /** *
   *Use field values for terms.
   * 
* * string field = 1; * @return Whether the field field is set. */ public boolean hasField() { return termsSourceCase_ == 1; } /** *
   *Use field values for terms.
   * 
* * string field = 1; * @return The field. */ public java.lang.String getField() { java.lang.Object ref = ""; if (termsSourceCase_ == 1) { ref = termsSource_; } 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(); if (termsSourceCase_ == 1) { termsSource_ = s; } return s; } } /** *
   *Use field values for terms.
   * 
* * string field = 1; * @return The bytes for field. */ public com.google.protobuf.ByteString getFieldBytes() { java.lang.Object ref = ""; if (termsSourceCase_ == 1) { ref = termsSource_; } if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (termsSourceCase_ == 1) { termsSource_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SCRIPT_FIELD_NUMBER = 2; /** *
   *Use FacetScript definition to produce terms.
   * 
* * .luceneserver.Script script = 2; * @return Whether the script field is set. */ @java.lang.Override public boolean hasScript() { return termsSourceCase_ == 2; } /** *
   *Use FacetScript definition to produce terms.
   * 
* * .luceneserver.Script script = 2; * @return The script. */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.Script getScript() { if (termsSourceCase_ == 2) { return (com.yelp.nrtsearch.server.grpc.Script) termsSource_; } return com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance(); } /** *
   *Use FacetScript definition to produce terms.
   * 
* * .luceneserver.Script script = 2; */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.ScriptOrBuilder getScriptOrBuilder() { if (termsSourceCase_ == 2) { return (com.yelp.nrtsearch.server.grpc.Script) termsSource_; } return com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance(); } public static final int SIZE_FIELD_NUMBER = 3; private int size_ = 0; /** *
   *Maximum number of top terms to return.
   * 
* * int32 size = 3; * @return The size. */ @java.lang.Override public int getSize() { return size_; } public static final int ORDER_FIELD_NUMBER = 4; private com.yelp.nrtsearch.server.grpc.BucketOrder order_; /** *
   *How results Buckets should be ordered, defaults to descending Bucket _count.
   * 
* * .luceneserver.BucketOrder order = 4; * @return Whether the order field is set. */ @java.lang.Override public boolean hasOrder() { return ((bitField0_ & 0x00000001) != 0); } /** *
   *How results Buckets should be ordered, defaults to descending Bucket _count.
   * 
* * .luceneserver.BucketOrder order = 4; * @return The order. */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.BucketOrder getOrder() { return order_ == null ? com.yelp.nrtsearch.server.grpc.BucketOrder.getDefaultInstance() : order_; } /** *
   *How results Buckets should be ordered, defaults to descending Bucket _count.
   * 
* * .luceneserver.BucketOrder order = 4; */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.BucketOrderOrBuilder getOrderOrBuilder() { return order_ == null ? com.yelp.nrtsearch.server.grpc.BucketOrder.getDefaultInstance() : order_; } 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 (termsSourceCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, termsSource_); } if (termsSourceCase_ == 2) { output.writeMessage(2, (com.yelp.nrtsearch.server.grpc.Script) termsSource_); } if (size_ != 0) { output.writeInt32(3, size_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(4, getOrder()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (termsSourceCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, termsSource_); } if (termsSourceCase_ == 2) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, (com.yelp.nrtsearch.server.grpc.Script) termsSource_); } if (size_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, size_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getOrder()); } 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.TermsCollector)) { return super.equals(obj); } com.yelp.nrtsearch.server.grpc.TermsCollector other = (com.yelp.nrtsearch.server.grpc.TermsCollector) obj; if (getSize() != other.getSize()) return false; if (hasOrder() != other.hasOrder()) return false; if (hasOrder()) { if (!getOrder() .equals(other.getOrder())) return false; } if (!getTermsSourceCase().equals(other.getTermsSourceCase())) return false; switch (termsSourceCase_) { case 1: if (!getField() .equals(other.getField())) return false; break; case 2: 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(); hash = (37 * hash) + SIZE_FIELD_NUMBER; hash = (53 * hash) + getSize(); if (hasOrder()) { hash = (37 * hash) + ORDER_FIELD_NUMBER; hash = (53 * hash) + getOrder().hashCode(); } switch (termsSourceCase_) { case 1: hash = (37 * hash) + FIELD_FIELD_NUMBER; hash = (53 * hash) + getField().hashCode(); break; case 2: 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.TermsCollector parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.TermsCollector 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.TermsCollector parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.TermsCollector 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.TermsCollector parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.TermsCollector 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.TermsCollector parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.yelp.nrtsearch.server.grpc.TermsCollector 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.TermsCollector parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.yelp.nrtsearch.server.grpc.TermsCollector 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.TermsCollector 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.TermsCollector 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.TermsCollector 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 term aggregating collector.
   * 
* * Protobuf type {@code luceneserver.TermsCollector} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:luceneserver.TermsCollector) com.yelp.nrtsearch.server.grpc.TermsCollectorOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_TermsCollector_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_TermsCollector_fieldAccessorTable .ensureFieldAccessorsInitialized( com.yelp.nrtsearch.server.grpc.TermsCollector.class, com.yelp.nrtsearch.server.grpc.TermsCollector.Builder.class); } // Construct using com.yelp.nrtsearch.server.grpc.TermsCollector.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getOrderFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (scriptBuilder_ != null) { scriptBuilder_.clear(); } size_ = 0; order_ = null; if (orderBuilder_ != null) { orderBuilder_.dispose(); orderBuilder_ = null; } termsSourceCase_ = 0; termsSource_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_TermsCollector_descriptor; } @java.lang.Override public com.yelp.nrtsearch.server.grpc.TermsCollector getDefaultInstanceForType() { return com.yelp.nrtsearch.server.grpc.TermsCollector.getDefaultInstance(); } @java.lang.Override public com.yelp.nrtsearch.server.grpc.TermsCollector build() { com.yelp.nrtsearch.server.grpc.TermsCollector result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.yelp.nrtsearch.server.grpc.TermsCollector buildPartial() { com.yelp.nrtsearch.server.grpc.TermsCollector result = new com.yelp.nrtsearch.server.grpc.TermsCollector(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(com.yelp.nrtsearch.server.grpc.TermsCollector result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000004) != 0)) { result.size_ = size_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000008) != 0)) { result.order_ = orderBuilder_ == null ? order_ : orderBuilder_.build(); to_bitField0_ |= 0x00000001; } result.bitField0_ |= to_bitField0_; } private void buildPartialOneofs(com.yelp.nrtsearch.server.grpc.TermsCollector result) { result.termsSourceCase_ = termsSourceCase_; result.termsSource_ = this.termsSource_; if (termsSourceCase_ == 2 && scriptBuilder_ != null) { result.termsSource_ = 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.TermsCollector) { return mergeFrom((com.yelp.nrtsearch.server.grpc.TermsCollector)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.TermsCollector other) { if (other == com.yelp.nrtsearch.server.grpc.TermsCollector.getDefaultInstance()) return this; if (other.getSize() != 0) { setSize(other.getSize()); } if (other.hasOrder()) { mergeOrder(other.getOrder()); } switch (other.getTermsSourceCase()) { case FIELD: { termsSourceCase_ = 1; termsSource_ = other.termsSource_; onChanged(); break; } case SCRIPT: { mergeScript(other.getScript()); break; } case TERMSSOURCE_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: { java.lang.String s = input.readStringRequireUtf8(); termsSourceCase_ = 1; termsSource_ = s; break; } // case 10 case 18: { input.readMessage( getScriptFieldBuilder().getBuilder(), extensionRegistry); termsSourceCase_ = 2; break; } // case 18 case 24: { size_ = input.readInt32(); bitField0_ |= 0x00000004; break; } // case 24 case 34: { input.readMessage( getOrderFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000008; break; } // case 34 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int termsSourceCase_ = 0; private java.lang.Object termsSource_; public TermsSourceCase getTermsSourceCase() { return TermsSourceCase.forNumber( termsSourceCase_); } public Builder clearTermsSource() { termsSourceCase_ = 0; termsSource_ = null; onChanged(); return this; } private int bitField0_; /** *
     *Use field values for terms.
     * 
* * string field = 1; * @return Whether the field field is set. */ @java.lang.Override public boolean hasField() { return termsSourceCase_ == 1; } /** *
     *Use field values for terms.
     * 
* * string field = 1; * @return The field. */ @java.lang.Override public java.lang.String getField() { java.lang.Object ref = ""; if (termsSourceCase_ == 1) { ref = termsSource_; } if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); if (termsSourceCase_ == 1) { termsSource_ = s; } return s; } else { return (java.lang.String) ref; } } /** *
     *Use field values for terms.
     * 
* * string field = 1; * @return The bytes for field. */ @java.lang.Override public com.google.protobuf.ByteString getFieldBytes() { java.lang.Object ref = ""; if (termsSourceCase_ == 1) { ref = termsSource_; } if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); if (termsSourceCase_ == 1) { termsSource_ = b; } return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     *Use field values for terms.
     * 
* * string field = 1; * @param value The field to set. * @return This builder for chaining. */ public Builder setField( java.lang.String value) { if (value == null) { throw new NullPointerException(); } termsSourceCase_ = 1; termsSource_ = value; onChanged(); return this; } /** *
     *Use field values for terms.
     * 
* * string field = 1; * @return This builder for chaining. */ public Builder clearField() { if (termsSourceCase_ == 1) { termsSourceCase_ = 0; termsSource_ = null; onChanged(); } return this; } /** *
     *Use field values for terms.
     * 
* * string field = 1; * @param value The bytes for field to set. * @return This builder for chaining. */ public Builder setFieldBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); termsSourceCase_ = 1; termsSource_ = value; onChanged(); return this; } 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_; /** *
     *Use FacetScript definition to produce terms.
     * 
* * .luceneserver.Script script = 2; * @return Whether the script field is set. */ @java.lang.Override public boolean hasScript() { return termsSourceCase_ == 2; } /** *
     *Use FacetScript definition to produce terms.
     * 
* * .luceneserver.Script script = 2; * @return The script. */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.Script getScript() { if (scriptBuilder_ == null) { if (termsSourceCase_ == 2) { return (com.yelp.nrtsearch.server.grpc.Script) termsSource_; } return com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance(); } else { if (termsSourceCase_ == 2) { return scriptBuilder_.getMessage(); } return com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance(); } } /** *
     *Use FacetScript definition to produce terms.
     * 
* * .luceneserver.Script script = 2; */ public Builder setScript(com.yelp.nrtsearch.server.grpc.Script value) { if (scriptBuilder_ == null) { if (value == null) { throw new NullPointerException(); } termsSource_ = value; onChanged(); } else { scriptBuilder_.setMessage(value); } termsSourceCase_ = 2; return this; } /** *
     *Use FacetScript definition to produce terms.
     * 
* * .luceneserver.Script script = 2; */ public Builder setScript( com.yelp.nrtsearch.server.grpc.Script.Builder builderForValue) { if (scriptBuilder_ == null) { termsSource_ = builderForValue.build(); onChanged(); } else { scriptBuilder_.setMessage(builderForValue.build()); } termsSourceCase_ = 2; return this; } /** *
     *Use FacetScript definition to produce terms.
     * 
* * .luceneserver.Script script = 2; */ public Builder mergeScript(com.yelp.nrtsearch.server.grpc.Script value) { if (scriptBuilder_ == null) { if (termsSourceCase_ == 2 && termsSource_ != com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance()) { termsSource_ = com.yelp.nrtsearch.server.grpc.Script.newBuilder((com.yelp.nrtsearch.server.grpc.Script) termsSource_) .mergeFrom(value).buildPartial(); } else { termsSource_ = value; } onChanged(); } else { if (termsSourceCase_ == 2) { scriptBuilder_.mergeFrom(value); } else { scriptBuilder_.setMessage(value); } } termsSourceCase_ = 2; return this; } /** *
     *Use FacetScript definition to produce terms.
     * 
* * .luceneserver.Script script = 2; */ public Builder clearScript() { if (scriptBuilder_ == null) { if (termsSourceCase_ == 2) { termsSourceCase_ = 0; termsSource_ = null; onChanged(); } } else { if (termsSourceCase_ == 2) { termsSourceCase_ = 0; termsSource_ = null; } scriptBuilder_.clear(); } return this; } /** *
     *Use FacetScript definition to produce terms.
     * 
* * .luceneserver.Script script = 2; */ public com.yelp.nrtsearch.server.grpc.Script.Builder getScriptBuilder() { return getScriptFieldBuilder().getBuilder(); } /** *
     *Use FacetScript definition to produce terms.
     * 
* * .luceneserver.Script script = 2; */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.ScriptOrBuilder getScriptOrBuilder() { if ((termsSourceCase_ == 2) && (scriptBuilder_ != null)) { return scriptBuilder_.getMessageOrBuilder(); } else { if (termsSourceCase_ == 2) { return (com.yelp.nrtsearch.server.grpc.Script) termsSource_; } return com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance(); } } /** *
     *Use FacetScript definition to produce terms.
     * 
* * .luceneserver.Script script = 2; */ 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 (!(termsSourceCase_ == 2)) { termsSource_ = 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) termsSource_, getParentForChildren(), isClean()); termsSource_ = null; } termsSourceCase_ = 2; onChanged(); return scriptBuilder_; } private int size_ ; /** *
     *Maximum number of top terms to return.
     * 
* * int32 size = 3; * @return The size. */ @java.lang.Override public int getSize() { return size_; } /** *
     *Maximum number of top terms to return.
     * 
* * int32 size = 3; * @param value The size to set. * @return This builder for chaining. */ public Builder setSize(int value) { size_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     *Maximum number of top terms to return.
     * 
* * int32 size = 3; * @return This builder for chaining. */ public Builder clearSize() { bitField0_ = (bitField0_ & ~0x00000004); size_ = 0; onChanged(); return this; } private com.yelp.nrtsearch.server.grpc.BucketOrder order_; private com.google.protobuf.SingleFieldBuilderV3< com.yelp.nrtsearch.server.grpc.BucketOrder, com.yelp.nrtsearch.server.grpc.BucketOrder.Builder, com.yelp.nrtsearch.server.grpc.BucketOrderOrBuilder> orderBuilder_; /** *
     *How results Buckets should be ordered, defaults to descending Bucket _count.
     * 
* * .luceneserver.BucketOrder order = 4; * @return Whether the order field is set. */ public boolean hasOrder() { return ((bitField0_ & 0x00000008) != 0); } /** *
     *How results Buckets should be ordered, defaults to descending Bucket _count.
     * 
* * .luceneserver.BucketOrder order = 4; * @return The order. */ public com.yelp.nrtsearch.server.grpc.BucketOrder getOrder() { if (orderBuilder_ == null) { return order_ == null ? com.yelp.nrtsearch.server.grpc.BucketOrder.getDefaultInstance() : order_; } else { return orderBuilder_.getMessage(); } } /** *
     *How results Buckets should be ordered, defaults to descending Bucket _count.
     * 
* * .luceneserver.BucketOrder order = 4; */ public Builder setOrder(com.yelp.nrtsearch.server.grpc.BucketOrder value) { if (orderBuilder_ == null) { if (value == null) { throw new NullPointerException(); } order_ = value; } else { orderBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     *How results Buckets should be ordered, defaults to descending Bucket _count.
     * 
* * .luceneserver.BucketOrder order = 4; */ public Builder setOrder( com.yelp.nrtsearch.server.grpc.BucketOrder.Builder builderForValue) { if (orderBuilder_ == null) { order_ = builderForValue.build(); } else { orderBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     *How results Buckets should be ordered, defaults to descending Bucket _count.
     * 
* * .luceneserver.BucketOrder order = 4; */ public Builder mergeOrder(com.yelp.nrtsearch.server.grpc.BucketOrder value) { if (orderBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && order_ != null && order_ != com.yelp.nrtsearch.server.grpc.BucketOrder.getDefaultInstance()) { getOrderBuilder().mergeFrom(value); } else { order_ = value; } } else { orderBuilder_.mergeFrom(value); } if (order_ != null) { bitField0_ |= 0x00000008; onChanged(); } return this; } /** *
     *How results Buckets should be ordered, defaults to descending Bucket _count.
     * 
* * .luceneserver.BucketOrder order = 4; */ public Builder clearOrder() { bitField0_ = (bitField0_ & ~0x00000008); order_ = null; if (orderBuilder_ != null) { orderBuilder_.dispose(); orderBuilder_ = null; } onChanged(); return this; } /** *
     *How results Buckets should be ordered, defaults to descending Bucket _count.
     * 
* * .luceneserver.BucketOrder order = 4; */ public com.yelp.nrtsearch.server.grpc.BucketOrder.Builder getOrderBuilder() { bitField0_ |= 0x00000008; onChanged(); return getOrderFieldBuilder().getBuilder(); } /** *
     *How results Buckets should be ordered, defaults to descending Bucket _count.
     * 
* * .luceneserver.BucketOrder order = 4; */ public com.yelp.nrtsearch.server.grpc.BucketOrderOrBuilder getOrderOrBuilder() { if (orderBuilder_ != null) { return orderBuilder_.getMessageOrBuilder(); } else { return order_ == null ? com.yelp.nrtsearch.server.grpc.BucketOrder.getDefaultInstance() : order_; } } /** *
     *How results Buckets should be ordered, defaults to descending Bucket _count.
     * 
* * .luceneserver.BucketOrder order = 4; */ private com.google.protobuf.SingleFieldBuilderV3< com.yelp.nrtsearch.server.grpc.BucketOrder, com.yelp.nrtsearch.server.grpc.BucketOrder.Builder, com.yelp.nrtsearch.server.grpc.BucketOrderOrBuilder> getOrderFieldBuilder() { if (orderBuilder_ == null) { orderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.yelp.nrtsearch.server.grpc.BucketOrder, com.yelp.nrtsearch.server.grpc.BucketOrder.Builder, com.yelp.nrtsearch.server.grpc.BucketOrderOrBuilder>( getOrder(), getParentForChildren(), isClean()); order_ = null; } return orderBuilder_; } @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.TermsCollector) } // @@protoc_insertion_point(class_scope:luceneserver.TermsCollector) private static final com.yelp.nrtsearch.server.grpc.TermsCollector DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.TermsCollector(); } public static com.yelp.nrtsearch.server.grpc.TermsCollector getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public TermsCollector 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.TermsCollector getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy