// 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>
 * Data extracted for a specific group based on certain filter criteria,
 * such as a given time period and/or service filter.
 * </pre>
 *
 * Protobuf type {@code google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats}
 */
public final class ErrorGroupStats extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats)
    ErrorGroupStatsOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use ErrorGroupStats.newBuilder() to construct.
  private ErrorGroupStats(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private ErrorGroupStats() {
    timedCounts_ = java.util.Collections.emptyList();
    affectedServices_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  private ErrorGroupStats(
      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;
          case 10:
            {
              com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup.Builder subBuilder = null;
              if (group_ != null) {
                subBuilder = group_.toBuilder();
              }
              group_ =
                  input.readMessage(
                      com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup.parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(group_);
                group_ = subBuilder.buildPartial();
              }

              break;
            }
          case 16:
            {
              count_ = input.readInt64();
              break;
            }
          case 24:
            {
              affectedUsersCount_ = input.readInt64();
              break;
            }
          case 34:
            {
              if (!((mutable_bitField0_ & 0x00000008) != 0)) {
                timedCounts_ =
                    new java.util.ArrayList<
                        com.google.devtools.clouderrorreporting.v1beta1.TimedCount>();
                mutable_bitField0_ |= 0x00000008;
              }
              timedCounts_.add(
                  input.readMessage(
                      com.google.devtools.clouderrorreporting.v1beta1.TimedCount.parser(),
                      extensionRegistry));
              break;
            }
          case 42:
            {
              com.google.protobuf.Timestamp.Builder subBuilder = null;
              if (firstSeenTime_ != null) {
                subBuilder = firstSeenTime_.toBuilder();
              }
              firstSeenTime_ =
                  input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(firstSeenTime_);
                firstSeenTime_ = subBuilder.buildPartial();
              }

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

              break;
            }
          case 58:
            {
              if (!((mutable_bitField0_ & 0x00000040) != 0)) {
                affectedServices_ =
                    new java.util.ArrayList<
                        com.google.devtools.clouderrorreporting.v1beta1.ServiceContext>();
                mutable_bitField0_ |= 0x00000040;
              }
              affectedServices_.add(
                  input.readMessage(
                      com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.parser(),
                      extensionRegistry));
              break;
            }
          case 64:
            {
              numAffectedServices_ = input.readInt32();
              break;
            }
          case 74:
            {
              com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.Builder subBuilder = null;
              if (representative_ != null) {
                subBuilder = representative_.toBuilder();
              }
              representative_ =
                  input.readMessage(
                      com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.parser(),
                      extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(representative_);
                representative_ = subBuilder.buildPartial();
              }

              break;
            }
          default:
            {
              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
                done = true;
              }
              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_ & 0x00000008) != 0)) {
        timedCounts_ = java.util.Collections.unmodifiableList(timedCounts_);
      }
      if (((mutable_bitField0_ & 0x00000040) != 0)) {
        affectedServices_ = java.util.Collections.unmodifiableList(affectedServices_);
      }
      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_ErrorGroupStats_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.devtools.clouderrorreporting.v1beta1.ErrorStatsServiceProto
        .internal_static_google_devtools_clouderrorreporting_v1beta1_ErrorGroupStats_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats.class,
            com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats.Builder.class);
  }

  private int bitField0_;
  public static final int GROUP_FIELD_NUMBER = 1;
  private com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup group_;
  /**
   *
   *
   * <pre>
   * Group data that is independent of the filter criteria.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1;</code>
   */
  public boolean hasGroup() {
    return group_ != null;
  }
  /**
   *
   *
   * <pre>
   * Group data that is independent of the filter criteria.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup getGroup() {
    return group_ == null
        ? com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup.getDefaultInstance()
        : group_;
  }
  /**
   *
   *
   * <pre>
   * Group data that is independent of the filter criteria.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrBuilder getGroupOrBuilder() {
    return getGroup();
  }

  public static final int COUNT_FIELD_NUMBER = 2;
  private long count_;
  /**
   *
   *
   * <pre>
   * Approximate total number of events in the given group that match
   * the filter criteria.
   * </pre>
   *
   * <code>int64 count = 2;</code>
   */
  public long getCount() {
    return count_;
  }

  public static final int AFFECTED_USERS_COUNT_FIELD_NUMBER = 3;
  private long affectedUsersCount_;
  /**
   *
   *
   * <pre>
   * Approximate number of affected users in the given group that
   * match the filter criteria.
   * Users are distinguished by data in the `ErrorContext` of the
   * individual error events, such as their login name or their remote
   * IP address in case of HTTP requests.
   * The number of affected users can be zero even if the number of
   * errors is non-zero if no data was provided from which the
   * affected user could be deduced.
   * Users are counted based on data in the request
   * context that was provided in the error report. If more users are
   * implicitly affected, such as due to a crash of the whole service,
   * this is not reflected here.
   * </pre>
   *
   * <code>int64 affected_users_count = 3;</code>
   */
  public long getAffectedUsersCount() {
    return affectedUsersCount_;
  }

  public static final int TIMED_COUNTS_FIELD_NUMBER = 4;
  private java.util.List<com.google.devtools.clouderrorreporting.v1beta1.TimedCount> timedCounts_;
  /**
   *
   *
   * <pre>
   * Approximate number of occurrences over time.
   * Timed counts returned by ListGroups are guaranteed to be:
   * - Inside the requested time interval
   * - Non-overlapping, and
   * - Ordered by ascending time.
   * </pre>
   *
   * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;</code>
   */
  public java.util.List<com.google.devtools.clouderrorreporting.v1beta1.TimedCount>
      getTimedCountsList() {
    return timedCounts_;
  }
  /**
   *
   *
   * <pre>
   * Approximate number of occurrences over time.
   * Timed counts returned by ListGroups are guaranteed to be:
   * - Inside the requested time interval
   * - Non-overlapping, and
   * - Ordered by ascending time.
   * </pre>
   *
   * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;</code>
   */
  public java.util.List<
          ? extends com.google.devtools.clouderrorreporting.v1beta1.TimedCountOrBuilder>
      getTimedCountsOrBuilderList() {
    return timedCounts_;
  }
  /**
   *
   *
   * <pre>
   * Approximate number of occurrences over time.
   * Timed counts returned by ListGroups are guaranteed to be:
   * - Inside the requested time interval
   * - Non-overlapping, and
   * - Ordered by ascending time.
   * </pre>
   *
   * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;</code>
   */
  public int getTimedCountsCount() {
    return timedCounts_.size();
  }
  /**
   *
   *
   * <pre>
   * Approximate number of occurrences over time.
   * Timed counts returned by ListGroups are guaranteed to be:
   * - Inside the requested time interval
   * - Non-overlapping, and
   * - Ordered by ascending time.
   * </pre>
   *
   * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.TimedCount getTimedCounts(int index) {
    return timedCounts_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Approximate number of occurrences over time.
   * Timed counts returned by ListGroups are guaranteed to be:
   * - Inside the requested time interval
   * - Non-overlapping, and
   * - Ordered by ascending time.
   * </pre>
   *
   * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.TimedCountOrBuilder
      getTimedCountsOrBuilder(int index) {
    return timedCounts_.get(index);
  }

  public static final int FIRST_SEEN_TIME_FIELD_NUMBER = 5;
  private com.google.protobuf.Timestamp firstSeenTime_;
  /**
   *
   *
   * <pre>
   * Approximate first occurrence that was ever seen for this group
   * and which matches the given filter criteria, ignoring the
   * time_range that was specified in the request.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp first_seen_time = 5;</code>
   */
  public boolean hasFirstSeenTime() {
    return firstSeenTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Approximate first occurrence that was ever seen for this group
   * and which matches the given filter criteria, ignoring the
   * time_range that was specified in the request.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp first_seen_time = 5;</code>
   */
  public com.google.protobuf.Timestamp getFirstSeenTime() {
    return firstSeenTime_ == null
        ? com.google.protobuf.Timestamp.getDefaultInstance()
        : firstSeenTime_;
  }
  /**
   *
   *
   * <pre>
   * Approximate first occurrence that was ever seen for this group
   * and which matches the given filter criteria, ignoring the
   * time_range that was specified in the request.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp first_seen_time = 5;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getFirstSeenTimeOrBuilder() {
    return getFirstSeenTime();
  }

  public static final int LAST_SEEN_TIME_FIELD_NUMBER = 6;
  private com.google.protobuf.Timestamp lastSeenTime_;
  /**
   *
   *
   * <pre>
   * Approximate last occurrence that was ever seen for this group and
   * which matches the given filter criteria, ignoring the time_range
   * that was specified in the request.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp last_seen_time = 6;</code>
   */
  public boolean hasLastSeenTime() {
    return lastSeenTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * Approximate last occurrence that was ever seen for this group and
   * which matches the given filter criteria, ignoring the time_range
   * that was specified in the request.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp last_seen_time = 6;</code>
   */
  public com.google.protobuf.Timestamp getLastSeenTime() {
    return lastSeenTime_ == null
        ? com.google.protobuf.Timestamp.getDefaultInstance()
        : lastSeenTime_;
  }
  /**
   *
   *
   * <pre>
   * Approximate last occurrence that was ever seen for this group and
   * which matches the given filter criteria, ignoring the time_range
   * that was specified in the request.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp last_seen_time = 6;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getLastSeenTimeOrBuilder() {
    return getLastSeenTime();
  }

  public static final int AFFECTED_SERVICES_FIELD_NUMBER = 7;
  private java.util.List<com.google.devtools.clouderrorreporting.v1beta1.ServiceContext>
      affectedServices_;
  /**
   *
   *
   * <pre>
   * Service contexts with a non-zero error count for the given filter
   * criteria. This list can be truncated if multiple services are affected.
   * Refer to `num_affected_services` for the total count.
   * </pre>
   *
   * <code>
   * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
   * </code>
   */
  public java.util.List<com.google.devtools.clouderrorreporting.v1beta1.ServiceContext>
      getAffectedServicesList() {
    return affectedServices_;
  }
  /**
   *
   *
   * <pre>
   * Service contexts with a non-zero error count for the given filter
   * criteria. This list can be truncated if multiple services are affected.
   * Refer to `num_affected_services` for the total count.
   * </pre>
   *
   * <code>
   * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
   * </code>
   */
  public java.util.List<
          ? extends com.google.devtools.clouderrorreporting.v1beta1.ServiceContextOrBuilder>
      getAffectedServicesOrBuilderList() {
    return affectedServices_;
  }
  /**
   *
   *
   * <pre>
   * Service contexts with a non-zero error count for the given filter
   * criteria. This list can be truncated if multiple services are affected.
   * Refer to `num_affected_services` for the total count.
   * </pre>
   *
   * <code>
   * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
   * </code>
   */
  public int getAffectedServicesCount() {
    return affectedServices_.size();
  }
  /**
   *
   *
   * <pre>
   * Service contexts with a non-zero error count for the given filter
   * criteria. This list can be truncated if multiple services are affected.
   * Refer to `num_affected_services` for the total count.
   * </pre>
   *
   * <code>
   * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
   * </code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.ServiceContext getAffectedServices(
      int index) {
    return affectedServices_.get(index);
  }
  /**
   *
   *
   * <pre>
   * Service contexts with a non-zero error count for the given filter
   * criteria. This list can be truncated if multiple services are affected.
   * Refer to `num_affected_services` for the total count.
   * </pre>
   *
   * <code>
   * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
   * </code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.ServiceContextOrBuilder
      getAffectedServicesOrBuilder(int index) {
    return affectedServices_.get(index);
  }

  public static final int NUM_AFFECTED_SERVICES_FIELD_NUMBER = 8;
  private int numAffectedServices_;
  /**
   *
   *
   * <pre>
   * The total number of services with a non-zero error count for the given
   * filter criteria.
   * </pre>
   *
   * <code>int32 num_affected_services = 8;</code>
   */
  public int getNumAffectedServices() {
    return numAffectedServices_;
  }

  public static final int REPRESENTATIVE_FIELD_NUMBER = 9;
  private com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative_;
  /**
   *
   *
   * <pre>
   * An arbitrary event that is chosen as representative for the whole group.
   * The representative event is intended to be used as a quick preview for
   * the whole group. Events in the group are usually sufficiently similar
   * to each other such that showing an arbitrary representative provides
   * insight into the characteristics of the group as a whole.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9;</code>
   */
  public boolean hasRepresentative() {
    return representative_ != null;
  }
  /**
   *
   *
   * <pre>
   * An arbitrary event that is chosen as representative for the whole group.
   * The representative event is intended to be used as a quick preview for
   * the whole group. Events in the group are usually sufficiently similar
   * to each other such that showing an arbitrary representative provides
   * insight into the characteristics of the group as a whole.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent getRepresentative() {
    return representative_ == null
        ? com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.getDefaultInstance()
        : representative_;
  }
  /**
   *
   *
   * <pre>
   * An arbitrary event that is chosen as representative for the whole group.
   * The representative event is intended to be used as a quick preview for
   * the whole group. Events in the group are usually sufficiently similar
   * to each other such that showing an arbitrary representative provides
   * insight into the characteristics of the group as a whole.
   * </pre>
   *
   * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.ErrorEventOrBuilder
      getRepresentativeOrBuilder() {
    return getRepresentative();
  }

  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 (group_ != null) {
      output.writeMessage(1, getGroup());
    }
    if (count_ != 0L) {
      output.writeInt64(2, count_);
    }
    if (affectedUsersCount_ != 0L) {
      output.writeInt64(3, affectedUsersCount_);
    }
    for (int i = 0; i < timedCounts_.size(); i++) {
      output.writeMessage(4, timedCounts_.get(i));
    }
    if (firstSeenTime_ != null) {
      output.writeMessage(5, getFirstSeenTime());
    }
    if (lastSeenTime_ != null) {
      output.writeMessage(6, getLastSeenTime());
    }
    for (int i = 0; i < affectedServices_.size(); i++) {
      output.writeMessage(7, affectedServices_.get(i));
    }
    if (numAffectedServices_ != 0) {
      output.writeInt32(8, numAffectedServices_);
    }
    if (representative_ != null) {
      output.writeMessage(9, getRepresentative());
    }
    unknownFields.writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (group_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getGroup());
    }
    if (count_ != 0L) {
      size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, count_);
    }
    if (affectedUsersCount_ != 0L) {
      size += com.google.protobuf.CodedOutputStream.computeInt64Size(3, affectedUsersCount_);
    }
    for (int i = 0; i < timedCounts_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, timedCounts_.get(i));
    }
    if (firstSeenTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getFirstSeenTime());
    }
    if (lastSeenTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getLastSeenTime());
    }
    for (int i = 0; i < affectedServices_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, affectedServices_.get(i));
    }
    if (numAffectedServices_ != 0) {
      size += com.google.protobuf.CodedOutputStream.computeInt32Size(8, numAffectedServices_);
    }
    if (representative_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getRepresentative());
    }
    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.ErrorGroupStats)) {
      return super.equals(obj);
    }
    com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats other =
        (com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats) obj;

    if (hasGroup() != other.hasGroup()) return false;
    if (hasGroup()) {
      if (!getGroup().equals(other.getGroup())) return false;
    }
    if (getCount() != other.getCount()) return false;
    if (getAffectedUsersCount() != other.getAffectedUsersCount()) return false;
    if (!getTimedCountsList().equals(other.getTimedCountsList())) return false;
    if (hasFirstSeenTime() != other.hasFirstSeenTime()) return false;
    if (hasFirstSeenTime()) {
      if (!getFirstSeenTime().equals(other.getFirstSeenTime())) return false;
    }
    if (hasLastSeenTime() != other.hasLastSeenTime()) return false;
    if (hasLastSeenTime()) {
      if (!getLastSeenTime().equals(other.getLastSeenTime())) return false;
    }
    if (!getAffectedServicesList().equals(other.getAffectedServicesList())) return false;
    if (getNumAffectedServices() != other.getNumAffectedServices()) return false;
    if (hasRepresentative() != other.hasRepresentative()) return false;
    if (hasRepresentative()) {
      if (!getRepresentative().equals(other.getRepresentative())) return false;
    }
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasGroup()) {
      hash = (37 * hash) + GROUP_FIELD_NUMBER;
      hash = (53 * hash) + getGroup().hashCode();
    }
    hash = (37 * hash) + COUNT_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getCount());
    hash = (37 * hash) + AFFECTED_USERS_COUNT_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getAffectedUsersCount());
    if (getTimedCountsCount() > 0) {
      hash = (37 * hash) + TIMED_COUNTS_FIELD_NUMBER;
      hash = (53 * hash) + getTimedCountsList().hashCode();
    }
    if (hasFirstSeenTime()) {
      hash = (37 * hash) + FIRST_SEEN_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getFirstSeenTime().hashCode();
    }
    if (hasLastSeenTime()) {
      hash = (37 * hash) + LAST_SEEN_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getLastSeenTime().hashCode();
    }
    if (getAffectedServicesCount() > 0) {
      hash = (37 * hash) + AFFECTED_SERVICES_FIELD_NUMBER;
      hash = (53 * hash) + getAffectedServicesList().hashCode();
    }
    hash = (37 * hash) + NUM_AFFECTED_SERVICES_FIELD_NUMBER;
    hash = (53 * hash) + getNumAffectedServices();
    if (hasRepresentative()) {
      hash = (37 * hash) + REPRESENTATIVE_FIELD_NUMBER;
      hash = (53 * hash) + getRepresentative().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats parseFrom(
      java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats 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.ErrorGroupStats parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats 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.ErrorGroupStats parseFrom(
      byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats 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.ErrorGroupStats parseFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats 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.ErrorGroupStats parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats 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.ErrorGroupStats 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.ErrorGroupStats 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.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats 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;
  }
  /**
   *
   *
   * <pre>
   * Data extracted for a specific group based on certain filter criteria,
   * such as a given time period and/or service filter.
   * </pre>
   *
   * Protobuf type {@code google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats)
      com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStatsOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.devtools.clouderrorreporting.v1beta1.ErrorStatsServiceProto
          .internal_static_google_devtools_clouderrorreporting_v1beta1_ErrorGroupStats_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.devtools.clouderrorreporting.v1beta1.ErrorStatsServiceProto
          .internal_static_google_devtools_clouderrorreporting_v1beta1_ErrorGroupStats_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats.class,
              com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats.Builder.class);
    }

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

    private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }

    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
        getTimedCountsFieldBuilder();
        getAffectedServicesFieldBuilder();
      }
    }

    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (groupBuilder_ == null) {
        group_ = null;
      } else {
        group_ = null;
        groupBuilder_ = null;
      }
      count_ = 0L;

      affectedUsersCount_ = 0L;

      if (timedCountsBuilder_ == null) {
        timedCounts_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
      } else {
        timedCountsBuilder_.clear();
      }
      if (firstSeenTimeBuilder_ == null) {
        firstSeenTime_ = null;
      } else {
        firstSeenTime_ = null;
        firstSeenTimeBuilder_ = null;
      }
      if (lastSeenTimeBuilder_ == null) {
        lastSeenTime_ = null;
      } else {
        lastSeenTime_ = null;
        lastSeenTimeBuilder_ = null;
      }
      if (affectedServicesBuilder_ == null) {
        affectedServices_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000040);
      } else {
        affectedServicesBuilder_.clear();
      }
      numAffectedServices_ = 0;

      if (representativeBuilder_ == null) {
        representative_ = null;
      } else {
        representative_ = null;
        representativeBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.devtools.clouderrorreporting.v1beta1.ErrorStatsServiceProto
          .internal_static_google_devtools_clouderrorreporting_v1beta1_ErrorGroupStats_descriptor;
    }

    @java.lang.Override
    public com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats
        getDefaultInstanceForType() {
      return com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats build() {
      com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats buildPartial() {
      com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats result =
          new com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (groupBuilder_ == null) {
        result.group_ = group_;
      } else {
        result.group_ = groupBuilder_.build();
      }
      result.count_ = count_;
      result.affectedUsersCount_ = affectedUsersCount_;
      if (timedCountsBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)) {
          timedCounts_ = java.util.Collections.unmodifiableList(timedCounts_);
          bitField0_ = (bitField0_ & ~0x00000008);
        }
        result.timedCounts_ = timedCounts_;
      } else {
        result.timedCounts_ = timedCountsBuilder_.build();
      }
      if (firstSeenTimeBuilder_ == null) {
        result.firstSeenTime_ = firstSeenTime_;
      } else {
        result.firstSeenTime_ = firstSeenTimeBuilder_.build();
      }
      if (lastSeenTimeBuilder_ == null) {
        result.lastSeenTime_ = lastSeenTime_;
      } else {
        result.lastSeenTime_ = lastSeenTimeBuilder_.build();
      }
      if (affectedServicesBuilder_ == null) {
        if (((bitField0_ & 0x00000040) != 0)) {
          affectedServices_ = java.util.Collections.unmodifiableList(affectedServices_);
          bitField0_ = (bitField0_ & ~0x00000040);
        }
        result.affectedServices_ = affectedServices_;
      } else {
        result.affectedServices_ = affectedServicesBuilder_.build();
      }
      result.numAffectedServices_ = numAffectedServices_;
      if (representativeBuilder_ == null) {
        result.representative_ = representative_;
      } else {
        result.representative_ = representativeBuilder_.build();
      }
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

    @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.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats) {
        return mergeFrom((com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(
        com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats other) {
      if (other
          == com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats.getDefaultInstance())
        return this;
      if (other.hasGroup()) {
        mergeGroup(other.getGroup());
      }
      if (other.getCount() != 0L) {
        setCount(other.getCount());
      }
      if (other.getAffectedUsersCount() != 0L) {
        setAffectedUsersCount(other.getAffectedUsersCount());
      }
      if (timedCountsBuilder_ == null) {
        if (!other.timedCounts_.isEmpty()) {
          if (timedCounts_.isEmpty()) {
            timedCounts_ = other.timedCounts_;
            bitField0_ = (bitField0_ & ~0x00000008);
          } else {
            ensureTimedCountsIsMutable();
            timedCounts_.addAll(other.timedCounts_);
          }
          onChanged();
        }
      } else {
        if (!other.timedCounts_.isEmpty()) {
          if (timedCountsBuilder_.isEmpty()) {
            timedCountsBuilder_.dispose();
            timedCountsBuilder_ = null;
            timedCounts_ = other.timedCounts_;
            bitField0_ = (bitField0_ & ~0x00000008);
            timedCountsBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getTimedCountsFieldBuilder()
                    : null;
          } else {
            timedCountsBuilder_.addAllMessages(other.timedCounts_);
          }
        }
      }
      if (other.hasFirstSeenTime()) {
        mergeFirstSeenTime(other.getFirstSeenTime());
      }
      if (other.hasLastSeenTime()) {
        mergeLastSeenTime(other.getLastSeenTime());
      }
      if (affectedServicesBuilder_ == null) {
        if (!other.affectedServices_.isEmpty()) {
          if (affectedServices_.isEmpty()) {
            affectedServices_ = other.affectedServices_;
            bitField0_ = (bitField0_ & ~0x00000040);
          } else {
            ensureAffectedServicesIsMutable();
            affectedServices_.addAll(other.affectedServices_);
          }
          onChanged();
        }
      } else {
        if (!other.affectedServices_.isEmpty()) {
          if (affectedServicesBuilder_.isEmpty()) {
            affectedServicesBuilder_.dispose();
            affectedServicesBuilder_ = null;
            affectedServices_ = other.affectedServices_;
            bitField0_ = (bitField0_ & ~0x00000040);
            affectedServicesBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getAffectedServicesFieldBuilder()
                    : null;
          } else {
            affectedServicesBuilder_.addAllMessages(other.affectedServices_);
          }
        }
      }
      if (other.getNumAffectedServices() != 0) {
        setNumAffectedServices(other.getNumAffectedServices());
      }
      if (other.hasRepresentative()) {
        mergeRepresentative(other.getRepresentative());
      }
      this.mergeUnknownFields(other.unknownFields);
      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 {
      com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage =
            (com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats)
                e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int bitField0_;

    private com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup group_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup,
            com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup.Builder,
            com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrBuilder>
        groupBuilder_;
    /**
     *
     *
     * <pre>
     * Group data that is independent of the filter criteria.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1;</code>
     */
    public boolean hasGroup() {
      return groupBuilder_ != null || group_ != null;
    }
    /**
     *
     *
     * <pre>
     * Group data that is independent of the filter criteria.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup getGroup() {
      if (groupBuilder_ == null) {
        return group_ == null
            ? com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup.getDefaultInstance()
            : group_;
      } else {
        return groupBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Group data that is independent of the filter criteria.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1;</code>
     */
    public Builder setGroup(com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup value) {
      if (groupBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        group_ = value;
        onChanged();
      } else {
        groupBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Group data that is independent of the filter criteria.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1;</code>
     */
    public Builder setGroup(
        com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup.Builder builderForValue) {
      if (groupBuilder_ == null) {
        group_ = builderForValue.build();
        onChanged();
      } else {
        groupBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Group data that is independent of the filter criteria.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1;</code>
     */
    public Builder mergeGroup(com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup value) {
      if (groupBuilder_ == null) {
        if (group_ != null) {
          group_ =
              com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup.newBuilder(group_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          group_ = value;
        }
        onChanged();
      } else {
        groupBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Group data that is independent of the filter criteria.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1;</code>
     */
    public Builder clearGroup() {
      if (groupBuilder_ == null) {
        group_ = null;
        onChanged();
      } else {
        group_ = null;
        groupBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Group data that is independent of the filter criteria.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup.Builder getGroupBuilder() {

      onChanged();
      return getGroupFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Group data that is independent of the filter criteria.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrBuilder getGroupOrBuilder() {
      if (groupBuilder_ != null) {
        return groupBuilder_.getMessageOrBuilder();
      } else {
        return group_ == null
            ? com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup.getDefaultInstance()
            : group_;
      }
    }
    /**
     *
     *
     * <pre>
     * Group data that is independent of the filter criteria.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorGroup group = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup,
            com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup.Builder,
            com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrBuilder>
        getGroupFieldBuilder() {
      if (groupBuilder_ == null) {
        groupBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup,
                com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup.Builder,
                com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrBuilder>(
                getGroup(), getParentForChildren(), isClean());
        group_ = null;
      }
      return groupBuilder_;
    }

    private long count_;
    /**
     *
     *
     * <pre>
     * Approximate total number of events in the given group that match
     * the filter criteria.
     * </pre>
     *
     * <code>int64 count = 2;</code>
     */
    public long getCount() {
      return count_;
    }
    /**
     *
     *
     * <pre>
     * Approximate total number of events in the given group that match
     * the filter criteria.
     * </pre>
     *
     * <code>int64 count = 2;</code>
     */
    public Builder setCount(long value) {

      count_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate total number of events in the given group that match
     * the filter criteria.
     * </pre>
     *
     * <code>int64 count = 2;</code>
     */
    public Builder clearCount() {

      count_ = 0L;
      onChanged();
      return this;
    }

    private long affectedUsersCount_;
    /**
     *
     *
     * <pre>
     * Approximate number of affected users in the given group that
     * match the filter criteria.
     * Users are distinguished by data in the `ErrorContext` of the
     * individual error events, such as their login name or their remote
     * IP address in case of HTTP requests.
     * The number of affected users can be zero even if the number of
     * errors is non-zero if no data was provided from which the
     * affected user could be deduced.
     * Users are counted based on data in the request
     * context that was provided in the error report. If more users are
     * implicitly affected, such as due to a crash of the whole service,
     * this is not reflected here.
     * </pre>
     *
     * <code>int64 affected_users_count = 3;</code>
     */
    public long getAffectedUsersCount() {
      return affectedUsersCount_;
    }
    /**
     *
     *
     * <pre>
     * Approximate number of affected users in the given group that
     * match the filter criteria.
     * Users are distinguished by data in the `ErrorContext` of the
     * individual error events, such as their login name or their remote
     * IP address in case of HTTP requests.
     * The number of affected users can be zero even if the number of
     * errors is non-zero if no data was provided from which the
     * affected user could be deduced.
     * Users are counted based on data in the request
     * context that was provided in the error report. If more users are
     * implicitly affected, such as due to a crash of the whole service,
     * this is not reflected here.
     * </pre>
     *
     * <code>int64 affected_users_count = 3;</code>
     */
    public Builder setAffectedUsersCount(long value) {

      affectedUsersCount_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate number of affected users in the given group that
     * match the filter criteria.
     * Users are distinguished by data in the `ErrorContext` of the
     * individual error events, such as their login name or their remote
     * IP address in case of HTTP requests.
     * The number of affected users can be zero even if the number of
     * errors is non-zero if no data was provided from which the
     * affected user could be deduced.
     * Users are counted based on data in the request
     * context that was provided in the error report. If more users are
     * implicitly affected, such as due to a crash of the whole service,
     * this is not reflected here.
     * </pre>
     *
     * <code>int64 affected_users_count = 3;</code>
     */
    public Builder clearAffectedUsersCount() {

      affectedUsersCount_ = 0L;
      onChanged();
      return this;
    }

    private java.util.List<com.google.devtools.clouderrorreporting.v1beta1.TimedCount>
        timedCounts_ = java.util.Collections.emptyList();

    private void ensureTimedCountsIsMutable() {
      if (!((bitField0_ & 0x00000008) != 0)) {
        timedCounts_ =
            new java.util.ArrayList<com.google.devtools.clouderrorreporting.v1beta1.TimedCount>(
                timedCounts_);
        bitField0_ |= 0x00000008;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.devtools.clouderrorreporting.v1beta1.TimedCount,
            com.google.devtools.clouderrorreporting.v1beta1.TimedCount.Builder,
            com.google.devtools.clouderrorreporting.v1beta1.TimedCountOrBuilder>
        timedCountsBuilder_;

    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public java.util.List<com.google.devtools.clouderrorreporting.v1beta1.TimedCount>
        getTimedCountsList() {
      if (timedCountsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(timedCounts_);
      } else {
        return timedCountsBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public int getTimedCountsCount() {
      if (timedCountsBuilder_ == null) {
        return timedCounts_.size();
      } else {
        return timedCountsBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.TimedCount getTimedCounts(int index) {
      if (timedCountsBuilder_ == null) {
        return timedCounts_.get(index);
      } else {
        return timedCountsBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public Builder setTimedCounts(
        int index, com.google.devtools.clouderrorreporting.v1beta1.TimedCount value) {
      if (timedCountsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureTimedCountsIsMutable();
        timedCounts_.set(index, value);
        onChanged();
      } else {
        timedCountsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public Builder setTimedCounts(
        int index,
        com.google.devtools.clouderrorreporting.v1beta1.TimedCount.Builder builderForValue) {
      if (timedCountsBuilder_ == null) {
        ensureTimedCountsIsMutable();
        timedCounts_.set(index, builderForValue.build());
        onChanged();
      } else {
        timedCountsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public Builder addTimedCounts(
        com.google.devtools.clouderrorreporting.v1beta1.TimedCount value) {
      if (timedCountsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureTimedCountsIsMutable();
        timedCounts_.add(value);
        onChanged();
      } else {
        timedCountsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public Builder addTimedCounts(
        int index, com.google.devtools.clouderrorreporting.v1beta1.TimedCount value) {
      if (timedCountsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureTimedCountsIsMutable();
        timedCounts_.add(index, value);
        onChanged();
      } else {
        timedCountsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public Builder addTimedCounts(
        com.google.devtools.clouderrorreporting.v1beta1.TimedCount.Builder builderForValue) {
      if (timedCountsBuilder_ == null) {
        ensureTimedCountsIsMutable();
        timedCounts_.add(builderForValue.build());
        onChanged();
      } else {
        timedCountsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public Builder addTimedCounts(
        int index,
        com.google.devtools.clouderrorreporting.v1beta1.TimedCount.Builder builderForValue) {
      if (timedCountsBuilder_ == null) {
        ensureTimedCountsIsMutable();
        timedCounts_.add(index, builderForValue.build());
        onChanged();
      } else {
        timedCountsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public Builder addAllTimedCounts(
        java.lang.Iterable<? extends com.google.devtools.clouderrorreporting.v1beta1.TimedCount>
            values) {
      if (timedCountsBuilder_ == null) {
        ensureTimedCountsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, timedCounts_);
        onChanged();
      } else {
        timedCountsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public Builder clearTimedCounts() {
      if (timedCountsBuilder_ == null) {
        timedCounts_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
        onChanged();
      } else {
        timedCountsBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public Builder removeTimedCounts(int index) {
      if (timedCountsBuilder_ == null) {
        ensureTimedCountsIsMutable();
        timedCounts_.remove(index);
        onChanged();
      } else {
        timedCountsBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.TimedCount.Builder getTimedCountsBuilder(
        int index) {
      return getTimedCountsFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.TimedCountOrBuilder
        getTimedCountsOrBuilder(int index) {
      if (timedCountsBuilder_ == null) {
        return timedCounts_.get(index);
      } else {
        return timedCountsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public java.util.List<
            ? extends com.google.devtools.clouderrorreporting.v1beta1.TimedCountOrBuilder>
        getTimedCountsOrBuilderList() {
      if (timedCountsBuilder_ != null) {
        return timedCountsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(timedCounts_);
      }
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.TimedCount.Builder
        addTimedCountsBuilder() {
      return getTimedCountsFieldBuilder()
          .addBuilder(
              com.google.devtools.clouderrorreporting.v1beta1.TimedCount.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.TimedCount.Builder addTimedCountsBuilder(
        int index) {
      return getTimedCountsFieldBuilder()
          .addBuilder(
              index,
              com.google.devtools.clouderrorreporting.v1beta1.TimedCount.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Approximate number of occurrences over time.
     * Timed counts returned by ListGroups are guaranteed to be:
     * - Inside the requested time interval
     * - Non-overlapping, and
     * - Ordered by ascending time.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TimedCount timed_counts = 4;
     * </code>
     */
    public java.util.List<com.google.devtools.clouderrorreporting.v1beta1.TimedCount.Builder>
        getTimedCountsBuilderList() {
      return getTimedCountsFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.devtools.clouderrorreporting.v1beta1.TimedCount,
            com.google.devtools.clouderrorreporting.v1beta1.TimedCount.Builder,
            com.google.devtools.clouderrorreporting.v1beta1.TimedCountOrBuilder>
        getTimedCountsFieldBuilder() {
      if (timedCountsBuilder_ == null) {
        timedCountsBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.devtools.clouderrorreporting.v1beta1.TimedCount,
                com.google.devtools.clouderrorreporting.v1beta1.TimedCount.Builder,
                com.google.devtools.clouderrorreporting.v1beta1.TimedCountOrBuilder>(
                timedCounts_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean());
        timedCounts_ = null;
      }
      return timedCountsBuilder_;
    }

    private com.google.protobuf.Timestamp firstSeenTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        firstSeenTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Approximate first occurrence that was ever seen for this group
     * and which matches the given filter criteria, ignoring the
     * time_range that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp first_seen_time = 5;</code>
     */
    public boolean hasFirstSeenTime() {
      return firstSeenTimeBuilder_ != null || firstSeenTime_ != null;
    }
    /**
     *
     *
     * <pre>
     * Approximate first occurrence that was ever seen for this group
     * and which matches the given filter criteria, ignoring the
     * time_range that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp first_seen_time = 5;</code>
     */
    public com.google.protobuf.Timestamp getFirstSeenTime() {
      if (firstSeenTimeBuilder_ == null) {
        return firstSeenTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : firstSeenTime_;
      } else {
        return firstSeenTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Approximate first occurrence that was ever seen for this group
     * and which matches the given filter criteria, ignoring the
     * time_range that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp first_seen_time = 5;</code>
     */
    public Builder setFirstSeenTime(com.google.protobuf.Timestamp value) {
      if (firstSeenTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        firstSeenTime_ = value;
        onChanged();
      } else {
        firstSeenTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate first occurrence that was ever seen for this group
     * and which matches the given filter criteria, ignoring the
     * time_range that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp first_seen_time = 5;</code>
     */
    public Builder setFirstSeenTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (firstSeenTimeBuilder_ == null) {
        firstSeenTime_ = builderForValue.build();
        onChanged();
      } else {
        firstSeenTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate first occurrence that was ever seen for this group
     * and which matches the given filter criteria, ignoring the
     * time_range that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp first_seen_time = 5;</code>
     */
    public Builder mergeFirstSeenTime(com.google.protobuf.Timestamp value) {
      if (firstSeenTimeBuilder_ == null) {
        if (firstSeenTime_ != null) {
          firstSeenTime_ =
              com.google.protobuf.Timestamp.newBuilder(firstSeenTime_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          firstSeenTime_ = value;
        }
        onChanged();
      } else {
        firstSeenTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate first occurrence that was ever seen for this group
     * and which matches the given filter criteria, ignoring the
     * time_range that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp first_seen_time = 5;</code>
     */
    public Builder clearFirstSeenTime() {
      if (firstSeenTimeBuilder_ == null) {
        firstSeenTime_ = null;
        onChanged();
      } else {
        firstSeenTime_ = null;
        firstSeenTimeBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate first occurrence that was ever seen for this group
     * and which matches the given filter criteria, ignoring the
     * time_range that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp first_seen_time = 5;</code>
     */
    public com.google.protobuf.Timestamp.Builder getFirstSeenTimeBuilder() {

      onChanged();
      return getFirstSeenTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Approximate first occurrence that was ever seen for this group
     * and which matches the given filter criteria, ignoring the
     * time_range that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp first_seen_time = 5;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getFirstSeenTimeOrBuilder() {
      if (firstSeenTimeBuilder_ != null) {
        return firstSeenTimeBuilder_.getMessageOrBuilder();
      } else {
        return firstSeenTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : firstSeenTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Approximate first occurrence that was ever seen for this group
     * and which matches the given filter criteria, ignoring the
     * time_range that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp first_seen_time = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getFirstSeenTimeFieldBuilder() {
      if (firstSeenTimeBuilder_ == null) {
        firstSeenTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getFirstSeenTime(), getParentForChildren(), isClean());
        firstSeenTime_ = null;
      }
      return firstSeenTimeBuilder_;
    }

    private com.google.protobuf.Timestamp lastSeenTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        lastSeenTimeBuilder_;
    /**
     *
     *
     * <pre>
     * Approximate last occurrence that was ever seen for this group and
     * which matches the given filter criteria, ignoring the time_range
     * that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_seen_time = 6;</code>
     */
    public boolean hasLastSeenTime() {
      return lastSeenTimeBuilder_ != null || lastSeenTime_ != null;
    }
    /**
     *
     *
     * <pre>
     * Approximate last occurrence that was ever seen for this group and
     * which matches the given filter criteria, ignoring the time_range
     * that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_seen_time = 6;</code>
     */
    public com.google.protobuf.Timestamp getLastSeenTime() {
      if (lastSeenTimeBuilder_ == null) {
        return lastSeenTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : lastSeenTime_;
      } else {
        return lastSeenTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * Approximate last occurrence that was ever seen for this group and
     * which matches the given filter criteria, ignoring the time_range
     * that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_seen_time = 6;</code>
     */
    public Builder setLastSeenTime(com.google.protobuf.Timestamp value) {
      if (lastSeenTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        lastSeenTime_ = value;
        onChanged();
      } else {
        lastSeenTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate last occurrence that was ever seen for this group and
     * which matches the given filter criteria, ignoring the time_range
     * that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_seen_time = 6;</code>
     */
    public Builder setLastSeenTime(com.google.protobuf.Timestamp.Builder builderForValue) {
      if (lastSeenTimeBuilder_ == null) {
        lastSeenTime_ = builderForValue.build();
        onChanged();
      } else {
        lastSeenTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate last occurrence that was ever seen for this group and
     * which matches the given filter criteria, ignoring the time_range
     * that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_seen_time = 6;</code>
     */
    public Builder mergeLastSeenTime(com.google.protobuf.Timestamp value) {
      if (lastSeenTimeBuilder_ == null) {
        if (lastSeenTime_ != null) {
          lastSeenTime_ =
              com.google.protobuf.Timestamp.newBuilder(lastSeenTime_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          lastSeenTime_ = value;
        }
        onChanged();
      } else {
        lastSeenTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate last occurrence that was ever seen for this group and
     * which matches the given filter criteria, ignoring the time_range
     * that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_seen_time = 6;</code>
     */
    public Builder clearLastSeenTime() {
      if (lastSeenTimeBuilder_ == null) {
        lastSeenTime_ = null;
        onChanged();
      } else {
        lastSeenTime_ = null;
        lastSeenTimeBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * Approximate last occurrence that was ever seen for this group and
     * which matches the given filter criteria, ignoring the time_range
     * that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_seen_time = 6;</code>
     */
    public com.google.protobuf.Timestamp.Builder getLastSeenTimeBuilder() {

      onChanged();
      return getLastSeenTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * Approximate last occurrence that was ever seen for this group and
     * which matches the given filter criteria, ignoring the time_range
     * that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_seen_time = 6;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getLastSeenTimeOrBuilder() {
      if (lastSeenTimeBuilder_ != null) {
        return lastSeenTimeBuilder_.getMessageOrBuilder();
      } else {
        return lastSeenTime_ == null
            ? com.google.protobuf.Timestamp.getDefaultInstance()
            : lastSeenTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * Approximate last occurrence that was ever seen for this group and
     * which matches the given filter criteria, ignoring the time_range
     * that was specified in the request.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp last_seen_time = 6;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp,
            com.google.protobuf.Timestamp.Builder,
            com.google.protobuf.TimestampOrBuilder>
        getLastSeenTimeFieldBuilder() {
      if (lastSeenTimeBuilder_ == null) {
        lastSeenTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.protobuf.Timestamp,
                com.google.protobuf.Timestamp.Builder,
                com.google.protobuf.TimestampOrBuilder>(
                getLastSeenTime(), getParentForChildren(), isClean());
        lastSeenTime_ = null;
      }
      return lastSeenTimeBuilder_;
    }

    private java.util.List<com.google.devtools.clouderrorreporting.v1beta1.ServiceContext>
        affectedServices_ = java.util.Collections.emptyList();

    private void ensureAffectedServicesIsMutable() {
      if (!((bitField0_ & 0x00000040) != 0)) {
        affectedServices_ =
            new java.util.ArrayList<com.google.devtools.clouderrorreporting.v1beta1.ServiceContext>(
                affectedServices_);
        bitField0_ |= 0x00000040;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.devtools.clouderrorreporting.v1beta1.ServiceContext,
            com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.Builder,
            com.google.devtools.clouderrorreporting.v1beta1.ServiceContextOrBuilder>
        affectedServicesBuilder_;

    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public java.util.List<com.google.devtools.clouderrorreporting.v1beta1.ServiceContext>
        getAffectedServicesList() {
      if (affectedServicesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(affectedServices_);
      } else {
        return affectedServicesBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public int getAffectedServicesCount() {
      if (affectedServicesBuilder_ == null) {
        return affectedServices_.size();
      } else {
        return affectedServicesBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ServiceContext getAffectedServices(
        int index) {
      if (affectedServicesBuilder_ == null) {
        return affectedServices_.get(index);
      } else {
        return affectedServicesBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public Builder setAffectedServices(
        int index, com.google.devtools.clouderrorreporting.v1beta1.ServiceContext value) {
      if (affectedServicesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAffectedServicesIsMutable();
        affectedServices_.set(index, value);
        onChanged();
      } else {
        affectedServicesBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public Builder setAffectedServices(
        int index,
        com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.Builder builderForValue) {
      if (affectedServicesBuilder_ == null) {
        ensureAffectedServicesIsMutable();
        affectedServices_.set(index, builderForValue.build());
        onChanged();
      } else {
        affectedServicesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public Builder addAffectedServices(
        com.google.devtools.clouderrorreporting.v1beta1.ServiceContext value) {
      if (affectedServicesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAffectedServicesIsMutable();
        affectedServices_.add(value);
        onChanged();
      } else {
        affectedServicesBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public Builder addAffectedServices(
        int index, com.google.devtools.clouderrorreporting.v1beta1.ServiceContext value) {
      if (affectedServicesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureAffectedServicesIsMutable();
        affectedServices_.add(index, value);
        onChanged();
      } else {
        affectedServicesBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public Builder addAffectedServices(
        com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.Builder builderForValue) {
      if (affectedServicesBuilder_ == null) {
        ensureAffectedServicesIsMutable();
        affectedServices_.add(builderForValue.build());
        onChanged();
      } else {
        affectedServicesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public Builder addAffectedServices(
        int index,
        com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.Builder builderForValue) {
      if (affectedServicesBuilder_ == null) {
        ensureAffectedServicesIsMutable();
        affectedServices_.add(index, builderForValue.build());
        onChanged();
      } else {
        affectedServicesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public Builder addAllAffectedServices(
        java.lang.Iterable<? extends com.google.devtools.clouderrorreporting.v1beta1.ServiceContext>
            values) {
      if (affectedServicesBuilder_ == null) {
        ensureAffectedServicesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, affectedServices_);
        onChanged();
      } else {
        affectedServicesBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public Builder clearAffectedServices() {
      if (affectedServicesBuilder_ == null) {
        affectedServices_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000040);
        onChanged();
      } else {
        affectedServicesBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public Builder removeAffectedServices(int index) {
      if (affectedServicesBuilder_ == null) {
        ensureAffectedServicesIsMutable();
        affectedServices_.remove(index);
        onChanged();
      } else {
        affectedServicesBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.Builder
        getAffectedServicesBuilder(int index) {
      return getAffectedServicesFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ServiceContextOrBuilder
        getAffectedServicesOrBuilder(int index) {
      if (affectedServicesBuilder_ == null) {
        return affectedServices_.get(index);
      } else {
        return affectedServicesBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public java.util.List<
            ? extends com.google.devtools.clouderrorreporting.v1beta1.ServiceContextOrBuilder>
        getAffectedServicesOrBuilderList() {
      if (affectedServicesBuilder_ != null) {
        return affectedServicesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(affectedServices_);
      }
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.Builder
        addAffectedServicesBuilder() {
      return getAffectedServicesFieldBuilder()
          .addBuilder(
              com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.Builder
        addAffectedServicesBuilder(int index) {
      return getAffectedServicesFieldBuilder()
          .addBuilder(
              index,
              com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * Service contexts with a non-zero error count for the given filter
     * criteria. This list can be truncated if multiple services are affected.
     * Refer to `num_affected_services` for the total count.
     * </pre>
     *
     * <code>
     * repeated .google.devtools.clouderrorreporting.v1beta1.ServiceContext affected_services = 7;
     * </code>
     */
    public java.util.List<com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.Builder>
        getAffectedServicesBuilderList() {
      return getAffectedServicesFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.devtools.clouderrorreporting.v1beta1.ServiceContext,
            com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.Builder,
            com.google.devtools.clouderrorreporting.v1beta1.ServiceContextOrBuilder>
        getAffectedServicesFieldBuilder() {
      if (affectedServicesBuilder_ == null) {
        affectedServicesBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.devtools.clouderrorreporting.v1beta1.ServiceContext,
                com.google.devtools.clouderrorreporting.v1beta1.ServiceContext.Builder,
                com.google.devtools.clouderrorreporting.v1beta1.ServiceContextOrBuilder>(
                affectedServices_,
                ((bitField0_ & 0x00000040) != 0),
                getParentForChildren(),
                isClean());
        affectedServices_ = null;
      }
      return affectedServicesBuilder_;
    }

    private int numAffectedServices_;
    /**
     *
     *
     * <pre>
     * The total number of services with a non-zero error count for the given
     * filter criteria.
     * </pre>
     *
     * <code>int32 num_affected_services = 8;</code>
     */
    public int getNumAffectedServices() {
      return numAffectedServices_;
    }
    /**
     *
     *
     * <pre>
     * The total number of services with a non-zero error count for the given
     * filter criteria.
     * </pre>
     *
     * <code>int32 num_affected_services = 8;</code>
     */
    public Builder setNumAffectedServices(int value) {

      numAffectedServices_ = value;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The total number of services with a non-zero error count for the given
     * filter criteria.
     * </pre>
     *
     * <code>int32 num_affected_services = 8;</code>
     */
    public Builder clearNumAffectedServices() {

      numAffectedServices_ = 0;
      onChanged();
      return this;
    }

    private com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent,
            com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.Builder,
            com.google.devtools.clouderrorreporting.v1beta1.ErrorEventOrBuilder>
        representativeBuilder_;
    /**
     *
     *
     * <pre>
     * An arbitrary event that is chosen as representative for the whole group.
     * The representative event is intended to be used as a quick preview for
     * the whole group. Events in the group are usually sufficiently similar
     * to each other such that showing an arbitrary representative provides
     * insight into the characteristics of the group as a whole.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9;</code>
     */
    public boolean hasRepresentative() {
      return representativeBuilder_ != null || representative_ != null;
    }
    /**
     *
     *
     * <pre>
     * An arbitrary event that is chosen as representative for the whole group.
     * The representative event is intended to be used as a quick preview for
     * the whole group. Events in the group are usually sufficiently similar
     * to each other such that showing an arbitrary representative provides
     * insight into the characteristics of the group as a whole.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent getRepresentative() {
      if (representativeBuilder_ == null) {
        return representative_ == null
            ? com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.getDefaultInstance()
            : representative_;
      } else {
        return representativeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * An arbitrary event that is chosen as representative for the whole group.
     * The representative event is intended to be used as a quick preview for
     * the whole group. Events in the group are usually sufficiently similar
     * to each other such that showing an arbitrary representative provides
     * insight into the characteristics of the group as a whole.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9;</code>
     */
    public Builder setRepresentative(
        com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent value) {
      if (representativeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        representative_ = value;
        onChanged();
      } else {
        representativeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * An arbitrary event that is chosen as representative for the whole group.
     * The representative event is intended to be used as a quick preview for
     * the whole group. Events in the group are usually sufficiently similar
     * to each other such that showing an arbitrary representative provides
     * insight into the characteristics of the group as a whole.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9;</code>
     */
    public Builder setRepresentative(
        com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.Builder builderForValue) {
      if (representativeBuilder_ == null) {
        representative_ = builderForValue.build();
        onChanged();
      } else {
        representativeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * An arbitrary event that is chosen as representative for the whole group.
     * The representative event is intended to be used as a quick preview for
     * the whole group. Events in the group are usually sufficiently similar
     * to each other such that showing an arbitrary representative provides
     * insight into the characteristics of the group as a whole.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9;</code>
     */
    public Builder mergeRepresentative(
        com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent value) {
      if (representativeBuilder_ == null) {
        if (representative_ != null) {
          representative_ =
              com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.newBuilder(representative_)
                  .mergeFrom(value)
                  .buildPartial();
        } else {
          representative_ = value;
        }
        onChanged();
      } else {
        representativeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * An arbitrary event that is chosen as representative for the whole group.
     * The representative event is intended to be used as a quick preview for
     * the whole group. Events in the group are usually sufficiently similar
     * to each other such that showing an arbitrary representative provides
     * insight into the characteristics of the group as a whole.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9;</code>
     */
    public Builder clearRepresentative() {
      if (representativeBuilder_ == null) {
        representative_ = null;
        onChanged();
      } else {
        representative_ = null;
        representativeBuilder_ = null;
      }

      return this;
    }
    /**
     *
     *
     * <pre>
     * An arbitrary event that is chosen as representative for the whole group.
     * The representative event is intended to be used as a quick preview for
     * the whole group. Events in the group are usually sufficiently similar
     * to each other such that showing an arbitrary representative provides
     * insight into the characteristics of the group as a whole.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.Builder
        getRepresentativeBuilder() {

      onChanged();
      return getRepresentativeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * An arbitrary event that is chosen as representative for the whole group.
     * The representative event is intended to be used as a quick preview for
     * the whole group. Events in the group are usually sufficiently similar
     * to each other such that showing an arbitrary representative provides
     * insight into the characteristics of the group as a whole.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.ErrorEventOrBuilder
        getRepresentativeOrBuilder() {
      if (representativeBuilder_ != null) {
        return representativeBuilder_.getMessageOrBuilder();
      } else {
        return representative_ == null
            ? com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.getDefaultInstance()
            : representative_;
      }
    }
    /**
     *
     *
     * <pre>
     * An arbitrary event that is chosen as representative for the whole group.
     * The representative event is intended to be used as a quick preview for
     * the whole group. Events in the group are usually sufficiently similar
     * to each other such that showing an arbitrary representative provides
     * insight into the characteristics of the group as a whole.
     * </pre>
     *
     * <code>.google.devtools.clouderrorreporting.v1beta1.ErrorEvent representative = 9;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent,
            com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.Builder,
            com.google.devtools.clouderrorreporting.v1beta1.ErrorEventOrBuilder>
        getRepresentativeFieldBuilder() {
      if (representativeBuilder_ == null) {
        representativeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent,
                com.google.devtools.clouderrorreporting.v1beta1.ErrorEvent.Builder,
                com.google.devtools.clouderrorreporting.v1beta1.ErrorEventOrBuilder>(
                getRepresentative(), getParentForChildren(), isClean());
        representative_ = null;
      }
      return representativeBuilder_;
    }

    @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:google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats)
  }

  // @@protoc_insertion_point(class_scope:google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats)
  private static final com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats
      DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats();
  }

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

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

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

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

  @java.lang.Override
  public com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupStats
      getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
