// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/devtools/remoteexecution/v1test/remote_execution.proto

package com.google.devtools.remoteexecution.v1test;

/**
 * <pre>
 * A `Command` is the actual command executed by a worker running an
 * [Action][google.devtools.remoteexecution.v1test.Action].
 * Except as otherwise required, the environment (such as which system
 * libraries or binaries are available, and what filesystems are mounted where)
 * is defined by and specific to the implementation of the remote execution API.
 * </pre>
 *
 * Protobuf type {@code google.devtools.remoteexecution.v1test.Command}
 */
public  final class Command extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.devtools.remoteexecution.v1test.Command)
    CommandOrBuilder {
  // Use Command.newBuilder() to construct.
  private Command(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private Command() {
    arguments_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    environmentVariables_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
  }
  private Command(
      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: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
              arguments_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000001;
            }
            arguments_.add(s);
            break;
          }
          case 18: {
            if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
              environmentVariables_ = new java.util.ArrayList<com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable>();
              mutable_bitField0_ |= 0x00000002;
            }
            environmentVariables_.add(
                input.readMessage(com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.parser(), extensionRegistry));
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
        arguments_ = arguments_.getUnmodifiableView();
      }
      if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
        environmentVariables_ = java.util.Collections.unmodifiableList(environmentVariables_);
      }
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.devtools.remoteexecution.v1test.RemoteExecutionProto.internal_static_google_devtools_remoteexecution_v1test_Command_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.devtools.remoteexecution.v1test.RemoteExecutionProto.internal_static_google_devtools_remoteexecution_v1test_Command_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.devtools.remoteexecution.v1test.Command.class, com.google.devtools.remoteexecution.v1test.Command.Builder.class);
  }

  public interface EnvironmentVariableOrBuilder extends
      // @@protoc_insertion_point(interface_extends:google.devtools.remoteexecution.v1test.Command.EnvironmentVariable)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The variable name.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    java.lang.String getName();
    /**
     * <pre>
     * The variable name.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    com.google.protobuf.ByteString
        getNameBytes();

    /**
     * <pre>
     * The variable value.
     * </pre>
     *
     * <code>string value = 2;</code>
     */
    java.lang.String getValue();
    /**
     * <pre>
     * The variable value.
     * </pre>
     *
     * <code>string value = 2;</code>
     */
    com.google.protobuf.ByteString
        getValueBytes();
  }
  /**
   * <pre>
   * An `EnvironmentVariable` is one variable to set in the running program's
   * environment.
   * </pre>
   *
   * Protobuf type {@code google.devtools.remoteexecution.v1test.Command.EnvironmentVariable}
   */
  public  static final class EnvironmentVariable extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:google.devtools.remoteexecution.v1test.Command.EnvironmentVariable)
      EnvironmentVariableOrBuilder {
    // Use EnvironmentVariable.newBuilder() to construct.
    private EnvironmentVariable(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private EnvironmentVariable() {
      name_ = "";
      value_ = "";
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private EnvironmentVariable(
        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: {
              java.lang.String s = input.readStringRequireUtf8();

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

              value_ = s;
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.devtools.remoteexecution.v1test.RemoteExecutionProto.internal_static_google_devtools_remoteexecution_v1test_Command_EnvironmentVariable_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.devtools.remoteexecution.v1test.RemoteExecutionProto.internal_static_google_devtools_remoteexecution_v1test_Command_EnvironmentVariable_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.class, com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.Builder.class);
    }

    public static final int NAME_FIELD_NUMBER = 1;
    private volatile java.lang.Object name_;
    /**
     * <pre>
     * The variable name.
     * </pre>
     *
     * <code>string name = 1;</code>
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The variable name.
     * </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 VALUE_FIELD_NUMBER = 2;
    private volatile java.lang.Object value_;
    /**
     * <pre>
     * The variable value.
     * </pre>
     *
     * <code>string value = 2;</code>
     */
    public java.lang.String getValue() {
      java.lang.Object ref = value_;
      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();
        value_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * The variable value.
     * </pre>
     *
     * <code>string value = 2;</code>
     */
    public com.google.protobuf.ByteString
        getValueBytes() {
      java.lang.Object ref = value_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        value_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

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

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (!getNameBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
      }
      if (!getValueBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_);
      }
    }

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

      size = 0;
      if (!getNameBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
      }
      if (!getValueBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_);
      }
      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.remoteexecution.v1test.Command.EnvironmentVariable)) {
        return super.equals(obj);
      }
      com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable other = (com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable) obj;

      boolean result = true;
      result = result && getName()
          .equals(other.getName());
      result = result && getValue()
          .equals(other.getValue());
      return result;
    }

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

    public static com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable 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.remoteexecution.v1test.Command.EnvironmentVariable parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable 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.remoteexecution.v1test.Command.EnvironmentVariable parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable 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.remoteexecution.v1test.Command.EnvironmentVariable parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable 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.remoteexecution.v1test.Command.EnvironmentVariable parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable 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.remoteexecution.v1test.Command.EnvironmentVariable 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 `EnvironmentVariable` is one variable to set in the running program's
     * environment.
     * </pre>
     *
     * Protobuf type {@code google.devtools.remoteexecution.v1test.Command.EnvironmentVariable}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:google.devtools.remoteexecution.v1test.Command.EnvironmentVariable)
        com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariableOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.google.devtools.remoteexecution.v1test.RemoteExecutionProto.internal_static_google_devtools_remoteexecution_v1test_Command_EnvironmentVariable_descriptor;
      }

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return com.google.devtools.remoteexecution.v1test.RemoteExecutionProto.internal_static_google_devtools_remoteexecution_v1test_Command_EnvironmentVariable_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.class, com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.Builder.class);
      }

      // Construct using com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.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();
        name_ = "";

        value_ = "";

        return this;
      }

      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return com.google.devtools.remoteexecution.v1test.RemoteExecutionProto.internal_static_google_devtools_remoteexecution_v1test_Command_EnvironmentVariable_descriptor;
      }

      public com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable getDefaultInstanceForType() {
        return com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.getDefaultInstance();
      }

      public com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable build() {
        com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      public com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable buildPartial() {
        com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable result = new com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable(this);
        result.name_ = name_;
        result.value_ = value_;
        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.remoteexecution.v1test.Command.EnvironmentVariable) {
          return mergeFrom((com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable other) {
        if (other == com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.getDefaultInstance()) return this;
        if (!other.getName().isEmpty()) {
          name_ = other.name_;
          onChanged();
        }
        if (!other.getValue().isEmpty()) {
          value_ = other.value_;
          onChanged();
        }
        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.remoteexecution.v1test.Command.EnvironmentVariable parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private java.lang.Object name_ = "";
      /**
       * <pre>
       * The variable name.
       * </pre>
       *
       * <code>string name = 1;</code>
       */
      public java.lang.String getName() {
        java.lang.Object ref = name_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          name_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The variable name.
       * </pre>
       *
       * <code>string name = 1;</code>
       */
      public com.google.protobuf.ByteString
          getNameBytes() {
        java.lang.Object ref = name_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          name_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The variable name.
       * </pre>
       *
       * <code>string name = 1;</code>
       */
      public Builder setName(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        name_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The variable name.
       * </pre>
       *
       * <code>string name = 1;</code>
       */
      public Builder clearName() {
        
        name_ = getDefaultInstance().getName();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The variable name.
       * </pre>
       *
       * <code>string name = 1;</code>
       */
      public Builder setNameBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        name_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object value_ = "";
      /**
       * <pre>
       * The variable value.
       * </pre>
       *
       * <code>string value = 2;</code>
       */
      public java.lang.String getValue() {
        java.lang.Object ref = value_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          value_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * The variable value.
       * </pre>
       *
       * <code>string value = 2;</code>
       */
      public com.google.protobuf.ByteString
          getValueBytes() {
        java.lang.Object ref = value_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          value_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * The variable value.
       * </pre>
       *
       * <code>string value = 2;</code>
       */
      public Builder setValue(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        value_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The variable value.
       * </pre>
       *
       * <code>string value = 2;</code>
       */
      public Builder clearValue() {
        
        value_ = getDefaultInstance().getValue();
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The variable value.
       * </pre>
       *
       * <code>string value = 2;</code>
       */
      public Builder setValueBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        value_ = value;
        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.remoteexecution.v1test.Command.EnvironmentVariable)
    }

    // @@protoc_insertion_point(class_scope:google.devtools.remoteexecution.v1test.Command.EnvironmentVariable)
    private static final com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable();
    }

    public static com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    public com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  public static final int ARGUMENTS_FIELD_NUMBER = 1;
  private com.google.protobuf.LazyStringList arguments_;
  /**
   * <pre>
   * The arguments to the command. The first argument must be the path to the
   * executable, which must be either a relative path, in which case it is
   * evaluated with respect to the input root, or an absolute path. The `PATH`
   * environment variable, or similar functionality on other systems, is not
   * used to determine which executable to run.
   * The working directory will always be the input root.
   * </pre>
   *
   * <code>repeated string arguments = 1;</code>
   */
  public com.google.protobuf.ProtocolStringList
      getArgumentsList() {
    return arguments_;
  }
  /**
   * <pre>
   * The arguments to the command. The first argument must be the path to the
   * executable, which must be either a relative path, in which case it is
   * evaluated with respect to the input root, or an absolute path. The `PATH`
   * environment variable, or similar functionality on other systems, is not
   * used to determine which executable to run.
   * The working directory will always be the input root.
   * </pre>
   *
   * <code>repeated string arguments = 1;</code>
   */
  public int getArgumentsCount() {
    return arguments_.size();
  }
  /**
   * <pre>
   * The arguments to the command. The first argument must be the path to the
   * executable, which must be either a relative path, in which case it is
   * evaluated with respect to the input root, or an absolute path. The `PATH`
   * environment variable, or similar functionality on other systems, is not
   * used to determine which executable to run.
   * The working directory will always be the input root.
   * </pre>
   *
   * <code>repeated string arguments = 1;</code>
   */
  public java.lang.String getArguments(int index) {
    return arguments_.get(index);
  }
  /**
   * <pre>
   * The arguments to the command. The first argument must be the path to the
   * executable, which must be either a relative path, in which case it is
   * evaluated with respect to the input root, or an absolute path. The `PATH`
   * environment variable, or similar functionality on other systems, is not
   * used to determine which executable to run.
   * The working directory will always be the input root.
   * </pre>
   *
   * <code>repeated string arguments = 1;</code>
   */
  public com.google.protobuf.ByteString
      getArgumentsBytes(int index) {
    return arguments_.getByteString(index);
  }

  public static final int ENVIRONMENT_VARIABLES_FIELD_NUMBER = 2;
  private java.util.List<com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable> environmentVariables_;
  /**
   * <pre>
   * The environment variables to set when running the program. The worker may
   * provide its own default environment variables; these defaults can be
   * overridden using this field. Additional variables can also be specified.
   * In order to ensure that equivalent `Command`s always hash to the same
   * value, the environment variables MUST be lexicographically sorted by name.
   * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
   * </pre>
   *
   * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
   */
  public java.util.List<com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable> getEnvironmentVariablesList() {
    return environmentVariables_;
  }
  /**
   * <pre>
   * The environment variables to set when running the program. The worker may
   * provide its own default environment variables; these defaults can be
   * overridden using this field. Additional variables can also be specified.
   * In order to ensure that equivalent `Command`s always hash to the same
   * value, the environment variables MUST be lexicographically sorted by name.
   * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
   * </pre>
   *
   * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
   */
  public java.util.List<? extends com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariableOrBuilder> 
      getEnvironmentVariablesOrBuilderList() {
    return environmentVariables_;
  }
  /**
   * <pre>
   * The environment variables to set when running the program. The worker may
   * provide its own default environment variables; these defaults can be
   * overridden using this field. Additional variables can also be specified.
   * In order to ensure that equivalent `Command`s always hash to the same
   * value, the environment variables MUST be lexicographically sorted by name.
   * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
   * </pre>
   *
   * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
   */
  public int getEnvironmentVariablesCount() {
    return environmentVariables_.size();
  }
  /**
   * <pre>
   * The environment variables to set when running the program. The worker may
   * provide its own default environment variables; these defaults can be
   * overridden using this field. Additional variables can also be specified.
   * In order to ensure that equivalent `Command`s always hash to the same
   * value, the environment variables MUST be lexicographically sorted by name.
   * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
   * </pre>
   *
   * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
   */
  public com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable getEnvironmentVariables(int index) {
    return environmentVariables_.get(index);
  }
  /**
   * <pre>
   * The environment variables to set when running the program. The worker may
   * provide its own default environment variables; these defaults can be
   * overridden using this field. Additional variables can also be specified.
   * In order to ensure that equivalent `Command`s always hash to the same
   * value, the environment variables MUST be lexicographically sorted by name.
   * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
   * </pre>
   *
   * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
   */
  public com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariableOrBuilder getEnvironmentVariablesOrBuilder(
      int index) {
    return environmentVariables_.get(index);
  }

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

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    for (int i = 0; i < arguments_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, arguments_.getRaw(i));
    }
    for (int i = 0; i < environmentVariables_.size(); i++) {
      output.writeMessage(2, environmentVariables_.get(i));
    }
  }

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

    size = 0;
    {
      int dataSize = 0;
      for (int i = 0; i < arguments_.size(); i++) {
        dataSize += computeStringSizeNoTag(arguments_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getArgumentsList().size();
    }
    for (int i = 0; i < environmentVariables_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, environmentVariables_.get(i));
    }
    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.remoteexecution.v1test.Command)) {
      return super.equals(obj);
    }
    com.google.devtools.remoteexecution.v1test.Command other = (com.google.devtools.remoteexecution.v1test.Command) obj;

    boolean result = true;
    result = result && getArgumentsList()
        .equals(other.getArgumentsList());
    result = result && getEnvironmentVariablesList()
        .equals(other.getEnvironmentVariablesList());
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (getArgumentsCount() > 0) {
      hash = (37 * hash) + ARGUMENTS_FIELD_NUMBER;
      hash = (53 * hash) + getArgumentsList().hashCode();
    }
    if (getEnvironmentVariablesCount() > 0) {
      hash = (37 * hash) + ENVIRONMENT_VARIABLES_FIELD_NUMBER;
      hash = (53 * hash) + getEnvironmentVariablesList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.google.devtools.remoteexecution.v1test.Command 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>
   * A `Command` is the actual command executed by a worker running an
   * [Action][google.devtools.remoteexecution.v1test.Action].
   * Except as otherwise required, the environment (such as which system
   * libraries or binaries are available, and what filesystems are mounted where)
   * is defined by and specific to the implementation of the remote execution API.
   * </pre>
   *
   * Protobuf type {@code google.devtools.remoteexecution.v1test.Command}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.devtools.remoteexecution.v1test.Command)
      com.google.devtools.remoteexecution.v1test.CommandOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.devtools.remoteexecution.v1test.RemoteExecutionProto.internal_static_google_devtools_remoteexecution_v1test_Command_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.devtools.remoteexecution.v1test.RemoteExecutionProto.internal_static_google_devtools_remoteexecution_v1test_Command_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.devtools.remoteexecution.v1test.Command.class, com.google.devtools.remoteexecution.v1test.Command.Builder.class);
    }

    // Construct using com.google.devtools.remoteexecution.v1test.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) {
        getEnvironmentVariablesFieldBuilder();
      }
    }
    public Builder clear() {
      super.clear();
      arguments_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      if (environmentVariablesBuilder_ == null) {
        environmentVariables_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
      } else {
        environmentVariablesBuilder_.clear();
      }
      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.devtools.remoteexecution.v1test.RemoteExecutionProto.internal_static_google_devtools_remoteexecution_v1test_Command_descriptor;
    }

    public com.google.devtools.remoteexecution.v1test.Command getDefaultInstanceForType() {
      return com.google.devtools.remoteexecution.v1test.Command.getDefaultInstance();
    }

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

    public com.google.devtools.remoteexecution.v1test.Command buildPartial() {
      com.google.devtools.remoteexecution.v1test.Command result = new com.google.devtools.remoteexecution.v1test.Command(this);
      int from_bitField0_ = bitField0_;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        arguments_ = arguments_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000001);
      }
      result.arguments_ = arguments_;
      if (environmentVariablesBuilder_ == null) {
        if (((bitField0_ & 0x00000002) == 0x00000002)) {
          environmentVariables_ = java.util.Collections.unmodifiableList(environmentVariables_);
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.environmentVariables_ = environmentVariables_;
      } else {
        result.environmentVariables_ = environmentVariablesBuilder_.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.remoteexecution.v1test.Command) {
        return mergeFrom((com.google.devtools.remoteexecution.v1test.Command)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.devtools.remoteexecution.v1test.Command other) {
      if (other == com.google.devtools.remoteexecution.v1test.Command.getDefaultInstance()) return this;
      if (!other.arguments_.isEmpty()) {
        if (arguments_.isEmpty()) {
          arguments_ = other.arguments_;
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          ensureArgumentsIsMutable();
          arguments_.addAll(other.arguments_);
        }
        onChanged();
      }
      if (environmentVariablesBuilder_ == null) {
        if (!other.environmentVariables_.isEmpty()) {
          if (environmentVariables_.isEmpty()) {
            environmentVariables_ = other.environmentVariables_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureEnvironmentVariablesIsMutable();
            environmentVariables_.addAll(other.environmentVariables_);
          }
          onChanged();
        }
      } else {
        if (!other.environmentVariables_.isEmpty()) {
          if (environmentVariablesBuilder_.isEmpty()) {
            environmentVariablesBuilder_.dispose();
            environmentVariablesBuilder_ = null;
            environmentVariables_ = other.environmentVariables_;
            bitField0_ = (bitField0_ & ~0x00000002);
            environmentVariablesBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getEnvironmentVariablesFieldBuilder() : null;
          } else {
            environmentVariablesBuilder_.addAllMessages(other.environmentVariables_);
          }
        }
      }
      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.remoteexecution.v1test.Command parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.devtools.remoteexecution.v1test.Command) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private com.google.protobuf.LazyStringList arguments_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    private void ensureArgumentsIsMutable() {
      if (!((bitField0_ & 0x00000001) == 0x00000001)) {
        arguments_ = new com.google.protobuf.LazyStringArrayList(arguments_);
        bitField0_ |= 0x00000001;
       }
    }
    /**
     * <pre>
     * The arguments to the command. The first argument must be the path to the
     * executable, which must be either a relative path, in which case it is
     * evaluated with respect to the input root, or an absolute path. The `PATH`
     * environment variable, or similar functionality on other systems, is not
     * used to determine which executable to run.
     * The working directory will always be the input root.
     * </pre>
     *
     * <code>repeated string arguments = 1;</code>
     */
    public com.google.protobuf.ProtocolStringList
        getArgumentsList() {
      return arguments_.getUnmodifiableView();
    }
    /**
     * <pre>
     * The arguments to the command. The first argument must be the path to the
     * executable, which must be either a relative path, in which case it is
     * evaluated with respect to the input root, or an absolute path. The `PATH`
     * environment variable, or similar functionality on other systems, is not
     * used to determine which executable to run.
     * The working directory will always be the input root.
     * </pre>
     *
     * <code>repeated string arguments = 1;</code>
     */
    public int getArgumentsCount() {
      return arguments_.size();
    }
    /**
     * <pre>
     * The arguments to the command. The first argument must be the path to the
     * executable, which must be either a relative path, in which case it is
     * evaluated with respect to the input root, or an absolute path. The `PATH`
     * environment variable, or similar functionality on other systems, is not
     * used to determine which executable to run.
     * The working directory will always be the input root.
     * </pre>
     *
     * <code>repeated string arguments = 1;</code>
     */
    public java.lang.String getArguments(int index) {
      return arguments_.get(index);
    }
    /**
     * <pre>
     * The arguments to the command. The first argument must be the path to the
     * executable, which must be either a relative path, in which case it is
     * evaluated with respect to the input root, or an absolute path. The `PATH`
     * environment variable, or similar functionality on other systems, is not
     * used to determine which executable to run.
     * The working directory will always be the input root.
     * </pre>
     *
     * <code>repeated string arguments = 1;</code>
     */
    public com.google.protobuf.ByteString
        getArgumentsBytes(int index) {
      return arguments_.getByteString(index);
    }
    /**
     * <pre>
     * The arguments to the command. The first argument must be the path to the
     * executable, which must be either a relative path, in which case it is
     * evaluated with respect to the input root, or an absolute path. The `PATH`
     * environment variable, or similar functionality on other systems, is not
     * used to determine which executable to run.
     * The working directory will always be the input root.
     * </pre>
     *
     * <code>repeated string arguments = 1;</code>
     */
    public Builder setArguments(
        int index, java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureArgumentsIsMutable();
      arguments_.set(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The arguments to the command. The first argument must be the path to the
     * executable, which must be either a relative path, in which case it is
     * evaluated with respect to the input root, or an absolute path. The `PATH`
     * environment variable, or similar functionality on other systems, is not
     * used to determine which executable to run.
     * The working directory will always be the input root.
     * </pre>
     *
     * <code>repeated string arguments = 1;</code>
     */
    public Builder addArguments(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  ensureArgumentsIsMutable();
      arguments_.add(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The arguments to the command. The first argument must be the path to the
     * executable, which must be either a relative path, in which case it is
     * evaluated with respect to the input root, or an absolute path. The `PATH`
     * environment variable, or similar functionality on other systems, is not
     * used to determine which executable to run.
     * The working directory will always be the input root.
     * </pre>
     *
     * <code>repeated string arguments = 1;</code>
     */
    public Builder addAllArguments(
        java.lang.Iterable<java.lang.String> values) {
      ensureArgumentsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, arguments_);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The arguments to the command. The first argument must be the path to the
     * executable, which must be either a relative path, in which case it is
     * evaluated with respect to the input root, or an absolute path. The `PATH`
     * environment variable, or similar functionality on other systems, is not
     * used to determine which executable to run.
     * The working directory will always be the input root.
     * </pre>
     *
     * <code>repeated string arguments = 1;</code>
     */
    public Builder clearArguments() {
      arguments_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The arguments to the command. The first argument must be the path to the
     * executable, which must be either a relative path, in which case it is
     * evaluated with respect to the input root, or an absolute path. The `PATH`
     * environment variable, or similar functionality on other systems, is not
     * used to determine which executable to run.
     * The working directory will always be the input root.
     * </pre>
     *
     * <code>repeated string arguments = 1;</code>
     */
    public Builder addArgumentsBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      ensureArgumentsIsMutable();
      arguments_.add(value);
      onChanged();
      return this;
    }

    private java.util.List<com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable> environmentVariables_ =
      java.util.Collections.emptyList();
    private void ensureEnvironmentVariablesIsMutable() {
      if (!((bitField0_ & 0x00000002) == 0x00000002)) {
        environmentVariables_ = new java.util.ArrayList<com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable>(environmentVariables_);
        bitField0_ |= 0x00000002;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable, com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.Builder, com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariableOrBuilder> environmentVariablesBuilder_;

    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public java.util.List<com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable> getEnvironmentVariablesList() {
      if (environmentVariablesBuilder_ == null) {
        return java.util.Collections.unmodifiableList(environmentVariables_);
      } else {
        return environmentVariablesBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public int getEnvironmentVariablesCount() {
      if (environmentVariablesBuilder_ == null) {
        return environmentVariables_.size();
      } else {
        return environmentVariablesBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable getEnvironmentVariables(int index) {
      if (environmentVariablesBuilder_ == null) {
        return environmentVariables_.get(index);
      } else {
        return environmentVariablesBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public Builder setEnvironmentVariables(
        int index, com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable value) {
      if (environmentVariablesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureEnvironmentVariablesIsMutable();
        environmentVariables_.set(index, value);
        onChanged();
      } else {
        environmentVariablesBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public Builder setEnvironmentVariables(
        int index, com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.Builder builderForValue) {
      if (environmentVariablesBuilder_ == null) {
        ensureEnvironmentVariablesIsMutable();
        environmentVariables_.set(index, builderForValue.build());
        onChanged();
      } else {
        environmentVariablesBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public Builder addEnvironmentVariables(com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable value) {
      if (environmentVariablesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureEnvironmentVariablesIsMutable();
        environmentVariables_.add(value);
        onChanged();
      } else {
        environmentVariablesBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public Builder addEnvironmentVariables(
        int index, com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable value) {
      if (environmentVariablesBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureEnvironmentVariablesIsMutable();
        environmentVariables_.add(index, value);
        onChanged();
      } else {
        environmentVariablesBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public Builder addEnvironmentVariables(
        com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.Builder builderForValue) {
      if (environmentVariablesBuilder_ == null) {
        ensureEnvironmentVariablesIsMutable();
        environmentVariables_.add(builderForValue.build());
        onChanged();
      } else {
        environmentVariablesBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public Builder addEnvironmentVariables(
        int index, com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.Builder builderForValue) {
      if (environmentVariablesBuilder_ == null) {
        ensureEnvironmentVariablesIsMutable();
        environmentVariables_.add(index, builderForValue.build());
        onChanged();
      } else {
        environmentVariablesBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public Builder addAllEnvironmentVariables(
        java.lang.Iterable<? extends com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable> values) {
      if (environmentVariablesBuilder_ == null) {
        ensureEnvironmentVariablesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, environmentVariables_);
        onChanged();
      } else {
        environmentVariablesBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public Builder clearEnvironmentVariables() {
      if (environmentVariablesBuilder_ == null) {
        environmentVariables_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
      } else {
        environmentVariablesBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public Builder removeEnvironmentVariables(int index) {
      if (environmentVariablesBuilder_ == null) {
        ensureEnvironmentVariablesIsMutable();
        environmentVariables_.remove(index);
        onChanged();
      } else {
        environmentVariablesBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.Builder getEnvironmentVariablesBuilder(
        int index) {
      return getEnvironmentVariablesFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariableOrBuilder getEnvironmentVariablesOrBuilder(
        int index) {
      if (environmentVariablesBuilder_ == null) {
        return environmentVariables_.get(index);  } else {
        return environmentVariablesBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public java.util.List<? extends com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariableOrBuilder> 
         getEnvironmentVariablesOrBuilderList() {
      if (environmentVariablesBuilder_ != null) {
        return environmentVariablesBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(environmentVariables_);
      }
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.Builder addEnvironmentVariablesBuilder() {
      return getEnvironmentVariablesFieldBuilder().addBuilder(
          com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.getDefaultInstance());
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.Builder addEnvironmentVariablesBuilder(
        int index) {
      return getEnvironmentVariablesFieldBuilder().addBuilder(
          index, com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.getDefaultInstance());
    }
    /**
     * <pre>
     * The environment variables to set when running the program. The worker may
     * provide its own default environment variables; these defaults can be
     * overridden using this field. Additional variables can also be specified.
     * In order to ensure that equivalent `Command`s always hash to the same
     * value, the environment variables MUST be lexicographically sorted by name.
     * Sorting of strings is done by code point, equivalently, by the UTF-8 bytes.
     * </pre>
     *
     * <code>repeated .google.devtools.remoteexecution.v1test.Command.EnvironmentVariable environment_variables = 2;</code>
     */
    public java.util.List<com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.Builder> 
         getEnvironmentVariablesBuilderList() {
      return getEnvironmentVariablesFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable, com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.Builder, com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariableOrBuilder> 
        getEnvironmentVariablesFieldBuilder() {
      if (environmentVariablesBuilder_ == null) {
        environmentVariablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable, com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariable.Builder, com.google.devtools.remoteexecution.v1test.Command.EnvironmentVariableOrBuilder>(
                environmentVariables_,
                ((bitField0_ & 0x00000002) == 0x00000002),
                getParentForChildren(),
                isClean());
        environmentVariables_ = null;
      }
      return environmentVariablesBuilder_;
    }
    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.remoteexecution.v1test.Command)
  }

  // @@protoc_insertion_point(class_scope:google.devtools.remoteexecution.v1test.Command)
  private static final com.google.devtools.remoteexecution.v1test.Command DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.devtools.remoteexecution.v1test.Command();
  }

  public static com.google.devtools.remoteexecution.v1test.Command getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<Command>
      PARSER = new com.google.protobuf.AbstractParser<Command>() {
    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;
  }

  public com.google.devtools.remoteexecution.v1test.Command getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

