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

com.yelp.nrtsearch.server.grpc.BucketResult 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;

/**
 * Protobuf type {@code luceneserver.BucketResult}
 */
public final class BucketResult extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:luceneserver.BucketResult)
    BucketResultOrBuilder {
private static final long serialVersionUID = 0L;
  // Use BucketResult.newBuilder() to construct.
  private BucketResult(com.google.protobuf.GeneratedMessageV3.Builder builder) {
    super(builder);
  }
  private BucketResult() {
    buckets_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new BucketResult();
  }

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_BucketResult_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_BucketResult_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.yelp.nrtsearch.server.grpc.BucketResult.class, com.yelp.nrtsearch.server.grpc.BucketResult.Builder.class);
  }

  public interface BucketOrBuilder extends
      // @@protoc_insertion_point(interface_extends:luceneserver.BucketResult.Bucket)
      com.google.protobuf.MessageOrBuilder {

    /**
     * string key = 1;
     * @return The key.
     */
    java.lang.String getKey();
    /**
     * string key = 1;
     * @return The bytes for key.
     */
    com.google.protobuf.ByteString
        getKeyBytes();

    /**
     * int32 count = 2;
     * @return The count.
     */
    int getCount();

    /**
     * 
     *Nested collector results for sub-aggregations of this bucket.
     * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ int getNestedCollectorResultsCount(); /** *
     *Nested collector results for sub-aggregations of this bucket.
     * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ boolean containsNestedCollectorResults( java.lang.String key); /** * Use {@link #getNestedCollectorResultsMap()} instead. */ @java.lang.Deprecated java.util.Map getNestedCollectorResults(); /** *
     *Nested collector results for sub-aggregations of this bucket.
     * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ java.util.Map getNestedCollectorResultsMap(); /** *
     *Nested collector results for sub-aggregations of this bucket.
     * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ /* nullable */ com.yelp.nrtsearch.server.grpc.CollectorResult getNestedCollectorResultsOrDefault( java.lang.String key, /* nullable */ com.yelp.nrtsearch.server.grpc.CollectorResult defaultValue); /** *
     *Nested collector results for sub-aggregations of this bucket.
     * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ com.yelp.nrtsearch.server.grpc.CollectorResult getNestedCollectorResultsOrThrow( java.lang.String key); } /** * Protobuf type {@code luceneserver.BucketResult.Bucket} */ public static final class Bucket extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:luceneserver.BucketResult.Bucket) BucketOrBuilder { private static final long serialVersionUID = 0L; // Use Bucket.newBuilder() to construct. private Bucket(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private Bucket() { key_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new Bucket(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_BucketResult_Bucket_descriptor; } @SuppressWarnings({"rawtypes"}) @java.lang.Override protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 8: return internalGetNestedCollectorResults(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_BucketResult_Bucket_fieldAccessorTable .ensureFieldAccessorsInitialized( com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.class, com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.Builder.class); } public static final int KEY_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object key_ = ""; /** * string key = 1; * @return The key. */ @java.lang.Override public java.lang.String getKey() { java.lang.Object ref = key_; 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(); key_ = s; return s; } } /** * string key = 1; * @return The bytes for key. */ @java.lang.Override public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int COUNT_FIELD_NUMBER = 2; private int count_ = 0; /** * int32 count = 2; * @return The count. */ @java.lang.Override public int getCount() { return count_; } public static final int NESTEDCOLLECTORRESULTS_FIELD_NUMBER = 8; private static final class NestedCollectorResultsDefaultEntryHolder { static final com.google.protobuf.MapEntry< java.lang.String, com.yelp.nrtsearch.server.grpc.CollectorResult> defaultEntry = com.google.protobuf.MapEntry .newDefaultInstance( com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_BucketResult_Bucket_NestedCollectorResultsEntry_descriptor, com.google.protobuf.WireFormat.FieldType.STRING, "", com.google.protobuf.WireFormat.FieldType.MESSAGE, com.yelp.nrtsearch.server.grpc.CollectorResult.getDefaultInstance()); } @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, com.yelp.nrtsearch.server.grpc.CollectorResult> nestedCollectorResults_; private com.google.protobuf.MapField internalGetNestedCollectorResults() { if (nestedCollectorResults_ == null) { return com.google.protobuf.MapField.emptyMapField( NestedCollectorResultsDefaultEntryHolder.defaultEntry); } return nestedCollectorResults_; } public int getNestedCollectorResultsCount() { return internalGetNestedCollectorResults().getMap().size(); } /** *
     *Nested collector results for sub-aggregations of this bucket.
     * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ @java.lang.Override public boolean containsNestedCollectorResults( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetNestedCollectorResults().getMap().containsKey(key); } /** * Use {@link #getNestedCollectorResultsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getNestedCollectorResults() { return getNestedCollectorResultsMap(); } /** *
     *Nested collector results for sub-aggregations of this bucket.
     * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ @java.lang.Override public java.util.Map getNestedCollectorResultsMap() { return internalGetNestedCollectorResults().getMap(); } /** *
     *Nested collector results for sub-aggregations of this bucket.
     * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ @java.lang.Override public /* nullable */ com.yelp.nrtsearch.server.grpc.CollectorResult getNestedCollectorResultsOrDefault( java.lang.String key, /* nullable */ com.yelp.nrtsearch.server.grpc.CollectorResult defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetNestedCollectorResults().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; } /** *
     *Nested collector results for sub-aggregations of this bucket.
     * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.CollectorResult getNestedCollectorResultsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetNestedCollectorResults().getMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return map.get(key); } 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(key_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); } if (count_ != 0) { output.writeInt32(2, count_); } com.google.protobuf.GeneratedMessageV3 .serializeStringMapTo( output, internalGetNestedCollectorResults(), NestedCollectorResultsDefaultEntryHolder.defaultEntry, 8); 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(key_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); } if (count_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, count_); } for (java.util.Map.Entry entry : internalGetNestedCollectorResults().getMap().entrySet()) { com.google.protobuf.MapEntry nestedCollectorResults__ = NestedCollectorResultsDefaultEntryHolder.defaultEntry.newBuilderForType() .setKey(entry.getKey()) .setValue(entry.getValue()) .build(); size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, nestedCollectorResults__); } 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.BucketResult.Bucket)) { return super.equals(obj); } com.yelp.nrtsearch.server.grpc.BucketResult.Bucket other = (com.yelp.nrtsearch.server.grpc.BucketResult.Bucket) obj; if (!getKey() .equals(other.getKey())) return false; if (getCount() != other.getCount()) return false; if (!internalGetNestedCollectorResults().equals( other.internalGetNestedCollectorResults())) 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) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); hash = (37 * hash) + COUNT_FIELD_NUMBER; hash = (53 * hash) + getCount(); if (!internalGetNestedCollectorResults().getMap().isEmpty()) { hash = (37 * hash) + NESTEDCOLLECTORRESULTS_FIELD_NUMBER; hash = (53 * hash) + internalGetNestedCollectorResults().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.yelp.nrtsearch.server.grpc.BucketResult.Bucket parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.BucketResult.Bucket 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.BucketResult.Bucket parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.BucketResult.Bucket 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.BucketResult.Bucket parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.BucketResult.Bucket 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.BucketResult.Bucket parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.yelp.nrtsearch.server.grpc.BucketResult.Bucket 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.BucketResult.Bucket parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.yelp.nrtsearch.server.grpc.BucketResult.Bucket 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.BucketResult.Bucket 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.BucketResult.Bucket 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.BucketResult.Bucket 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.BucketResult.Bucket} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:luceneserver.BucketResult.Bucket) com.yelp.nrtsearch.server.grpc.BucketResult.BucketOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_BucketResult_Bucket_descriptor; } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 8: return internalGetNestedCollectorResults(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 8: return internalGetMutableNestedCollectorResults(); default: throw new RuntimeException( "Invalid map field number: " + number); } } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_BucketResult_Bucket_fieldAccessorTable .ensureFieldAccessorsInitialized( com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.class, com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.Builder.class); } // Construct using com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; key_ = ""; count_ = 0; internalGetMutableNestedCollectorResults().clear(); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_BucketResult_Bucket_descriptor; } @java.lang.Override public com.yelp.nrtsearch.server.grpc.BucketResult.Bucket getDefaultInstanceForType() { return com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.getDefaultInstance(); } @java.lang.Override public com.yelp.nrtsearch.server.grpc.BucketResult.Bucket build() { com.yelp.nrtsearch.server.grpc.BucketResult.Bucket result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.yelp.nrtsearch.server.grpc.BucketResult.Bucket buildPartial() { com.yelp.nrtsearch.server.grpc.BucketResult.Bucket result = new com.yelp.nrtsearch.server.grpc.BucketResult.Bucket(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.yelp.nrtsearch.server.grpc.BucketResult.Bucket result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.key_ = key_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.count_ = count_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.nestedCollectorResults_ = internalGetNestedCollectorResults().build(NestedCollectorResultsDefaultEntryHolder.defaultEntry); } } @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.BucketResult.Bucket) { return mergeFrom((com.yelp.nrtsearch.server.grpc.BucketResult.Bucket)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.BucketResult.Bucket other) { if (other == com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.getDefaultInstance()) return this; if (!other.getKey().isEmpty()) { key_ = other.key_; bitField0_ |= 0x00000001; onChanged(); } if (other.getCount() != 0) { setCount(other.getCount()); } internalGetMutableNestedCollectorResults().mergeFrom( other.internalGetNestedCollectorResults()); bitField0_ |= 0x00000004; 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: { key_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 16: { count_ = input.readInt32(); bitField0_ |= 0x00000002; break; } // case 16 case 66: { com.google.protobuf.MapEntry nestedCollectorResults__ = input.readMessage( NestedCollectorResultsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); internalGetMutableNestedCollectorResults().ensureBuilderMap().put( nestedCollectorResults__.getKey(), nestedCollectorResults__.getValue()); bitField0_ |= 0x00000004; break; } // case 66 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 key_ = ""; /** * string key = 1; * @return The key. */ public java.lang.String getKey() { java.lang.Object ref = key_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); key_ = s; return s; } else { return (java.lang.String) ref; } } /** * string key = 1; * @return The bytes for key. */ public com.google.protobuf.ByteString getKeyBytes() { java.lang.Object ref = key_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); key_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * string key = 1; * @param value The key to set. * @return This builder for chaining. */ public Builder setKey( java.lang.String value) { if (value == null) { throw new NullPointerException(); } key_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** * string key = 1; * @return This builder for chaining. */ public Builder clearKey() { key_ = getDefaultInstance().getKey(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * string key = 1; * @param value The bytes for key to set. * @return This builder for chaining. */ public Builder setKeyBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); key_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private int count_ ; /** * int32 count = 2; * @return The count. */ @java.lang.Override public int getCount() { return count_; } /** * int32 count = 2; * @param value The count to set. * @return This builder for chaining. */ public Builder setCount(int value) { count_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * int32 count = 2; * @return This builder for chaining. */ public Builder clearCount() { bitField0_ = (bitField0_ & ~0x00000002); count_ = 0; onChanged(); return this; } private static final class NestedCollectorResultsConverter implements com.google.protobuf.MapFieldBuilder.Converter { @java.lang.Override public com.yelp.nrtsearch.server.grpc.CollectorResult build(com.yelp.nrtsearch.server.grpc.CollectorResultOrBuilder val) { if (val instanceof com.yelp.nrtsearch.server.grpc.CollectorResult) { return (com.yelp.nrtsearch.server.grpc.CollectorResult) val; } return ((com.yelp.nrtsearch.server.grpc.CollectorResult.Builder) val).build(); } @java.lang.Override public com.google.protobuf.MapEntry defaultEntry() { return NestedCollectorResultsDefaultEntryHolder.defaultEntry; } }; private static final NestedCollectorResultsConverter nestedCollectorResultsConverter = new NestedCollectorResultsConverter(); private com.google.protobuf.MapFieldBuilder< java.lang.String, com.yelp.nrtsearch.server.grpc.CollectorResultOrBuilder, com.yelp.nrtsearch.server.grpc.CollectorResult, com.yelp.nrtsearch.server.grpc.CollectorResult.Builder> nestedCollectorResults_; private com.google.protobuf.MapFieldBuilder internalGetNestedCollectorResults() { if (nestedCollectorResults_ == null) { return new com.google.protobuf.MapFieldBuilder<>(nestedCollectorResultsConverter); } return nestedCollectorResults_; } private com.google.protobuf.MapFieldBuilder internalGetMutableNestedCollectorResults() { if (nestedCollectorResults_ == null) { nestedCollectorResults_ = new com.google.protobuf.MapFieldBuilder<>(nestedCollectorResultsConverter); } bitField0_ |= 0x00000004; onChanged(); return nestedCollectorResults_; } public int getNestedCollectorResultsCount() { return internalGetNestedCollectorResults().ensureBuilderMap().size(); } /** *
       *Nested collector results for sub-aggregations of this bucket.
       * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ @java.lang.Override public boolean containsNestedCollectorResults( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } return internalGetNestedCollectorResults().ensureBuilderMap().containsKey(key); } /** * Use {@link #getNestedCollectorResultsMap()} instead. */ @java.lang.Override @java.lang.Deprecated public java.util.Map getNestedCollectorResults() { return getNestedCollectorResultsMap(); } /** *
       *Nested collector results for sub-aggregations of this bucket.
       * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ @java.lang.Override public java.util.Map getNestedCollectorResultsMap() { return internalGetNestedCollectorResults().getImmutableMap(); } /** *
       *Nested collector results for sub-aggregations of this bucket.
       * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ @java.lang.Override public /* nullable */ com.yelp.nrtsearch.server.grpc.CollectorResult getNestedCollectorResultsOrDefault( java.lang.String key, /* nullable */ com.yelp.nrtsearch.server.grpc.CollectorResult defaultValue) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetMutableNestedCollectorResults().ensureBuilderMap(); return map.containsKey(key) ? nestedCollectorResultsConverter.build(map.get(key)) : defaultValue; } /** *
       *Nested collector results for sub-aggregations of this bucket.
       * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.CollectorResult getNestedCollectorResultsOrThrow( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetMutableNestedCollectorResults().ensureBuilderMap(); if (!map.containsKey(key)) { throw new java.lang.IllegalArgumentException(); } return nestedCollectorResultsConverter.build(map.get(key)); } public Builder clearNestedCollectorResults() { bitField0_ = (bitField0_ & ~0x00000004); internalGetMutableNestedCollectorResults().clear(); return this; } /** *
       *Nested collector results for sub-aggregations of this bucket.
       * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ public Builder removeNestedCollectorResults( java.lang.String key) { if (key == null) { throw new NullPointerException("map key"); } internalGetMutableNestedCollectorResults().ensureBuilderMap() .remove(key); return this; } /** * Use alternate mutation accessors instead. */ @java.lang.Deprecated public java.util.Map getMutableNestedCollectorResults() { bitField0_ |= 0x00000004; return internalGetMutableNestedCollectorResults().ensureMessageMap(); } /** *
       *Nested collector results for sub-aggregations of this bucket.
       * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ public Builder putNestedCollectorResults( java.lang.String key, com.yelp.nrtsearch.server.grpc.CollectorResult value) { if (key == null) { throw new NullPointerException("map key"); } if (value == null) { throw new NullPointerException("map value"); } internalGetMutableNestedCollectorResults().ensureBuilderMap() .put(key, value); bitField0_ |= 0x00000004; return this; } /** *
       *Nested collector results for sub-aggregations of this bucket.
       * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ public Builder putAllNestedCollectorResults( java.util.Map values) { for (java.util.Map.Entry e : values.entrySet()) { if (e.getKey() == null || e.getValue() == null) { throw new NullPointerException(); } } internalGetMutableNestedCollectorResults().ensureBuilderMap() .putAll(values); bitField0_ |= 0x00000004; return this; } /** *
       *Nested collector results for sub-aggregations of this bucket.
       * 
* * map<string, .luceneserver.CollectorResult> nestedCollectorResults = 8; */ public com.yelp.nrtsearch.server.grpc.CollectorResult.Builder putNestedCollectorResultsBuilderIfAbsent( java.lang.String key) { java.util.Map builderMap = internalGetMutableNestedCollectorResults().ensureBuilderMap(); com.yelp.nrtsearch.server.grpc.CollectorResultOrBuilder entry = builderMap.get(key); if (entry == null) { entry = com.yelp.nrtsearch.server.grpc.CollectorResult.newBuilder(); builderMap.put(key, entry); } if (entry instanceof com.yelp.nrtsearch.server.grpc.CollectorResult) { entry = ((com.yelp.nrtsearch.server.grpc.CollectorResult) entry).toBuilder(); builderMap.put(key, entry); } return (com.yelp.nrtsearch.server.grpc.CollectorResult.Builder) entry; } @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.BucketResult.Bucket) } // @@protoc_insertion_point(class_scope:luceneserver.BucketResult.Bucket) private static final com.yelp.nrtsearch.server.grpc.BucketResult.Bucket DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.BucketResult.Bucket(); } public static com.yelp.nrtsearch.server.grpc.BucketResult.Bucket getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Bucket 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.BucketResult.Bucket getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int BUCKETS_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List buckets_; /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ @java.lang.Override public java.util.List getBucketsList() { return buckets_; } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ @java.lang.Override public java.util.List getBucketsOrBuilderList() { return buckets_; } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ @java.lang.Override public int getBucketsCount() { return buckets_.size(); } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.BucketResult.Bucket getBuckets(int index) { return buckets_.get(index); } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.BucketResult.BucketOrBuilder getBucketsOrBuilder( int index) { return buckets_.get(index); } public static final int TOTALBUCKETS_FIELD_NUMBER = 2; private int totalBuckets_ = 0; /** *
   *Number of unique buckets, including those not in the buckets list.
   * 
* * int32 totalBuckets = 2; * @return The totalBuckets. */ @java.lang.Override public int getTotalBuckets() { return totalBuckets_; } public static final int TOTALOTHERCOUNTS_FIELD_NUMBER = 3; private int totalOtherCounts_ = 0; /** *
   *Number of other collected counts not represented in the buckets' counts.
   * 
* * int32 totalOtherCounts = 3; * @return The totalOtherCounts. */ @java.lang.Override public int getTotalOtherCounts() { return totalOtherCounts_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < buckets_.size(); i++) { output.writeMessage(1, buckets_.get(i)); } if (totalBuckets_ != 0) { output.writeInt32(2, totalBuckets_); } if (totalOtherCounts_ != 0) { output.writeInt32(3, totalOtherCounts_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < buckets_.size(); i++) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, buckets_.get(i)); } if (totalBuckets_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, totalBuckets_); } if (totalOtherCounts_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, totalOtherCounts_); } 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.BucketResult)) { return super.equals(obj); } com.yelp.nrtsearch.server.grpc.BucketResult other = (com.yelp.nrtsearch.server.grpc.BucketResult) obj; if (!getBucketsList() .equals(other.getBucketsList())) return false; if (getTotalBuckets() != other.getTotalBuckets()) return false; if (getTotalOtherCounts() != other.getTotalOtherCounts()) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getBucketsCount() > 0) { hash = (37 * hash) + BUCKETS_FIELD_NUMBER; hash = (53 * hash) + getBucketsList().hashCode(); } hash = (37 * hash) + TOTALBUCKETS_FIELD_NUMBER; hash = (53 * hash) + getTotalBuckets(); hash = (37 * hash) + TOTALOTHERCOUNTS_FIELD_NUMBER; hash = (53 * hash) + getTotalOtherCounts(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.yelp.nrtsearch.server.grpc.BucketResult parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.BucketResult 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.BucketResult parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.BucketResult 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.BucketResult parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.BucketResult 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.BucketResult parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.yelp.nrtsearch.server.grpc.BucketResult 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.BucketResult parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.yelp.nrtsearch.server.grpc.BucketResult 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.BucketResult 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.BucketResult 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.BucketResult 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.BucketResult} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:luceneserver.BucketResult) com.yelp.nrtsearch.server.grpc.BucketResultOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_BucketResult_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_BucketResult_fieldAccessorTable .ensureFieldAccessorsInitialized( com.yelp.nrtsearch.server.grpc.BucketResult.class, com.yelp.nrtsearch.server.grpc.BucketResult.Builder.class); } // Construct using com.yelp.nrtsearch.server.grpc.BucketResult.newBuilder() private Builder() { } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (bucketsBuilder_ == null) { buckets_ = java.util.Collections.emptyList(); } else { buckets_ = null; bucketsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); totalBuckets_ = 0; totalOtherCounts_ = 0; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_BucketResult_descriptor; } @java.lang.Override public com.yelp.nrtsearch.server.grpc.BucketResult getDefaultInstanceForType() { return com.yelp.nrtsearch.server.grpc.BucketResult.getDefaultInstance(); } @java.lang.Override public com.yelp.nrtsearch.server.grpc.BucketResult build() { com.yelp.nrtsearch.server.grpc.BucketResult result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.yelp.nrtsearch.server.grpc.BucketResult buildPartial() { com.yelp.nrtsearch.server.grpc.BucketResult result = new com.yelp.nrtsearch.server.grpc.BucketResult(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields(com.yelp.nrtsearch.server.grpc.BucketResult result) { if (bucketsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { buckets_ = java.util.Collections.unmodifiableList(buckets_); bitField0_ = (bitField0_ & ~0x00000001); } result.buckets_ = buckets_; } else { result.buckets_ = bucketsBuilder_.build(); } } private void buildPartial0(com.yelp.nrtsearch.server.grpc.BucketResult result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000002) != 0)) { result.totalBuckets_ = totalBuckets_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.totalOtherCounts_ = totalOtherCounts_; } } @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.BucketResult) { return mergeFrom((com.yelp.nrtsearch.server.grpc.BucketResult)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.BucketResult other) { if (other == com.yelp.nrtsearch.server.grpc.BucketResult.getDefaultInstance()) return this; if (bucketsBuilder_ == null) { if (!other.buckets_.isEmpty()) { if (buckets_.isEmpty()) { buckets_ = other.buckets_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureBucketsIsMutable(); buckets_.addAll(other.buckets_); } onChanged(); } } else { if (!other.buckets_.isEmpty()) { if (bucketsBuilder_.isEmpty()) { bucketsBuilder_.dispose(); bucketsBuilder_ = null; buckets_ = other.buckets_; bitField0_ = (bitField0_ & ~0x00000001); bucketsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getBucketsFieldBuilder() : null; } else { bucketsBuilder_.addAllMessages(other.buckets_); } } } if (other.getTotalBuckets() != 0) { setTotalBuckets(other.getTotalBuckets()); } if (other.getTotalOtherCounts() != 0) { setTotalOtherCounts(other.getTotalOtherCounts()); } 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: { com.yelp.nrtsearch.server.grpc.BucketResult.Bucket m = input.readMessage( com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.parser(), extensionRegistry); if (bucketsBuilder_ == null) { ensureBucketsIsMutable(); buckets_.add(m); } else { bucketsBuilder_.addMessage(m); } break; } // case 10 case 16: { totalBuckets_ = input.readInt32(); bitField0_ |= 0x00000002; break; } // case 16 case 24: { totalOtherCounts_ = input.readInt32(); bitField0_ |= 0x00000004; break; } // case 24 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.util.List buckets_ = java.util.Collections.emptyList(); private void ensureBucketsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { buckets_ = new java.util.ArrayList(buckets_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.yelp.nrtsearch.server.grpc.BucketResult.Bucket, com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.Builder, com.yelp.nrtsearch.server.grpc.BucketResult.BucketOrBuilder> bucketsBuilder_; /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public java.util.List getBucketsList() { if (bucketsBuilder_ == null) { return java.util.Collections.unmodifiableList(buckets_); } else { return bucketsBuilder_.getMessageList(); } } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public int getBucketsCount() { if (bucketsBuilder_ == null) { return buckets_.size(); } else { return bucketsBuilder_.getCount(); } } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public com.yelp.nrtsearch.server.grpc.BucketResult.Bucket getBuckets(int index) { if (bucketsBuilder_ == null) { return buckets_.get(index); } else { return bucketsBuilder_.getMessage(index); } } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public Builder setBuckets( int index, com.yelp.nrtsearch.server.grpc.BucketResult.Bucket value) { if (bucketsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBucketsIsMutable(); buckets_.set(index, value); onChanged(); } else { bucketsBuilder_.setMessage(index, value); } return this; } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public Builder setBuckets( int index, com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.Builder builderForValue) { if (bucketsBuilder_ == null) { ensureBucketsIsMutable(); buckets_.set(index, builderForValue.build()); onChanged(); } else { bucketsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public Builder addBuckets(com.yelp.nrtsearch.server.grpc.BucketResult.Bucket value) { if (bucketsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBucketsIsMutable(); buckets_.add(value); onChanged(); } else { bucketsBuilder_.addMessage(value); } return this; } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public Builder addBuckets( int index, com.yelp.nrtsearch.server.grpc.BucketResult.Bucket value) { if (bucketsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBucketsIsMutable(); buckets_.add(index, value); onChanged(); } else { bucketsBuilder_.addMessage(index, value); } return this; } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public Builder addBuckets( com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.Builder builderForValue) { if (bucketsBuilder_ == null) { ensureBucketsIsMutable(); buckets_.add(builderForValue.build()); onChanged(); } else { bucketsBuilder_.addMessage(builderForValue.build()); } return this; } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public Builder addBuckets( int index, com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.Builder builderForValue) { if (bucketsBuilder_ == null) { ensureBucketsIsMutable(); buckets_.add(index, builderForValue.build()); onChanged(); } else { bucketsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public Builder addAllBuckets( java.lang.Iterable values) { if (bucketsBuilder_ == null) { ensureBucketsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, buckets_); onChanged(); } else { bucketsBuilder_.addAllMessages(values); } return this; } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public Builder clearBuckets() { if (bucketsBuilder_ == null) { buckets_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { bucketsBuilder_.clear(); } return this; } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public Builder removeBuckets(int index) { if (bucketsBuilder_ == null) { ensureBucketsIsMutable(); buckets_.remove(index); onChanged(); } else { bucketsBuilder_.remove(index); } return this; } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.Builder getBucketsBuilder( int index) { return getBucketsFieldBuilder().getBuilder(index); } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public com.yelp.nrtsearch.server.grpc.BucketResult.BucketOrBuilder getBucketsOrBuilder( int index) { if (bucketsBuilder_ == null) { return buckets_.get(index); } else { return bucketsBuilder_.getMessageOrBuilder(index); } } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public java.util.List getBucketsOrBuilderList() { if (bucketsBuilder_ != null) { return bucketsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(buckets_); } } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.Builder addBucketsBuilder() { return getBucketsFieldBuilder().addBuilder( com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.getDefaultInstance()); } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.Builder addBucketsBuilder( int index) { return getBucketsFieldBuilder().addBuilder( index, com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.getDefaultInstance()); } /** * repeated .luceneserver.BucketResult.Bucket buckets = 1; */ public java.util.List getBucketsBuilderList() { return getBucketsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.yelp.nrtsearch.server.grpc.BucketResult.Bucket, com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.Builder, com.yelp.nrtsearch.server.grpc.BucketResult.BucketOrBuilder> getBucketsFieldBuilder() { if (bucketsBuilder_ == null) { bucketsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.yelp.nrtsearch.server.grpc.BucketResult.Bucket, com.yelp.nrtsearch.server.grpc.BucketResult.Bucket.Builder, com.yelp.nrtsearch.server.grpc.BucketResult.BucketOrBuilder>( buckets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); buckets_ = null; } return bucketsBuilder_; } private int totalBuckets_ ; /** *
     *Number of unique buckets, including those not in the buckets list.
     * 
* * int32 totalBuckets = 2; * @return The totalBuckets. */ @java.lang.Override public int getTotalBuckets() { return totalBuckets_; } /** *
     *Number of unique buckets, including those not in the buckets list.
     * 
* * int32 totalBuckets = 2; * @param value The totalBuckets to set. * @return This builder for chaining. */ public Builder setTotalBuckets(int value) { totalBuckets_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     *Number of unique buckets, including those not in the buckets list.
     * 
* * int32 totalBuckets = 2; * @return This builder for chaining. */ public Builder clearTotalBuckets() { bitField0_ = (bitField0_ & ~0x00000002); totalBuckets_ = 0; onChanged(); return this; } private int totalOtherCounts_ ; /** *
     *Number of other collected counts not represented in the buckets' counts.
     * 
* * int32 totalOtherCounts = 3; * @return The totalOtherCounts. */ @java.lang.Override public int getTotalOtherCounts() { return totalOtherCounts_; } /** *
     *Number of other collected counts not represented in the buckets' counts.
     * 
* * int32 totalOtherCounts = 3; * @param value The totalOtherCounts to set. * @return This builder for chaining. */ public Builder setTotalOtherCounts(int value) { totalOtherCounts_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     *Number of other collected counts not represented in the buckets' counts.
     * 
* * int32 totalOtherCounts = 3; * @return This builder for chaining. */ public Builder clearTotalOtherCounts() { bitField0_ = (bitField0_ & ~0x00000004); totalOtherCounts_ = 0; 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.BucketResult) } // @@protoc_insertion_point(class_scope:luceneserver.BucketResult) private static final com.yelp.nrtsearch.server.grpc.BucketResult DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.BucketResult(); } public static com.yelp.nrtsearch.server.grpc.BucketResult getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public BucketResult 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.BucketResult getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy