// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/devtools/build/v1/publish_build_event.proto

package com.google.devtools.build.v1;

/**
 * <pre>
 * The fist 3 fields are identical to OrderedBuildEvent so we can have wire-
 * compatibility when migrating BES publishers.
 * </pre>
 *
 * Protobuf type {@code google.devtools.build.v1.PublishBuildToolEventStreamRequest}
 */
public  final class PublishBuildToolEventStreamRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.devtools.build.v1.PublishBuildToolEventStreamRequest)
    PublishBuildToolEventStreamRequestOrBuilder {
private static final long serialVersionUID = 0L;
  // Use PublishBuildToolEventStreamRequest.newBuilder() to construct.
  private PublishBuildToolEventStreamRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private PublishBuildToolEventStreamRequest() {
    sequenceNumber_ = 0L;
    notificationKeywords_ = com.google.protobuf.LazyStringArrayList.EMPTY;
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private PublishBuildToolEventStreamRequest(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    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: {
            com.google.devtools.build.v1.StreamId.Builder subBuilder = null;
            if (streamId_ != null) {
              subBuilder = streamId_.toBuilder();
            }
            streamId_ = input.readMessage(com.google.devtools.build.v1.StreamId.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(streamId_);
              streamId_ = subBuilder.buildPartial();
            }

            break;
          }
          case 16: {

            sequenceNumber_ = input.readInt64();
            break;
          }
          case 26: {
            com.google.devtools.build.v1.BuildEvent.Builder subBuilder = null;
            if (event_ != null) {
              subBuilder = event_.toBuilder();
            }
            event_ = input.readMessage(com.google.devtools.build.v1.BuildEvent.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(event_);
              event_ = subBuilder.buildPartial();
            }

            break;
          }
          case 34: {
            com.google.devtools.build.v1.OrderedBuildEvent.Builder subBuilder = null;
            if (orderedBuildEvent_ != null) {
              subBuilder = orderedBuildEvent_.toBuilder();
            }
            orderedBuildEvent_ = input.readMessage(com.google.devtools.build.v1.OrderedBuildEvent.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(orderedBuildEvent_);
              orderedBuildEvent_ = subBuilder.buildPartial();
            }

            break;
          }
          case 42: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
              notificationKeywords_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000010;
            }
            notificationKeywords_.add(s);
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
        notificationKeywords_ = notificationKeywords_.getUnmodifiableView();
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.devtools.build.v1.BackendProto.internal_static_google_devtools_build_v1_PublishBuildToolEventStreamRequest_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.devtools.build.v1.BackendProto.internal_static_google_devtools_build_v1_PublishBuildToolEventStreamRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.devtools.build.v1.PublishBuildToolEventStreamRequest.class, com.google.devtools.build.v1.PublishBuildToolEventStreamRequest.Builder.class);
  }

  private int bitField0_;
  public static final int STREAM_ID_FIELD_NUMBER = 1;
  private com.google.devtools.build.v1.StreamId streamId_;
  /**
   * <pre>
   * Which build event stream this event belongs to.
   * </pre>
   *
   * <code>.google.devtools.build.v1.StreamId stream_id = 1 [deprecated = true];</code>
   */
  @java.lang.Deprecated public boolean hasStreamId() {
    return streamId_ != null;
  }
  /**
   * <pre>
   * Which build event stream this event belongs to.
   * </pre>
   *
   * <code>.google.devtools.build.v1.StreamId stream_id = 1 [deprecated = true];</code>
   */
  @java.lang.Deprecated public com.google.devtools.build.v1.StreamId getStreamId() {
    return streamId_ == null ? com.google.devtools.build.v1.StreamId.getDefaultInstance() : streamId_;
  }
  /**
   * <pre>
   * Which build event stream this event belongs to.
   * </pre>
   *
   * <code>.google.devtools.build.v1.StreamId stream_id = 1 [deprecated = true];</code>
   */
  @java.lang.Deprecated public com.google.devtools.build.v1.StreamIdOrBuilder getStreamIdOrBuilder() {
    return getStreamId();
  }

  public static final int SEQUENCE_NUMBER_FIELD_NUMBER = 2;
  private long sequenceNumber_;
  /**
   * <pre>
   * The position of this event in the stream. The sequence numbers for a build
   * event stream should be a sequence of consecutive natural numbers starting
   * from one. (1, 2, 3, ...)
   * </pre>
   *
   * <code>int64 sequence_number = 2 [deprecated = true];</code>
   */
  @java.lang.Deprecated public long getSequenceNumber() {
    return sequenceNumber_;
  }

  public static final int EVENT_FIELD_NUMBER = 3;
  private com.google.devtools.build.v1.BuildEvent event_;
  /**
   * <pre>
   * The actual event.
   * </pre>
   *
   * <code>.google.devtools.build.v1.BuildEvent event = 3 [deprecated = true];</code>
   */
  @java.lang.Deprecated public boolean hasEvent() {
    return event_ != null;
  }
  /**
   * <pre>
   * The actual event.
   * </pre>
   *
   * <code>.google.devtools.build.v1.BuildEvent event = 3 [deprecated = true];</code>
   */
  @java.lang.Deprecated public com.google.devtools.build.v1.BuildEvent getEvent() {
    return event_ == null ? com.google.devtools.build.v1.BuildEvent.getDefaultInstance() : event_;
  }
  /**
   * <pre>
   * The actual event.
   * </pre>
   *
   * <code>.google.devtools.build.v1.BuildEvent event = 3 [deprecated = true];</code>
   */
  @java.lang.Deprecated public com.google.devtools.build.v1.BuildEventOrBuilder getEventOrBuilder() {
    return getEvent();
  }

  public static final int ORDERED_BUILD_EVENT_FIELD_NUMBER = 4;
  private com.google.devtools.build.v1.OrderedBuildEvent orderedBuildEvent_;
  /**
   * <pre>
   * The build event with position info.
   * New publishing clients should use this field rather than the 3 above.
   * </pre>
   *
   * <code>.google.devtools.build.v1.OrderedBuildEvent ordered_build_event = 4;</code>
   */
  public boolean hasOrderedBuildEvent() {
    return orderedBuildEvent_ != null;
  }
  /**
   * <pre>
   * The build event with position info.
   * New publishing clients should use this field rather than the 3 above.
   * </pre>
   *
   * <code>.google.devtools.build.v1.OrderedBuildEvent ordered_build_event = 4;</code>
   */
  public com.google.devtools.build.v1.OrderedBuildEvent getOrderedBuildEvent() {
    return orderedBuildEvent_ == null ? com.google.devtools.build.v1.OrderedBuildEvent.getDefaultInstance() : orderedBuildEvent_;
  }
  /**
   * <pre>
   * The build event with position info.
   * New publishing clients should use this field rather than the 3 above.
   * </pre>
   *
   * <code>.google.devtools.build.v1.OrderedBuildEvent ordered_build_event = 4;</code>
   */
  public com.google.devtools.build.v1.OrderedBuildEventOrBuilder getOrderedBuildEventOrBuilder() {
    return getOrderedBuildEvent();
  }

  public static final int NOTIFICATION_KEYWORDS_FIELD_NUMBER = 5;
  private com.google.protobuf.LazyStringList notificationKeywords_;
  /**
   * <pre>
   * The keywords to be attached to the notification which notifies the start
   * of a new build event stream. BES only reads this field when sequence_number
   * or ordered_build_event.sequence_number is 1 in this message. If this field
   * is empty, BES will not publish notification messages for this stream.
   * </pre>
   *
   * <code>repeated string notification_keywords = 5;</code>
   */
  public com.google.protobuf.ProtocolStringList
      getNotificationKeywordsList() {
    return notificationKeywords_;
  }
  /**
   * <pre>
   * The keywords to be attached to the notification which notifies the start
   * of a new build event stream. BES only reads this field when sequence_number
   * or ordered_build_event.sequence_number is 1 in this message. If this field
   * is empty, BES will not publish notification messages for this stream.
   * </pre>
   *
   * <code>repeated string notification_keywords = 5;</code>
   */
  public int getNotificationKeywordsCount() {
    return notificationKeywords_.size();
  }
  /**
   * <pre>
   * The keywords to be attached to the notification which notifies the start
   * of a new build event stream. BES only reads this field when sequence_number
   * or ordered_build_event.sequence_number is 1 in this message. If this field
   * is empty, BES will not publish notification messages for this stream.
   * </pre>
   *
   * <code>repeated string notification_keywords = 5;</code>
   */
  public java.lang.String getNotificationKeywords(int index) {
    return notificationKeywords_.get(index);
  }
  /**
   * <pre>
   * The keywords to be attached to the notification which notifies the start
   * of a new build event stream. BES only reads this field when sequence_number
   * or ordered_build_event.sequence_number is 1 in this message. If this field
   * is empty, BES will not publish notification messages for this stream.
   * </pre>
   *
   * <code>repeated string notification_keywords = 5;</code>
   */
  public com.google.protobuf.ByteString
      getNotificationKeywordsBytes(int index) {
    return notificationKeywords_.getByteString(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 (streamId_ != null) {
      output.writeMessage(1, getStreamId());
    }
    if (sequenceNumber_ != 0L) {
      output.writeInt64(2, sequenceNumber_);
    }
    if (event_ != null) {
      output.writeMessage(3, getEvent());
    }
    if (orderedBuildEvent_ != null) {
      output.writeMessage(4, getOrderedBuildEvent());
    }
    for (int i = 0; i < notificationKeywords_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, notificationKeywords_.getRaw(i));
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (streamId_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getStreamId());
    }
    if (sequenceNumber_ != 0L) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(2, sequenceNumber_);
    }
    if (event_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, getEvent());
    }
    if (orderedBuildEvent_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, getOrderedBuildEvent());
    }
    {
      int dataSize = 0;
      for (int i = 0; i < notificationKeywords_.size(); i++) {
        dataSize += computeStringSizeNoTag(notificationKeywords_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getNotificationKeywordsList().size();
    }
    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.build.v1.PublishBuildToolEventStreamRequest)) {
      return super.equals(obj);
    }
    com.google.devtools.build.v1.PublishBuildToolEventStreamRequest other = (com.google.devtools.build.v1.PublishBuildToolEventStreamRequest) obj;

    boolean result = true;
    result = result && (hasStreamId() == other.hasStreamId());
    if (hasStreamId()) {
      result = result && getStreamId()
          .equals(other.getStreamId());
    }
    result = result && (getSequenceNumber()
        == other.getSequenceNumber());
    result = result && (hasEvent() == other.hasEvent());
    if (hasEvent()) {
      result = result && getEvent()
          .equals(other.getEvent());
    }
    result = result && (hasOrderedBuildEvent() == other.hasOrderedBuildEvent());
    if (hasOrderedBuildEvent()) {
      result = result && getOrderedBuildEvent()
          .equals(other.getOrderedBuildEvent());
    }
    result = result && getNotificationKeywordsList()
        .equals(other.getNotificationKeywordsList());
    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();
    if (hasStreamId()) {
      hash = (37 * hash) + STREAM_ID_FIELD_NUMBER;
      hash = (53 * hash) + getStreamId().hashCode();
    }
    hash = (37 * hash) + SEQUENCE_NUMBER_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        getSequenceNumber());
    if (hasEvent()) {
      hash = (37 * hash) + EVENT_FIELD_NUMBER;
      hash = (53 * hash) + getEvent().hashCode();
    }
    if (hasOrderedBuildEvent()) {
      hash = (37 * hash) + ORDERED_BUILD_EVENT_FIELD_NUMBER;
      hash = (53 * hash) + getOrderedBuildEvent().hashCode();
    }
    if (getNotificationKeywordsCount() > 0) {
      hash = (37 * hash) + NOTIFICATION_KEYWORDS_FIELD_NUMBER;
      hash = (53 * hash) + getNotificationKeywordsList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.devtools.build.v1.PublishBuildToolEventStreamRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.devtools.build.v1.PublishBuildToolEventStreamRequest 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.build.v1.PublishBuildToolEventStreamRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.devtools.build.v1.PublishBuildToolEventStreamRequest 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.build.v1.PublishBuildToolEventStreamRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.devtools.build.v1.PublishBuildToolEventStreamRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.devtools.build.v1.PublishBuildToolEventStreamRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.devtools.build.v1.PublishBuildToolEventStreamRequest 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.build.v1.PublishBuildToolEventStreamRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.devtools.build.v1.PublishBuildToolEventStreamRequest 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.build.v1.PublishBuildToolEventStreamRequest parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.devtools.build.v1.PublishBuildToolEventStreamRequest 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.build.v1.PublishBuildToolEventStreamRequest 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>
   * The fist 3 fields are identical to OrderedBuildEvent so we can have wire-
   * compatibility when migrating BES publishers.
   * </pre>
   *
   * Protobuf type {@code google.devtools.build.v1.PublishBuildToolEventStreamRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.devtools.build.v1.PublishBuildToolEventStreamRequest)
      com.google.devtools.build.v1.PublishBuildToolEventStreamRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.devtools.build.v1.BackendProto.internal_static_google_devtools_build_v1_PublishBuildToolEventStreamRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.devtools.build.v1.BackendProto.internal_static_google_devtools_build_v1_PublishBuildToolEventStreamRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.devtools.build.v1.PublishBuildToolEventStreamRequest.class, com.google.devtools.build.v1.PublishBuildToolEventStreamRequest.Builder.class);
    }

    // Construct using com.google.devtools.build.v1.PublishBuildToolEventStreamRequest.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    public Builder clear() {
      super.clear();
      if (streamIdBuilder_ == null) {
        streamId_ = null;
      } else {
        streamId_ = null;
        streamIdBuilder_ = null;
      }
      sequenceNumber_ = 0L;

      if (eventBuilder_ == null) {
        event_ = null;
      } else {
        event_ = null;
        eventBuilder_ = null;
      }
      if (orderedBuildEventBuilder_ == null) {
        orderedBuildEvent_ = null;
      } else {
        orderedBuildEvent_ = null;
        orderedBuildEventBuilder_ = null;
      }
      notificationKeywords_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000010);
      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.devtools.build.v1.BackendProto.internal_static_google_devtools_build_v1_PublishBuildToolEventStreamRequest_descriptor;
    }

    public com.google.devtools.build.v1.PublishBuildToolEventStreamRequest getDefaultInstanceForType() {
      return com.google.devtools.build.v1.PublishBuildToolEventStreamRequest.getDefaultInstance();
    }

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

    public com.google.devtools.build.v1.PublishBuildToolEventStreamRequest buildPartial() {
      com.google.devtools.build.v1.PublishBuildToolEventStreamRequest result = new com.google.devtools.build.v1.PublishBuildToolEventStreamRequest(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (streamIdBuilder_ == null) {
        result.streamId_ = streamId_;
      } else {
        result.streamId_ = streamIdBuilder_.build();
      }
      result.sequenceNumber_ = sequenceNumber_;
      if (eventBuilder_ == null) {
        result.event_ = event_;
      } else {
        result.event_ = eventBuilder_.build();
      }
      if (orderedBuildEventBuilder_ == null) {
        result.orderedBuildEvent_ = orderedBuildEvent_;
      } else {
        result.orderedBuildEvent_ = orderedBuildEventBuilder_.build();
      }
      if (((bitField0_ & 0x00000010) == 0x00000010)) {
        notificationKeywords_ = notificationKeywords_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000010);
      }
      result.notificationKeywords_ = notificationKeywords_;
      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.build.v1.PublishBuildToolEventStreamRequest) {
        return mergeFrom((com.google.devtools.build.v1.PublishBuildToolEventStreamRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.devtools.build.v1.PublishBuildToolEventStreamRequest other) {
      if (other == com.google.devtools.build.v1.PublishBuildToolEventStreamRequest.getDefaultInstance()) return this;
      if (other.hasStreamId()) {
        mergeStreamId(other.getStreamId());
      }
      if (other.getSequenceNumber() != 0L) {
        setSequenceNumber(other.getSequenceNumber());
      }
      if (other.hasEvent()) {
        mergeEvent(other.getEvent());
      }
      if (other.hasOrderedBuildEvent()) {
        mergeOrderedBuildEvent(other.getOrderedBuildEvent());
      }
      if (!other.notificationKeywords_.isEmpty()) {
        if (notificationKeywords_.isEmpty()) {
          notificationKeywords_ = other.notificationKeywords_;
          bitField0_ = (bitField0_ & ~0x00000010);
        } else {
          ensureNotificationKeywordsIsMutable();
          notificationKeywords_.addAll(other.notificationKeywords_);
        }
        onChanged();
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

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

    private com.google.devtools.build.v1.StreamId streamId_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.StreamId, com.google.devtools.build.v1.StreamId.Builder, com.google.devtools.build.v1.StreamIdOrBuilder> streamIdBuilder_;
    /**
     * <pre>
     * Which build event stream this event belongs to.
     * </pre>
     *
     * <code>.google.devtools.build.v1.StreamId stream_id = 1 [deprecated = true];</code>
     */
    @java.lang.Deprecated public boolean hasStreamId() {
      return streamIdBuilder_ != null || streamId_ != null;
    }
    /**
     * <pre>
     * Which build event stream this event belongs to.
     * </pre>
     *
     * <code>.google.devtools.build.v1.StreamId stream_id = 1 [deprecated = true];</code>
     */
    @java.lang.Deprecated public com.google.devtools.build.v1.StreamId getStreamId() {
      if (streamIdBuilder_ == null) {
        return streamId_ == null ? com.google.devtools.build.v1.StreamId.getDefaultInstance() : streamId_;
      } else {
        return streamIdBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Which build event stream this event belongs to.
     * </pre>
     *
     * <code>.google.devtools.build.v1.StreamId stream_id = 1 [deprecated = true];</code>
     */
    @java.lang.Deprecated public Builder setStreamId(com.google.devtools.build.v1.StreamId value) {
      if (streamIdBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        streamId_ = value;
        onChanged();
      } else {
        streamIdBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Which build event stream this event belongs to.
     * </pre>
     *
     * <code>.google.devtools.build.v1.StreamId stream_id = 1 [deprecated = true];</code>
     */
    @java.lang.Deprecated public Builder setStreamId(
        com.google.devtools.build.v1.StreamId.Builder builderForValue) {
      if (streamIdBuilder_ == null) {
        streamId_ = builderForValue.build();
        onChanged();
      } else {
        streamIdBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Which build event stream this event belongs to.
     * </pre>
     *
     * <code>.google.devtools.build.v1.StreamId stream_id = 1 [deprecated = true];</code>
     */
    @java.lang.Deprecated public Builder mergeStreamId(com.google.devtools.build.v1.StreamId value) {
      if (streamIdBuilder_ == null) {
        if (streamId_ != null) {
          streamId_ =
            com.google.devtools.build.v1.StreamId.newBuilder(streamId_).mergeFrom(value).buildPartial();
        } else {
          streamId_ = value;
        }
        onChanged();
      } else {
        streamIdBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Which build event stream this event belongs to.
     * </pre>
     *
     * <code>.google.devtools.build.v1.StreamId stream_id = 1 [deprecated = true];</code>
     */
    @java.lang.Deprecated public Builder clearStreamId() {
      if (streamIdBuilder_ == null) {
        streamId_ = null;
        onChanged();
      } else {
        streamId_ = null;
        streamIdBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Which build event stream this event belongs to.
     * </pre>
     *
     * <code>.google.devtools.build.v1.StreamId stream_id = 1 [deprecated = true];</code>
     */
    @java.lang.Deprecated public com.google.devtools.build.v1.StreamId.Builder getStreamIdBuilder() {
      
      onChanged();
      return getStreamIdFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Which build event stream this event belongs to.
     * </pre>
     *
     * <code>.google.devtools.build.v1.StreamId stream_id = 1 [deprecated = true];</code>
     */
    @java.lang.Deprecated public com.google.devtools.build.v1.StreamIdOrBuilder getStreamIdOrBuilder() {
      if (streamIdBuilder_ != null) {
        return streamIdBuilder_.getMessageOrBuilder();
      } else {
        return streamId_ == null ?
            com.google.devtools.build.v1.StreamId.getDefaultInstance() : streamId_;
      }
    }
    /**
     * <pre>
     * Which build event stream this event belongs to.
     * </pre>
     *
     * <code>.google.devtools.build.v1.StreamId stream_id = 1 [deprecated = true];</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.StreamId, com.google.devtools.build.v1.StreamId.Builder, com.google.devtools.build.v1.StreamIdOrBuilder> 
        getStreamIdFieldBuilder() {
      if (streamIdBuilder_ == null) {
        streamIdBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.build.v1.StreamId, com.google.devtools.build.v1.StreamId.Builder, com.google.devtools.build.v1.StreamIdOrBuilder>(
                getStreamId(),
                getParentForChildren(),
                isClean());
        streamId_ = null;
      }
      return streamIdBuilder_;
    }

    private long sequenceNumber_ ;
    /**
     * <pre>
     * The position of this event in the stream. The sequence numbers for a build
     * event stream should be a sequence of consecutive natural numbers starting
     * from one. (1, 2, 3, ...)
     * </pre>
     *
     * <code>int64 sequence_number = 2 [deprecated = true];</code>
     */
    @java.lang.Deprecated public long getSequenceNumber() {
      return sequenceNumber_;
    }
    /**
     * <pre>
     * The position of this event in the stream. The sequence numbers for a build
     * event stream should be a sequence of consecutive natural numbers starting
     * from one. (1, 2, 3, ...)
     * </pre>
     *
     * <code>int64 sequence_number = 2 [deprecated = true];</code>
     */
    @java.lang.Deprecated public Builder setSequenceNumber(long value) {
      
      sequenceNumber_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The position of this event in the stream. The sequence numbers for a build
     * event stream should be a sequence of consecutive natural numbers starting
     * from one. (1, 2, 3, ...)
     * </pre>
     *
     * <code>int64 sequence_number = 2 [deprecated = true];</code>
     */
    @java.lang.Deprecated public Builder clearSequenceNumber() {
      
      sequenceNumber_ = 0L;
      onChanged();
      return this;
    }

    private com.google.devtools.build.v1.BuildEvent event_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.BuildEvent, com.google.devtools.build.v1.BuildEvent.Builder, com.google.devtools.build.v1.BuildEventOrBuilder> eventBuilder_;
    /**
     * <pre>
     * The actual event.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent event = 3 [deprecated = true];</code>
     */
    @java.lang.Deprecated public boolean hasEvent() {
      return eventBuilder_ != null || event_ != null;
    }
    /**
     * <pre>
     * The actual event.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent event = 3 [deprecated = true];</code>
     */
    @java.lang.Deprecated public com.google.devtools.build.v1.BuildEvent getEvent() {
      if (eventBuilder_ == null) {
        return event_ == null ? com.google.devtools.build.v1.BuildEvent.getDefaultInstance() : event_;
      } else {
        return eventBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * The actual event.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent event = 3 [deprecated = true];</code>
     */
    @java.lang.Deprecated public Builder setEvent(com.google.devtools.build.v1.BuildEvent value) {
      if (eventBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        event_ = value;
        onChanged();
      } else {
        eventBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * The actual event.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent event = 3 [deprecated = true];</code>
     */
    @java.lang.Deprecated public Builder setEvent(
        com.google.devtools.build.v1.BuildEvent.Builder builderForValue) {
      if (eventBuilder_ == null) {
        event_ = builderForValue.build();
        onChanged();
      } else {
        eventBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * The actual event.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent event = 3 [deprecated = true];</code>
     */
    @java.lang.Deprecated public Builder mergeEvent(com.google.devtools.build.v1.BuildEvent value) {
      if (eventBuilder_ == null) {
        if (event_ != null) {
          event_ =
            com.google.devtools.build.v1.BuildEvent.newBuilder(event_).mergeFrom(value).buildPartial();
        } else {
          event_ = value;
        }
        onChanged();
      } else {
        eventBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * The actual event.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent event = 3 [deprecated = true];</code>
     */
    @java.lang.Deprecated public Builder clearEvent() {
      if (eventBuilder_ == null) {
        event_ = null;
        onChanged();
      } else {
        event_ = null;
        eventBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * The actual event.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent event = 3 [deprecated = true];</code>
     */
    @java.lang.Deprecated public com.google.devtools.build.v1.BuildEvent.Builder getEventBuilder() {
      
      onChanged();
      return getEventFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The actual event.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent event = 3 [deprecated = true];</code>
     */
    @java.lang.Deprecated public com.google.devtools.build.v1.BuildEventOrBuilder getEventOrBuilder() {
      if (eventBuilder_ != null) {
        return eventBuilder_.getMessageOrBuilder();
      } else {
        return event_ == null ?
            com.google.devtools.build.v1.BuildEvent.getDefaultInstance() : event_;
      }
    }
    /**
     * <pre>
     * The actual event.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent event = 3 [deprecated = true];</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.BuildEvent, com.google.devtools.build.v1.BuildEvent.Builder, com.google.devtools.build.v1.BuildEventOrBuilder> 
        getEventFieldBuilder() {
      if (eventBuilder_ == null) {
        eventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.build.v1.BuildEvent, com.google.devtools.build.v1.BuildEvent.Builder, com.google.devtools.build.v1.BuildEventOrBuilder>(
                getEvent(),
                getParentForChildren(),
                isClean());
        event_ = null;
      }
      return eventBuilder_;
    }

    private com.google.devtools.build.v1.OrderedBuildEvent orderedBuildEvent_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.OrderedBuildEvent, com.google.devtools.build.v1.OrderedBuildEvent.Builder, com.google.devtools.build.v1.OrderedBuildEventOrBuilder> orderedBuildEventBuilder_;
    /**
     * <pre>
     * The build event with position info.
     * New publishing clients should use this field rather than the 3 above.
     * </pre>
     *
     * <code>.google.devtools.build.v1.OrderedBuildEvent ordered_build_event = 4;</code>
     */
    public boolean hasOrderedBuildEvent() {
      return orderedBuildEventBuilder_ != null || orderedBuildEvent_ != null;
    }
    /**
     * <pre>
     * The build event with position info.
     * New publishing clients should use this field rather than the 3 above.
     * </pre>
     *
     * <code>.google.devtools.build.v1.OrderedBuildEvent ordered_build_event = 4;</code>
     */
    public com.google.devtools.build.v1.OrderedBuildEvent getOrderedBuildEvent() {
      if (orderedBuildEventBuilder_ == null) {
        return orderedBuildEvent_ == null ? com.google.devtools.build.v1.OrderedBuildEvent.getDefaultInstance() : orderedBuildEvent_;
      } else {
        return orderedBuildEventBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * The build event with position info.
     * New publishing clients should use this field rather than the 3 above.
     * </pre>
     *
     * <code>.google.devtools.build.v1.OrderedBuildEvent ordered_build_event = 4;</code>
     */
    public Builder setOrderedBuildEvent(com.google.devtools.build.v1.OrderedBuildEvent value) {
      if (orderedBuildEventBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        orderedBuildEvent_ = value;
        onChanged();
      } else {
        orderedBuildEventBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * The build event with position info.
     * New publishing clients should use this field rather than the 3 above.
     * </pre>
     *
     * <code>.google.devtools.build.v1.OrderedBuildEvent ordered_build_event = 4;</code>
     */
    public Builder setOrderedBuildEvent(
        com.google.devtools.build.v1.OrderedBuildEvent.Builder builderForValue) {
      if (orderedBuildEventBuilder_ == null) {
        orderedBuildEvent_ = builderForValue.build();
        onChanged();
      } else {
        orderedBuildEventBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * The build event with position info.
     * New publishing clients should use this field rather than the 3 above.
     * </pre>
     *
     * <code>.google.devtools.build.v1.OrderedBuildEvent ordered_build_event = 4;</code>
     */
    public Builder mergeOrderedBuildEvent(com.google.devtools.build.v1.OrderedBuildEvent value) {
      if (orderedBuildEventBuilder_ == null) {
        if (orderedBuildEvent_ != null) {
          orderedBuildEvent_ =
            com.google.devtools.build.v1.OrderedBuildEvent.newBuilder(orderedBuildEvent_).mergeFrom(value).buildPartial();
        } else {
          orderedBuildEvent_ = value;
        }
        onChanged();
      } else {
        orderedBuildEventBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * The build event with position info.
     * New publishing clients should use this field rather than the 3 above.
     * </pre>
     *
     * <code>.google.devtools.build.v1.OrderedBuildEvent ordered_build_event = 4;</code>
     */
    public Builder clearOrderedBuildEvent() {
      if (orderedBuildEventBuilder_ == null) {
        orderedBuildEvent_ = null;
        onChanged();
      } else {
        orderedBuildEvent_ = null;
        orderedBuildEventBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * The build event with position info.
     * New publishing clients should use this field rather than the 3 above.
     * </pre>
     *
     * <code>.google.devtools.build.v1.OrderedBuildEvent ordered_build_event = 4;</code>
     */
    public com.google.devtools.build.v1.OrderedBuildEvent.Builder getOrderedBuildEventBuilder() {
      
      onChanged();
      return getOrderedBuildEventFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The build event with position info.
     * New publishing clients should use this field rather than the 3 above.
     * </pre>
     *
     * <code>.google.devtools.build.v1.OrderedBuildEvent ordered_build_event = 4;</code>
     */
    public com.google.devtools.build.v1.OrderedBuildEventOrBuilder getOrderedBuildEventOrBuilder() {
      if (orderedBuildEventBuilder_ != null) {
        return orderedBuildEventBuilder_.getMessageOrBuilder();
      } else {
        return orderedBuildEvent_ == null ?
            com.google.devtools.build.v1.OrderedBuildEvent.getDefaultInstance() : orderedBuildEvent_;
      }
    }
    /**
     * <pre>
     * The build event with position info.
     * New publishing clients should use this field rather than the 3 above.
     * </pre>
     *
     * <code>.google.devtools.build.v1.OrderedBuildEvent ordered_build_event = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.OrderedBuildEvent, com.google.devtools.build.v1.OrderedBuildEvent.Builder, com.google.devtools.build.v1.OrderedBuildEventOrBuilder> 
        getOrderedBuildEventFieldBuilder() {
      if (orderedBuildEventBuilder_ == null) {
        orderedBuildEventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.build.v1.OrderedBuildEvent, com.google.devtools.build.v1.OrderedBuildEvent.Builder, com.google.devtools.build.v1.OrderedBuildEventOrBuilder>(
                getOrderedBuildEvent(),
                getParentForChildren(),
                isClean());
        orderedBuildEvent_ = null;
      }
      return orderedBuildEventBuilder_;
    }

    private com.google.protobuf.LazyStringList notificationKeywords_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureNotificationKeywordsIsMutable() {
      if (!((bitField0_ & 0x00000010) == 0x00000010)) {
        notificationKeywords_ = new com.google.protobuf.LazyStringArrayList(notificationKeywords_);
        bitField0_ |= 0x00000010;
       }
    }
    /**
     * <pre>
     * The keywords to be attached to the notification which notifies the start
     * of a new build event stream. BES only reads this field when sequence_number
     * or ordered_build_event.sequence_number is 1 in this message. If this field
     * is empty, BES will not publish notification messages for this stream.
     * </pre>
     *
     * <code>repeated string notification_keywords = 5;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getNotificationKeywordsList() {
      return notificationKeywords_.getUnmodifiableView();
    }
    /**
     * <pre>
     * The keywords to be attached to the notification which notifies the start
     * of a new build event stream. BES only reads this field when sequence_number
     * or ordered_build_event.sequence_number is 1 in this message. If this field
     * is empty, BES will not publish notification messages for this stream.
     * </pre>
     *
     * <code>repeated string notification_keywords = 5;</code>
     */
    public int getNotificationKeywordsCount() {
      return notificationKeywords_.size();
    }
    /**
     * <pre>
     * The keywords to be attached to the notification which notifies the start
     * of a new build event stream. BES only reads this field when sequence_number
     * or ordered_build_event.sequence_number is 1 in this message. If this field
     * is empty, BES will not publish notification messages for this stream.
     * </pre>
     *
     * <code>repeated string notification_keywords = 5;</code>
     */
    public java.lang.String getNotificationKeywords(int index) {
      return notificationKeywords_.get(index);
    }
    /**
     * <pre>
     * The keywords to be attached to the notification which notifies the start
     * of a new build event stream. BES only reads this field when sequence_number
     * or ordered_build_event.sequence_number is 1 in this message. If this field
     * is empty, BES will not publish notification messages for this stream.
     * </pre>
     *
     * <code>repeated string notification_keywords = 5;</code>
     */
    public com.google.protobuf.ByteString
        getNotificationKeywordsBytes(int index) {
      return notificationKeywords_.getByteString(index);
    }
    /**
     * <pre>
     * The keywords to be attached to the notification which notifies the start
     * of a new build event stream. BES only reads this field when sequence_number
     * or ordered_build_event.sequence_number is 1 in this message. If this field
     * is empty, BES will not publish notification messages for this stream.
     * </pre>
     *
     * <code>repeated string notification_keywords = 5;</code>
     */
    public Builder setNotificationKeywords(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureNotificationKeywordsIsMutable();
      notificationKeywords_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The keywords to be attached to the notification which notifies the start
     * of a new build event stream. BES only reads this field when sequence_number
     * or ordered_build_event.sequence_number is 1 in this message. If this field
     * is empty, BES will not publish notification messages for this stream.
     * </pre>
     *
     * <code>repeated string notification_keywords = 5;</code>
     */
    public Builder addNotificationKeywords(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureNotificationKeywordsIsMutable();
      notificationKeywords_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The keywords to be attached to the notification which notifies the start
     * of a new build event stream. BES only reads this field when sequence_number
     * or ordered_build_event.sequence_number is 1 in this message. If this field
     * is empty, BES will not publish notification messages for this stream.
     * </pre>
     *
     * <code>repeated string notification_keywords = 5;</code>
     */
    public Builder addAllNotificationKeywords(
        java.lang.Iterable<java.lang.String> values) {
      ensureNotificationKeywordsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, notificationKeywords_);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The keywords to be attached to the notification which notifies the start
     * of a new build event stream. BES only reads this field when sequence_number
     * or ordered_build_event.sequence_number is 1 in this message. If this field
     * is empty, BES will not publish notification messages for this stream.
     * </pre>
     *
     * <code>repeated string notification_keywords = 5;</code>
     */
    public Builder clearNotificationKeywords() {
      notificationKeywords_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000010);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The keywords to be attached to the notification which notifies the start
     * of a new build event stream. BES only reads this field when sequence_number
     * or ordered_build_event.sequence_number is 1 in this message. If this field
     * is empty, BES will not publish notification messages for this stream.
     * </pre>
     *
     * <code>repeated string notification_keywords = 5;</code>
     */
    public Builder addNotificationKeywordsBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      ensureNotificationKeywordsIsMutable();
      notificationKeywords_.add(value);
      onChanged();
      return this;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:google.devtools.build.v1.PublishBuildToolEventStreamRequest)
  }

  // @@protoc_insertion_point(class_scope:google.devtools.build.v1.PublishBuildToolEventStreamRequest)
  private static final com.google.devtools.build.v1.PublishBuildToolEventStreamRequest DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.devtools.build.v1.PublishBuildToolEventStreamRequest();
  }

  public static com.google.devtools.build.v1.PublishBuildToolEventStreamRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  public com.google.devtools.build.v1.PublishBuildToolEventStreamRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

