// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/devtools/clouderrorreporting/v1beta1/error_stats_service.proto

package com.google.devtools.clouderrorreporting.v1beta1;

/**
 * <pre>
 * Specifies a set of `ErrorGroupStats` to return.
 * </pre>
 *
 * Protobuf type {@code google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest}
 */
public  final class ListGroupStatsRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest)
    ListGroupStatsRequestOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ListGroupStatsRequest.newBuilder() to construct.
  private ListGroupStatsRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private ListGroupStatsRequest() {
    projectName_ = "";
    groupId_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    alignment_ = 0;
    order_ = 0;
    pageSize_ = 0;
    pageToken_ = "";
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private ListGroupStatsRequest(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          default: {
            if (!parseUnknownFieldProto3(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

            projectName_ = s;
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
              groupId_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000002;
            }
            groupId_.add(s);
            break;
          }
          case 26: {
            com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter.Builder subBuilder = null;
            if (serviceFilter_ != null) {
              subBuilder = serviceFilter_.toBuilder();
            }
            serviceFilter_ = input.readMessage(com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(serviceFilter_);
              serviceFilter_ = subBuilder.buildPartial();
            }

            break;
          }
          case 42: {
            com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Builder subBuilder = null;
            if (timeRange_ != null) {
              subBuilder = timeRange_.toBuilder();
            }
            timeRange_ = input.readMessage(com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(timeRange_);
              timeRange_ = subBuilder.buildPartial();
            }

            break;
          }
          case 50: {
            com.google.protobuf.Duration.Builder subBuilder = null;
            if (timedCountDuration_ != null) {
              subBuilder = timedCountDuration_.toBuilder();
            }
            timedCountDuration_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(timedCountDuration_);
              timedCountDuration_ = subBuilder.buildPartial();
            }

            break;
          }
          case 56: {
            int rawValue = input.readEnum();

            alignment_ = rawValue;
            break;
          }
          case 66: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (alignmentTime_ != null) {
              subBuilder = alignmentTime_.toBuilder();
            }
            alignmentTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(alignmentTime_);
              alignmentTime_ = subBuilder.buildPartial();
            }

            break;
          }
          case 72: {
            int rawValue = input.readEnum();

            order_ = rawValue;
            break;
          }
          case 88: {

            pageSize_ = input.readInt32();
            break;
          }
          case 98: {
            java.lang.String s = input.readStringRequireUtf8();

            pageToken_ = s;
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
        groupId_ = groupId_.getUnmodifiableView();
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.devtools.clouderrorreporting.v1beta1.ErrorStatsServiceProto.internal_static_google_devtools_clouderrorreporting_v1beta1_ListGroupStatsRequest_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.devtools.clouderrorreporting.v1beta1.ErrorStatsServiceProto.internal_static_google_devtools_clouderrorreporting_v1beta1_ListGroupStatsRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.class, com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.Builder.class);
  }

  private int bitField0_;
  public static final int PROJECT_NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object projectName_;
  /**
   * <pre>
   * [Required] The resource name of the Google Cloud Platform project. Written
   * as &lt;code&gt;projects/&lt;/code&gt; plus the
   * &lt;a href="https://support.google.com/cloud/answer/6158840"&gt;Google Cloud
   * Platform project ID&lt;/a&gt;.
   * Example: &lt;code&gt;projects/my-project-123&lt;/code&gt;.
   * </pre>
   *
   * <code>string project_name = 1;</code>
   */
  public java.lang.String getProjectName() {
    java.lang.Object ref = projectName_;
    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();
      projectName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * [Required] The resource name of the Google Cloud Platform project. Written
   * as &lt;code&gt;projects/&lt;/code&gt; plus the
   * &lt;a href="https://support.google.com/cloud/answer/6158840"&gt;Google Cloud
   * Platform project ID&lt;/a&gt;.
   * Example: &lt;code&gt;projects/my-project-123&lt;/code&gt;.
   * </pre>
   *
   * <code>string project_name = 1;</code>
   */
  public com.google.protobuf.ByteString
      getProjectNameBytes() {
    java.lang.Object ref = projectName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      projectName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int GROUP_ID_FIELD_NUMBER = 2;
  private com.google.protobuf.LazyStringList groupId_;
  /**
   * <pre>
   * [Optional] List all &lt;code&gt;ErrorGroupStats&lt;/code&gt; with these IDs.
   * </pre>
   *
   * <code>repeated string group_id = 2;</code>
   */
  public com.google.protobuf.ProtocolStringList
      getGroupIdList() {
    return groupId_;
  }
  /**
   * <pre>
   * [Optional] List all &lt;code&gt;ErrorGroupStats&lt;/code&gt; with these IDs.
   * </pre>
   *
   * <code>repeated string group_id = 2;</code>
   */
  public int getGroupIdCount() {
    return groupId_.size();
  }
  /**
   * <pre>
   * [Optional] List all &lt;code&gt;ErrorGroupStats&lt;/code&gt; with these IDs.
   * </pre>
   *
   * <code>repeated string group_id = 2;</code>
   */
  public java.lang.String getGroupId(int index) {
    return groupId_.get(index);
  }
  /**
   * <pre>
   * [Optional] List all &lt;code&gt;ErrorGroupStats&lt;/code&gt; with these IDs.
   * </pre>
   *
   * <code>repeated string group_id = 2;</code>
   */
  public com.google.protobuf.ByteString
      getGroupIdBytes(int index) {
    return groupId_.getByteString(index);
  }

  public static final int SERVICE_FILTER_FIELD_NUMBER = 3;
  private com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter serviceFilter_;
  /**
   * <pre>
   * [Optional] List only &lt;code&gt;ErrorGroupStats&lt;/code&gt; which belong to a service
   * context that matches the filter.
   * Data for all service contexts is returned if this field is not specified.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3;</code>
   */
  public boolean hasServiceFilter() {
    return serviceFilter_ != null;
  }
  /**
   * <pre>
   * [Optional] List only &lt;code&gt;ErrorGroupStats&lt;/code&gt; which belong to a service
   * context that matches the filter.
   * Data for all service contexts is returned if this field is not specified.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter getServiceFilter() {
    return serviceFilter_ == null ? com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter.getDefaultInstance() : serviceFilter_;
  }
  /**
   * <pre>
   * [Optional] List only &lt;code&gt;ErrorGroupStats&lt;/code&gt; which belong to a service
   * context that matches the filter.
   * Data for all service contexts is returned if this field is not specified.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilterOrBuilder getServiceFilterOrBuilder() {
    return getServiceFilter();
  }

  public static final int TIME_RANGE_FIELD_NUMBER = 5;
  private com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange timeRange_;
  /**
   * <pre>
   * [Optional] List data for the given time range.
   * If not set a default time range is used. The field time_range_begin
   * in the response will specify the beginning of this time range.
   * Only &lt;code&gt;ErrorGroupStats&lt;/code&gt; with a non-zero count in the given time
   * range are returned, unless the request contains an explicit group_id list.
   * If a group_id list is given, also &lt;code&gt;ErrorGroupStats&lt;/code&gt; with zero
   * occurrences are returned.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5;</code>
   */
  public boolean hasTimeRange() {
    return timeRange_ != null;
  }
  /**
   * <pre>
   * [Optional] List data for the given time range.
   * If not set a default time range is used. The field time_range_begin
   * in the response will specify the beginning of this time range.
   * Only &lt;code&gt;ErrorGroupStats&lt;/code&gt; with a non-zero count in the given time
   * range are returned, unless the request contains an explicit group_id list.
   * If a group_id list is given, also &lt;code&gt;ErrorGroupStats&lt;/code&gt; with zero
   * occurrences are returned.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange getTimeRange() {
    return timeRange_ == null ? com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.getDefaultInstance() : timeRange_;
  }
  /**
   * <pre>
   * [Optional] List data for the given time range.
   * If not set a default time range is used. The field time_range_begin
   * in the response will specify the beginning of this time range.
   * Only &lt;code&gt;ErrorGroupStats&lt;/code&gt; with a non-zero count in the given time
   * range are returned, unless the request contains an explicit group_id list.
   * If a group_id list is given, also &lt;code&gt;ErrorGroupStats&lt;/code&gt; with zero
   * occurrences are returned.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRangeOrBuilder getTimeRangeOrBuilder() {
    return getTimeRange();
  }

  public static final int TIMED_COUNT_DURATION_FIELD_NUMBER = 6;
  private com.google.protobuf.Duration timedCountDuration_;
  /**
   * <pre>
   * [Optional] The preferred duration for a single returned `TimedCount`.
   * If not set, no timed counts are returned.
   * </pre>
   *
   * <code>.google.protobuf.Duration timed_count_duration = 6;</code>
   */
  public boolean hasTimedCountDuration() {
    return timedCountDuration_ != null;
  }
  /**
   * <pre>
   * [Optional] The preferred duration for a single returned `TimedCount`.
   * If not set, no timed counts are returned.
   * </pre>
   *
   * <code>.google.protobuf.Duration timed_count_duration = 6;</code>
   */
  public com.google.protobuf.Duration getTimedCountDuration() {
    return timedCountDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timedCountDuration_;
  }
  /**
   * <pre>
   * [Optional] The preferred duration for a single returned `TimedCount`.
   * If not set, no timed counts are returned.
   * </pre>
   *
   * <code>.google.protobuf.Duration timed_count_duration = 6;</code>
   */
  public com.google.protobuf.DurationOrBuilder getTimedCountDurationOrBuilder() {
    return getTimedCountDuration();
  }

  public static final int ALIGNMENT_FIELD_NUMBER = 7;
  private int alignment_;
  /**
   * <pre>
   * [Optional] The alignment of the timed counts to be returned.
   * Default is `ALIGNMENT_EQUAL_AT_END`.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7;</code>
   */
  public int getAlignmentValue() {
    return alignment_;
  }
  /**
   * <pre>
   * [Optional] The alignment of the timed counts to be returned.
   * Default is `ALIGNMENT_EQUAL_AT_END`.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment getAlignment() {
    com.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment result = com.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment.valueOf(alignment_);
    return result == null ? com.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment.UNRECOGNIZED : result;
  }

  public static final int ALIGNMENT_TIME_FIELD_NUMBER = 8;
  private com.google.protobuf.Timestamp alignmentTime_;
  /**
   * <pre>
   * [Optional] Time where the timed counts shall be aligned if rounded
   * alignment is chosen. Default is 00:00 UTC.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp alignment_time = 8;</code>
   */
  public boolean hasAlignmentTime() {
    return alignmentTime_ != null;
  }
  /**
   * <pre>
   * [Optional] Time where the timed counts shall be aligned if rounded
   * alignment is chosen. Default is 00:00 UTC.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp alignment_time = 8;</code>
   */
  public com.google.protobuf.Timestamp getAlignmentTime() {
    return alignmentTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : alignmentTime_;
  }
  /**
   * <pre>
   * [Optional] Time where the timed counts shall be aligned if rounded
   * alignment is chosen. Default is 00:00 UTC.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp alignment_time = 8;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getAlignmentTimeOrBuilder() {
    return getAlignmentTime();
  }

  public static final int ORDER_FIELD_NUMBER = 9;
  private int order_;
  /**
   * <pre>
   * [Optional] The sort order in which the results are returned.
   * Default is `COUNT_DESC`.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9;</code>
   */
  public int getOrderValue() {
    return order_;
  }
  /**
   * <pre>
   * [Optional] The sort order in which the results are returned.
   * Default is `COUNT_DESC`.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder getOrder() {
    com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder result = com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder.valueOf(order_);
    return result == null ? com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder.UNRECOGNIZED : result;
  }

  public static final int PAGE_SIZE_FIELD_NUMBER = 11;
  private int pageSize_;
  /**
   * <pre>
   * [Optional] The maximum number of results to return per response.
   * Default is 20.
   * </pre>
   *
   * <code>int32 page_size = 11;</code>
   */
  public int getPageSize() {
    return pageSize_;
  }

  public static final int PAGE_TOKEN_FIELD_NUMBER = 12;
  private volatile java.lang.Object pageToken_;
  /**
   * <pre>
   * [Optional] A `next_page_token` provided by a previous response. To view
   * additional results, pass this token along with the identical query
   * parameters as the first request.
   * </pre>
   *
   * <code>string page_token = 12;</code>
   */
  public java.lang.String getPageToken() {
    java.lang.Object ref = pageToken_;
    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();
      pageToken_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * [Optional] A `next_page_token` provided by a previous response. To view
   * additional results, pass this token along with the identical query
   * parameters as the first request.
   * </pre>
   *
   * <code>string page_token = 12;</code>
   */
  public com.google.protobuf.ByteString
      getPageTokenBytes() {
    java.lang.Object ref = pageToken_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      pageToken_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!getProjectNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, projectName_);
    }
    for (int i = 0; i < groupId_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, groupId_.getRaw(i));
    }
    if (serviceFilter_ != null) {
      output.writeMessage(3, getServiceFilter());
    }
    if (timeRange_ != null) {
      output.writeMessage(5, getTimeRange());
    }
    if (timedCountDuration_ != null) {
      output.writeMessage(6, getTimedCountDuration());
    }
    if (alignment_ != com.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment.ERROR_COUNT_ALIGNMENT_UNSPECIFIED.getNumber()) {
      output.writeEnum(7, alignment_);
    }
    if (alignmentTime_ != null) {
      output.writeMessage(8, getAlignmentTime());
    }
    if (order_ != com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder.GROUP_ORDER_UNSPECIFIED.getNumber()) {
      output.writeEnum(9, order_);
    }
    if (pageSize_ != 0) {
      output.writeInt32(11, pageSize_);
    }
    if (!getPageTokenBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, pageToken_);
    }
    unknownFields.writeTo(output);
  }

  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (!getProjectNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, projectName_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < groupId_.size(); i++) {
        dataSize += computeStringSizeNoTag(groupId_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getGroupIdList().size();
    }
    if (serviceFilter_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, getServiceFilter());
    }
    if (timeRange_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, getTimeRange());
    }
    if (timedCountDuration_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(6, getTimedCountDuration());
    }
    if (alignment_ != com.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment.ERROR_COUNT_ALIGNMENT_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(7, alignment_);
    }
    if (alignmentTime_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(8, getAlignmentTime());
    }
    if (order_ != com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder.GROUP_ORDER_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(9, order_);
    }
    if (pageSize_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(11, pageSize_);
    }
    if (!getPageTokenBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, pageToken_);
    }
    size += unknownFields.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.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest)) {
      return super.equals(obj);
    }
    com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest other = (com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest) obj;

    boolean result = true;
    result = result && getProjectName()
        .equals(other.getProjectName());
    result = result && getGroupIdList()
        .equals(other.getGroupIdList());
    result = result && (hasServiceFilter() == other.hasServiceFilter());
    if (hasServiceFilter()) {
      result = result && getServiceFilter()
          .equals(other.getServiceFilter());
    }
    result = result && (hasTimeRange() == other.hasTimeRange());
    if (hasTimeRange()) {
      result = result && getTimeRange()
          .equals(other.getTimeRange());
    }
    result = result && (hasTimedCountDuration() == other.hasTimedCountDuration());
    if (hasTimedCountDuration()) {
      result = result && getTimedCountDuration()
          .equals(other.getTimedCountDuration());
    }
    result = result && alignment_ == other.alignment_;
    result = result && (hasAlignmentTime() == other.hasAlignmentTime());
    if (hasAlignmentTime()) {
      result = result && getAlignmentTime()
          .equals(other.getAlignmentTime());
    }
    result = result && order_ == other.order_;
    result = result && (getPageSize()
        == other.getPageSize());
    result = result && getPageToken()
        .equals(other.getPageToken());
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + PROJECT_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getProjectName().hashCode();
    if (getGroupIdCount() > 0) {
      hash = (37 * hash) + GROUP_ID_FIELD_NUMBER;
      hash = (53 * hash) + getGroupIdList().hashCode();
    }
    if (hasServiceFilter()) {
      hash = (37 * hash) + SERVICE_FILTER_FIELD_NUMBER;
      hash = (53 * hash) + getServiceFilter().hashCode();
    }
    if (hasTimeRange()) {
      hash = (37 * hash) + TIME_RANGE_FIELD_NUMBER;
      hash = (53 * hash) + getTimeRange().hashCode();
    }
    if (hasTimedCountDuration()) {
      hash = (37 * hash) + TIMED_COUNT_DURATION_FIELD_NUMBER;
      hash = (53 * hash) + getTimedCountDuration().hashCode();
    }
    hash = (37 * hash) + ALIGNMENT_FIELD_NUMBER;
    hash = (53 * hash) + alignment_;
    if (hasAlignmentTime()) {
      hash = (37 * hash) + ALIGNMENT_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getAlignmentTime().hashCode();
    }
    hash = (37 * hash) + ORDER_FIELD_NUMBER;
    hash = (53 * hash) + order_;
    hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER;
    hash = (53 * hash) + getPageSize();
    hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
    hash = (53 * hash) + getPageToken().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest 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.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest 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.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  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;
  }
  /**
   * <pre>
   * Specifies a set of `ErrorGroupStats` to return.
   * </pre>
   *
   * Protobuf type {@code google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest)
      com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.devtools.clouderrorreporting.v1beta1.ErrorStatsServiceProto.internal_static_google_devtools_clouderrorreporting_v1beta1_ListGroupStatsRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.devtools.clouderrorreporting.v1beta1.ErrorStatsServiceProto.internal_static_google_devtools_clouderrorreporting_v1beta1_ListGroupStatsRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.class, com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.Builder.class);
    }

    // Construct using com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    public Builder clear() {
      super.clear();
      projectName_ = "";

      groupId_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000002);
      if (serviceFilterBuilder_ == null) {
        serviceFilter_ = null;
      } else {
        serviceFilter_ = null;
        serviceFilterBuilder_ = null;
      }
      if (timeRangeBuilder_ == null) {
        timeRange_ = null;
      } else {
        timeRange_ = null;
        timeRangeBuilder_ = null;
      }
      if (timedCountDurationBuilder_ == null) {
        timedCountDuration_ = null;
      } else {
        timedCountDuration_ = null;
        timedCountDurationBuilder_ = null;
      }
      alignment_ = 0;

      if (alignmentTimeBuilder_ == null) {
        alignmentTime_ = null;
      } else {
        alignmentTime_ = null;
        alignmentTimeBuilder_ = null;
      }
      order_ = 0;

      pageSize_ = 0;

      pageToken_ = "";

      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.devtools.clouderrorreporting.v1beta1.ErrorStatsServiceProto.internal_static_google_devtools_clouderrorreporting_v1beta1_ListGroupStatsRequest_descriptor;
    }

    public com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest getDefaultInstanceForType() {
      return com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.getDefaultInstance();
    }

    public com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest build() {
      com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest buildPartial() {
      com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest result = new com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.projectName_ = projectName_;
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        groupId_ = groupId_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000002);
      }
      result.groupId_ = groupId_;
      if (serviceFilterBuilder_ == null) {
        result.serviceFilter_ = serviceFilter_;
      } else {
        result.serviceFilter_ = serviceFilterBuilder_.build();
      }
      if (timeRangeBuilder_ == null) {
        result.timeRange_ = timeRange_;
      } else {
        result.timeRange_ = timeRangeBuilder_.build();
      }
      if (timedCountDurationBuilder_ == null) {
        result.timedCountDuration_ = timedCountDuration_;
      } else {
        result.timedCountDuration_ = timedCountDurationBuilder_.build();
      }
      result.alignment_ = alignment_;
      if (alignmentTimeBuilder_ == null) {
        result.alignmentTime_ = alignmentTime_;
      } else {
        result.alignmentTime_ = alignmentTimeBuilder_.build();
      }
      result.order_ = order_;
      result.pageSize_ = pageSize_;
      result.pageToken_ = pageToken_;
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.setField(field, value);
    }
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest) {
        return mergeFrom((com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest other) {
      if (other == com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest.getDefaultInstance()) return this;
      if (!other.getProjectName().isEmpty()) {
        projectName_ = other.projectName_;
        onChanged();
      }
      if (!other.groupId_.isEmpty()) {
        if (groupId_.isEmpty()) {
          groupId_ = other.groupId_;
          bitField0_ = (bitField0_ & ~0x00000002);
        } else {
          ensureGroupIdIsMutable();
          groupId_.addAll(other.groupId_);
        }
        onChanged();
      }
      if (other.hasServiceFilter()) {
        mergeServiceFilter(other.getServiceFilter());
      }
      if (other.hasTimeRange()) {
        mergeTimeRange(other.getTimeRange());
      }
      if (other.hasTimedCountDuration()) {
        mergeTimedCountDuration(other.getTimedCountDuration());
      }
      if (other.alignment_ != 0) {
        setAlignmentValue(other.getAlignmentValue());
      }
      if (other.hasAlignmentTime()) {
        mergeAlignmentTime(other.getAlignmentTime());
      }
      if (other.order_ != 0) {
        setOrderValue(other.getOrderValue());
      }
      if (other.getPageSize() != 0) {
        setPageSize(other.getPageSize());
      }
      if (!other.getPageToken().isEmpty()) {
        pageToken_ = other.pageToken_;
        onChanged();
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private java.lang.Object projectName_ = "";
    /**
     * <pre>
     * [Required] The resource name of the Google Cloud Platform project. Written
     * as &lt;code&gt;projects/&lt;/code&gt; plus the
     * &lt;a href="https://support.google.com/cloud/answer/6158840"&gt;Google Cloud
     * Platform project ID&lt;/a&gt;.
     * Example: &lt;code&gt;projects/my-project-123&lt;/code&gt;.
     * </pre>
     *
     * <code>string project_name = 1;</code>
     */
    public java.lang.String getProjectName() {
      java.lang.Object ref = projectName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        projectName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * [Required] The resource name of the Google Cloud Platform project. Written
     * as &lt;code&gt;projects/&lt;/code&gt; plus the
     * &lt;a href="https://support.google.com/cloud/answer/6158840"&gt;Google Cloud
     * Platform project ID&lt;/a&gt;.
     * Example: &lt;code&gt;projects/my-project-123&lt;/code&gt;.
     * </pre>
     *
     * <code>string project_name = 1;</code>
     */
    public com.google.protobuf.ByteString
        getProjectNameBytes() {
      java.lang.Object ref = projectName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        projectName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * [Required] The resource name of the Google Cloud Platform project. Written
     * as &lt;code&gt;projects/&lt;/code&gt; plus the
     * &lt;a href="https://support.google.com/cloud/answer/6158840"&gt;Google Cloud
     * Platform project ID&lt;/a&gt;.
     * Example: &lt;code&gt;projects/my-project-123&lt;/code&gt;.
     * </pre>
     *
     * <code>string project_name = 1;</code>
     */
    public Builder setProjectName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      projectName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * [Required] The resource name of the Google Cloud Platform project. Written
     * as &lt;code&gt;projects/&lt;/code&gt; plus the
     * &lt;a href="https://support.google.com/cloud/answer/6158840"&gt;Google Cloud
     * Platform project ID&lt;/a&gt;.
     * Example: &lt;code&gt;projects/my-project-123&lt;/code&gt;.
     * </pre>
     *
     * <code>string project_name = 1;</code>
     */
    public Builder clearProjectName() {
      
      projectName_ = getDefaultInstance().getProjectName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * [Required] The resource name of the Google Cloud Platform project. Written
     * as &lt;code&gt;projects/&lt;/code&gt; plus the
     * &lt;a href="https://support.google.com/cloud/answer/6158840"&gt;Google Cloud
     * Platform project ID&lt;/a&gt;.
     * Example: &lt;code&gt;projects/my-project-123&lt;/code&gt;.
     * </pre>
     *
     * <code>string project_name = 1;</code>
     */
    public Builder setProjectNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      projectName_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList groupId_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureGroupIdIsMutable() {
      if (!((bitField0_ & 0x00000002) == 0x00000002)) {
        groupId_ = new com.google.protobuf.LazyStringArrayList(groupId_);
        bitField0_ |= 0x00000002;
       }
    }
    /**
     * <pre>
     * [Optional] List all &lt;code&gt;ErrorGroupStats&lt;/code&gt; with these IDs.
     * </pre>
     *
     * <code>repeated string group_id = 2;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getGroupIdList() {
      return groupId_.getUnmodifiableView();
    }
    /**
     * <pre>
     * [Optional] List all &lt;code&gt;ErrorGroupStats&lt;/code&gt; with these IDs.
     * </pre>
     *
     * <code>repeated string group_id = 2;</code>
     */
    public int getGroupIdCount() {
      return groupId_.size();
    }
    /**
     * <pre>
     * [Optional] List all &lt;code&gt;ErrorGroupStats&lt;/code&gt; with these IDs.
     * </pre>
     *
     * <code>repeated string group_id = 2;</code>
     */
    public java.lang.String getGroupId(int index) {
      return groupId_.get(index);
    }
    /**
     * <pre>
     * [Optional] List all &lt;code&gt;ErrorGroupStats&lt;/code&gt; with these IDs.
     * </pre>
     *
     * <code>repeated string group_id = 2;</code>
     */
    public com.google.protobuf.ByteString
        getGroupIdBytes(int index) {
      return groupId_.getByteString(index);
    }
    /**
     * <pre>
     * [Optional] List all &lt;code&gt;ErrorGroupStats&lt;/code&gt; with these IDs.
     * </pre>
     *
     * <code>repeated string group_id = 2;</code>
     */
    public Builder setGroupId(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureGroupIdIsMutable();
      groupId_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * [Optional] List all &lt;code&gt;ErrorGroupStats&lt;/code&gt; with these IDs.
     * </pre>
     *
     * <code>repeated string group_id = 2;</code>
     */
    public Builder addGroupId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureGroupIdIsMutable();
      groupId_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * [Optional] List all &lt;code&gt;ErrorGroupStats&lt;/code&gt; with these IDs.
     * </pre>
     *
     * <code>repeated string group_id = 2;</code>
     */
    public Builder addAllGroupId(
        java.lang.Iterable<java.lang.String> values) {
      ensureGroupIdIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, groupId_);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * [Optional] List all &lt;code&gt;ErrorGroupStats&lt;/code&gt; with these IDs.
     * </pre>
     *
     * <code>repeated string group_id = 2;</code>
     */
    public Builder clearGroupId() {
      groupId_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * [Optional] List all &lt;code&gt;ErrorGroupStats&lt;/code&gt; with these IDs.
     * </pre>
     *
     * <code>repeated string group_id = 2;</code>
     */
    public Builder addGroupIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      ensureGroupIdIsMutable();
      groupId_.add(value);
      onChanged();
      return this;
    }

    private com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter serviceFilter_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter, com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter.Builder, com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilterOrBuilder> serviceFilterBuilder_;
    /**
     * <pre>
     * [Optional] List only &lt;code&gt;ErrorGroupStats&lt;/code&gt; which belong to a service
     * context that matches the filter.
     * Data for all service contexts is returned if this field is not specified.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3;</code>
     */
    public boolean hasServiceFilter() {
      return serviceFilterBuilder_ != null || serviceFilter_ != null;
    }
    /**
     * <pre>
     * [Optional] List only &lt;code&gt;ErrorGroupStats&lt;/code&gt; which belong to a service
     * context that matches the filter.
     * Data for all service contexts is returned if this field is not specified.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter getServiceFilter() {
      if (serviceFilterBuilder_ == null) {
        return serviceFilter_ == null ? com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter.getDefaultInstance() : serviceFilter_;
      } else {
        return serviceFilterBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * [Optional] List only &lt;code&gt;ErrorGroupStats&lt;/code&gt; which belong to a service
     * context that matches the filter.
     * Data for all service contexts is returned if this field is not specified.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3;</code>
     */
    public Builder setServiceFilter(com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter value) {
      if (serviceFilterBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        serviceFilter_ = value;
        onChanged();
      } else {
        serviceFilterBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * [Optional] List only &lt;code&gt;ErrorGroupStats&lt;/code&gt; which belong to a service
     * context that matches the filter.
     * Data for all service contexts is returned if this field is not specified.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3;</code>
     */
    public Builder setServiceFilter(
        com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter.Builder builderForValue) {
      if (serviceFilterBuilder_ == null) {
        serviceFilter_ = builderForValue.build();
        onChanged();
      } else {
        serviceFilterBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * [Optional] List only &lt;code&gt;ErrorGroupStats&lt;/code&gt; which belong to a service
     * context that matches the filter.
     * Data for all service contexts is returned if this field is not specified.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3;</code>
     */
    public Builder mergeServiceFilter(com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter value) {
      if (serviceFilterBuilder_ == null) {
        if (serviceFilter_ != null) {
          serviceFilter_ =
            com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter.newBuilder(serviceFilter_).mergeFrom(value).buildPartial();
        } else {
          serviceFilter_ = value;
        }
        onChanged();
      } else {
        serviceFilterBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * [Optional] List only &lt;code&gt;ErrorGroupStats&lt;/code&gt; which belong to a service
     * context that matches the filter.
     * Data for all service contexts is returned if this field is not specified.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3;</code>
     */
    public Builder clearServiceFilter() {
      if (serviceFilterBuilder_ == null) {
        serviceFilter_ = null;
        onChanged();
      } else {
        serviceFilter_ = null;
        serviceFilterBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * [Optional] List only &lt;code&gt;ErrorGroupStats&lt;/code&gt; which belong to a service
     * context that matches the filter.
     * Data for all service contexts is returned if this field is not specified.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter.Builder getServiceFilterBuilder() {
      
      onChanged();
      return getServiceFilterFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * [Optional] List only &lt;code&gt;ErrorGroupStats&lt;/code&gt; which belong to a service
     * context that matches the filter.
     * Data for all service contexts is returned if this field is not specified.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilterOrBuilder getServiceFilterOrBuilder() {
      if (serviceFilterBuilder_ != null) {
        return serviceFilterBuilder_.getMessageOrBuilder();
      } else {
        return serviceFilter_ == null ?
            com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter.getDefaultInstance() : serviceFilter_;
      }
    }
    /**
     * <pre>
     * [Optional] List only &lt;code&gt;ErrorGroupStats&lt;/code&gt; which belong to a service
     * context that matches the filter.
     * Data for all service contexts is returned if this field is not specified.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter service_filter = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter, com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter.Builder, com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilterOrBuilder> 
        getServiceFilterFieldBuilder() {
      if (serviceFilterBuilder_ == null) {
        serviceFilterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter, com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilter.Builder, com.google.devtools.clouderrorreporting.v1beta1.ServiceContextFilterOrBuilder>(
                getServiceFilter(),
                getParentForChildren(),
                isClean());
        serviceFilter_ = null;
      }
      return serviceFilterBuilder_;
    }

    private com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange timeRange_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange, com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Builder, com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRangeOrBuilder> timeRangeBuilder_;
    /**
     * <pre>
     * [Optional] List data for the given time range.
     * If not set a default time range is used. The field time_range_begin
     * in the response will specify the beginning of this time range.
     * Only &lt;code&gt;ErrorGroupStats&lt;/code&gt; with a non-zero count in the given time
     * range are returned, unless the request contains an explicit group_id list.
     * If a group_id list is given, also &lt;code&gt;ErrorGroupStats&lt;/code&gt; with zero
     * occurrences are returned.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5;</code>
     */
    public boolean hasTimeRange() {
      return timeRangeBuilder_ != null || timeRange_ != null;
    }
    /**
     * <pre>
     * [Optional] List data for the given time range.
     * If not set a default time range is used. The field time_range_begin
     * in the response will specify the beginning of this time range.
     * Only &lt;code&gt;ErrorGroupStats&lt;/code&gt; with a non-zero count in the given time
     * range are returned, unless the request contains an explicit group_id list.
     * If a group_id list is given, also &lt;code&gt;ErrorGroupStats&lt;/code&gt; with zero
     * occurrences are returned.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange getTimeRange() {
      if (timeRangeBuilder_ == null) {
        return timeRange_ == null ? com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.getDefaultInstance() : timeRange_;
      } else {
        return timeRangeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * [Optional] List data for the given time range.
     * If not set a default time range is used. The field time_range_begin
     * in the response will specify the beginning of this time range.
     * Only &lt;code&gt;ErrorGroupStats&lt;/code&gt; with a non-zero count in the given time
     * range are returned, unless the request contains an explicit group_id list.
     * If a group_id list is given, also &lt;code&gt;ErrorGroupStats&lt;/code&gt; with zero
     * occurrences are returned.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5;</code>
     */
    public Builder setTimeRange(com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange value) {
      if (timeRangeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        timeRange_ = value;
        onChanged();
      } else {
        timeRangeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * [Optional] List data for the given time range.
     * If not set a default time range is used. The field time_range_begin
     * in the response will specify the beginning of this time range.
     * Only &lt;code&gt;ErrorGroupStats&lt;/code&gt; with a non-zero count in the given time
     * range are returned, unless the request contains an explicit group_id list.
     * If a group_id list is given, also &lt;code&gt;ErrorGroupStats&lt;/code&gt; with zero
     * occurrences are returned.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5;</code>
     */
    public Builder setTimeRange(
        com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Builder builderForValue) {
      if (timeRangeBuilder_ == null) {
        timeRange_ = builderForValue.build();
        onChanged();
      } else {
        timeRangeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * [Optional] List data for the given time range.
     * If not set a default time range is used. The field time_range_begin
     * in the response will specify the beginning of this time range.
     * Only &lt;code&gt;ErrorGroupStats&lt;/code&gt; with a non-zero count in the given time
     * range are returned, unless the request contains an explicit group_id list.
     * If a group_id list is given, also &lt;code&gt;ErrorGroupStats&lt;/code&gt; with zero
     * occurrences are returned.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5;</code>
     */
    public Builder mergeTimeRange(com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange value) {
      if (timeRangeBuilder_ == null) {
        if (timeRange_ != null) {
          timeRange_ =
            com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.newBuilder(timeRange_).mergeFrom(value).buildPartial();
        } else {
          timeRange_ = value;
        }
        onChanged();
      } else {
        timeRangeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * [Optional] List data for the given time range.
     * If not set a default time range is used. The field time_range_begin
     * in the response will specify the beginning of this time range.
     * Only &lt;code&gt;ErrorGroupStats&lt;/code&gt; with a non-zero count in the given time
     * range are returned, unless the request contains an explicit group_id list.
     * If a group_id list is given, also &lt;code&gt;ErrorGroupStats&lt;/code&gt; with zero
     * occurrences are returned.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5;</code>
     */
    public Builder clearTimeRange() {
      if (timeRangeBuilder_ == null) {
        timeRange_ = null;
        onChanged();
      } else {
        timeRange_ = null;
        timeRangeBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * [Optional] List data for the given time range.
     * If not set a default time range is used. The field time_range_begin
     * in the response will specify the beginning of this time range.
     * Only &lt;code&gt;ErrorGroupStats&lt;/code&gt; with a non-zero count in the given time
     * range are returned, unless the request contains an explicit group_id list.
     * If a group_id list is given, also &lt;code&gt;ErrorGroupStats&lt;/code&gt; with zero
     * occurrences are returned.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Builder getTimeRangeBuilder() {
      
      onChanged();
      return getTimeRangeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * [Optional] List data for the given time range.
     * If not set a default time range is used. The field time_range_begin
     * in the response will specify the beginning of this time range.
     * Only &lt;code&gt;ErrorGroupStats&lt;/code&gt; with a non-zero count in the given time
     * range are returned, unless the request contains an explicit group_id list.
     * If a group_id list is given, also &lt;code&gt;ErrorGroupStats&lt;/code&gt; with zero
     * occurrences are returned.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRangeOrBuilder getTimeRangeOrBuilder() {
      if (timeRangeBuilder_ != null) {
        return timeRangeBuilder_.getMessageOrBuilder();
      } else {
        return timeRange_ == null ?
            com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.getDefaultInstance() : timeRange_;
      }
    }
    /**
     * <pre>
     * [Optional] List data for the given time range.
     * If not set a default time range is used. The field time_range_begin
     * in the response will specify the beginning of this time range.
     * Only &lt;code&gt;ErrorGroupStats&lt;/code&gt; with a non-zero count in the given time
     * range are returned, unless the request contains an explicit group_id list.
     * If a group_id list is given, also &lt;code&gt;ErrorGroupStats&lt;/code&gt; with zero
     * occurrences are returned.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange time_range = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange, com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Builder, com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRangeOrBuilder> 
        getTimeRangeFieldBuilder() {
      if (timeRangeBuilder_ == null) {
        timeRangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange, com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRange.Builder, com.google.devtools.clouderrorreporting.v1beta1.QueryTimeRangeOrBuilder>(
                getTimeRange(),
                getParentForChildren(),
                isClean());
        timeRange_ = null;
      }
      return timeRangeBuilder_;
    }

    private com.google.protobuf.Duration timedCountDuration_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> timedCountDurationBuilder_;
    /**
     * <pre>
     * [Optional] The preferred duration for a single returned `TimedCount`.
     * If not set, no timed counts are returned.
     * </pre>
     *
     * <code>.google.protobuf.Duration timed_count_duration = 6;</code>
     */
    public boolean hasTimedCountDuration() {
      return timedCountDurationBuilder_ != null || timedCountDuration_ != null;
    }
    /**
     * <pre>
     * [Optional] The preferred duration for a single returned `TimedCount`.
     * If not set, no timed counts are returned.
     * </pre>
     *
     * <code>.google.protobuf.Duration timed_count_duration = 6;</code>
     */
    public com.google.protobuf.Duration getTimedCountDuration() {
      if (timedCountDurationBuilder_ == null) {
        return timedCountDuration_ == null ? com.google.protobuf.Duration.getDefaultInstance() : timedCountDuration_;
      } else {
        return timedCountDurationBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * [Optional] The preferred duration for a single returned `TimedCount`.
     * If not set, no timed counts are returned.
     * </pre>
     *
     * <code>.google.protobuf.Duration timed_count_duration = 6;</code>
     */
    public Builder setTimedCountDuration(com.google.protobuf.Duration value) {
      if (timedCountDurationBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        timedCountDuration_ = value;
        onChanged();
      } else {
        timedCountDurationBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * [Optional] The preferred duration for a single returned `TimedCount`.
     * If not set, no timed counts are returned.
     * </pre>
     *
     * <code>.google.protobuf.Duration timed_count_duration = 6;</code>
     */
    public Builder setTimedCountDuration(
        com.google.protobuf.Duration.Builder builderForValue) {
      if (timedCountDurationBuilder_ == null) {
        timedCountDuration_ = builderForValue.build();
        onChanged();
      } else {
        timedCountDurationBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * [Optional] The preferred duration for a single returned `TimedCount`.
     * If not set, no timed counts are returned.
     * </pre>
     *
     * <code>.google.protobuf.Duration timed_count_duration = 6;</code>
     */
    public Builder mergeTimedCountDuration(com.google.protobuf.Duration value) {
      if (timedCountDurationBuilder_ == null) {
        if (timedCountDuration_ != null) {
          timedCountDuration_ =
            com.google.protobuf.Duration.newBuilder(timedCountDuration_).mergeFrom(value).buildPartial();
        } else {
          timedCountDuration_ = value;
        }
        onChanged();
      } else {
        timedCountDurationBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * [Optional] The preferred duration for a single returned `TimedCount`.
     * If not set, no timed counts are returned.
     * </pre>
     *
     * <code>.google.protobuf.Duration timed_count_duration = 6;</code>
     */
    public Builder clearTimedCountDuration() {
      if (timedCountDurationBuilder_ == null) {
        timedCountDuration_ = null;
        onChanged();
      } else {
        timedCountDuration_ = null;
        timedCountDurationBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * [Optional] The preferred duration for a single returned `TimedCount`.
     * If not set, no timed counts are returned.
     * </pre>
     *
     * <code>.google.protobuf.Duration timed_count_duration = 6;</code>
     */
    public com.google.protobuf.Duration.Builder getTimedCountDurationBuilder() {
      
      onChanged();
      return getTimedCountDurationFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * [Optional] The preferred duration for a single returned `TimedCount`.
     * If not set, no timed counts are returned.
     * </pre>
     *
     * <code>.google.protobuf.Duration timed_count_duration = 6;</code>
     */
    public com.google.protobuf.DurationOrBuilder getTimedCountDurationOrBuilder() {
      if (timedCountDurationBuilder_ != null) {
        return timedCountDurationBuilder_.getMessageOrBuilder();
      } else {
        return timedCountDuration_ == null ?
            com.google.protobuf.Duration.getDefaultInstance() : timedCountDuration_;
      }
    }
    /**
     * <pre>
     * [Optional] The preferred duration for a single returned `TimedCount`.
     * If not set, no timed counts are returned.
     * </pre>
     *
     * <code>.google.protobuf.Duration timed_count_duration = 6;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> 
        getTimedCountDurationFieldBuilder() {
      if (timedCountDurationBuilder_ == null) {
        timedCountDurationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>(
                getTimedCountDuration(),
                getParentForChildren(),
                isClean());
        timedCountDuration_ = null;
      }
      return timedCountDurationBuilder_;
    }

    private int alignment_ = 0;
    /**
     * <pre>
     * [Optional] The alignment of the timed counts to be returned.
     * Default is `ALIGNMENT_EQUAL_AT_END`.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7;</code>
     */
    public int getAlignmentValue() {
      return alignment_;
    }
    /**
     * <pre>
     * [Optional] The alignment of the timed counts to be returned.
     * Default is `ALIGNMENT_EQUAL_AT_END`.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7;</code>
     */
    public Builder setAlignmentValue(int value) {
      alignment_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * [Optional] The alignment of the timed counts to be returned.
     * Default is `ALIGNMENT_EQUAL_AT_END`.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment getAlignment() {
      com.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment result = com.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment.valueOf(alignment_);
      return result == null ? com.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment.UNRECOGNIZED : result;
    }
    /**
     * <pre>
     * [Optional] The alignment of the timed counts to be returned.
     * Default is `ALIGNMENT_EQUAL_AT_END`.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7;</code>
     */
    public Builder setAlignment(com.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      alignment_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * [Optional] The alignment of the timed counts to be returned.
     * Default is `ALIGNMENT_EQUAL_AT_END`.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.TimedCountAlignment alignment = 7;</code>
     */
    public Builder clearAlignment() {
      
      alignment_ = 0;
      onChanged();
      return this;
    }

    private com.google.protobuf.Timestamp alignmentTime_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> alignmentTimeBuilder_;
    /**
     * <pre>
     * [Optional] Time where the timed counts shall be aligned if rounded
     * alignment is chosen. Default is 00:00 UTC.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp alignment_time = 8;</code>
     */
    public boolean hasAlignmentTime() {
      return alignmentTimeBuilder_ != null || alignmentTime_ != null;
    }
    /**
     * <pre>
     * [Optional] Time where the timed counts shall be aligned if rounded
     * alignment is chosen. Default is 00:00 UTC.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp alignment_time = 8;</code>
     */
    public com.google.protobuf.Timestamp getAlignmentTime() {
      if (alignmentTimeBuilder_ == null) {
        return alignmentTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : alignmentTime_;
      } else {
        return alignmentTimeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * [Optional] Time where the timed counts shall be aligned if rounded
     * alignment is chosen. Default is 00:00 UTC.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp alignment_time = 8;</code>
     */
    public Builder setAlignmentTime(com.google.protobuf.Timestamp value) {
      if (alignmentTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        alignmentTime_ = value;
        onChanged();
      } else {
        alignmentTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * [Optional] Time where the timed counts shall be aligned if rounded
     * alignment is chosen. Default is 00:00 UTC.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp alignment_time = 8;</code>
     */
    public Builder setAlignmentTime(
        com.google.protobuf.Timestamp.Builder builderForValue) {
      if (alignmentTimeBuilder_ == null) {
        alignmentTime_ = builderForValue.build();
        onChanged();
      } else {
        alignmentTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * [Optional] Time where the timed counts shall be aligned if rounded
     * alignment is chosen. Default is 00:00 UTC.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp alignment_time = 8;</code>
     */
    public Builder mergeAlignmentTime(com.google.protobuf.Timestamp value) {
      if (alignmentTimeBuilder_ == null) {
        if (alignmentTime_ != null) {
          alignmentTime_ =
            com.google.protobuf.Timestamp.newBuilder(alignmentTime_).mergeFrom(value).buildPartial();
        } else {
          alignmentTime_ = value;
        }
        onChanged();
      } else {
        alignmentTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * [Optional] Time where the timed counts shall be aligned if rounded
     * alignment is chosen. Default is 00:00 UTC.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp alignment_time = 8;</code>
     */
    public Builder clearAlignmentTime() {
      if (alignmentTimeBuilder_ == null) {
        alignmentTime_ = null;
        onChanged();
      } else {
        alignmentTime_ = null;
        alignmentTimeBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * [Optional] Time where the timed counts shall be aligned if rounded
     * alignment is chosen. Default is 00:00 UTC.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp alignment_time = 8;</code>
     */
    public com.google.protobuf.Timestamp.Builder getAlignmentTimeBuilder() {
      
      onChanged();
      return getAlignmentTimeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * [Optional] Time where the timed counts shall be aligned if rounded
     * alignment is chosen. Default is 00:00 UTC.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp alignment_time = 8;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getAlignmentTimeOrBuilder() {
      if (alignmentTimeBuilder_ != null) {
        return alignmentTimeBuilder_.getMessageOrBuilder();
      } else {
        return alignmentTime_ == null ?
            com.google.protobuf.Timestamp.getDefaultInstance() : alignmentTime_;
      }
    }
    /**
     * <pre>
     * [Optional] Time where the timed counts shall be aligned if rounded
     * alignment is chosen. Default is 00:00 UTC.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp alignment_time = 8;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> 
        getAlignmentTimeFieldBuilder() {
      if (alignmentTimeBuilder_ == null) {
        alignmentTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
                getAlignmentTime(),
                getParentForChildren(),
                isClean());
        alignmentTime_ = null;
      }
      return alignmentTimeBuilder_;
    }

    private int order_ = 0;
    /**
     * <pre>
     * [Optional] The sort order in which the results are returned.
     * Default is `COUNT_DESC`.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9;</code>
     */
    public int getOrderValue() {
      return order_;
    }
    /**
     * <pre>
     * [Optional] The sort order in which the results are returned.
     * Default is `COUNT_DESC`.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9;</code>
     */
    public Builder setOrderValue(int value) {
      order_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * [Optional] The sort order in which the results are returned.
     * Default is `COUNT_DESC`.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder getOrder() {
      com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder result = com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder.valueOf(order_);
      return result == null ? com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder.UNRECOGNIZED : result;
    }
    /**
     * <pre>
     * [Optional] The sort order in which the results are returned.
     * Default is `COUNT_DESC`.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9;</code>
     */
    public Builder setOrder(com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      order_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * [Optional] The sort order in which the results are returned.
     * Default is `COUNT_DESC`.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrder order = 9;</code>
     */
    public Builder clearOrder() {
      
      order_ = 0;
      onChanged();
      return this;
    }

    private int pageSize_ ;
    /**
     * <pre>
     * [Optional] The maximum number of results to return per response.
     * Default is 20.
     * </pre>
     *
     * <code>int32 page_size = 11;</code>
     */
    public int getPageSize() {
      return pageSize_;
    }
    /**
     * <pre>
     * [Optional] The maximum number of results to return per response.
     * Default is 20.
     * </pre>
     *
     * <code>int32 page_size = 11;</code>
     */
    public Builder setPageSize(int value) {
      
      pageSize_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * [Optional] The maximum number of results to return per response.
     * Default is 20.
     * </pre>
     *
     * <code>int32 page_size = 11;</code>
     */
    public Builder clearPageSize() {
      
      pageSize_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object pageToken_ = "";
    /**
     * <pre>
     * [Optional] A `next_page_token` provided by a previous response. To view
     * additional results, pass this token along with the identical query
     * parameters as the first request.
     * </pre>
     *
     * <code>string page_token = 12;</code>
     */
    public java.lang.String getPageToken() {
      java.lang.Object ref = pageToken_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        pageToken_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * [Optional] A `next_page_token` provided by a previous response. To view
     * additional results, pass this token along with the identical query
     * parameters as the first request.
     * </pre>
     *
     * <code>string page_token = 12;</code>
     */
    public com.google.protobuf.ByteString
        getPageTokenBytes() {
      java.lang.Object ref = pageToken_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        pageToken_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * [Optional] A `next_page_token` provided by a previous response. To view
     * additional results, pass this token along with the identical query
     * parameters as the first request.
     * </pre>
     *
     * <code>string page_token = 12;</code>
     */
    public Builder setPageToken(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      pageToken_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * [Optional] A `next_page_token` provided by a previous response. To view
     * additional results, pass this token along with the identical query
     * parameters as the first request.
     * </pre>
     *
     * <code>string page_token = 12;</code>
     */
    public Builder clearPageToken() {
      
      pageToken_ = getDefaultInstance().getPageToken();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * [Optional] A `next_page_token` provided by a previous response. To view
     * additional results, pass this token along with the identical query
     * parameters as the first request.
     * </pre>
     *
     * <code>string page_token = 12;</code>
     */
    public Builder setPageTokenBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      pageToken_ = value;
      onChanged();
      return this;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest)
  }

  // @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest)
  private static final com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest();
  }

  public static com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<ListGroupStatsRequest>
      PARSER = new com.google.protobuf.AbstractParser<ListGroupStatsRequest>() {
    public ListGroupStatsRequest parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new ListGroupStatsRequest(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser<ListGroupStatsRequest> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<ListGroupStatsRequest> getParserForType() {
    return PARSER;
  }

  public com.google.devtools.clouderrorreporting.v1beta1.ListGroupStatsRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

