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

package io.grafeas.v1beta1.provenance;

/**
 * <pre>
 * Command describes a step performed as part of the build pipeline.
 * </pre>
 *
 * Protobuf type {@code grafeas.v1beta1.provenance.Command}
 */
public  final class Command extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:grafeas.v1beta1.provenance.Command)
    CommandOrBuilder {
private static final long serialVersionUID = 0L;
  // Use Command.newBuilder() to construct.
  private Command(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private Command() {
    name_ = "";
    env_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    args_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    dir_ = "";
    id_ = "";
    waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY;
  }

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

            name_ = s;
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
              env_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000002;
            }
            env_.add(s);
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
              args_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000004;
            }
            args_.add(s);
            break;
          }
          case 34: {
            java.lang.String s = input.readStringRequireUtf8();

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

            id_ = s;
            break;
          }
          case 50: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
              waitFor_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000020;
            }
            waitFor_.add(s);
            break;
          }
          default: {
            if (!parseUnknownFieldProto3(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
        env_ = env_.getUnmodifiableView();
      }
      if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
        args_ = args_.getUnmodifiableView();
      }
      if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) {
        waitFor_ = waitFor_.getUnmodifiableView();
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return io.grafeas.v1beta1.provenance.Provenance.internal_static_grafeas_v1beta1_provenance_Command_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return io.grafeas.v1beta1.provenance.Provenance.internal_static_grafeas_v1beta1_provenance_Command_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            io.grafeas.v1beta1.provenance.Command.class, io.grafeas.v1beta1.provenance.Command.Builder.class);
  }

  private int bitField0_;
  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;
  /**
   * <pre>
   * Name of the command, as presented on the command line, or if the command is
   * packaged as a Docker container, as presented to `docker pull`.
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Name of the command, as presented on the command line, or if the command is
   * packaged as a Docker container, as presented to `docker pull`.
   * </pre>
   *
   * <code>string name = 1;</code>
   */
  public com.google.protobuf.ByteString
      getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ENV_FIELD_NUMBER = 2;
  private com.google.protobuf.LazyStringList env_;
  /**
   * <pre>
   * Environment variables set before running this command.
   * </pre>
   *
   * <code>repeated string env = 2;</code>
   */
  public com.google.protobuf.ProtocolStringList
      getEnvList() {
    return env_;
  }
  /**
   * <pre>
   * Environment variables set before running this command.
   * </pre>
   *
   * <code>repeated string env = 2;</code>
   */
  public int getEnvCount() {
    return env_.size();
  }
  /**
   * <pre>
   * Environment variables set before running this command.
   * </pre>
   *
   * <code>repeated string env = 2;</code>
   */
  public java.lang.String getEnv(int index) {
    return env_.get(index);
  }
  /**
   * <pre>
   * Environment variables set before running this command.
   * </pre>
   *
   * <code>repeated string env = 2;</code>
   */
  public com.google.protobuf.ByteString
      getEnvBytes(int index) {
    return env_.getByteString(index);
  }

  public static final int ARGS_FIELD_NUMBER = 3;
  private com.google.protobuf.LazyStringList args_;
  /**
   * <pre>
   * Command-line arguments used when executing this command.
   * </pre>
   *
   * <code>repeated string args = 3;</code>
   */
  public com.google.protobuf.ProtocolStringList
      getArgsList() {
    return args_;
  }
  /**
   * <pre>
   * Command-line arguments used when executing this command.
   * </pre>
   *
   * <code>repeated string args = 3;</code>
   */
  public int getArgsCount() {
    return args_.size();
  }
  /**
   * <pre>
   * Command-line arguments used when executing this command.
   * </pre>
   *
   * <code>repeated string args = 3;</code>
   */
  public java.lang.String getArgs(int index) {
    return args_.get(index);
  }
  /**
   * <pre>
   * Command-line arguments used when executing this command.
   * </pre>
   *
   * <code>repeated string args = 3;</code>
   */
  public com.google.protobuf.ByteString
      getArgsBytes(int index) {
    return args_.getByteString(index);
  }

  public static final int DIR_FIELD_NUMBER = 4;
  private volatile java.lang.Object dir_;
  /**
   * <pre>
   * Working directory (relative to project source root) used when running this
   * command.
   * </pre>
   *
   * <code>string dir = 4;</code>
   */
  public java.lang.String getDir() {
    java.lang.Object ref = dir_;
    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();
      dir_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Working directory (relative to project source root) used when running this
   * command.
   * </pre>
   *
   * <code>string dir = 4;</code>
   */
  public com.google.protobuf.ByteString
      getDirBytes() {
    java.lang.Object ref = dir_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      dir_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ID_FIELD_NUMBER = 5;
  private volatile java.lang.Object id_;
  /**
   * <pre>
   * Optional unique identifier for this command, used in wait_for to reference
   * this command as a dependency.
   * </pre>
   *
   * <code>string id = 5;</code>
   */
  public java.lang.String getId() {
    java.lang.Object ref = id_;
    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();
      id_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Optional unique identifier for this command, used in wait_for to reference
   * this command as a dependency.
   * </pre>
   *
   * <code>string id = 5;</code>
   */
  public com.google.protobuf.ByteString
      getIdBytes() {
    java.lang.Object ref = id_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      id_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int WAIT_FOR_FIELD_NUMBER = 6;
  private com.google.protobuf.LazyStringList waitFor_;
  /**
   * <pre>
   * The ID(s) of the command(s) that this command depends on.
   * </pre>
   *
   * <code>repeated string wait_for = 6;</code>
   */
  public com.google.protobuf.ProtocolStringList
      getWaitForList() {
    return waitFor_;
  }
  /**
   * <pre>
   * The ID(s) of the command(s) that this command depends on.
   * </pre>
   *
   * <code>repeated string wait_for = 6;</code>
   */
  public int getWaitForCount() {
    return waitFor_.size();
  }
  /**
   * <pre>
   * The ID(s) of the command(s) that this command depends on.
   * </pre>
   *
   * <code>repeated string wait_for = 6;</code>
   */
  public java.lang.String getWaitFor(int index) {
    return waitFor_.get(index);
  }
  /**
   * <pre>
   * The ID(s) of the command(s) that this command depends on.
   * </pre>
   *
   * <code>repeated string wait_for = 6;</code>
   */
  public com.google.protobuf.ByteString
      getWaitForBytes(int index) {
    return waitFor_.getByteString(index);
  }

  private byte memoizedIsInitialized = -1;
  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!getNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    for (int i = 0; i < env_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, env_.getRaw(i));
    }
    for (int i = 0; i < args_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, args_.getRaw(i));
    }
    if (!getDirBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, dir_);
    }
    if (!getIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, id_);
    }
    for (int i = 0; i < waitFor_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, waitFor_.getRaw(i));
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!getNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < env_.size(); i++) {
        dataSize += computeStringSizeNoTag(env_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getEnvList().size();
    }
    {
      int dataSize = 0;
      for (int i = 0; i < args_.size(); i++) {
        dataSize += computeStringSizeNoTag(args_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getArgsList().size();
    }
    if (!getDirBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, dir_);
    }
    if (!getIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, id_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < waitFor_.size(); i++) {
        dataSize += computeStringSizeNoTag(waitFor_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getWaitForList().size();
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof io.grafeas.v1beta1.provenance.Command)) {
      return super.equals(obj);
    }
    io.grafeas.v1beta1.provenance.Command other = (io.grafeas.v1beta1.provenance.Command) obj;

    boolean result = true;
    result = result && getName()
        .equals(other.getName());
    result = result && getEnvList()
        .equals(other.getEnvList());
    result = result && getArgsList()
        .equals(other.getArgsList());
    result = result && getDir()
        .equals(other.getDir());
    result = result && getId()
        .equals(other.getId());
    result = result && getWaitForList()
        .equals(other.getWaitForList());
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    if (getEnvCount() > 0) {
      hash = (37 * hash) + ENV_FIELD_NUMBER;
      hash = (53 * hash) + getEnvList().hashCode();
    }
    if (getArgsCount() > 0) {
      hash = (37 * hash) + ARGS_FIELD_NUMBER;
      hash = (53 * hash) + getArgsList().hashCode();
    }
    hash = (37 * hash) + DIR_FIELD_NUMBER;
    hash = (53 * hash) + getDir().hashCode();
    hash = (37 * hash) + ID_FIELD_NUMBER;
    hash = (53 * hash) + getId().hashCode();
    if (getWaitForCount() > 0) {
      hash = (37 * hash) + WAIT_FOR_FIELD_NUMBER;
      hash = (53 * hash) + getWaitForList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(io.grafeas.v1beta1.provenance.Command prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   * Command describes a step performed as part of the build pipeline.
   * </pre>
   *
   * Protobuf type {@code grafeas.v1beta1.provenance.Command}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:grafeas.v1beta1.provenance.Command)
      io.grafeas.v1beta1.provenance.CommandOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.grafeas.v1beta1.provenance.Provenance.internal_static_grafeas_v1beta1_provenance_Command_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.grafeas.v1beta1.provenance.Provenance.internal_static_grafeas_v1beta1_provenance_Command_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.grafeas.v1beta1.provenance.Command.class, io.grafeas.v1beta1.provenance.Command.Builder.class);
    }

    // Construct using io.grafeas.v1beta1.provenance.Command.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

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

      env_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000002);
      args_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000004);
      dir_ = "";

      id_ = "";

      waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000020);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return io.grafeas.v1beta1.provenance.Provenance.internal_static_grafeas_v1beta1_provenance_Command_descriptor;
    }

    @java.lang.Override
    public io.grafeas.v1beta1.provenance.Command getDefaultInstanceForType() {
      return io.grafeas.v1beta1.provenance.Command.getDefaultInstance();
    }

    @java.lang.Override
    public io.grafeas.v1beta1.provenance.Command build() {
      io.grafeas.v1beta1.provenance.Command result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public io.grafeas.v1beta1.provenance.Command buildPartial() {
      io.grafeas.v1beta1.provenance.Command result = new io.grafeas.v1beta1.provenance.Command(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.name_ = name_;
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        env_ = env_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000002);
      }
      result.env_ = env_;
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        args_ = args_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000004);
      }
      result.args_ = args_;
      result.dir_ = dir_;
      result.id_ = id_;
      if (((bitField0_ & 0x00000020) == 0x00000020)) {
        waitFor_ = waitFor_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000020);
      }
      result.waitFor_ = waitFor_;
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(io.grafeas.v1beta1.provenance.Command other) {
      if (other == io.grafeas.v1beta1.provenance.Command.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (!other.env_.isEmpty()) {
        if (env_.isEmpty()) {
          env_ = other.env_;
          bitField0_ = (bitField0_ & ~0x00000002);
        } else {
          ensureEnvIsMutable();
          env_.addAll(other.env_);
        }
        onChanged();
      }
      if (!other.args_.isEmpty()) {
        if (args_.isEmpty()) {
          args_ = other.args_;
          bitField0_ = (bitField0_ & ~0x00000004);
        } else {
          ensureArgsIsMutable();
          args_.addAll(other.args_);
        }
        onChanged();
      }
      if (!other.getDir().isEmpty()) {
        dir_ = other.dir_;
        onChanged();
      }
      if (!other.getId().isEmpty()) {
        id_ = other.id_;
        onChanged();
      }
      if (!other.waitFor_.isEmpty()) {
        if (waitFor_.isEmpty()) {
          waitFor_ = other.waitFor_;
          bitField0_ = (bitField0_ & ~0x00000020);
        } else {
          ensureWaitForIsMutable();
          waitFor_.addAll(other.waitFor_);
        }
        onChanged();
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

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

    private java.lang.Object name_ = "";
    /**
     * <pre>
     * Name of the command, as presented on the command line, or if the command is
     * packaged as a Docker container, as presented to `docker pull`.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Name of the command, as presented on the command line, or if the command is
     * packaged as a Docker container, as presented to `docker pull`.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public com.google.protobuf.ByteString
        getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Name of the command, as presented on the command line, or if the command is
     * packaged as a Docker container, as presented to `docker pull`.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder setName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      name_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the command, as presented on the command line, or if the command is
     * packaged as a Docker container, as presented to `docker pull`.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder clearName() {
      
      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Name of the command, as presented on the command line, or if the command is
     * packaged as a Docker container, as presented to `docker pull`.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public Builder setNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      name_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList env_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureEnvIsMutable() {
      if (!((bitField0_ & 0x00000002) == 0x00000002)) {
        env_ = new com.google.protobuf.LazyStringArrayList(env_);
        bitField0_ |= 0x00000002;
       }
    }
    /**
     * <pre>
     * Environment variables set before running this command.
     * </pre>
     *
     * <code>repeated string env = 2;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getEnvList() {
      return env_.getUnmodifiableView();
    }
    /**
     * <pre>
     * Environment variables set before running this command.
     * </pre>
     *
     * <code>repeated string env = 2;</code>
     */
    public int getEnvCount() {
      return env_.size();
    }
    /**
     * <pre>
     * Environment variables set before running this command.
     * </pre>
     *
     * <code>repeated string env = 2;</code>
     */
    public java.lang.String getEnv(int index) {
      return env_.get(index);
    }
    /**
     * <pre>
     * Environment variables set before running this command.
     * </pre>
     *
     * <code>repeated string env = 2;</code>
     */
    public com.google.protobuf.ByteString
        getEnvBytes(int index) {
      return env_.getByteString(index);
    }
    /**
     * <pre>
     * Environment variables set before running this command.
     * </pre>
     *
     * <code>repeated string env = 2;</code>
     */
    public Builder setEnv(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureEnvIsMutable();
      env_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Environment variables set before running this command.
     * </pre>
     *
     * <code>repeated string env = 2;</code>
     */
    public Builder addEnv(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureEnvIsMutable();
      env_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Environment variables set before running this command.
     * </pre>
     *
     * <code>repeated string env = 2;</code>
     */
    public Builder addAllEnv(
        java.lang.Iterable<java.lang.String> values) {
      ensureEnvIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, env_);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Environment variables set before running this command.
     * </pre>
     *
     * <code>repeated string env = 2;</code>
     */
    public Builder clearEnv() {
      env_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Environment variables set before running this command.
     * </pre>
     *
     * <code>repeated string env = 2;</code>
     */
    public Builder addEnvBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      ensureEnvIsMutable();
      env_.add(value);
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList args_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureArgsIsMutable() {
      if (!((bitField0_ & 0x00000004) == 0x00000004)) {
        args_ = new com.google.protobuf.LazyStringArrayList(args_);
        bitField0_ |= 0x00000004;
       }
    }
    /**
     * <pre>
     * Command-line arguments used when executing this command.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getArgsList() {
      return args_.getUnmodifiableView();
    }
    /**
     * <pre>
     * Command-line arguments used when executing this command.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public int getArgsCount() {
      return args_.size();
    }
    /**
     * <pre>
     * Command-line arguments used when executing this command.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public java.lang.String getArgs(int index) {
      return args_.get(index);
    }
    /**
     * <pre>
     * Command-line arguments used when executing this command.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public com.google.protobuf.ByteString
        getArgsBytes(int index) {
      return args_.getByteString(index);
    }
    /**
     * <pre>
     * Command-line arguments used when executing this command.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public Builder setArgs(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureArgsIsMutable();
      args_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Command-line arguments used when executing this command.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public Builder addArgs(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureArgsIsMutable();
      args_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Command-line arguments used when executing this command.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public Builder addAllArgs(
        java.lang.Iterable<java.lang.String> values) {
      ensureArgsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, args_);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Command-line arguments used when executing this command.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public Builder clearArgs() {
      args_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000004);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Command-line arguments used when executing this command.
     * </pre>
     *
     * <code>repeated string args = 3;</code>
     */
    public Builder addArgsBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      ensureArgsIsMutable();
      args_.add(value);
      onChanged();
      return this;
    }

    private java.lang.Object dir_ = "";
    /**
     * <pre>
     * Working directory (relative to project source root) used when running this
     * command.
     * </pre>
     *
     * <code>string dir = 4;</code>
     */
    public java.lang.String getDir() {
      java.lang.Object ref = dir_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        dir_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Working directory (relative to project source root) used when running this
     * command.
     * </pre>
     *
     * <code>string dir = 4;</code>
     */
    public com.google.protobuf.ByteString
        getDirBytes() {
      java.lang.Object ref = dir_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        dir_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Working directory (relative to project source root) used when running this
     * command.
     * </pre>
     *
     * <code>string dir = 4;</code>
     */
    public Builder setDir(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      dir_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Working directory (relative to project source root) used when running this
     * command.
     * </pre>
     *
     * <code>string dir = 4;</code>
     */
    public Builder clearDir() {
      
      dir_ = getDefaultInstance().getDir();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Working directory (relative to project source root) used when running this
     * command.
     * </pre>
     *
     * <code>string dir = 4;</code>
     */
    public Builder setDirBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      dir_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object id_ = "";
    /**
     * <pre>
     * Optional unique identifier for this command, used in wait_for to reference
     * this command as a dependency.
     * </pre>
     *
     * <code>string id = 5;</code>
     */
    public java.lang.String getId() {
      java.lang.Object ref = id_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        id_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Optional unique identifier for this command, used in wait_for to reference
     * this command as a dependency.
     * </pre>
     *
     * <code>string id = 5;</code>
     */
    public com.google.protobuf.ByteString
        getIdBytes() {
      java.lang.Object ref = id_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        id_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Optional unique identifier for this command, used in wait_for to reference
     * this command as a dependency.
     * </pre>
     *
     * <code>string id = 5;</code>
     */
    public Builder setId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      id_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional unique identifier for this command, used in wait_for to reference
     * this command as a dependency.
     * </pre>
     *
     * <code>string id = 5;</code>
     */
    public Builder clearId() {
      
      id_ = getDefaultInstance().getId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Optional unique identifier for this command, used in wait_for to reference
     * this command as a dependency.
     * </pre>
     *
     * <code>string id = 5;</code>
     */
    public Builder setIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      id_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureWaitForIsMutable() {
      if (!((bitField0_ & 0x00000020) == 0x00000020)) {
        waitFor_ = new com.google.protobuf.LazyStringArrayList(waitFor_);
        bitField0_ |= 0x00000020;
       }
    }
    /**
     * <pre>
     * The ID(s) of the command(s) that this command depends on.
     * </pre>
     *
     * <code>repeated string wait_for = 6;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getWaitForList() {
      return waitFor_.getUnmodifiableView();
    }
    /**
     * <pre>
     * The ID(s) of the command(s) that this command depends on.
     * </pre>
     *
     * <code>repeated string wait_for = 6;</code>
     */
    public int getWaitForCount() {
      return waitFor_.size();
    }
    /**
     * <pre>
     * The ID(s) of the command(s) that this command depends on.
     * </pre>
     *
     * <code>repeated string wait_for = 6;</code>
     */
    public java.lang.String getWaitFor(int index) {
      return waitFor_.get(index);
    }
    /**
     * <pre>
     * The ID(s) of the command(s) that this command depends on.
     * </pre>
     *
     * <code>repeated string wait_for = 6;</code>
     */
    public com.google.protobuf.ByteString
        getWaitForBytes(int index) {
      return waitFor_.getByteString(index);
    }
    /**
     * <pre>
     * The ID(s) of the command(s) that this command depends on.
     * </pre>
     *
     * <code>repeated string wait_for = 6;</code>
     */
    public Builder setWaitFor(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureWaitForIsMutable();
      waitFor_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The ID(s) of the command(s) that this command depends on.
     * </pre>
     *
     * <code>repeated string wait_for = 6;</code>
     */
    public Builder addWaitFor(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureWaitForIsMutable();
      waitFor_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The ID(s) of the command(s) that this command depends on.
     * </pre>
     *
     * <code>repeated string wait_for = 6;</code>
     */
    public Builder addAllWaitFor(
        java.lang.Iterable<java.lang.String> values) {
      ensureWaitForIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, waitFor_);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The ID(s) of the command(s) that this command depends on.
     * </pre>
     *
     * <code>repeated string wait_for = 6;</code>
     */
    public Builder clearWaitFor() {
      waitFor_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000020);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The ID(s) of the command(s) that this command depends on.
     * </pre>
     *
     * <code>repeated string wait_for = 6;</code>
     */
    public Builder addWaitForBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      ensureWaitForIsMutable();
      waitFor_.add(value);
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:grafeas.v1beta1.provenance.Command)
  }

  // @@protoc_insertion_point(class_scope:grafeas.v1beta1.provenance.Command)
  private static final io.grafeas.v1beta1.provenance.Command DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new io.grafeas.v1beta1.provenance.Command();
  }

  public static io.grafeas.v1beta1.provenance.Command getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public io.grafeas.v1beta1.provenance.Command getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

