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

package com.google.devtools.clouderrorreporting.v1beta1;

/**
 * <pre>
 * Description of a group of similar error events.
 * </pre>
 *
 * Protobuf type {@code google.devtools.clouderrorreporting.v1beta1.ErrorGroup}
 */
public  final class ErrorGroup extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.devtools.clouderrorreporting.v1beta1.ErrorGroup)
    ErrorGroupOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ErrorGroup.newBuilder() to construct.
  private ErrorGroup(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private ErrorGroup() {
    name_ = "";
    groupId_ = "";
    trackingIssues_ = java.util.Collections.emptyList();
  }

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

            name_ = s;
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();

            groupId_ = s;
            break;
          }
          case 26: {
            if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
              trackingIssues_ = new java.util.ArrayList<com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue>();
              mutable_bitField0_ |= 0x00000004;
            }
            trackingIssues_.add(
                input.readMessage(com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue.parser(), extensionRegistry));
            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_ & 0x00000004) == 0x00000004)) {
        trackingIssues_ = java.util.Collections.unmodifiableList(trackingIssues_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.devtools.clouderrorreporting.v1beta1.CommonProto.internal_static_google_devtools_clouderrorreporting_v1beta1_ErrorGroup_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.devtools.clouderrorreporting.v1beta1.CommonProto.internal_static_google_devtools_clouderrorreporting_v1beta1_ErrorGroup_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup.class, com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup.Builder.class);
  }

  private int bitField0_;
  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   * <pre>
   * The group resource name.
   * Example: &lt;code&gt;projects/my-project-123/groups/my-groupid&lt;/code&gt;
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The group resource name.
   * Example: &lt;code&gt;projects/my-project-123/groups/my-groupid&lt;/code&gt;
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  public com.google.protobuf.ByteString
      getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int GROUP_ID_FIELD_NUMBER = 2;
  private volatile java.lang.Object groupId_;
  /**
   * <pre>
   * Group IDs are unique for a given project. If the same kind of error
   * occurs in different service contexts, it will receive the same group ID.
   * </pre>
   *
   * <code>string group_id = 2;</code>
   */
  public java.lang.String getGroupId() {
    java.lang.Object ref = groupId_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      groupId_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Group IDs are unique for a given project. If the same kind of error
   * occurs in different service contexts, it will receive the same group ID.
   * </pre>
   *
   * <code>string group_id = 2;</code>
   */
  public com.google.protobuf.ByteString
      getGroupIdBytes() {
    java.lang.Object ref = groupId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      groupId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TRACKING_ISSUES_FIELD_NUMBER = 3;
  private java.util.List<com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue> trackingIssues_;
  /**
   * <pre>
   * Associated tracking issues.
   * </pre>
   *
   * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
   */
  public java.util.List<com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue> getTrackingIssuesList() {
    return trackingIssues_;
  }
  /**
   * <pre>
   * Associated tracking issues.
   * </pre>
   *
   * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
   */
  public java.util.List<? extends com.google.devtools.clouderrorreporting.v1beta1.TrackingIssueOrBuilder> 
      getTrackingIssuesOrBuilderList() {
    return trackingIssues_;
  }
  /**
   * <pre>
   * Associated tracking issues.
   * </pre>
   *
   * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
   */
  public int getTrackingIssuesCount() {
    return trackingIssues_.size();
  }
  /**
   * <pre>
   * Associated tracking issues.
   * </pre>
   *
   * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue getTrackingIssues(int index) {
    return trackingIssues_.get(index);
  }
  /**
   * <pre>
   * Associated tracking issues.
   * </pre>
   *
   * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
   */
  public com.google.devtools.clouderrorreporting.v1beta1.TrackingIssueOrBuilder getTrackingIssuesOrBuilder(
      int index) {
    return trackingIssues_.get(index);
  }

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

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!getNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (!getGroupIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, groupId_);
    }
    for (int i = 0; i < trackingIssues_.size(); i++) {
      output.writeMessage(3, trackingIssues_.get(i));
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!getNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (!getGroupIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, groupId_);
    }
    for (int i = 0; i < trackingIssues_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, trackingIssues_.get(i));
    }
    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.ErrorGroup)) {
      return super.equals(obj);
    }
    com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup other = (com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup) obj;

    boolean result = true;
    result = result && getName()
        .equals(other.getName());
    result = result && getGroupId()
        .equals(other.getGroupId());
    result = result && getTrackingIssuesList()
        .equals(other.getTrackingIssuesList());
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + GROUP_ID_FIELD_NUMBER;
    hash = (53 * hash) + getGroupId().hashCode();
    if (getTrackingIssuesCount() > 0) {
      hash = (37 * hash) + TRACKING_ISSUES_FIELD_NUMBER;
      hash = (53 * hash) + getTrackingIssuesList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   * Description of a group of similar error events.
   * </pre>
   *
   * Protobuf type {@code google.devtools.clouderrorreporting.v1beta1.ErrorGroup}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.devtools.clouderrorreporting.v1beta1.ErrorGroup)
      com.google.devtools.clouderrorreporting.v1beta1.ErrorGroupOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.devtools.clouderrorreporting.v1beta1.CommonProto.internal_static_google_devtools_clouderrorreporting_v1beta1_ErrorGroup_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.devtools.clouderrorreporting.v1beta1.CommonProto.internal_static_google_devtools_clouderrorreporting_v1beta1_ErrorGroup_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup.class, com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup.Builder.class);
    }

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

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

      groupId_ = "";

      if (trackingIssuesBuilder_ == null) {
        trackingIssues_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
      } else {
        trackingIssuesBuilder_.clear();
      }
      return this;
    }

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

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

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

    public com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup buildPartial() {
      com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup result = new com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.name_ = name_;
      result.groupId_ = groupId_;
      if (trackingIssuesBuilder_ == null) {
        if (((bitField0_ & 0x00000004) == 0x00000004)) {
          trackingIssues_ = java.util.Collections.unmodifiableList(trackingIssues_);
          bitField0_ = (bitField0_ & ~0x00000004);
        }
        result.trackingIssues_ = trackingIssues_;
      } else {
        result.trackingIssues_ = trackingIssuesBuilder_.build();
      }
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup other) {
      if (other == com.google.devtools.clouderrorreporting.v1beta1.ErrorGroup.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (!other.getGroupId().isEmpty()) {
        groupId_ = other.groupId_;
        onChanged();
      }
      if (trackingIssuesBuilder_ == null) {
        if (!other.trackingIssues_.isEmpty()) {
          if (trackingIssues_.isEmpty()) {
            trackingIssues_ = other.trackingIssues_;
            bitField0_ = (bitField0_ & ~0x00000004);
          } else {
            ensureTrackingIssuesIsMutable();
            trackingIssues_.addAll(other.trackingIssues_);
          }
          onChanged();
        }
      } else {
        if (!other.trackingIssues_.isEmpty()) {
          if (trackingIssuesBuilder_.isEmpty()) {
            trackingIssuesBuilder_.dispose();
            trackingIssuesBuilder_ = null;
            trackingIssues_ = other.trackingIssues_;
            bitField0_ = (bitField0_ & ~0x00000004);
            trackingIssuesBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getTrackingIssuesFieldBuilder() : null;
          } else {
            trackingIssuesBuilder_.addAllMessages(other.trackingIssues_);
          }
        }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

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

    private java.lang.Object name_ = "";
    /**
     * <pre>
     * The group resource name.
     * Example: &lt;code&gt;projects/my-project-123/groups/my-groupid&lt;/code&gt;
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The group resource name.
     * Example: &lt;code&gt;projects/my-project-123/groups/my-groupid&lt;/code&gt;
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public com.google.protobuf.ByteString
        getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The group resource name.
     * Example: &lt;code&gt;projects/my-project-123/groups/my-groupid&lt;/code&gt;
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder setName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      name_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The group resource name.
     * Example: &lt;code&gt;projects/my-project-123/groups/my-groupid&lt;/code&gt;
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder clearName() {
      
      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The group resource name.
     * Example: &lt;code&gt;projects/my-project-123/groups/my-groupid&lt;/code&gt;
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder setNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      name_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object groupId_ = "";
    /**
     * <pre>
     * Group IDs are unique for a given project. If the same kind of error
     * occurs in different service contexts, it will receive the same group ID.
     * </pre>
     *
     * <code>string group_id = 2;</code>
     */
    public java.lang.String getGroupId() {
      java.lang.Object ref = groupId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        groupId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Group IDs are unique for a given project. If the same kind of error
     * occurs in different service contexts, it will receive the same group ID.
     * </pre>
     *
     * <code>string group_id = 2;</code>
     */
    public com.google.protobuf.ByteString
        getGroupIdBytes() {
      java.lang.Object ref = groupId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        groupId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Group IDs are unique for a given project. If the same kind of error
     * occurs in different service contexts, it will receive the same group ID.
     * </pre>
     *
     * <code>string group_id = 2;</code>
     */
    public Builder setGroupId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      groupId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Group IDs are unique for a given project. If the same kind of error
     * occurs in different service contexts, it will receive the same group ID.
     * </pre>
     *
     * <code>string group_id = 2;</code>
     */
    public Builder clearGroupId() {
      
      groupId_ = getDefaultInstance().getGroupId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Group IDs are unique for a given project. If the same kind of error
     * occurs in different service contexts, it will receive the same group ID.
     * </pre>
     *
     * <code>string group_id = 2;</code>
     */
    public Builder setGroupIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      groupId_ = value;
      onChanged();
      return this;
    }

    private java.util.List<com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue> trackingIssues_ =
      java.util.Collections.emptyList();
    private void ensureTrackingIssuesIsMutable() {
      if (!((bitField0_ & 0x00000004) == 0x00000004)) {
        trackingIssues_ = new java.util.ArrayList<com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue>(trackingIssues_);
        bitField0_ |= 0x00000004;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue, com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue.Builder, com.google.devtools.clouderrorreporting.v1beta1.TrackingIssueOrBuilder> trackingIssuesBuilder_;

    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public java.util.List<com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue> getTrackingIssuesList() {
      if (trackingIssuesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(trackingIssues_);
      } else {
        return trackingIssuesBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public int getTrackingIssuesCount() {
      if (trackingIssuesBuilder_ == null) {
        return trackingIssues_.size();
      } else {
        return trackingIssuesBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue getTrackingIssues(int index) {
      if (trackingIssuesBuilder_ == null) {
        return trackingIssues_.get(index);
      } else {
        return trackingIssuesBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public Builder setTrackingIssues(
        int index, com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue value) {
      if (trackingIssuesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureTrackingIssuesIsMutable();
        trackingIssues_.set(index, value);
        onChanged();
      } else {
        trackingIssuesBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public Builder setTrackingIssues(
        int index, com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue.Builder builderForValue) {
      if (trackingIssuesBuilder_ == null) {
        ensureTrackingIssuesIsMutable();
        trackingIssues_.set(index, builderForValue.build());
        onChanged();
      } else {
        trackingIssuesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public Builder addTrackingIssues(com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue value) {
      if (trackingIssuesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureTrackingIssuesIsMutable();
        trackingIssues_.add(value);
        onChanged();
      } else {
        trackingIssuesBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public Builder addTrackingIssues(
        int index, com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue value) {
      if (trackingIssuesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureTrackingIssuesIsMutable();
        trackingIssues_.add(index, value);
        onChanged();
      } else {
        trackingIssuesBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public Builder addTrackingIssues(
        com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue.Builder builderForValue) {
      if (trackingIssuesBuilder_ == null) {
        ensureTrackingIssuesIsMutable();
        trackingIssues_.add(builderForValue.build());
        onChanged();
      } else {
        trackingIssuesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public Builder addTrackingIssues(
        int index, com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue.Builder builderForValue) {
      if (trackingIssuesBuilder_ == null) {
        ensureTrackingIssuesIsMutable();
        trackingIssues_.add(index, builderForValue.build());
        onChanged();
      } else {
        trackingIssuesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public Builder addAllTrackingIssues(
        java.lang.Iterable<? extends com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue> values) {
      if (trackingIssuesBuilder_ == null) {
        ensureTrackingIssuesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, trackingIssues_);
        onChanged();
      } else {
        trackingIssuesBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public Builder clearTrackingIssues() {
      if (trackingIssuesBuilder_ == null) {
        trackingIssues_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000004);
        onChanged();
      } else {
        trackingIssuesBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public Builder removeTrackingIssues(int index) {
      if (trackingIssuesBuilder_ == null) {
        ensureTrackingIssuesIsMutable();
        trackingIssues_.remove(index);
        onChanged();
      } else {
        trackingIssuesBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue.Builder getTrackingIssuesBuilder(
        int index) {
      return getTrackingIssuesFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.TrackingIssueOrBuilder getTrackingIssuesOrBuilder(
        int index) {
      if (trackingIssuesBuilder_ == null) {
        return trackingIssues_.get(index);  } else {
        return trackingIssuesBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public java.util.List<? extends com.google.devtools.clouderrorreporting.v1beta1.TrackingIssueOrBuilder> 
         getTrackingIssuesOrBuilderList() {
      if (trackingIssuesBuilder_ != null) {
        return trackingIssuesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(trackingIssues_);
      }
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue.Builder addTrackingIssuesBuilder() {
      return getTrackingIssuesFieldBuilder().addBuilder(
          com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue.getDefaultInstance());
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue.Builder addTrackingIssuesBuilder(
        int index) {
      return getTrackingIssuesFieldBuilder().addBuilder(
          index, com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue.getDefaultInstance());
    }
    /**
     * <pre>
     * Associated tracking issues.
     * </pre>
     *
     * <code>repeated .google.devtools.clouderrorreporting.v1beta1.TrackingIssue tracking_issues = 3;</code>
     */
    public java.util.List<com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue.Builder> 
         getTrackingIssuesBuilderList() {
      return getTrackingIssuesFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue, com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue.Builder, com.google.devtools.clouderrorreporting.v1beta1.TrackingIssueOrBuilder> 
        getTrackingIssuesFieldBuilder() {
      if (trackingIssuesBuilder_ == null) {
        trackingIssuesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue, com.google.devtools.clouderrorreporting.v1beta1.TrackingIssue.Builder, com.google.devtools.clouderrorreporting.v1beta1.TrackingIssueOrBuilder>(
                trackingIssues_,
                ((bitField0_ & 0x00000004) == 0x00000004),
                getParentForChildren(),
                isClean());
        trackingIssues_ = null;
      }
      return trackingIssuesBuilder_;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

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


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

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

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

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

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

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

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

}

