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

package com.google.devtools.build.v1;

/**
 * <pre>
 * An event representing some state change that occured in the build. This
 * message does not include field for uniquely identifying an event.
 * </pre>
 *
 * Protobuf type {@code google.devtools.build.v1.BuildEvent}
 */
public  final class BuildEvent extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.devtools.build.v1.BuildEvent)
    BuildEventOrBuilder {
  // Use BuildEvent.newBuilder() to construct.
  private BuildEvent(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private BuildEvent() {
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
  }
  private BuildEvent(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    int mutable_bitField0_ = 0;
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          default: {
            if (!input.skipField(tag)) {
              done = true;
            }
            break;
          }
          case 10: {
            com.google.protobuf.Timestamp.Builder subBuilder = null;
            if (eventTime_ != null) {
              subBuilder = eventTime_.toBuilder();
            }
            eventTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(eventTime_);
              eventTime_ = subBuilder.buildPartial();
            }

            break;
          }
          case 410: {
            com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.Builder subBuilder = null;
            if (eventCase_ == 51) {
              subBuilder = ((com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted) event_).toBuilder();
            }
            event_ =
                input.readMessage(com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted) event_);
              event_ = subBuilder.buildPartial();
            }
            eventCase_ = 51;
            break;
          }
          case 418: {
            com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.Builder subBuilder = null;
            if (eventCase_ == 52) {
              subBuilder = ((com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished) event_).toBuilder();
            }
            event_ =
                input.readMessage(com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished) event_);
              event_ = subBuilder.buildPartial();
            }
            eventCase_ = 52;
            break;
          }
          case 426: {
            com.google.devtools.build.v1.BuildEvent.BuildEnqueued.Builder subBuilder = null;
            if (eventCase_ == 53) {
              subBuilder = ((com.google.devtools.build.v1.BuildEvent.BuildEnqueued) event_).toBuilder();
            }
            event_ =
                input.readMessage(com.google.devtools.build.v1.BuildEvent.BuildEnqueued.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.devtools.build.v1.BuildEvent.BuildEnqueued) event_);
              event_ = subBuilder.buildPartial();
            }
            eventCase_ = 53;
            break;
          }
          case 442: {
            com.google.devtools.build.v1.BuildEvent.BuildFinished.Builder subBuilder = null;
            if (eventCase_ == 55) {
              subBuilder = ((com.google.devtools.build.v1.BuildEvent.BuildFinished) event_).toBuilder();
            }
            event_ =
                input.readMessage(com.google.devtools.build.v1.BuildEvent.BuildFinished.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.devtools.build.v1.BuildEvent.BuildFinished) event_);
              event_ = subBuilder.buildPartial();
            }
            eventCase_ = 55;
            break;
          }
          case 450: {
            com.google.devtools.build.v1.BuildEvent.ConsoleOutput.Builder subBuilder = null;
            if (eventCase_ == 56) {
              subBuilder = ((com.google.devtools.build.v1.BuildEvent.ConsoleOutput) event_).toBuilder();
            }
            event_ =
                input.readMessage(com.google.devtools.build.v1.BuildEvent.ConsoleOutput.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.devtools.build.v1.BuildEvent.ConsoleOutput) event_);
              event_ = subBuilder.buildPartial();
            }
            eventCase_ = 56;
            break;
          }
          case 474: {
            com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.Builder subBuilder = null;
            if (eventCase_ == 59) {
              subBuilder = ((com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished) event_).toBuilder();
            }
            event_ =
                input.readMessage(com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished) event_);
              event_ = subBuilder.buildPartial();
            }
            eventCase_ = 59;
            break;
          }
          case 482: {
            com.google.protobuf.Any.Builder subBuilder = null;
            if (eventCase_ == 60) {
              subBuilder = ((com.google.protobuf.Any) event_).toBuilder();
            }
            event_ =
                input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.protobuf.Any) event_);
              event_ = subBuilder.buildPartial();
            }
            eventCase_ = 60;
            break;
          }
          case 490: {
            com.google.protobuf.Any.Builder subBuilder = null;
            if (eventCase_ == 61) {
              subBuilder = ((com.google.protobuf.Any) event_).toBuilder();
            }
            event_ =
                input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.protobuf.Any) event_);
              event_ = subBuilder.buildPartial();
            }
            eventCase_ = 61;
            break;
          }
          case 498: {
            com.google.protobuf.Any.Builder subBuilder = null;
            if (eventCase_ == 62) {
              subBuilder = ((com.google.protobuf.Any) event_).toBuilder();
            }
            event_ =
                input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom((com.google.protobuf.Any) event_);
              event_ = subBuilder.buildPartial();
            }
            eventCase_ = 62;
            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 {
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.devtools.build.v1.BuildEvent.class, com.google.devtools.build.v1.BuildEvent.Builder.class);
  }

  public interface InvocationAttemptStartedOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.devtools.build.v1.BuildEvent.InvocationAttemptStarted)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The number of the invocation attempt, starting at 1 and increasing by 1
     * for each new attempt. Can be used to determine if there is a later
     * invocation attempt replacing the current one a client is processing.
     * </pre>
     *
     * <code>int64 attempt_number = 1;</code>
     */
    long getAttemptNumber();
  }
  /**
   * <pre>
   * Notification that the build system has attempted to run the build tool.
   * </pre>
   *
   * Protobuf type {@code google.devtools.build.v1.BuildEvent.InvocationAttemptStarted}
   */
  public  static final class InvocationAttemptStarted extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.devtools.build.v1.BuildEvent.InvocationAttemptStarted)
      InvocationAttemptStartedOrBuilder {
    // Use InvocationAttemptStarted.newBuilder() to construct.
    private InvocationAttemptStarted(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private InvocationAttemptStarted() {
      attemptNumber_ = 0L;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private InvocationAttemptStarted(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 8: {

              attemptNumber_ = input.readInt64();
              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 {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_InvocationAttemptStarted_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_InvocationAttemptStarted_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.class, com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.Builder.class);
    }

    public static final int ATTEMPT_NUMBER_FIELD_NUMBER = 1;
    private long attemptNumber_;
    /**
     * <pre>
     * The number of the invocation attempt, starting at 1 and increasing by 1
     * for each new attempt. Can be used to determine if there is a later
     * invocation attempt replacing the current one a client is processing.
     * </pre>
     *
     * <code>int64 attempt_number = 1;</code>
     */
    public long getAttemptNumber() {
      return attemptNumber_;
    }

    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 (attemptNumber_ != 0L) {
        output.writeInt64(1, attemptNumber_);
      }
    }

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

      size = 0;
      if (attemptNumber_ != 0L) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt64Size(1, attemptNumber_);
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted)) {
        return super.equals(obj);
      }
      com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted other = (com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted) obj;

      boolean result = true;
      result = result && (getAttemptNumber()
          == other.getAttemptNumber());
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + ATTEMPT_NUMBER_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getAttemptNumber());
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted 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.BuildEvent.InvocationAttemptStarted parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted 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.BuildEvent.InvocationAttemptStarted parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted 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.BuildEvent.InvocationAttemptStarted parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted 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.BuildEvent.InvocationAttemptStarted parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted 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.BuildEvent.InvocationAttemptStarted 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.BuildEvent.InvocationAttemptStarted 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.BuildEvent.InvocationAttemptStarted 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>
     * Notification that the build system has attempted to run the build tool.
     * </pre>
     *
     * Protobuf type {@code google.devtools.build.v1.BuildEvent.InvocationAttemptStarted}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.devtools.build.v1.BuildEvent.InvocationAttemptStarted)
        com.google.devtools.build.v1.BuildEvent.InvocationAttemptStartedOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_InvocationAttemptStarted_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_InvocationAttemptStarted_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.class, com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.Builder.class);
      }

      // Construct using com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.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();
        attemptNumber_ = 0L;

        return this;
      }

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

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

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

      public com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted buildPartial() {
        com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted result = new com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted(this);
        result.attemptNumber_ = attemptNumber_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          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, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted) {
          return mergeFrom((com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted other) {
        if (other == com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.getDefaultInstance()) return this;
        if (other.getAttemptNumber() != 0L) {
          setAttemptNumber(other.getAttemptNumber());
        }
        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.BuildEvent.InvocationAttemptStarted parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private long attemptNumber_ ;
      /**
       * <pre>
       * The number of the invocation attempt, starting at 1 and increasing by 1
       * for each new attempt. Can be used to determine if there is a later
       * invocation attempt replacing the current one a client is processing.
       * </pre>
       *
       * <code>int64 attempt_number = 1;</code>
       */
      public long getAttemptNumber() {
        return attemptNumber_;
      }
      /**
       * <pre>
       * The number of the invocation attempt, starting at 1 and increasing by 1
       * for each new attempt. Can be used to determine if there is a later
       * invocation attempt replacing the current one a client is processing.
       * </pre>
       *
       * <code>int64 attempt_number = 1;</code>
       */
      public Builder setAttemptNumber(long value) {
        
        attemptNumber_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The number of the invocation attempt, starting at 1 and increasing by 1
       * for each new attempt. Can be used to determine if there is a later
       * invocation attempt replacing the current one a client is processing.
       * </pre>
       *
       * <code>int64 attempt_number = 1;</code>
       */
      public Builder clearAttemptNumber() {
        
        attemptNumber_ = 0L;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

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


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

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

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

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

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

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

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

  }

  public interface InvocationAttemptFinishedOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.devtools.build.v1.BuildEvent.InvocationAttemptFinished)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The exit code of the build tool.
     * </pre>
     *
     * <code>.google.protobuf.Int32Value exit_code = 2;</code>
     */
    boolean hasExitCode();
    /**
     * <pre>
     * The exit code of the build tool.
     * </pre>
     *
     * <code>.google.protobuf.Int32Value exit_code = 2;</code>
     */
    com.google.protobuf.Int32Value getExitCode();
    /**
     * <pre>
     * The exit code of the build tool.
     * </pre>
     *
     * <code>.google.protobuf.Int32Value exit_code = 2;</code>
     */
    com.google.protobuf.Int32ValueOrBuilder getExitCodeOrBuilder();

    /**
     * <pre>
     * Final status of the invocation.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildStatus invocation_status = 3;</code>
     */
    boolean hasInvocationStatus();
    /**
     * <pre>
     * Final status of the invocation.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildStatus invocation_status = 3;</code>
     */
    com.google.devtools.build.v1.BuildStatus getInvocationStatus();
    /**
     * <pre>
     * Final status of the invocation.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildStatus invocation_status = 3;</code>
     */
    com.google.devtools.build.v1.BuildStatusOrBuilder getInvocationStatusOrBuilder();
  }
  /**
   * <pre>
   * Notification that an invocation attempt has finished.
   * </pre>
   *
   * Protobuf type {@code google.devtools.build.v1.BuildEvent.InvocationAttemptFinished}
   */
  public  static final class InvocationAttemptFinished extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.devtools.build.v1.BuildEvent.InvocationAttemptFinished)
      InvocationAttemptFinishedOrBuilder {
    // Use InvocationAttemptFinished.newBuilder() to construct.
    private InvocationAttemptFinished(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private InvocationAttemptFinished() {
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private InvocationAttemptFinished(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 18: {
              com.google.protobuf.Int32Value.Builder subBuilder = null;
              if (exitCode_ != null) {
                subBuilder = exitCode_.toBuilder();
              }
              exitCode_ = input.readMessage(com.google.protobuf.Int32Value.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(exitCode_);
                exitCode_ = subBuilder.buildPartial();
              }

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

              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 {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_InvocationAttemptFinished_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_InvocationAttemptFinished_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.class, com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.Builder.class);
    }

    public static final int EXIT_CODE_FIELD_NUMBER = 2;
    private com.google.protobuf.Int32Value exitCode_;
    /**
     * <pre>
     * The exit code of the build tool.
     * </pre>
     *
     * <code>.google.protobuf.Int32Value exit_code = 2;</code>
     */
    public boolean hasExitCode() {
      return exitCode_ != null;
    }
    /**
     * <pre>
     * The exit code of the build tool.
     * </pre>
     *
     * <code>.google.protobuf.Int32Value exit_code = 2;</code>
     */
    public com.google.protobuf.Int32Value getExitCode() {
      return exitCode_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : exitCode_;
    }
    /**
     * <pre>
     * The exit code of the build tool.
     * </pre>
     *
     * <code>.google.protobuf.Int32Value exit_code = 2;</code>
     */
    public com.google.protobuf.Int32ValueOrBuilder getExitCodeOrBuilder() {
      return getExitCode();
    }

    public static final int INVOCATION_STATUS_FIELD_NUMBER = 3;
    private com.google.devtools.build.v1.BuildStatus invocationStatus_;
    /**
     * <pre>
     * Final status of the invocation.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildStatus invocation_status = 3;</code>
     */
    public boolean hasInvocationStatus() {
      return invocationStatus_ != null;
    }
    /**
     * <pre>
     * Final status of the invocation.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildStatus invocation_status = 3;</code>
     */
    public com.google.devtools.build.v1.BuildStatus getInvocationStatus() {
      return invocationStatus_ == null ? com.google.devtools.build.v1.BuildStatus.getDefaultInstance() : invocationStatus_;
    }
    /**
     * <pre>
     * Final status of the invocation.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildStatus invocation_status = 3;</code>
     */
    public com.google.devtools.build.v1.BuildStatusOrBuilder getInvocationStatusOrBuilder() {
      return getInvocationStatus();
    }

    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 (exitCode_ != null) {
        output.writeMessage(2, getExitCode());
      }
      if (invocationStatus_ != null) {
        output.writeMessage(3, getInvocationStatus());
      }
    }

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

      size = 0;
      if (exitCode_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(2, getExitCode());
      }
      if (invocationStatus_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, getInvocationStatus());
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished)) {
        return super.equals(obj);
      }
      com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished other = (com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished) obj;

      boolean result = true;
      result = result && (hasExitCode() == other.hasExitCode());
      if (hasExitCode()) {
        result = result && getExitCode()
            .equals(other.getExitCode());
      }
      result = result && (hasInvocationStatus() == other.hasInvocationStatus());
      if (hasInvocationStatus()) {
        result = result && getInvocationStatus()
            .equals(other.getInvocationStatus());
      }
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasExitCode()) {
        hash = (37 * hash) + EXIT_CODE_FIELD_NUMBER;
        hash = (53 * hash) + getExitCode().hashCode();
      }
      if (hasInvocationStatus()) {
        hash = (37 * hash) + INVOCATION_STATUS_FIELD_NUMBER;
        hash = (53 * hash) + getInvocationStatus().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished 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.BuildEvent.InvocationAttemptFinished parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished 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.BuildEvent.InvocationAttemptFinished parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished 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.BuildEvent.InvocationAttemptFinished parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished 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.BuildEvent.InvocationAttemptFinished parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished 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.BuildEvent.InvocationAttemptFinished 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.BuildEvent.InvocationAttemptFinished 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.BuildEvent.InvocationAttemptFinished 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>
     * Notification that an invocation attempt has finished.
     * </pre>
     *
     * Protobuf type {@code google.devtools.build.v1.BuildEvent.InvocationAttemptFinished}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.devtools.build.v1.BuildEvent.InvocationAttemptFinished)
        com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinishedOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_InvocationAttemptFinished_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_InvocationAttemptFinished_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.class, com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.Builder.class);
      }

      // Construct using com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.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 (exitCodeBuilder_ == null) {
          exitCode_ = null;
        } else {
          exitCode_ = null;
          exitCodeBuilder_ = null;
        }
        if (invocationStatusBuilder_ == null) {
          invocationStatus_ = null;
        } else {
          invocationStatus_ = null;
          invocationStatusBuilder_ = null;
        }
        return this;
      }

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

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

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

      public com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished buildPartial() {
        com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished result = new com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished(this);
        if (exitCodeBuilder_ == null) {
          result.exitCode_ = exitCode_;
        } else {
          result.exitCode_ = exitCodeBuilder_.build();
        }
        if (invocationStatusBuilder_ == null) {
          result.invocationStatus_ = invocationStatus_;
        } else {
          result.invocationStatus_ = invocationStatusBuilder_.build();
        }
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          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, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished) {
          return mergeFrom((com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished other) {
        if (other == com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.getDefaultInstance()) return this;
        if (other.hasExitCode()) {
          mergeExitCode(other.getExitCode());
        }
        if (other.hasInvocationStatus()) {
          mergeInvocationStatus(other.getInvocationStatus());
        }
        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.BuildEvent.InvocationAttemptFinished parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private com.google.protobuf.Int32Value exitCode_ = null;
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> exitCodeBuilder_;
      /**
       * <pre>
       * The exit code of the build tool.
       * </pre>
       *
       * <code>.google.protobuf.Int32Value exit_code = 2;</code>
       */
      public boolean hasExitCode() {
        return exitCodeBuilder_ != null || exitCode_ != null;
      }
      /**
       * <pre>
       * The exit code of the build tool.
       * </pre>
       *
       * <code>.google.protobuf.Int32Value exit_code = 2;</code>
       */
      public com.google.protobuf.Int32Value getExitCode() {
        if (exitCodeBuilder_ == null) {
          return exitCode_ == null ? com.google.protobuf.Int32Value.getDefaultInstance() : exitCode_;
        } else {
          return exitCodeBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * The exit code of the build tool.
       * </pre>
       *
       * <code>.google.protobuf.Int32Value exit_code = 2;</code>
       */
      public Builder setExitCode(com.google.protobuf.Int32Value value) {
        if (exitCodeBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          exitCode_ = value;
          onChanged();
        } else {
          exitCodeBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * The exit code of the build tool.
       * </pre>
       *
       * <code>.google.protobuf.Int32Value exit_code = 2;</code>
       */
      public Builder setExitCode(
          com.google.protobuf.Int32Value.Builder builderForValue) {
        if (exitCodeBuilder_ == null) {
          exitCode_ = builderForValue.build();
          onChanged();
        } else {
          exitCodeBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * The exit code of the build tool.
       * </pre>
       *
       * <code>.google.protobuf.Int32Value exit_code = 2;</code>
       */
      public Builder mergeExitCode(com.google.protobuf.Int32Value value) {
        if (exitCodeBuilder_ == null) {
          if (exitCode_ != null) {
            exitCode_ =
              com.google.protobuf.Int32Value.newBuilder(exitCode_).mergeFrom(value).buildPartial();
          } else {
            exitCode_ = value;
          }
          onChanged();
        } else {
          exitCodeBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * The exit code of the build tool.
       * </pre>
       *
       * <code>.google.protobuf.Int32Value exit_code = 2;</code>
       */
      public Builder clearExitCode() {
        if (exitCodeBuilder_ == null) {
          exitCode_ = null;
          onChanged();
        } else {
          exitCode_ = null;
          exitCodeBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * The exit code of the build tool.
       * </pre>
       *
       * <code>.google.protobuf.Int32Value exit_code = 2;</code>
       */
      public com.google.protobuf.Int32Value.Builder getExitCodeBuilder() {
        
        onChanged();
        return getExitCodeFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * The exit code of the build tool.
       * </pre>
       *
       * <code>.google.protobuf.Int32Value exit_code = 2;</code>
       */
      public com.google.protobuf.Int32ValueOrBuilder getExitCodeOrBuilder() {
        if (exitCodeBuilder_ != null) {
          return exitCodeBuilder_.getMessageOrBuilder();
        } else {
          return exitCode_ == null ?
              com.google.protobuf.Int32Value.getDefaultInstance() : exitCode_;
        }
      }
      /**
       * <pre>
       * The exit code of the build tool.
       * </pre>
       *
       * <code>.google.protobuf.Int32Value exit_code = 2;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder> 
          getExitCodeFieldBuilder() {
        if (exitCodeBuilder_ == null) {
          exitCodeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              com.google.protobuf.Int32Value, com.google.protobuf.Int32Value.Builder, com.google.protobuf.Int32ValueOrBuilder>(
                  getExitCode(),
                  getParentForChildren(),
                  isClean());
          exitCode_ = null;
        }
        return exitCodeBuilder_;
      }

      private com.google.devtools.build.v1.BuildStatus invocationStatus_ = null;
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.devtools.build.v1.BuildStatus, com.google.devtools.build.v1.BuildStatus.Builder, com.google.devtools.build.v1.BuildStatusOrBuilder> invocationStatusBuilder_;
      /**
       * <pre>
       * Final status of the invocation.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus invocation_status = 3;</code>
       */
      public boolean hasInvocationStatus() {
        return invocationStatusBuilder_ != null || invocationStatus_ != null;
      }
      /**
       * <pre>
       * Final status of the invocation.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus invocation_status = 3;</code>
       */
      public com.google.devtools.build.v1.BuildStatus getInvocationStatus() {
        if (invocationStatusBuilder_ == null) {
          return invocationStatus_ == null ? com.google.devtools.build.v1.BuildStatus.getDefaultInstance() : invocationStatus_;
        } else {
          return invocationStatusBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * Final status of the invocation.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus invocation_status = 3;</code>
       */
      public Builder setInvocationStatus(com.google.devtools.build.v1.BuildStatus value) {
        if (invocationStatusBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          invocationStatus_ = value;
          onChanged();
        } else {
          invocationStatusBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * Final status of the invocation.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus invocation_status = 3;</code>
       */
      public Builder setInvocationStatus(
          com.google.devtools.build.v1.BuildStatus.Builder builderForValue) {
        if (invocationStatusBuilder_ == null) {
          invocationStatus_ = builderForValue.build();
          onChanged();
        } else {
          invocationStatusBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * Final status of the invocation.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus invocation_status = 3;</code>
       */
      public Builder mergeInvocationStatus(com.google.devtools.build.v1.BuildStatus value) {
        if (invocationStatusBuilder_ == null) {
          if (invocationStatus_ != null) {
            invocationStatus_ =
              com.google.devtools.build.v1.BuildStatus.newBuilder(invocationStatus_).mergeFrom(value).buildPartial();
          } else {
            invocationStatus_ = value;
          }
          onChanged();
        } else {
          invocationStatusBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * Final status of the invocation.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus invocation_status = 3;</code>
       */
      public Builder clearInvocationStatus() {
        if (invocationStatusBuilder_ == null) {
          invocationStatus_ = null;
          onChanged();
        } else {
          invocationStatus_ = null;
          invocationStatusBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * Final status of the invocation.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus invocation_status = 3;</code>
       */
      public com.google.devtools.build.v1.BuildStatus.Builder getInvocationStatusBuilder() {
        
        onChanged();
        return getInvocationStatusFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Final status of the invocation.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus invocation_status = 3;</code>
       */
      public com.google.devtools.build.v1.BuildStatusOrBuilder getInvocationStatusOrBuilder() {
        if (invocationStatusBuilder_ != null) {
          return invocationStatusBuilder_.getMessageOrBuilder();
        } else {
          return invocationStatus_ == null ?
              com.google.devtools.build.v1.BuildStatus.getDefaultInstance() : invocationStatus_;
        }
      }
      /**
       * <pre>
       * Final status of the invocation.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus invocation_status = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.devtools.build.v1.BuildStatus, com.google.devtools.build.v1.BuildStatus.Builder, com.google.devtools.build.v1.BuildStatusOrBuilder> 
          getInvocationStatusFieldBuilder() {
        if (invocationStatusBuilder_ == null) {
          invocationStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              com.google.devtools.build.v1.BuildStatus, com.google.devtools.build.v1.BuildStatus.Builder, com.google.devtools.build.v1.BuildStatusOrBuilder>(
                  getInvocationStatus(),
                  getParentForChildren(),
                  isClean());
          invocationStatus_ = null;
        }
        return invocationStatusBuilder_;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

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


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

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

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

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

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

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

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

  }

  public interface BuildEnqueuedOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.devtools.build.v1.BuildEvent.BuildEnqueued)
      com.google.protobuf.MessageOrBuilder {
  }
  /**
   * <pre>
   * Notification that the build request is enqueued. It could happen when
   * a new build request is inserted into the build queue, or when a
   * build request is put back into the build queue due to a previous build
   * failure.
   * </pre>
   *
   * Protobuf type {@code google.devtools.build.v1.BuildEvent.BuildEnqueued}
   */
  public  static final class BuildEnqueued extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.devtools.build.v1.BuildEvent.BuildEnqueued)
      BuildEnqueuedOrBuilder {
    // Use BuildEnqueued.newBuilder() to construct.
    private BuildEnqueued(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private BuildEnqueued() {
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private BuildEnqueued(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_BuildEnqueued_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_BuildEnqueued_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.devtools.build.v1.BuildEvent.BuildEnqueued.class, com.google.devtools.build.v1.BuildEvent.BuildEnqueued.Builder.class);
    }

    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 {
    }

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

      size = 0;
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof com.google.devtools.build.v1.BuildEvent.BuildEnqueued)) {
        return super.equals(obj);
      }
      com.google.devtools.build.v1.BuildEvent.BuildEnqueued other = (com.google.devtools.build.v1.BuildEvent.BuildEnqueued) obj;

      boolean result = true;
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.devtools.build.v1.BuildEvent.BuildEnqueued parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.BuildEnqueued 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.BuildEvent.BuildEnqueued parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.BuildEnqueued 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.BuildEvent.BuildEnqueued parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.BuildEnqueued 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.BuildEvent.BuildEnqueued parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.devtools.build.v1.BuildEvent.BuildEnqueued 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.BuildEvent.BuildEnqueued parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.devtools.build.v1.BuildEvent.BuildEnqueued 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.BuildEvent.BuildEnqueued 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.BuildEvent.BuildEnqueued 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.BuildEvent.BuildEnqueued 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>
     * Notification that the build request is enqueued. It could happen when
     * a new build request is inserted into the build queue, or when a
     * build request is put back into the build queue due to a previous build
     * failure.
     * </pre>
     *
     * Protobuf type {@code google.devtools.build.v1.BuildEvent.BuildEnqueued}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.devtools.build.v1.BuildEvent.BuildEnqueued)
        com.google.devtools.build.v1.BuildEvent.BuildEnqueuedOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_BuildEnqueued_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_BuildEnqueued_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.devtools.build.v1.BuildEvent.BuildEnqueued.class, com.google.devtools.build.v1.BuildEvent.BuildEnqueued.Builder.class);
      }

      // Construct using com.google.devtools.build.v1.BuildEvent.BuildEnqueued.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();
        return this;
      }

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

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

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

      public com.google.devtools.build.v1.BuildEvent.BuildEnqueued buildPartial() {
        com.google.devtools.build.v1.BuildEvent.BuildEnqueued result = new com.google.devtools.build.v1.BuildEvent.BuildEnqueued(this);
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          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, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.devtools.build.v1.BuildEvent.BuildEnqueued) {
          return mergeFrom((com.google.devtools.build.v1.BuildEvent.BuildEnqueued)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.devtools.build.v1.BuildEvent.BuildEnqueued other) {
        if (other == com.google.devtools.build.v1.BuildEvent.BuildEnqueued.getDefaultInstance()) return this;
        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.BuildEvent.BuildEnqueued parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.devtools.build.v1.BuildEvent.BuildEnqueued) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

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


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

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

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

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

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

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

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

  }

  public interface BuildFinishedOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.devtools.build.v1.BuildEvent.BuildFinished)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * Final status of the build.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildStatus status = 1;</code>
     */
    boolean hasStatus();
    /**
     * <pre>
     * Final status of the build.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildStatus status = 1;</code>
     */
    com.google.devtools.build.v1.BuildStatus getStatus();
    /**
     * <pre>
     * Final status of the build.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildStatus status = 1;</code>
     */
    com.google.devtools.build.v1.BuildStatusOrBuilder getStatusOrBuilder();
  }
  /**
   * <pre>
   * Notification that the build request has finished, and no further
   * invocations will occur.  Note that this applies to the entire Build.
   * Individual invocations trigger InvocationFinished when they finish.
   * </pre>
   *
   * Protobuf type {@code google.devtools.build.v1.BuildEvent.BuildFinished}
   */
  public  static final class BuildFinished extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.devtools.build.v1.BuildEvent.BuildFinished)
      BuildFinishedOrBuilder {
    // Use BuildFinished.newBuilder() to construct.
    private BuildFinished(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private BuildFinished() {
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private BuildFinished(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 10: {
              com.google.devtools.build.v1.BuildStatus.Builder subBuilder = null;
              if (status_ != null) {
                subBuilder = status_.toBuilder();
              }
              status_ = input.readMessage(com.google.devtools.build.v1.BuildStatus.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(status_);
                status_ = subBuilder.buildPartial();
              }

              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 {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_BuildFinished_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_BuildFinished_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.devtools.build.v1.BuildEvent.BuildFinished.class, com.google.devtools.build.v1.BuildEvent.BuildFinished.Builder.class);
    }

    public static final int STATUS_FIELD_NUMBER = 1;
    private com.google.devtools.build.v1.BuildStatus status_;
    /**
     * <pre>
     * Final status of the build.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildStatus status = 1;</code>
     */
    public boolean hasStatus() {
      return status_ != null;
    }
    /**
     * <pre>
     * Final status of the build.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildStatus status = 1;</code>
     */
    public com.google.devtools.build.v1.BuildStatus getStatus() {
      return status_ == null ? com.google.devtools.build.v1.BuildStatus.getDefaultInstance() : status_;
    }
    /**
     * <pre>
     * Final status of the build.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildStatus status = 1;</code>
     */
    public com.google.devtools.build.v1.BuildStatusOrBuilder getStatusOrBuilder() {
      return getStatus();
    }

    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 (status_ != null) {
        output.writeMessage(1, getStatus());
      }
    }

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

      size = 0;
      if (status_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, getStatus());
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof com.google.devtools.build.v1.BuildEvent.BuildFinished)) {
        return super.equals(obj);
      }
      com.google.devtools.build.v1.BuildEvent.BuildFinished other = (com.google.devtools.build.v1.BuildEvent.BuildFinished) obj;

      boolean result = true;
      result = result && (hasStatus() == other.hasStatus());
      if (hasStatus()) {
        result = result && getStatus()
            .equals(other.getStatus());
      }
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      if (hasStatus()) {
        hash = (37 * hash) + STATUS_FIELD_NUMBER;
        hash = (53 * hash) + getStatus().hashCode();
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.devtools.build.v1.BuildEvent.BuildFinished parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.BuildFinished 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.BuildEvent.BuildFinished parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.BuildFinished 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.BuildEvent.BuildFinished parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.BuildFinished 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.BuildEvent.BuildFinished parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.devtools.build.v1.BuildEvent.BuildFinished 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.BuildEvent.BuildFinished parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.devtools.build.v1.BuildEvent.BuildFinished 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.BuildEvent.BuildFinished 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.BuildEvent.BuildFinished 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.BuildEvent.BuildFinished 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>
     * Notification that the build request has finished, and no further
     * invocations will occur.  Note that this applies to the entire Build.
     * Individual invocations trigger InvocationFinished when they finish.
     * </pre>
     *
     * Protobuf type {@code google.devtools.build.v1.BuildEvent.BuildFinished}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.devtools.build.v1.BuildEvent.BuildFinished)
        com.google.devtools.build.v1.BuildEvent.BuildFinishedOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_BuildFinished_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_BuildFinished_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.devtools.build.v1.BuildEvent.BuildFinished.class, com.google.devtools.build.v1.BuildEvent.BuildFinished.Builder.class);
      }

      // Construct using com.google.devtools.build.v1.BuildEvent.BuildFinished.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 (statusBuilder_ == null) {
          status_ = null;
        } else {
          status_ = null;
          statusBuilder_ = null;
        }
        return this;
      }

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

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

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

      public com.google.devtools.build.v1.BuildEvent.BuildFinished buildPartial() {
        com.google.devtools.build.v1.BuildEvent.BuildFinished result = new com.google.devtools.build.v1.BuildEvent.BuildFinished(this);
        if (statusBuilder_ == null) {
          result.status_ = status_;
        } else {
          result.status_ = statusBuilder_.build();
        }
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          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, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.devtools.build.v1.BuildEvent.BuildFinished) {
          return mergeFrom((com.google.devtools.build.v1.BuildEvent.BuildFinished)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.devtools.build.v1.BuildEvent.BuildFinished other) {
        if (other == com.google.devtools.build.v1.BuildEvent.BuildFinished.getDefaultInstance()) return this;
        if (other.hasStatus()) {
          mergeStatus(other.getStatus());
        }
        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.BuildEvent.BuildFinished parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.devtools.build.v1.BuildEvent.BuildFinished) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private com.google.devtools.build.v1.BuildStatus status_ = null;
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.devtools.build.v1.BuildStatus, com.google.devtools.build.v1.BuildStatus.Builder, com.google.devtools.build.v1.BuildStatusOrBuilder> statusBuilder_;
      /**
       * <pre>
       * Final status of the build.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus status = 1;</code>
       */
      public boolean hasStatus() {
        return statusBuilder_ != null || status_ != null;
      }
      /**
       * <pre>
       * Final status of the build.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus status = 1;</code>
       */
      public com.google.devtools.build.v1.BuildStatus getStatus() {
        if (statusBuilder_ == null) {
          return status_ == null ? com.google.devtools.build.v1.BuildStatus.getDefaultInstance() : status_;
        } else {
          return statusBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * Final status of the build.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus status = 1;</code>
       */
      public Builder setStatus(com.google.devtools.build.v1.BuildStatus value) {
        if (statusBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          status_ = value;
          onChanged();
        } else {
          statusBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * Final status of the build.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus status = 1;</code>
       */
      public Builder setStatus(
          com.google.devtools.build.v1.BuildStatus.Builder builderForValue) {
        if (statusBuilder_ == null) {
          status_ = builderForValue.build();
          onChanged();
        } else {
          statusBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * Final status of the build.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus status = 1;</code>
       */
      public Builder mergeStatus(com.google.devtools.build.v1.BuildStatus value) {
        if (statusBuilder_ == null) {
          if (status_ != null) {
            status_ =
              com.google.devtools.build.v1.BuildStatus.newBuilder(status_).mergeFrom(value).buildPartial();
          } else {
            status_ = value;
          }
          onChanged();
        } else {
          statusBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * Final status of the build.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus status = 1;</code>
       */
      public Builder clearStatus() {
        if (statusBuilder_ == null) {
          status_ = null;
          onChanged();
        } else {
          status_ = null;
          statusBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * Final status of the build.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus status = 1;</code>
       */
      public com.google.devtools.build.v1.BuildStatus.Builder getStatusBuilder() {
        
        onChanged();
        return getStatusFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * Final status of the build.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus status = 1;</code>
       */
      public com.google.devtools.build.v1.BuildStatusOrBuilder getStatusOrBuilder() {
        if (statusBuilder_ != null) {
          return statusBuilder_.getMessageOrBuilder();
        } else {
          return status_ == null ?
              com.google.devtools.build.v1.BuildStatus.getDefaultInstance() : status_;
        }
      }
      /**
       * <pre>
       * Final status of the build.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildStatus status = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          com.google.devtools.build.v1.BuildStatus, com.google.devtools.build.v1.BuildStatus.Builder, com.google.devtools.build.v1.BuildStatusOrBuilder> 
          getStatusFieldBuilder() {
        if (statusBuilder_ == null) {
          statusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              com.google.devtools.build.v1.BuildStatus, com.google.devtools.build.v1.BuildStatus.Builder, com.google.devtools.build.v1.BuildStatusOrBuilder>(
                  getStatus(),
                  getParentForChildren(),
                  isClean());
          status_ = null;
        }
        return statusBuilder_;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

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


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

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

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

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

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

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

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

  }

  public interface ConsoleOutputOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.devtools.build.v1.BuildEvent.ConsoleOutput)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The output stream type.
     * </pre>
     *
     * <code>.google.devtools.build.v1.ConsoleOutputStream type = 1;</code>
     */
    int getTypeValue();
    /**
     * <pre>
     * The output stream type.
     * </pre>
     *
     * <code>.google.devtools.build.v1.ConsoleOutputStream type = 1;</code>
     */
    com.google.devtools.build.v1.ConsoleOutputStream getType();

    /**
     * <pre>
     * Regular UTF-8 output; normal text.
     * </pre>
     *
     * <code>string text_output = 2;</code>
     */
    java.lang.String getTextOutput();
    /**
     * <pre>
     * Regular UTF-8 output; normal text.
     * </pre>
     *
     * <code>string text_output = 2;</code>
     */
    com.google.protobuf.ByteString
        getTextOutputBytes();

    /**
     * <pre>
     * Used if the output is not UTF-8 text (for example, a binary proto).
     * </pre>
     *
     * <code>bytes binary_output = 3;</code>
     */
    com.google.protobuf.ByteString getBinaryOutput();

    public com.google.devtools.build.v1.BuildEvent.ConsoleOutput.OutputCase getOutputCase();
  }
  /**
   * <pre>
   * Textual output written to standard output or standard error.
   * </pre>
   *
   * Protobuf type {@code google.devtools.build.v1.BuildEvent.ConsoleOutput}
   */
  public  static final class ConsoleOutput extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.devtools.build.v1.BuildEvent.ConsoleOutput)
      ConsoleOutputOrBuilder {
    // Use ConsoleOutput.newBuilder() to construct.
    private ConsoleOutput(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private ConsoleOutput() {
      type_ = 0;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private ConsoleOutput(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 8: {
              int rawValue = input.readEnum();

              type_ = rawValue;
              break;
            }
            case 18: {
              java.lang.String s = input.readStringRequireUtf8();
              outputCase_ = 2;
              output_ = s;
              break;
            }
            case 26: {
              outputCase_ = 3;
              output_ = input.readBytes();
              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 {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_ConsoleOutput_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_ConsoleOutput_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.devtools.build.v1.BuildEvent.ConsoleOutput.class, com.google.devtools.build.v1.BuildEvent.ConsoleOutput.Builder.class);
    }

    private int outputCase_ = 0;
    private java.lang.Object output_;
    public enum OutputCase
        implements com.google.protobuf.Internal.EnumLite {
      TEXT_OUTPUT(2),
      BINARY_OUTPUT(3),
      OUTPUT_NOT_SET(0);
      private final int value;
      private OutputCase(int value) {
        this.value = value;
      }
      /**
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static OutputCase valueOf(int value) {
        return forNumber(value);
      }

      public static OutputCase forNumber(int value) {
        switch (value) {
          case 2: return TEXT_OUTPUT;
          case 3: return BINARY_OUTPUT;
          case 0: return OUTPUT_NOT_SET;
          default: return null;
        }
      }
      public int getNumber() {
        return this.value;
      }
    };

    public OutputCase
    getOutputCase() {
      return OutputCase.forNumber(
          outputCase_);
    }

    public static final int TYPE_FIELD_NUMBER = 1;
    private int type_;
    /**
     * <pre>
     * The output stream type.
     * </pre>
     *
     * <code>.google.devtools.build.v1.ConsoleOutputStream type = 1;</code>
     */
    public int getTypeValue() {
      return type_;
    }
    /**
     * <pre>
     * The output stream type.
     * </pre>
     *
     * <code>.google.devtools.build.v1.ConsoleOutputStream type = 1;</code>
     */
    public com.google.devtools.build.v1.ConsoleOutputStream getType() {
      com.google.devtools.build.v1.ConsoleOutputStream result = com.google.devtools.build.v1.ConsoleOutputStream.valueOf(type_);
      return result == null ? com.google.devtools.build.v1.ConsoleOutputStream.UNRECOGNIZED : result;
    }

    public static final int TEXT_OUTPUT_FIELD_NUMBER = 2;
    /**
     * <pre>
     * Regular UTF-8 output; normal text.
     * </pre>
     *
     * <code>string text_output = 2;</code>
     */
    public java.lang.String getTextOutput() {
      java.lang.Object ref = "";
      if (outputCase_ == 2) {
        ref = output_;
      }
      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();
        if (outputCase_ == 2) {
          output_ = s;
        }
        return s;
      }
    }
    /**
     * <pre>
     * Regular UTF-8 output; normal text.
     * </pre>
     *
     * <code>string text_output = 2;</code>
     */
    public com.google.protobuf.ByteString
        getTextOutputBytes() {
      java.lang.Object ref = "";
      if (outputCase_ == 2) {
        ref = output_;
      }
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        if (outputCase_ == 2) {
          output_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int BINARY_OUTPUT_FIELD_NUMBER = 3;
    /**
     * <pre>
     * Used if the output is not UTF-8 text (for example, a binary proto).
     * </pre>
     *
     * <code>bytes binary_output = 3;</code>
     */
    public com.google.protobuf.ByteString getBinaryOutput() {
      if (outputCase_ == 3) {
        return (com.google.protobuf.ByteString) output_;
      }
      return com.google.protobuf.ByteString.EMPTY;
    }

    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 (type_ != com.google.devtools.build.v1.ConsoleOutputStream.UNKNOWN.getNumber()) {
        output.writeEnum(1, type_);
      }
      if (outputCase_ == 2) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, output_);
      }
      if (outputCase_ == 3) {
        output.writeBytes(
            3, (com.google.protobuf.ByteString) output_);
      }
    }

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

      size = 0;
      if (type_ != com.google.devtools.build.v1.ConsoleOutputStream.UNKNOWN.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(1, type_);
      }
      if (outputCase_ == 2) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, output_);
      }
      if (outputCase_ == 3) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(
              3, (com.google.protobuf.ByteString) output_);
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof com.google.devtools.build.v1.BuildEvent.ConsoleOutput)) {
        return super.equals(obj);
      }
      com.google.devtools.build.v1.BuildEvent.ConsoleOutput other = (com.google.devtools.build.v1.BuildEvent.ConsoleOutput) obj;

      boolean result = true;
      result = result && type_ == other.type_;
      result = result && getOutputCase().equals(
          other.getOutputCase());
      if (!result) return false;
      switch (outputCase_) {
        case 2:
          result = result && getTextOutput()
              .equals(other.getTextOutput());
          break;
        case 3:
          result = result && getBinaryOutput()
              .equals(other.getBinaryOutput());
          break;
        case 0:
        default:
      }
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + TYPE_FIELD_NUMBER;
      hash = (53 * hash) + type_;
      switch (outputCase_) {
        case 2:
          hash = (37 * hash) + TEXT_OUTPUT_FIELD_NUMBER;
          hash = (53 * hash) + getTextOutput().hashCode();
          break;
        case 3:
          hash = (37 * hash) + BINARY_OUTPUT_FIELD_NUMBER;
          hash = (53 * hash) + getBinaryOutput().hashCode();
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.devtools.build.v1.BuildEvent.ConsoleOutput parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.ConsoleOutput 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.BuildEvent.ConsoleOutput parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.ConsoleOutput 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.BuildEvent.ConsoleOutput parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.ConsoleOutput 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.BuildEvent.ConsoleOutput parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.devtools.build.v1.BuildEvent.ConsoleOutput 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.BuildEvent.ConsoleOutput parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.devtools.build.v1.BuildEvent.ConsoleOutput 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.BuildEvent.ConsoleOutput 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.BuildEvent.ConsoleOutput 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.BuildEvent.ConsoleOutput 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>
     * Textual output written to standard output or standard error.
     * </pre>
     *
     * Protobuf type {@code google.devtools.build.v1.BuildEvent.ConsoleOutput}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.devtools.build.v1.BuildEvent.ConsoleOutput)
        com.google.devtools.build.v1.BuildEvent.ConsoleOutputOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_ConsoleOutput_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_ConsoleOutput_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.devtools.build.v1.BuildEvent.ConsoleOutput.class, com.google.devtools.build.v1.BuildEvent.ConsoleOutput.Builder.class);
      }

      // Construct using com.google.devtools.build.v1.BuildEvent.ConsoleOutput.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();
        type_ = 0;

        outputCase_ = 0;
        output_ = null;
        return this;
      }

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

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

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

      public com.google.devtools.build.v1.BuildEvent.ConsoleOutput buildPartial() {
        com.google.devtools.build.v1.BuildEvent.ConsoleOutput result = new com.google.devtools.build.v1.BuildEvent.ConsoleOutput(this);
        result.type_ = type_;
        if (outputCase_ == 2) {
          result.output_ = output_;
        }
        if (outputCase_ == 3) {
          result.output_ = output_;
        }
        result.outputCase_ = outputCase_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          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, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.devtools.build.v1.BuildEvent.ConsoleOutput) {
          return mergeFrom((com.google.devtools.build.v1.BuildEvent.ConsoleOutput)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.devtools.build.v1.BuildEvent.ConsoleOutput other) {
        if (other == com.google.devtools.build.v1.BuildEvent.ConsoleOutput.getDefaultInstance()) return this;
        if (other.type_ != 0) {
          setTypeValue(other.getTypeValue());
        }
        switch (other.getOutputCase()) {
          case TEXT_OUTPUT: {
            outputCase_ = 2;
            output_ = other.output_;
            onChanged();
            break;
          }
          case BINARY_OUTPUT: {
            setBinaryOutput(other.getBinaryOutput());
            break;
          }
          case OUTPUT_NOT_SET: {
            break;
          }
        }
        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.BuildEvent.ConsoleOutput parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.devtools.build.v1.BuildEvent.ConsoleOutput) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }
      private int outputCase_ = 0;
      private java.lang.Object output_;
      public OutputCase
          getOutputCase() {
        return OutputCase.forNumber(
            outputCase_);
      }

      public Builder clearOutput() {
        outputCase_ = 0;
        output_ = null;
        onChanged();
        return this;
      }


      private int type_ = 0;
      /**
       * <pre>
       * The output stream type.
       * </pre>
       *
       * <code>.google.devtools.build.v1.ConsoleOutputStream type = 1;</code>
       */
      public int getTypeValue() {
        return type_;
      }
      /**
       * <pre>
       * The output stream type.
       * </pre>
       *
       * <code>.google.devtools.build.v1.ConsoleOutputStream type = 1;</code>
       */
      public Builder setTypeValue(int value) {
        type_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The output stream type.
       * </pre>
       *
       * <code>.google.devtools.build.v1.ConsoleOutputStream type = 1;</code>
       */
      public com.google.devtools.build.v1.ConsoleOutputStream getType() {
        com.google.devtools.build.v1.ConsoleOutputStream result = com.google.devtools.build.v1.ConsoleOutputStream.valueOf(type_);
        return result == null ? com.google.devtools.build.v1.ConsoleOutputStream.UNRECOGNIZED : result;
      }
      /**
       * <pre>
       * The output stream type.
       * </pre>
       *
       * <code>.google.devtools.build.v1.ConsoleOutputStream type = 1;</code>
       */
      public Builder setType(com.google.devtools.build.v1.ConsoleOutputStream value) {
        if (value == null) {
          throw new NullPointerException();
        }
        
        type_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The output stream type.
       * </pre>
       *
       * <code>.google.devtools.build.v1.ConsoleOutputStream type = 1;</code>
       */
      public Builder clearType() {
        
        type_ = 0;
        onChanged();
        return this;
      }

      /**
       * <pre>
       * Regular UTF-8 output; normal text.
       * </pre>
       *
       * <code>string text_output = 2;</code>
       */
      public java.lang.String getTextOutput() {
        java.lang.Object ref = "";
        if (outputCase_ == 2) {
          ref = output_;
        }
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          if (outputCase_ == 2) {
            output_ = s;
          }
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * Regular UTF-8 output; normal text.
       * </pre>
       *
       * <code>string text_output = 2;</code>
       */
      public com.google.protobuf.ByteString
          getTextOutputBytes() {
        java.lang.Object ref = "";
        if (outputCase_ == 2) {
          ref = output_;
        }
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          if (outputCase_ == 2) {
            output_ = b;
          }
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * Regular UTF-8 output; normal text.
       * </pre>
       *
       * <code>string text_output = 2;</code>
       */
      public Builder setTextOutput(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  outputCase_ = 2;
        output_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Regular UTF-8 output; normal text.
       * </pre>
       *
       * <code>string text_output = 2;</code>
       */
      public Builder clearTextOutput() {
        if (outputCase_ == 2) {
          outputCase_ = 0;
          output_ = null;
          onChanged();
        }
        return this;
      }
      /**
       * <pre>
       * Regular UTF-8 output; normal text.
       * </pre>
       *
       * <code>string text_output = 2;</code>
       */
      public Builder setTextOutputBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        outputCase_ = 2;
        output_ = value;
        onChanged();
        return this;
      }

      /**
       * <pre>
       * Used if the output is not UTF-8 text (for example, a binary proto).
       * </pre>
       *
       * <code>bytes binary_output = 3;</code>
       */
      public com.google.protobuf.ByteString getBinaryOutput() {
        if (outputCase_ == 3) {
          return (com.google.protobuf.ByteString) output_;
        }
        return com.google.protobuf.ByteString.EMPTY;
      }
      /**
       * <pre>
       * Used if the output is not UTF-8 text (for example, a binary proto).
       * </pre>
       *
       * <code>bytes binary_output = 3;</code>
       */
      public Builder setBinaryOutput(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  outputCase_ = 3;
        output_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Used if the output is not UTF-8 text (for example, a binary proto).
       * </pre>
       *
       * <code>bytes binary_output = 3;</code>
       */
      public Builder clearBinaryOutput() {
        if (outputCase_ == 3) {
          outputCase_ = 0;
          output_ = null;
          onChanged();
        }
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

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


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

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

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

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

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

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

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

  }

  public interface BuildComponentStreamFinishedOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * How the event stream finished.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType type = 1;</code>
     */
    int getTypeValue();
    /**
     * <pre>
     * How the event stream finished.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType type = 1;</code>
     */
    com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType getType();
  }
  /**
   * <pre>
   * Notification of the end of a build event stream published by a build
   * component other than CONTROLLER (See StreamId.BuildComponents).
   * </pre>
   *
   * Protobuf type {@code google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished}
   */
  public  static final class BuildComponentStreamFinished extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished)
      BuildComponentStreamFinishedOrBuilder {
    // Use BuildComponentStreamFinished.newBuilder() to construct.
    private BuildComponentStreamFinished(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private BuildComponentStreamFinished() {
      type_ = 0;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private BuildComponentStreamFinished(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      this();
      int mutable_bitField0_ = 0;
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            default: {
              if (!input.skipField(tag)) {
                done = true;
              }
              break;
            }
            case 8: {
              int rawValue = input.readEnum();

              type_ = rawValue;
              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 {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_BuildComponentStreamFinished_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_BuildComponentStreamFinished_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.class, com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.Builder.class);
    }

    /**
     * <pre>
     * How did the event stream finish.
     * </pre>
     *
     * Protobuf enum {@code google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType}
     */
    public enum FinishType
        implements com.google.protobuf.ProtocolMessageEnum {
      /**
       * <pre>
       * Unknown or unspecified; callers should never set this value.
       * </pre>
       *
       * <code>FINISH_TYPE_UNSPECIFIED = 0;</code>
       */
      FINISH_TYPE_UNSPECIFIED(0),
      /**
       * <pre>
       * Set by the event publisher to indicate a build event stream is
       * finished.
       * </pre>
       *
       * <code>FINISHED = 1;</code>
       */
      FINISHED(1),
      /**
       * <pre>
       * Set by the WatchBuild RPC server when the publisher of a build event
       * stream stops publishing events without publishing a
       * BuildComponentStreamFinished event whose type equals FINISHED.
       * </pre>
       *
       * <code>EXPIRED = 2;</code>
       */
      EXPIRED(2),
      UNRECOGNIZED(-1),
      ;

      /**
       * <pre>
       * Unknown or unspecified; callers should never set this value.
       * </pre>
       *
       * <code>FINISH_TYPE_UNSPECIFIED = 0;</code>
       */
      public static final int FINISH_TYPE_UNSPECIFIED_VALUE = 0;
      /**
       * <pre>
       * Set by the event publisher to indicate a build event stream is
       * finished.
       * </pre>
       *
       * <code>FINISHED = 1;</code>
       */
      public static final int FINISHED_VALUE = 1;
      /**
       * <pre>
       * Set by the WatchBuild RPC server when the publisher of a build event
       * stream stops publishing events without publishing a
       * BuildComponentStreamFinished event whose type equals FINISHED.
       * </pre>
       *
       * <code>EXPIRED = 2;</code>
       */
      public static final int EXPIRED_VALUE = 2;


      public final int getNumber() {
        if (this == UNRECOGNIZED) {
          throw new java.lang.IllegalArgumentException(
              "Can't get the number of an unknown enum value.");
        }
        return value;
      }

      /**
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static FinishType valueOf(int value) {
        return forNumber(value);
      }

      public static FinishType forNumber(int value) {
        switch (value) {
          case 0: return FINISH_TYPE_UNSPECIFIED;
          case 1: return FINISHED;
          case 2: return EXPIRED;
          default: return null;
        }
      }

      public static com.google.protobuf.Internal.EnumLiteMap<FinishType>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static final com.google.protobuf.Internal.EnumLiteMap<
          FinishType> internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<FinishType>() {
              public FinishType findValueByNumber(int number) {
                return FinishType.forNumber(number);
              }
            };

      public final com.google.protobuf.Descriptors.EnumValueDescriptor
          getValueDescriptor() {
        return getDescriptor().getValues().get(ordinal());
      }
      public final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptorForType() {
        return getDescriptor();
      }
      public static final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptor() {
        return com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.getDescriptor().getEnumTypes().get(0);
      }

      private static final FinishType[] VALUES = values();

      public static FinishType valueOf(
          com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
        if (desc.getType() != getDescriptor()) {
          throw new java.lang.IllegalArgumentException(
            "EnumValueDescriptor is not for this type.");
        }
        if (desc.getIndex() == -1) {
          return UNRECOGNIZED;
        }
        return VALUES[desc.getIndex()];
      }

      private final int value;

      private FinishType(int value) {
        this.value = value;
      }

      // @@protoc_insertion_point(enum_scope:google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType)
    }

    public static final int TYPE_FIELD_NUMBER = 1;
    private int type_;
    /**
     * <pre>
     * How the event stream finished.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType type = 1;</code>
     */
    public int getTypeValue() {
      return type_;
    }
    /**
     * <pre>
     * How the event stream finished.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType type = 1;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType getType() {
      com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType result = com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType.valueOf(type_);
      return result == null ? com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType.UNRECOGNIZED : result;
    }

    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 (type_ != com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType.FINISH_TYPE_UNSPECIFIED.getNumber()) {
        output.writeEnum(1, type_);
      }
    }

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

      size = 0;
      if (type_ != com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType.FINISH_TYPE_UNSPECIFIED.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(1, type_);
      }
      memoizedSize = size;
      return size;
    }

    private static final long serialVersionUID = 0L;
    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished)) {
        return super.equals(obj);
      }
      com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished other = (com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished) obj;

      boolean result = true;
      result = result && type_ == other.type_;
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + TYPE_FIELD_NUMBER;
      hash = (53 * hash) + type_;
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished 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.BuildEvent.BuildComponentStreamFinished parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished 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.BuildEvent.BuildComponentStreamFinished parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished 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.BuildEvent.BuildComponentStreamFinished parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished 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.BuildEvent.BuildComponentStreamFinished parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished 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.BuildEvent.BuildComponentStreamFinished 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.BuildEvent.BuildComponentStreamFinished 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.BuildEvent.BuildComponentStreamFinished 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>
     * Notification of the end of a build event stream published by a build
     * component other than CONTROLLER (See StreamId.BuildComponents).
     * </pre>
     *
     * Protobuf type {@code google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished)
        com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinishedOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_BuildComponentStreamFinished_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_BuildComponentStreamFinished_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.class, com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.Builder.class);
      }

      // Construct using com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.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();
        type_ = 0;

        return this;
      }

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

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

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

      public com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished buildPartial() {
        com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished result = new com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished(this);
        result.type_ = type_;
        onBuilt();
        return result;
      }

      public Builder clone() {
        return (Builder) super.clone();
      }
      public Builder setField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          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, Object value) {
        return (Builder) super.setRepeatedField(field, index, value);
      }
      public Builder addRepeatedField(
          com.google.protobuf.Descriptors.FieldDescriptor field,
          Object value) {
        return (Builder) super.addRepeatedField(field, value);
      }
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished) {
          return mergeFrom((com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished other) {
        if (other == com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.getDefaultInstance()) return this;
        if (other.type_ != 0) {
          setTypeValue(other.getTypeValue());
        }
        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.BuildEvent.BuildComponentStreamFinished parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private int type_ = 0;
      /**
       * <pre>
       * How the event stream finished.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType type = 1;</code>
       */
      public int getTypeValue() {
        return type_;
      }
      /**
       * <pre>
       * How the event stream finished.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType type = 1;</code>
       */
      public Builder setTypeValue(int value) {
        type_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * How the event stream finished.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType type = 1;</code>
       */
      public com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType getType() {
        com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType result = com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType.valueOf(type_);
        return result == null ? com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType.UNRECOGNIZED : result;
      }
      /**
       * <pre>
       * How the event stream finished.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType type = 1;</code>
       */
      public Builder setType(com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType value) {
        if (value == null) {
          throw new NullPointerException();
        }
        
        type_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * How the event stream finished.
       * </pre>
       *
       * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.FinishType type = 1;</code>
       */
      public Builder clearType() {
        
        type_ = 0;
        onChanged();
        return this;
      }
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return this;
      }

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


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

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

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

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

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

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

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

  }

  private int eventCase_ = 0;
  private java.lang.Object event_;
  public enum EventCase
      implements com.google.protobuf.Internal.EnumLite {
    INVOCATION_ATTEMPT_STARTED(51),
    INVOCATION_ATTEMPT_FINISHED(52),
    BUILD_ENQUEUED(53),
    BUILD_FINISHED(55),
    CONSOLE_OUTPUT(56),
    COMPONENT_STREAM_FINISHED(59),
    BAZEL_EVENT(60),
    BUILD_EXECUTION_EVENT(61),
    SOURCE_FETCH_EVENT(62),
    EVENT_NOT_SET(0);
    private final int value;
    private EventCase(int value) {
      this.value = value;
    }
    /**
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static EventCase valueOf(int value) {
      return forNumber(value);
    }

    public static EventCase forNumber(int value) {
      switch (value) {
        case 51: return INVOCATION_ATTEMPT_STARTED;
        case 52: return INVOCATION_ATTEMPT_FINISHED;
        case 53: return BUILD_ENQUEUED;
        case 55: return BUILD_FINISHED;
        case 56: return CONSOLE_OUTPUT;
        case 59: return COMPONENT_STREAM_FINISHED;
        case 60: return BAZEL_EVENT;
        case 61: return BUILD_EXECUTION_EVENT;
        case 62: return SOURCE_FETCH_EVENT;
        case 0: return EVENT_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public EventCase
  getEventCase() {
    return EventCase.forNumber(
        eventCase_);
  }

  public static final int EVENT_TIME_FIELD_NUMBER = 1;
  private com.google.protobuf.Timestamp eventTime_;
  /**
   * <pre>
   * The timestamp of this event.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp event_time = 1;</code>
   */
  public boolean hasEventTime() {
    return eventTime_ != null;
  }
  /**
   * <pre>
   * The timestamp of this event.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp event_time = 1;</code>
   */
  public com.google.protobuf.Timestamp getEventTime() {
    return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_;
  }
  /**
   * <pre>
   * The timestamp of this event.
   * </pre>
   *
   * <code>.google.protobuf.Timestamp event_time = 1;</code>
   */
  public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() {
    return getEventTime();
  }

  public static final int INVOCATION_ATTEMPT_STARTED_FIELD_NUMBER = 51;
  /**
   * <pre>
   * An invocation attempt has started.
   * </pre>
   *
   * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted invocation_attempt_started = 51;</code>
   */
  public com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted getInvocationAttemptStarted() {
    if (eventCase_ == 51) {
       return (com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted) event_;
    }
    return com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.getDefaultInstance();
  }
  /**
   * <pre>
   * An invocation attempt has started.
   * </pre>
   *
   * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted invocation_attempt_started = 51;</code>
   */
  public com.google.devtools.build.v1.BuildEvent.InvocationAttemptStartedOrBuilder getInvocationAttemptStartedOrBuilder() {
    if (eventCase_ == 51) {
       return (com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted) event_;
    }
    return com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.getDefaultInstance();
  }

  public static final int INVOCATION_ATTEMPT_FINISHED_FIELD_NUMBER = 52;
  /**
   * <pre>
   * An invocation attempt has finished.
   * </pre>
   *
   * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished invocation_attempt_finished = 52;</code>
   */
  public com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished getInvocationAttemptFinished() {
    if (eventCase_ == 52) {
       return (com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished) event_;
    }
    return com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.getDefaultInstance();
  }
  /**
   * <pre>
   * An invocation attempt has finished.
   * </pre>
   *
   * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished invocation_attempt_finished = 52;</code>
   */
  public com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinishedOrBuilder getInvocationAttemptFinishedOrBuilder() {
    if (eventCase_ == 52) {
       return (com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished) event_;
    }
    return com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.getDefaultInstance();
  }

  public static final int BUILD_ENQUEUED_FIELD_NUMBER = 53;
  /**
   * <pre>
   * The build is enqueued (just inserted to the build queue or put back
   * into the build queue due to a previous build failure).
   * </pre>
   *
   * <code>.google.devtools.build.v1.BuildEvent.BuildEnqueued build_enqueued = 53;</code>
   */
  public com.google.devtools.build.v1.BuildEvent.BuildEnqueued getBuildEnqueued() {
    if (eventCase_ == 53) {
       return (com.google.devtools.build.v1.BuildEvent.BuildEnqueued) event_;
    }
    return com.google.devtools.build.v1.BuildEvent.BuildEnqueued.getDefaultInstance();
  }
  /**
   * <pre>
   * The build is enqueued (just inserted to the build queue or put back
   * into the build queue due to a previous build failure).
   * </pre>
   *
   * <code>.google.devtools.build.v1.BuildEvent.BuildEnqueued build_enqueued = 53;</code>
   */
  public com.google.devtools.build.v1.BuildEvent.BuildEnqueuedOrBuilder getBuildEnqueuedOrBuilder() {
    if (eventCase_ == 53) {
       return (com.google.devtools.build.v1.BuildEvent.BuildEnqueued) event_;
    }
    return com.google.devtools.build.v1.BuildEvent.BuildEnqueued.getDefaultInstance();
  }

  public static final int BUILD_FINISHED_FIELD_NUMBER = 55;
  /**
   * <pre>
   * The build has finished. Set when the build is terminated.
   * </pre>
   *
   * <code>.google.devtools.build.v1.BuildEvent.BuildFinished build_finished = 55;</code>
   */
  public com.google.devtools.build.v1.BuildEvent.BuildFinished getBuildFinished() {
    if (eventCase_ == 55) {
       return (com.google.devtools.build.v1.BuildEvent.BuildFinished) event_;
    }
    return com.google.devtools.build.v1.BuildEvent.BuildFinished.getDefaultInstance();
  }
  /**
   * <pre>
   * The build has finished. Set when the build is terminated.
   * </pre>
   *
   * <code>.google.devtools.build.v1.BuildEvent.BuildFinished build_finished = 55;</code>
   */
  public com.google.devtools.build.v1.BuildEvent.BuildFinishedOrBuilder getBuildFinishedOrBuilder() {
    if (eventCase_ == 55) {
       return (com.google.devtools.build.v1.BuildEvent.BuildFinished) event_;
    }
    return com.google.devtools.build.v1.BuildEvent.BuildFinished.getDefaultInstance();
  }

  public static final int CONSOLE_OUTPUT_FIELD_NUMBER = 56;
  /**
   * <pre>
   * An event containing printed text.
   * </pre>
   *
   * <code>.google.devtools.build.v1.BuildEvent.ConsoleOutput console_output = 56;</code>
   */
  public com.google.devtools.build.v1.BuildEvent.ConsoleOutput getConsoleOutput() {
    if (eventCase_ == 56) {
       return (com.google.devtools.build.v1.BuildEvent.ConsoleOutput) event_;
    }
    return com.google.devtools.build.v1.BuildEvent.ConsoleOutput.getDefaultInstance();
  }
  /**
   * <pre>
   * An event containing printed text.
   * </pre>
   *
   * <code>.google.devtools.build.v1.BuildEvent.ConsoleOutput console_output = 56;</code>
   */
  public com.google.devtools.build.v1.BuildEvent.ConsoleOutputOrBuilder getConsoleOutputOrBuilder() {
    if (eventCase_ == 56) {
       return (com.google.devtools.build.v1.BuildEvent.ConsoleOutput) event_;
    }
    return com.google.devtools.build.v1.BuildEvent.ConsoleOutput.getDefaultInstance();
  }

  public static final int COMPONENT_STREAM_FINISHED_FIELD_NUMBER = 59;
  /**
   * <pre>
   * Indicates the end of a build event stream (with the same StreamId) from
   * a build component executing the requested build task.
   * *** This field does not indicate the WatchBuild RPC is finished. ***
   * </pre>
   *
   * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished component_stream_finished = 59;</code>
   */
  public com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished getComponentStreamFinished() {
    if (eventCase_ == 59) {
       return (com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished) event_;
    }
    return com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.getDefaultInstance();
  }
  /**
   * <pre>
   * Indicates the end of a build event stream (with the same StreamId) from
   * a build component executing the requested build task.
   * *** This field does not indicate the WatchBuild RPC is finished. ***
   * </pre>
   *
   * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished component_stream_finished = 59;</code>
   */
  public com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinishedOrBuilder getComponentStreamFinishedOrBuilder() {
    if (eventCase_ == 59) {
       return (com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished) event_;
    }
    return com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.getDefaultInstance();
  }

  public static final int BAZEL_EVENT_FIELD_NUMBER = 60;
  /**
   * <pre>
   * Structured build event generated by Bazel about its execution progress.
   * </pre>
   *
   * <code>.google.protobuf.Any bazel_event = 60;</code>
   */
  public com.google.protobuf.Any getBazelEvent() {
    if (eventCase_ == 60) {
       return (com.google.protobuf.Any) event_;
    }
    return com.google.protobuf.Any.getDefaultInstance();
  }
  /**
   * <pre>
   * Structured build event generated by Bazel about its execution progress.
   * </pre>
   *
   * <code>.google.protobuf.Any bazel_event = 60;</code>
   */
  public com.google.protobuf.AnyOrBuilder getBazelEventOrBuilder() {
    if (eventCase_ == 60) {
       return (com.google.protobuf.Any) event_;
    }
    return com.google.protobuf.Any.getDefaultInstance();
  }

  public static final int BUILD_EXECUTION_EVENT_FIELD_NUMBER = 61;
  /**
   * <pre>
   * An event that contains supplemental tool-specific information about
   * build execution.
   * </pre>
   *
   * <code>.google.protobuf.Any build_execution_event = 61;</code>
   */
  public com.google.protobuf.Any getBuildExecutionEvent() {
    if (eventCase_ == 61) {
       return (com.google.protobuf.Any) event_;
    }
    return com.google.protobuf.Any.getDefaultInstance();
  }
  /**
   * <pre>
   * An event that contains supplemental tool-specific information about
   * build execution.
   * </pre>
   *
   * <code>.google.protobuf.Any build_execution_event = 61;</code>
   */
  public com.google.protobuf.AnyOrBuilder getBuildExecutionEventOrBuilder() {
    if (eventCase_ == 61) {
       return (com.google.protobuf.Any) event_;
    }
    return com.google.protobuf.Any.getDefaultInstance();
  }

  public static final int SOURCE_FETCH_EVENT_FIELD_NUMBER = 62;
  /**
   * <pre>
   * An event that contains supplemental tool-specific information about
   * source fetching.
   * </pre>
   *
   * <code>.google.protobuf.Any source_fetch_event = 62;</code>
   */
  public com.google.protobuf.Any getSourceFetchEvent() {
    if (eventCase_ == 62) {
       return (com.google.protobuf.Any) event_;
    }
    return com.google.protobuf.Any.getDefaultInstance();
  }
  /**
   * <pre>
   * An event that contains supplemental tool-specific information about
   * source fetching.
   * </pre>
   *
   * <code>.google.protobuf.Any source_fetch_event = 62;</code>
   */
  public com.google.protobuf.AnyOrBuilder getSourceFetchEventOrBuilder() {
    if (eventCase_ == 62) {
       return (com.google.protobuf.Any) event_;
    }
    return com.google.protobuf.Any.getDefaultInstance();
  }

  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 (eventTime_ != null) {
      output.writeMessage(1, getEventTime());
    }
    if (eventCase_ == 51) {
      output.writeMessage(51, (com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted) event_);
    }
    if (eventCase_ == 52) {
      output.writeMessage(52, (com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished) event_);
    }
    if (eventCase_ == 53) {
      output.writeMessage(53, (com.google.devtools.build.v1.BuildEvent.BuildEnqueued) event_);
    }
    if (eventCase_ == 55) {
      output.writeMessage(55, (com.google.devtools.build.v1.BuildEvent.BuildFinished) event_);
    }
    if (eventCase_ == 56) {
      output.writeMessage(56, (com.google.devtools.build.v1.BuildEvent.ConsoleOutput) event_);
    }
    if (eventCase_ == 59) {
      output.writeMessage(59, (com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished) event_);
    }
    if (eventCase_ == 60) {
      output.writeMessage(60, (com.google.protobuf.Any) event_);
    }
    if (eventCase_ == 61) {
      output.writeMessage(61, (com.google.protobuf.Any) event_);
    }
    if (eventCase_ == 62) {
      output.writeMessage(62, (com.google.protobuf.Any) event_);
    }
  }

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

    size = 0;
    if (eventTime_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getEventTime());
    }
    if (eventCase_ == 51) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(51, (com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted) event_);
    }
    if (eventCase_ == 52) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(52, (com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished) event_);
    }
    if (eventCase_ == 53) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(53, (com.google.devtools.build.v1.BuildEvent.BuildEnqueued) event_);
    }
    if (eventCase_ == 55) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(55, (com.google.devtools.build.v1.BuildEvent.BuildFinished) event_);
    }
    if (eventCase_ == 56) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(56, (com.google.devtools.build.v1.BuildEvent.ConsoleOutput) event_);
    }
    if (eventCase_ == 59) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(59, (com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished) event_);
    }
    if (eventCase_ == 60) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(60, (com.google.protobuf.Any) event_);
    }
    if (eventCase_ == 61) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(61, (com.google.protobuf.Any) event_);
    }
    if (eventCase_ == 62) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(62, (com.google.protobuf.Any) event_);
    }
    memoizedSize = size;
    return size;
  }

  private static final long serialVersionUID = 0L;
  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.google.devtools.build.v1.BuildEvent)) {
      return super.equals(obj);
    }
    com.google.devtools.build.v1.BuildEvent other = (com.google.devtools.build.v1.BuildEvent) obj;

    boolean result = true;
    result = result && (hasEventTime() == other.hasEventTime());
    if (hasEventTime()) {
      result = result && getEventTime()
          .equals(other.getEventTime());
    }
    result = result && getEventCase().equals(
        other.getEventCase());
    if (!result) return false;
    switch (eventCase_) {
      case 51:
        result = result && getInvocationAttemptStarted()
            .equals(other.getInvocationAttemptStarted());
        break;
      case 52:
        result = result && getInvocationAttemptFinished()
            .equals(other.getInvocationAttemptFinished());
        break;
      case 53:
        result = result && getBuildEnqueued()
            .equals(other.getBuildEnqueued());
        break;
      case 55:
        result = result && getBuildFinished()
            .equals(other.getBuildFinished());
        break;
      case 56:
        result = result && getConsoleOutput()
            .equals(other.getConsoleOutput());
        break;
      case 59:
        result = result && getComponentStreamFinished()
            .equals(other.getComponentStreamFinished());
        break;
      case 60:
        result = result && getBazelEvent()
            .equals(other.getBazelEvent());
        break;
      case 61:
        result = result && getBuildExecutionEvent()
            .equals(other.getBuildExecutionEvent());
        break;
      case 62:
        result = result && getSourceFetchEvent()
            .equals(other.getSourceFetchEvent());
        break;
      case 0:
      default:
    }
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasEventTime()) {
      hash = (37 * hash) + EVENT_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getEventTime().hashCode();
    }
    switch (eventCase_) {
      case 51:
        hash = (37 * hash) + INVOCATION_ATTEMPT_STARTED_FIELD_NUMBER;
        hash = (53 * hash) + getInvocationAttemptStarted().hashCode();
        break;
      case 52:
        hash = (37 * hash) + INVOCATION_ATTEMPT_FINISHED_FIELD_NUMBER;
        hash = (53 * hash) + getInvocationAttemptFinished().hashCode();
        break;
      case 53:
        hash = (37 * hash) + BUILD_ENQUEUED_FIELD_NUMBER;
        hash = (53 * hash) + getBuildEnqueued().hashCode();
        break;
      case 55:
        hash = (37 * hash) + BUILD_FINISHED_FIELD_NUMBER;
        hash = (53 * hash) + getBuildFinished().hashCode();
        break;
      case 56:
        hash = (37 * hash) + CONSOLE_OUTPUT_FIELD_NUMBER;
        hash = (53 * hash) + getConsoleOutput().hashCode();
        break;
      case 59:
        hash = (37 * hash) + COMPONENT_STREAM_FINISHED_FIELD_NUMBER;
        hash = (53 * hash) + getComponentStreamFinished().hashCode();
        break;
      case 60:
        hash = (37 * hash) + BAZEL_EVENT_FIELD_NUMBER;
        hash = (53 * hash) + getBazelEvent().hashCode();
        break;
      case 61:
        hash = (37 * hash) + BUILD_EXECUTION_EVENT_FIELD_NUMBER;
        hash = (53 * hash) + getBuildExecutionEvent().hashCode();
        break;
      case 62:
        hash = (37 * hash) + SOURCE_FETCH_EVENT_FIELD_NUMBER;
        hash = (53 * hash) + getSourceFetchEvent().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.devtools.build.v1.BuildEvent parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.devtools.build.v1.BuildEvent 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.BuildEvent parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.devtools.build.v1.BuildEvent 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.BuildEvent parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.devtools.build.v1.BuildEvent 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.BuildEvent parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.devtools.build.v1.BuildEvent 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.BuildEvent parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.devtools.build.v1.BuildEvent 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.BuildEvent 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.BuildEvent 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.BuildEvent 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>
   * An event representing some state change that occured in the build. This
   * message does not include field for uniquely identifying an event.
   * </pre>
   *
   * Protobuf type {@code google.devtools.build.v1.BuildEvent}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.devtools.build.v1.BuildEvent)
      com.google.devtools.build.v1.BuildEventOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.devtools.build.v1.BuildEventProto.internal_static_google_devtools_build_v1_BuildEvent_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.devtools.build.v1.BuildEvent.class, com.google.devtools.build.v1.BuildEvent.Builder.class);
    }

    // Construct using com.google.devtools.build.v1.BuildEvent.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 (eventTimeBuilder_ == null) {
        eventTime_ = null;
      } else {
        eventTime_ = null;
        eventTimeBuilder_ = null;
      }
      eventCase_ = 0;
      event_ = null;
      return this;
    }

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

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

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

    public com.google.devtools.build.v1.BuildEvent buildPartial() {
      com.google.devtools.build.v1.BuildEvent result = new com.google.devtools.build.v1.BuildEvent(this);
      if (eventTimeBuilder_ == null) {
        result.eventTime_ = eventTime_;
      } else {
        result.eventTime_ = eventTimeBuilder_.build();
      }
      if (eventCase_ == 51) {
        if (invocationAttemptStartedBuilder_ == null) {
          result.event_ = event_;
        } else {
          result.event_ = invocationAttemptStartedBuilder_.build();
        }
      }
      if (eventCase_ == 52) {
        if (invocationAttemptFinishedBuilder_ == null) {
          result.event_ = event_;
        } else {
          result.event_ = invocationAttemptFinishedBuilder_.build();
        }
      }
      if (eventCase_ == 53) {
        if (buildEnqueuedBuilder_ == null) {
          result.event_ = event_;
        } else {
          result.event_ = buildEnqueuedBuilder_.build();
        }
      }
      if (eventCase_ == 55) {
        if (buildFinishedBuilder_ == null) {
          result.event_ = event_;
        } else {
          result.event_ = buildFinishedBuilder_.build();
        }
      }
      if (eventCase_ == 56) {
        if (consoleOutputBuilder_ == null) {
          result.event_ = event_;
        } else {
          result.event_ = consoleOutputBuilder_.build();
        }
      }
      if (eventCase_ == 59) {
        if (componentStreamFinishedBuilder_ == null) {
          result.event_ = event_;
        } else {
          result.event_ = componentStreamFinishedBuilder_.build();
        }
      }
      if (eventCase_ == 60) {
        if (bazelEventBuilder_ == null) {
          result.event_ = event_;
        } else {
          result.event_ = bazelEventBuilder_.build();
        }
      }
      if (eventCase_ == 61) {
        if (buildExecutionEventBuilder_ == null) {
          result.event_ = event_;
        } else {
          result.event_ = buildExecutionEventBuilder_.build();
        }
      }
      if (eventCase_ == 62) {
        if (sourceFetchEventBuilder_ == null) {
          result.event_ = event_;
        } else {
          result.event_ = sourceFetchEventBuilder_.build();
        }
      }
      result.eventCase_ = eventCase_;
      onBuilt();
      return result;
    }

    public Builder clone() {
      return (Builder) super.clone();
    }
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        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, Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.devtools.build.v1.BuildEvent) {
        return mergeFrom((com.google.devtools.build.v1.BuildEvent)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.devtools.build.v1.BuildEvent other) {
      if (other == com.google.devtools.build.v1.BuildEvent.getDefaultInstance()) return this;
      if (other.hasEventTime()) {
        mergeEventTime(other.getEventTime());
      }
      switch (other.getEventCase()) {
        case INVOCATION_ATTEMPT_STARTED: {
          mergeInvocationAttemptStarted(other.getInvocationAttemptStarted());
          break;
        }
        case INVOCATION_ATTEMPT_FINISHED: {
          mergeInvocationAttemptFinished(other.getInvocationAttemptFinished());
          break;
        }
        case BUILD_ENQUEUED: {
          mergeBuildEnqueued(other.getBuildEnqueued());
          break;
        }
        case BUILD_FINISHED: {
          mergeBuildFinished(other.getBuildFinished());
          break;
        }
        case CONSOLE_OUTPUT: {
          mergeConsoleOutput(other.getConsoleOutput());
          break;
        }
        case COMPONENT_STREAM_FINISHED: {
          mergeComponentStreamFinished(other.getComponentStreamFinished());
          break;
        }
        case BAZEL_EVENT: {
          mergeBazelEvent(other.getBazelEvent());
          break;
        }
        case BUILD_EXECUTION_EVENT: {
          mergeBuildExecutionEvent(other.getBuildExecutionEvent());
          break;
        }
        case SOURCE_FETCH_EVENT: {
          mergeSourceFetchEvent(other.getSourceFetchEvent());
          break;
        }
        case EVENT_NOT_SET: {
          break;
        }
      }
      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.BuildEvent parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.devtools.build.v1.BuildEvent) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int eventCase_ = 0;
    private java.lang.Object event_;
    public EventCase
        getEventCase() {
      return EventCase.forNumber(
          eventCase_);
    }

    public Builder clearEvent() {
      eventCase_ = 0;
      event_ = null;
      onChanged();
      return this;
    }


    private com.google.protobuf.Timestamp eventTime_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> eventTimeBuilder_;
    /**
     * <pre>
     * The timestamp of this event.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    public boolean hasEventTime() {
      return eventTimeBuilder_ != null || eventTime_ != null;
    }
    /**
     * <pre>
     * The timestamp of this event.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    public com.google.protobuf.Timestamp getEventTime() {
      if (eventTimeBuilder_ == null) {
        return eventTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_;
      } else {
        return eventTimeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * The timestamp of this event.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    public Builder setEventTime(com.google.protobuf.Timestamp value) {
      if (eventTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        eventTime_ = value;
        onChanged();
      } else {
        eventTimeBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * The timestamp of this event.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    public Builder setEventTime(
        com.google.protobuf.Timestamp.Builder builderForValue) {
      if (eventTimeBuilder_ == null) {
        eventTime_ = builderForValue.build();
        onChanged();
      } else {
        eventTimeBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * The timestamp of this event.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    public Builder mergeEventTime(com.google.protobuf.Timestamp value) {
      if (eventTimeBuilder_ == null) {
        if (eventTime_ != null) {
          eventTime_ =
            com.google.protobuf.Timestamp.newBuilder(eventTime_).mergeFrom(value).buildPartial();
        } else {
          eventTime_ = value;
        }
        onChanged();
      } else {
        eventTimeBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * The timestamp of this event.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    public Builder clearEventTime() {
      if (eventTimeBuilder_ == null) {
        eventTime_ = null;
        onChanged();
      } else {
        eventTime_ = null;
        eventTimeBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * The timestamp of this event.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    public com.google.protobuf.Timestamp.Builder getEventTimeBuilder() {
      
      onChanged();
      return getEventTimeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The timestamp of this event.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    public com.google.protobuf.TimestampOrBuilder getEventTimeOrBuilder() {
      if (eventTimeBuilder_ != null) {
        return eventTimeBuilder_.getMessageOrBuilder();
      } else {
        return eventTime_ == null ?
            com.google.protobuf.Timestamp.getDefaultInstance() : eventTime_;
      }
    }
    /**
     * <pre>
     * The timestamp of this event.
     * </pre>
     *
     * <code>.google.protobuf.Timestamp event_time = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> 
        getEventTimeFieldBuilder() {
      if (eventTimeBuilder_ == null) {
        eventTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
                getEventTime(),
                getParentForChildren(),
                isClean());
        eventTime_ = null;
      }
      return eventTimeBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted, com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.Builder, com.google.devtools.build.v1.BuildEvent.InvocationAttemptStartedOrBuilder> invocationAttemptStartedBuilder_;
    /**
     * <pre>
     * An invocation attempt has started.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted invocation_attempt_started = 51;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted getInvocationAttemptStarted() {
      if (invocationAttemptStartedBuilder_ == null) {
        if (eventCase_ == 51) {
          return (com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted) event_;
        }
        return com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.getDefaultInstance();
      } else {
        if (eventCase_ == 51) {
          return invocationAttemptStartedBuilder_.getMessage();
        }
        return com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * An invocation attempt has started.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted invocation_attempt_started = 51;</code>
     */
    public Builder setInvocationAttemptStarted(com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted value) {
      if (invocationAttemptStartedBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        event_ = value;
        onChanged();
      } else {
        invocationAttemptStartedBuilder_.setMessage(value);
      }
      eventCase_ = 51;
      return this;
    }
    /**
     * <pre>
     * An invocation attempt has started.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted invocation_attempt_started = 51;</code>
     */
    public Builder setInvocationAttemptStarted(
        com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.Builder builderForValue) {
      if (invocationAttemptStartedBuilder_ == null) {
        event_ = builderForValue.build();
        onChanged();
      } else {
        invocationAttemptStartedBuilder_.setMessage(builderForValue.build());
      }
      eventCase_ = 51;
      return this;
    }
    /**
     * <pre>
     * An invocation attempt has started.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted invocation_attempt_started = 51;</code>
     */
    public Builder mergeInvocationAttemptStarted(com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted value) {
      if (invocationAttemptStartedBuilder_ == null) {
        if (eventCase_ == 51 &&
            event_ != com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.getDefaultInstance()) {
          event_ = com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.newBuilder((com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted) event_)
              .mergeFrom(value).buildPartial();
        } else {
          event_ = value;
        }
        onChanged();
      } else {
        if (eventCase_ == 51) {
          invocationAttemptStartedBuilder_.mergeFrom(value);
        }
        invocationAttemptStartedBuilder_.setMessage(value);
      }
      eventCase_ = 51;
      return this;
    }
    /**
     * <pre>
     * An invocation attempt has started.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted invocation_attempt_started = 51;</code>
     */
    public Builder clearInvocationAttemptStarted() {
      if (invocationAttemptStartedBuilder_ == null) {
        if (eventCase_ == 51) {
          eventCase_ = 0;
          event_ = null;
          onChanged();
        }
      } else {
        if (eventCase_ == 51) {
          eventCase_ = 0;
          event_ = null;
        }
        invocationAttemptStartedBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * An invocation attempt has started.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted invocation_attempt_started = 51;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.Builder getInvocationAttemptStartedBuilder() {
      return getInvocationAttemptStartedFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * An invocation attempt has started.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted invocation_attempt_started = 51;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.InvocationAttemptStartedOrBuilder getInvocationAttemptStartedOrBuilder() {
      if ((eventCase_ == 51) && (invocationAttemptStartedBuilder_ != null)) {
        return invocationAttemptStartedBuilder_.getMessageOrBuilder();
      } else {
        if (eventCase_ == 51) {
          return (com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted) event_;
        }
        return com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * An invocation attempt has started.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted invocation_attempt_started = 51;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted, com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.Builder, com.google.devtools.build.v1.BuildEvent.InvocationAttemptStartedOrBuilder> 
        getInvocationAttemptStartedFieldBuilder() {
      if (invocationAttemptStartedBuilder_ == null) {
        if (!(eventCase_ == 51)) {
          event_ = com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.getDefaultInstance();
        }
        invocationAttemptStartedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted, com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted.Builder, com.google.devtools.build.v1.BuildEvent.InvocationAttemptStartedOrBuilder>(
                (com.google.devtools.build.v1.BuildEvent.InvocationAttemptStarted) event_,
                getParentForChildren(),
                isClean());
        event_ = null;
      }
      eventCase_ = 51;
      onChanged();;
      return invocationAttemptStartedBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished, com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.Builder, com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinishedOrBuilder> invocationAttemptFinishedBuilder_;
    /**
     * <pre>
     * An invocation attempt has finished.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished invocation_attempt_finished = 52;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished getInvocationAttemptFinished() {
      if (invocationAttemptFinishedBuilder_ == null) {
        if (eventCase_ == 52) {
          return (com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished) event_;
        }
        return com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.getDefaultInstance();
      } else {
        if (eventCase_ == 52) {
          return invocationAttemptFinishedBuilder_.getMessage();
        }
        return com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * An invocation attempt has finished.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished invocation_attempt_finished = 52;</code>
     */
    public Builder setInvocationAttemptFinished(com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished value) {
      if (invocationAttemptFinishedBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        event_ = value;
        onChanged();
      } else {
        invocationAttemptFinishedBuilder_.setMessage(value);
      }
      eventCase_ = 52;
      return this;
    }
    /**
     * <pre>
     * An invocation attempt has finished.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished invocation_attempt_finished = 52;</code>
     */
    public Builder setInvocationAttemptFinished(
        com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.Builder builderForValue) {
      if (invocationAttemptFinishedBuilder_ == null) {
        event_ = builderForValue.build();
        onChanged();
      } else {
        invocationAttemptFinishedBuilder_.setMessage(builderForValue.build());
      }
      eventCase_ = 52;
      return this;
    }
    /**
     * <pre>
     * An invocation attempt has finished.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished invocation_attempt_finished = 52;</code>
     */
    public Builder mergeInvocationAttemptFinished(com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished value) {
      if (invocationAttemptFinishedBuilder_ == null) {
        if (eventCase_ == 52 &&
            event_ != com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.getDefaultInstance()) {
          event_ = com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.newBuilder((com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished) event_)
              .mergeFrom(value).buildPartial();
        } else {
          event_ = value;
        }
        onChanged();
      } else {
        if (eventCase_ == 52) {
          invocationAttemptFinishedBuilder_.mergeFrom(value);
        }
        invocationAttemptFinishedBuilder_.setMessage(value);
      }
      eventCase_ = 52;
      return this;
    }
    /**
     * <pre>
     * An invocation attempt has finished.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished invocation_attempt_finished = 52;</code>
     */
    public Builder clearInvocationAttemptFinished() {
      if (invocationAttemptFinishedBuilder_ == null) {
        if (eventCase_ == 52) {
          eventCase_ = 0;
          event_ = null;
          onChanged();
        }
      } else {
        if (eventCase_ == 52) {
          eventCase_ = 0;
          event_ = null;
        }
        invocationAttemptFinishedBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * An invocation attempt has finished.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished invocation_attempt_finished = 52;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.Builder getInvocationAttemptFinishedBuilder() {
      return getInvocationAttemptFinishedFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * An invocation attempt has finished.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished invocation_attempt_finished = 52;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinishedOrBuilder getInvocationAttemptFinishedOrBuilder() {
      if ((eventCase_ == 52) && (invocationAttemptFinishedBuilder_ != null)) {
        return invocationAttemptFinishedBuilder_.getMessageOrBuilder();
      } else {
        if (eventCase_ == 52) {
          return (com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished) event_;
        }
        return com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * An invocation attempt has finished.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished invocation_attempt_finished = 52;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished, com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.Builder, com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinishedOrBuilder> 
        getInvocationAttemptFinishedFieldBuilder() {
      if (invocationAttemptFinishedBuilder_ == null) {
        if (!(eventCase_ == 52)) {
          event_ = com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.getDefaultInstance();
        }
        invocationAttemptFinishedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished, com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished.Builder, com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinishedOrBuilder>(
                (com.google.devtools.build.v1.BuildEvent.InvocationAttemptFinished) event_,
                getParentForChildren(),
                isClean());
        event_ = null;
      }
      eventCase_ = 52;
      onChanged();;
      return invocationAttemptFinishedBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.BuildEvent.BuildEnqueued, com.google.devtools.build.v1.BuildEvent.BuildEnqueued.Builder, com.google.devtools.build.v1.BuildEvent.BuildEnqueuedOrBuilder> buildEnqueuedBuilder_;
    /**
     * <pre>
     * The build is enqueued (just inserted to the build queue or put back
     * into the build queue due to a previous build failure).
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildEnqueued build_enqueued = 53;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.BuildEnqueued getBuildEnqueued() {
      if (buildEnqueuedBuilder_ == null) {
        if (eventCase_ == 53) {
          return (com.google.devtools.build.v1.BuildEvent.BuildEnqueued) event_;
        }
        return com.google.devtools.build.v1.BuildEvent.BuildEnqueued.getDefaultInstance();
      } else {
        if (eventCase_ == 53) {
          return buildEnqueuedBuilder_.getMessage();
        }
        return com.google.devtools.build.v1.BuildEvent.BuildEnqueued.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * The build is enqueued (just inserted to the build queue or put back
     * into the build queue due to a previous build failure).
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildEnqueued build_enqueued = 53;</code>
     */
    public Builder setBuildEnqueued(com.google.devtools.build.v1.BuildEvent.BuildEnqueued value) {
      if (buildEnqueuedBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        event_ = value;
        onChanged();
      } else {
        buildEnqueuedBuilder_.setMessage(value);
      }
      eventCase_ = 53;
      return this;
    }
    /**
     * <pre>
     * The build is enqueued (just inserted to the build queue or put back
     * into the build queue due to a previous build failure).
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildEnqueued build_enqueued = 53;</code>
     */
    public Builder setBuildEnqueued(
        com.google.devtools.build.v1.BuildEvent.BuildEnqueued.Builder builderForValue) {
      if (buildEnqueuedBuilder_ == null) {
        event_ = builderForValue.build();
        onChanged();
      } else {
        buildEnqueuedBuilder_.setMessage(builderForValue.build());
      }
      eventCase_ = 53;
      return this;
    }
    /**
     * <pre>
     * The build is enqueued (just inserted to the build queue or put back
     * into the build queue due to a previous build failure).
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildEnqueued build_enqueued = 53;</code>
     */
    public Builder mergeBuildEnqueued(com.google.devtools.build.v1.BuildEvent.BuildEnqueued value) {
      if (buildEnqueuedBuilder_ == null) {
        if (eventCase_ == 53 &&
            event_ != com.google.devtools.build.v1.BuildEvent.BuildEnqueued.getDefaultInstance()) {
          event_ = com.google.devtools.build.v1.BuildEvent.BuildEnqueued.newBuilder((com.google.devtools.build.v1.BuildEvent.BuildEnqueued) event_)
              .mergeFrom(value).buildPartial();
        } else {
          event_ = value;
        }
        onChanged();
      } else {
        if (eventCase_ == 53) {
          buildEnqueuedBuilder_.mergeFrom(value);
        }
        buildEnqueuedBuilder_.setMessage(value);
      }
      eventCase_ = 53;
      return this;
    }
    /**
     * <pre>
     * The build is enqueued (just inserted to the build queue or put back
     * into the build queue due to a previous build failure).
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildEnqueued build_enqueued = 53;</code>
     */
    public Builder clearBuildEnqueued() {
      if (buildEnqueuedBuilder_ == null) {
        if (eventCase_ == 53) {
          eventCase_ = 0;
          event_ = null;
          onChanged();
        }
      } else {
        if (eventCase_ == 53) {
          eventCase_ = 0;
          event_ = null;
        }
        buildEnqueuedBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * The build is enqueued (just inserted to the build queue or put back
     * into the build queue due to a previous build failure).
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildEnqueued build_enqueued = 53;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.BuildEnqueued.Builder getBuildEnqueuedBuilder() {
      return getBuildEnqueuedFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The build is enqueued (just inserted to the build queue or put back
     * into the build queue due to a previous build failure).
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildEnqueued build_enqueued = 53;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.BuildEnqueuedOrBuilder getBuildEnqueuedOrBuilder() {
      if ((eventCase_ == 53) && (buildEnqueuedBuilder_ != null)) {
        return buildEnqueuedBuilder_.getMessageOrBuilder();
      } else {
        if (eventCase_ == 53) {
          return (com.google.devtools.build.v1.BuildEvent.BuildEnqueued) event_;
        }
        return com.google.devtools.build.v1.BuildEvent.BuildEnqueued.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * The build is enqueued (just inserted to the build queue or put back
     * into the build queue due to a previous build failure).
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildEnqueued build_enqueued = 53;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.BuildEvent.BuildEnqueued, com.google.devtools.build.v1.BuildEvent.BuildEnqueued.Builder, com.google.devtools.build.v1.BuildEvent.BuildEnqueuedOrBuilder> 
        getBuildEnqueuedFieldBuilder() {
      if (buildEnqueuedBuilder_ == null) {
        if (!(eventCase_ == 53)) {
          event_ = com.google.devtools.build.v1.BuildEvent.BuildEnqueued.getDefaultInstance();
        }
        buildEnqueuedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.build.v1.BuildEvent.BuildEnqueued, com.google.devtools.build.v1.BuildEvent.BuildEnqueued.Builder, com.google.devtools.build.v1.BuildEvent.BuildEnqueuedOrBuilder>(
                (com.google.devtools.build.v1.BuildEvent.BuildEnqueued) event_,
                getParentForChildren(),
                isClean());
        event_ = null;
      }
      eventCase_ = 53;
      onChanged();;
      return buildEnqueuedBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.BuildEvent.BuildFinished, com.google.devtools.build.v1.BuildEvent.BuildFinished.Builder, com.google.devtools.build.v1.BuildEvent.BuildFinishedOrBuilder> buildFinishedBuilder_;
    /**
     * <pre>
     * The build has finished. Set when the build is terminated.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildFinished build_finished = 55;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.BuildFinished getBuildFinished() {
      if (buildFinishedBuilder_ == null) {
        if (eventCase_ == 55) {
          return (com.google.devtools.build.v1.BuildEvent.BuildFinished) event_;
        }
        return com.google.devtools.build.v1.BuildEvent.BuildFinished.getDefaultInstance();
      } else {
        if (eventCase_ == 55) {
          return buildFinishedBuilder_.getMessage();
        }
        return com.google.devtools.build.v1.BuildEvent.BuildFinished.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * The build has finished. Set when the build is terminated.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildFinished build_finished = 55;</code>
     */
    public Builder setBuildFinished(com.google.devtools.build.v1.BuildEvent.BuildFinished value) {
      if (buildFinishedBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        event_ = value;
        onChanged();
      } else {
        buildFinishedBuilder_.setMessage(value);
      }
      eventCase_ = 55;
      return this;
    }
    /**
     * <pre>
     * The build has finished. Set when the build is terminated.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildFinished build_finished = 55;</code>
     */
    public Builder setBuildFinished(
        com.google.devtools.build.v1.BuildEvent.BuildFinished.Builder builderForValue) {
      if (buildFinishedBuilder_ == null) {
        event_ = builderForValue.build();
        onChanged();
      } else {
        buildFinishedBuilder_.setMessage(builderForValue.build());
      }
      eventCase_ = 55;
      return this;
    }
    /**
     * <pre>
     * The build has finished. Set when the build is terminated.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildFinished build_finished = 55;</code>
     */
    public Builder mergeBuildFinished(com.google.devtools.build.v1.BuildEvent.BuildFinished value) {
      if (buildFinishedBuilder_ == null) {
        if (eventCase_ == 55 &&
            event_ != com.google.devtools.build.v1.BuildEvent.BuildFinished.getDefaultInstance()) {
          event_ = com.google.devtools.build.v1.BuildEvent.BuildFinished.newBuilder((com.google.devtools.build.v1.BuildEvent.BuildFinished) event_)
              .mergeFrom(value).buildPartial();
        } else {
          event_ = value;
        }
        onChanged();
      } else {
        if (eventCase_ == 55) {
          buildFinishedBuilder_.mergeFrom(value);
        }
        buildFinishedBuilder_.setMessage(value);
      }
      eventCase_ = 55;
      return this;
    }
    /**
     * <pre>
     * The build has finished. Set when the build is terminated.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildFinished build_finished = 55;</code>
     */
    public Builder clearBuildFinished() {
      if (buildFinishedBuilder_ == null) {
        if (eventCase_ == 55) {
          eventCase_ = 0;
          event_ = null;
          onChanged();
        }
      } else {
        if (eventCase_ == 55) {
          eventCase_ = 0;
          event_ = null;
        }
        buildFinishedBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * The build has finished. Set when the build is terminated.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildFinished build_finished = 55;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.BuildFinished.Builder getBuildFinishedBuilder() {
      return getBuildFinishedFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * The build has finished. Set when the build is terminated.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildFinished build_finished = 55;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.BuildFinishedOrBuilder getBuildFinishedOrBuilder() {
      if ((eventCase_ == 55) && (buildFinishedBuilder_ != null)) {
        return buildFinishedBuilder_.getMessageOrBuilder();
      } else {
        if (eventCase_ == 55) {
          return (com.google.devtools.build.v1.BuildEvent.BuildFinished) event_;
        }
        return com.google.devtools.build.v1.BuildEvent.BuildFinished.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * The build has finished. Set when the build is terminated.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildFinished build_finished = 55;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.BuildEvent.BuildFinished, com.google.devtools.build.v1.BuildEvent.BuildFinished.Builder, com.google.devtools.build.v1.BuildEvent.BuildFinishedOrBuilder> 
        getBuildFinishedFieldBuilder() {
      if (buildFinishedBuilder_ == null) {
        if (!(eventCase_ == 55)) {
          event_ = com.google.devtools.build.v1.BuildEvent.BuildFinished.getDefaultInstance();
        }
        buildFinishedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.build.v1.BuildEvent.BuildFinished, com.google.devtools.build.v1.BuildEvent.BuildFinished.Builder, com.google.devtools.build.v1.BuildEvent.BuildFinishedOrBuilder>(
                (com.google.devtools.build.v1.BuildEvent.BuildFinished) event_,
                getParentForChildren(),
                isClean());
        event_ = null;
      }
      eventCase_ = 55;
      onChanged();;
      return buildFinishedBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.BuildEvent.ConsoleOutput, com.google.devtools.build.v1.BuildEvent.ConsoleOutput.Builder, com.google.devtools.build.v1.BuildEvent.ConsoleOutputOrBuilder> consoleOutputBuilder_;
    /**
     * <pre>
     * An event containing printed text.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.ConsoleOutput console_output = 56;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.ConsoleOutput getConsoleOutput() {
      if (consoleOutputBuilder_ == null) {
        if (eventCase_ == 56) {
          return (com.google.devtools.build.v1.BuildEvent.ConsoleOutput) event_;
        }
        return com.google.devtools.build.v1.BuildEvent.ConsoleOutput.getDefaultInstance();
      } else {
        if (eventCase_ == 56) {
          return consoleOutputBuilder_.getMessage();
        }
        return com.google.devtools.build.v1.BuildEvent.ConsoleOutput.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * An event containing printed text.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.ConsoleOutput console_output = 56;</code>
     */
    public Builder setConsoleOutput(com.google.devtools.build.v1.BuildEvent.ConsoleOutput value) {
      if (consoleOutputBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        event_ = value;
        onChanged();
      } else {
        consoleOutputBuilder_.setMessage(value);
      }
      eventCase_ = 56;
      return this;
    }
    /**
     * <pre>
     * An event containing printed text.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.ConsoleOutput console_output = 56;</code>
     */
    public Builder setConsoleOutput(
        com.google.devtools.build.v1.BuildEvent.ConsoleOutput.Builder builderForValue) {
      if (consoleOutputBuilder_ == null) {
        event_ = builderForValue.build();
        onChanged();
      } else {
        consoleOutputBuilder_.setMessage(builderForValue.build());
      }
      eventCase_ = 56;
      return this;
    }
    /**
     * <pre>
     * An event containing printed text.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.ConsoleOutput console_output = 56;</code>
     */
    public Builder mergeConsoleOutput(com.google.devtools.build.v1.BuildEvent.ConsoleOutput value) {
      if (consoleOutputBuilder_ == null) {
        if (eventCase_ == 56 &&
            event_ != com.google.devtools.build.v1.BuildEvent.ConsoleOutput.getDefaultInstance()) {
          event_ = com.google.devtools.build.v1.BuildEvent.ConsoleOutput.newBuilder((com.google.devtools.build.v1.BuildEvent.ConsoleOutput) event_)
              .mergeFrom(value).buildPartial();
        } else {
          event_ = value;
        }
        onChanged();
      } else {
        if (eventCase_ == 56) {
          consoleOutputBuilder_.mergeFrom(value);
        }
        consoleOutputBuilder_.setMessage(value);
      }
      eventCase_ = 56;
      return this;
    }
    /**
     * <pre>
     * An event containing printed text.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.ConsoleOutput console_output = 56;</code>
     */
    public Builder clearConsoleOutput() {
      if (consoleOutputBuilder_ == null) {
        if (eventCase_ == 56) {
          eventCase_ = 0;
          event_ = null;
          onChanged();
        }
      } else {
        if (eventCase_ == 56) {
          eventCase_ = 0;
          event_ = null;
        }
        consoleOutputBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * An event containing printed text.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.ConsoleOutput console_output = 56;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.ConsoleOutput.Builder getConsoleOutputBuilder() {
      return getConsoleOutputFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * An event containing printed text.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.ConsoleOutput console_output = 56;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.ConsoleOutputOrBuilder getConsoleOutputOrBuilder() {
      if ((eventCase_ == 56) && (consoleOutputBuilder_ != null)) {
        return consoleOutputBuilder_.getMessageOrBuilder();
      } else {
        if (eventCase_ == 56) {
          return (com.google.devtools.build.v1.BuildEvent.ConsoleOutput) event_;
        }
        return com.google.devtools.build.v1.BuildEvent.ConsoleOutput.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * An event containing printed text.
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.ConsoleOutput console_output = 56;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.BuildEvent.ConsoleOutput, com.google.devtools.build.v1.BuildEvent.ConsoleOutput.Builder, com.google.devtools.build.v1.BuildEvent.ConsoleOutputOrBuilder> 
        getConsoleOutputFieldBuilder() {
      if (consoleOutputBuilder_ == null) {
        if (!(eventCase_ == 56)) {
          event_ = com.google.devtools.build.v1.BuildEvent.ConsoleOutput.getDefaultInstance();
        }
        consoleOutputBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.build.v1.BuildEvent.ConsoleOutput, com.google.devtools.build.v1.BuildEvent.ConsoleOutput.Builder, com.google.devtools.build.v1.BuildEvent.ConsoleOutputOrBuilder>(
                (com.google.devtools.build.v1.BuildEvent.ConsoleOutput) event_,
                getParentForChildren(),
                isClean());
        event_ = null;
      }
      eventCase_ = 56;
      onChanged();;
      return consoleOutputBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished, com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.Builder, com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinishedOrBuilder> componentStreamFinishedBuilder_;
    /**
     * <pre>
     * Indicates the end of a build event stream (with the same StreamId) from
     * a build component executing the requested build task.
     * *** This field does not indicate the WatchBuild RPC is finished. ***
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished component_stream_finished = 59;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished getComponentStreamFinished() {
      if (componentStreamFinishedBuilder_ == null) {
        if (eventCase_ == 59) {
          return (com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished) event_;
        }
        return com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.getDefaultInstance();
      } else {
        if (eventCase_ == 59) {
          return componentStreamFinishedBuilder_.getMessage();
        }
        return com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Indicates the end of a build event stream (with the same StreamId) from
     * a build component executing the requested build task.
     * *** This field does not indicate the WatchBuild RPC is finished. ***
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished component_stream_finished = 59;</code>
     */
    public Builder setComponentStreamFinished(com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished value) {
      if (componentStreamFinishedBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        event_ = value;
        onChanged();
      } else {
        componentStreamFinishedBuilder_.setMessage(value);
      }
      eventCase_ = 59;
      return this;
    }
    /**
     * <pre>
     * Indicates the end of a build event stream (with the same StreamId) from
     * a build component executing the requested build task.
     * *** This field does not indicate the WatchBuild RPC is finished. ***
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished component_stream_finished = 59;</code>
     */
    public Builder setComponentStreamFinished(
        com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.Builder builderForValue) {
      if (componentStreamFinishedBuilder_ == null) {
        event_ = builderForValue.build();
        onChanged();
      } else {
        componentStreamFinishedBuilder_.setMessage(builderForValue.build());
      }
      eventCase_ = 59;
      return this;
    }
    /**
     * <pre>
     * Indicates the end of a build event stream (with the same StreamId) from
     * a build component executing the requested build task.
     * *** This field does not indicate the WatchBuild RPC is finished. ***
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished component_stream_finished = 59;</code>
     */
    public Builder mergeComponentStreamFinished(com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished value) {
      if (componentStreamFinishedBuilder_ == null) {
        if (eventCase_ == 59 &&
            event_ != com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.getDefaultInstance()) {
          event_ = com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.newBuilder((com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished) event_)
              .mergeFrom(value).buildPartial();
        } else {
          event_ = value;
        }
        onChanged();
      } else {
        if (eventCase_ == 59) {
          componentStreamFinishedBuilder_.mergeFrom(value);
        }
        componentStreamFinishedBuilder_.setMessage(value);
      }
      eventCase_ = 59;
      return this;
    }
    /**
     * <pre>
     * Indicates the end of a build event stream (with the same StreamId) from
     * a build component executing the requested build task.
     * *** This field does not indicate the WatchBuild RPC is finished. ***
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished component_stream_finished = 59;</code>
     */
    public Builder clearComponentStreamFinished() {
      if (componentStreamFinishedBuilder_ == null) {
        if (eventCase_ == 59) {
          eventCase_ = 0;
          event_ = null;
          onChanged();
        }
      } else {
        if (eventCase_ == 59) {
          eventCase_ = 0;
          event_ = null;
        }
        componentStreamFinishedBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Indicates the end of a build event stream (with the same StreamId) from
     * a build component executing the requested build task.
     * *** This field does not indicate the WatchBuild RPC is finished. ***
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished component_stream_finished = 59;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.Builder getComponentStreamFinishedBuilder() {
      return getComponentStreamFinishedFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Indicates the end of a build event stream (with the same StreamId) from
     * a build component executing the requested build task.
     * *** This field does not indicate the WatchBuild RPC is finished. ***
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished component_stream_finished = 59;</code>
     */
    public com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinishedOrBuilder getComponentStreamFinishedOrBuilder() {
      if ((eventCase_ == 59) && (componentStreamFinishedBuilder_ != null)) {
        return componentStreamFinishedBuilder_.getMessageOrBuilder();
      } else {
        if (eventCase_ == 59) {
          return (com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished) event_;
        }
        return com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Indicates the end of a build event stream (with the same StreamId) from
     * a build component executing the requested build task.
     * *** This field does not indicate the WatchBuild RPC is finished. ***
     * </pre>
     *
     * <code>.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished component_stream_finished = 59;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished, com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.Builder, com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinishedOrBuilder> 
        getComponentStreamFinishedFieldBuilder() {
      if (componentStreamFinishedBuilder_ == null) {
        if (!(eventCase_ == 59)) {
          event_ = com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.getDefaultInstance();
        }
        componentStreamFinishedBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished, com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished.Builder, com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinishedOrBuilder>(
                (com.google.devtools.build.v1.BuildEvent.BuildComponentStreamFinished) event_,
                getParentForChildren(),
                isClean());
        event_ = null;
      }
      eventCase_ = 59;
      onChanged();;
      return componentStreamFinishedBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> bazelEventBuilder_;
    /**
     * <pre>
     * Structured build event generated by Bazel about its execution progress.
     * </pre>
     *
     * <code>.google.protobuf.Any bazel_event = 60;</code>
     */
    public com.google.protobuf.Any getBazelEvent() {
      if (bazelEventBuilder_ == null) {
        if (eventCase_ == 60) {
          return (com.google.protobuf.Any) event_;
        }
        return com.google.protobuf.Any.getDefaultInstance();
      } else {
        if (eventCase_ == 60) {
          return bazelEventBuilder_.getMessage();
        }
        return com.google.protobuf.Any.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Structured build event generated by Bazel about its execution progress.
     * </pre>
     *
     * <code>.google.protobuf.Any bazel_event = 60;</code>
     */
    public Builder setBazelEvent(com.google.protobuf.Any value) {
      if (bazelEventBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        event_ = value;
        onChanged();
      } else {
        bazelEventBuilder_.setMessage(value);
      }
      eventCase_ = 60;
      return this;
    }
    /**
     * <pre>
     * Structured build event generated by Bazel about its execution progress.
     * </pre>
     *
     * <code>.google.protobuf.Any bazel_event = 60;</code>
     */
    public Builder setBazelEvent(
        com.google.protobuf.Any.Builder builderForValue) {
      if (bazelEventBuilder_ == null) {
        event_ = builderForValue.build();
        onChanged();
      } else {
        bazelEventBuilder_.setMessage(builderForValue.build());
      }
      eventCase_ = 60;
      return this;
    }
    /**
     * <pre>
     * Structured build event generated by Bazel about its execution progress.
     * </pre>
     *
     * <code>.google.protobuf.Any bazel_event = 60;</code>
     */
    public Builder mergeBazelEvent(com.google.protobuf.Any value) {
      if (bazelEventBuilder_ == null) {
        if (eventCase_ == 60 &&
            event_ != com.google.protobuf.Any.getDefaultInstance()) {
          event_ = com.google.protobuf.Any.newBuilder((com.google.protobuf.Any) event_)
              .mergeFrom(value).buildPartial();
        } else {
          event_ = value;
        }
        onChanged();
      } else {
        if (eventCase_ == 60) {
          bazelEventBuilder_.mergeFrom(value);
        }
        bazelEventBuilder_.setMessage(value);
      }
      eventCase_ = 60;
      return this;
    }
    /**
     * <pre>
     * Structured build event generated by Bazel about its execution progress.
     * </pre>
     *
     * <code>.google.protobuf.Any bazel_event = 60;</code>
     */
    public Builder clearBazelEvent() {
      if (bazelEventBuilder_ == null) {
        if (eventCase_ == 60) {
          eventCase_ = 0;
          event_ = null;
          onChanged();
        }
      } else {
        if (eventCase_ == 60) {
          eventCase_ = 0;
          event_ = null;
        }
        bazelEventBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Structured build event generated by Bazel about its execution progress.
     * </pre>
     *
     * <code>.google.protobuf.Any bazel_event = 60;</code>
     */
    public com.google.protobuf.Any.Builder getBazelEventBuilder() {
      return getBazelEventFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Structured build event generated by Bazel about its execution progress.
     * </pre>
     *
     * <code>.google.protobuf.Any bazel_event = 60;</code>
     */
    public com.google.protobuf.AnyOrBuilder getBazelEventOrBuilder() {
      if ((eventCase_ == 60) && (bazelEventBuilder_ != null)) {
        return bazelEventBuilder_.getMessageOrBuilder();
      } else {
        if (eventCase_ == 60) {
          return (com.google.protobuf.Any) event_;
        }
        return com.google.protobuf.Any.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Structured build event generated by Bazel about its execution progress.
     * </pre>
     *
     * <code>.google.protobuf.Any bazel_event = 60;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> 
        getBazelEventFieldBuilder() {
      if (bazelEventBuilder_ == null) {
        if (!(eventCase_ == 60)) {
          event_ = com.google.protobuf.Any.getDefaultInstance();
        }
        bazelEventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
                (com.google.protobuf.Any) event_,
                getParentForChildren(),
                isClean());
        event_ = null;
      }
      eventCase_ = 60;
      onChanged();;
      return bazelEventBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> buildExecutionEventBuilder_;
    /**
     * <pre>
     * An event that contains supplemental tool-specific information about
     * build execution.
     * </pre>
     *
     * <code>.google.protobuf.Any build_execution_event = 61;</code>
     */
    public com.google.protobuf.Any getBuildExecutionEvent() {
      if (buildExecutionEventBuilder_ == null) {
        if (eventCase_ == 61) {
          return (com.google.protobuf.Any) event_;
        }
        return com.google.protobuf.Any.getDefaultInstance();
      } else {
        if (eventCase_ == 61) {
          return buildExecutionEventBuilder_.getMessage();
        }
        return com.google.protobuf.Any.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * An event that contains supplemental tool-specific information about
     * build execution.
     * </pre>
     *
     * <code>.google.protobuf.Any build_execution_event = 61;</code>
     */
    public Builder setBuildExecutionEvent(com.google.protobuf.Any value) {
      if (buildExecutionEventBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        event_ = value;
        onChanged();
      } else {
        buildExecutionEventBuilder_.setMessage(value);
      }
      eventCase_ = 61;
      return this;
    }
    /**
     * <pre>
     * An event that contains supplemental tool-specific information about
     * build execution.
     * </pre>
     *
     * <code>.google.protobuf.Any build_execution_event = 61;</code>
     */
    public Builder setBuildExecutionEvent(
        com.google.protobuf.Any.Builder builderForValue) {
      if (buildExecutionEventBuilder_ == null) {
        event_ = builderForValue.build();
        onChanged();
      } else {
        buildExecutionEventBuilder_.setMessage(builderForValue.build());
      }
      eventCase_ = 61;
      return this;
    }
    /**
     * <pre>
     * An event that contains supplemental tool-specific information about
     * build execution.
     * </pre>
     *
     * <code>.google.protobuf.Any build_execution_event = 61;</code>
     */
    public Builder mergeBuildExecutionEvent(com.google.protobuf.Any value) {
      if (buildExecutionEventBuilder_ == null) {
        if (eventCase_ == 61 &&
            event_ != com.google.protobuf.Any.getDefaultInstance()) {
          event_ = com.google.protobuf.Any.newBuilder((com.google.protobuf.Any) event_)
              .mergeFrom(value).buildPartial();
        } else {
          event_ = value;
        }
        onChanged();
      } else {
        if (eventCase_ == 61) {
          buildExecutionEventBuilder_.mergeFrom(value);
        }
        buildExecutionEventBuilder_.setMessage(value);
      }
      eventCase_ = 61;
      return this;
    }
    /**
     * <pre>
     * An event that contains supplemental tool-specific information about
     * build execution.
     * </pre>
     *
     * <code>.google.protobuf.Any build_execution_event = 61;</code>
     */
    public Builder clearBuildExecutionEvent() {
      if (buildExecutionEventBuilder_ == null) {
        if (eventCase_ == 61) {
          eventCase_ = 0;
          event_ = null;
          onChanged();
        }
      } else {
        if (eventCase_ == 61) {
          eventCase_ = 0;
          event_ = null;
        }
        buildExecutionEventBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * An event that contains supplemental tool-specific information about
     * build execution.
     * </pre>
     *
     * <code>.google.protobuf.Any build_execution_event = 61;</code>
     */
    public com.google.protobuf.Any.Builder getBuildExecutionEventBuilder() {
      return getBuildExecutionEventFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * An event that contains supplemental tool-specific information about
     * build execution.
     * </pre>
     *
     * <code>.google.protobuf.Any build_execution_event = 61;</code>
     */
    public com.google.protobuf.AnyOrBuilder getBuildExecutionEventOrBuilder() {
      if ((eventCase_ == 61) && (buildExecutionEventBuilder_ != null)) {
        return buildExecutionEventBuilder_.getMessageOrBuilder();
      } else {
        if (eventCase_ == 61) {
          return (com.google.protobuf.Any) event_;
        }
        return com.google.protobuf.Any.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * An event that contains supplemental tool-specific information about
     * build execution.
     * </pre>
     *
     * <code>.google.protobuf.Any build_execution_event = 61;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> 
        getBuildExecutionEventFieldBuilder() {
      if (buildExecutionEventBuilder_ == null) {
        if (!(eventCase_ == 61)) {
          event_ = com.google.protobuf.Any.getDefaultInstance();
        }
        buildExecutionEventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
                (com.google.protobuf.Any) event_,
                getParentForChildren(),
                isClean());
        event_ = null;
      }
      eventCase_ = 61;
      onChanged();;
      return buildExecutionEventBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> sourceFetchEventBuilder_;
    /**
     * <pre>
     * An event that contains supplemental tool-specific information about
     * source fetching.
     * </pre>
     *
     * <code>.google.protobuf.Any source_fetch_event = 62;</code>
     */
    public com.google.protobuf.Any getSourceFetchEvent() {
      if (sourceFetchEventBuilder_ == null) {
        if (eventCase_ == 62) {
          return (com.google.protobuf.Any) event_;
        }
        return com.google.protobuf.Any.getDefaultInstance();
      } else {
        if (eventCase_ == 62) {
          return sourceFetchEventBuilder_.getMessage();
        }
        return com.google.protobuf.Any.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * An event that contains supplemental tool-specific information about
     * source fetching.
     * </pre>
     *
     * <code>.google.protobuf.Any source_fetch_event = 62;</code>
     */
    public Builder setSourceFetchEvent(com.google.protobuf.Any value) {
      if (sourceFetchEventBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        event_ = value;
        onChanged();
      } else {
        sourceFetchEventBuilder_.setMessage(value);
      }
      eventCase_ = 62;
      return this;
    }
    /**
     * <pre>
     * An event that contains supplemental tool-specific information about
     * source fetching.
     * </pre>
     *
     * <code>.google.protobuf.Any source_fetch_event = 62;</code>
     */
    public Builder setSourceFetchEvent(
        com.google.protobuf.Any.Builder builderForValue) {
      if (sourceFetchEventBuilder_ == null) {
        event_ = builderForValue.build();
        onChanged();
      } else {
        sourceFetchEventBuilder_.setMessage(builderForValue.build());
      }
      eventCase_ = 62;
      return this;
    }
    /**
     * <pre>
     * An event that contains supplemental tool-specific information about
     * source fetching.
     * </pre>
     *
     * <code>.google.protobuf.Any source_fetch_event = 62;</code>
     */
    public Builder mergeSourceFetchEvent(com.google.protobuf.Any value) {
      if (sourceFetchEventBuilder_ == null) {
        if (eventCase_ == 62 &&
            event_ != com.google.protobuf.Any.getDefaultInstance()) {
          event_ = com.google.protobuf.Any.newBuilder((com.google.protobuf.Any) event_)
              .mergeFrom(value).buildPartial();
        } else {
          event_ = value;
        }
        onChanged();
      } else {
        if (eventCase_ == 62) {
          sourceFetchEventBuilder_.mergeFrom(value);
        }
        sourceFetchEventBuilder_.setMessage(value);
      }
      eventCase_ = 62;
      return this;
    }
    /**
     * <pre>
     * An event that contains supplemental tool-specific information about
     * source fetching.
     * </pre>
     *
     * <code>.google.protobuf.Any source_fetch_event = 62;</code>
     */
    public Builder clearSourceFetchEvent() {
      if (sourceFetchEventBuilder_ == null) {
        if (eventCase_ == 62) {
          eventCase_ = 0;
          event_ = null;
          onChanged();
        }
      } else {
        if (eventCase_ == 62) {
          eventCase_ = 0;
          event_ = null;
        }
        sourceFetchEventBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * An event that contains supplemental tool-specific information about
     * source fetching.
     * </pre>
     *
     * <code>.google.protobuf.Any source_fetch_event = 62;</code>
     */
    public com.google.protobuf.Any.Builder getSourceFetchEventBuilder() {
      return getSourceFetchEventFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * An event that contains supplemental tool-specific information about
     * source fetching.
     * </pre>
     *
     * <code>.google.protobuf.Any source_fetch_event = 62;</code>
     */
    public com.google.protobuf.AnyOrBuilder getSourceFetchEventOrBuilder() {
      if ((eventCase_ == 62) && (sourceFetchEventBuilder_ != null)) {
        return sourceFetchEventBuilder_.getMessageOrBuilder();
      } else {
        if (eventCase_ == 62) {
          return (com.google.protobuf.Any) event_;
        }
        return com.google.protobuf.Any.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * An event that contains supplemental tool-specific information about
     * source fetching.
     * </pre>
     *
     * <code>.google.protobuf.Any source_fetch_event = 62;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> 
        getSourceFetchEventFieldBuilder() {
      if (sourceFetchEventBuilder_ == null) {
        if (!(eventCase_ == 62)) {
          event_ = com.google.protobuf.Any.getDefaultInstance();
        }
        sourceFetchEventBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
                (com.google.protobuf.Any) event_,
                getParentForChildren(),
                isClean());
        event_ = null;
      }
      eventCase_ = 62;
      onChanged();;
      return sourceFetchEventBuilder_;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return this;
    }

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


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

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

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

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

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

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

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

}

