// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: build/bazel/remote/execution/v2/remote_execution.proto

package build.bazel.remote.execution.v2;

/**
 * <pre>
 * A request message for
 * [ContentAddressableStorage.BatchUpdateBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchUpdateBlobs].
 * </pre>
 *
 * Protobuf type {@code build.bazel.remote.execution.v2.BatchUpdateBlobsRequest}
 */
public  final class BatchUpdateBlobsRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:build.bazel.remote.execution.v2.BatchUpdateBlobsRequest)
    BatchUpdateBlobsRequestOrBuilder {
private static final long serialVersionUID = 0L;
  // Use BatchUpdateBlobsRequest.newBuilder() to construct.
  private BatchUpdateBlobsRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private BatchUpdateBlobsRequest() {
    instanceName_ = "";
    requests_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private BatchUpdateBlobsRequest(
      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();

            instanceName_ = s;
            break;
          }
          case 18: {
            if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
              requests_ = new java.util.ArrayList<build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request>();
              mutable_bitField0_ |= 0x00000002;
            }
            requests_.add(
                input.readMessage(build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.parser(), extensionRegistry));
            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)) {
        requests_ = java.util.Collections.unmodifiableList(requests_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_BatchUpdateBlobsRequest_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_BatchUpdateBlobsRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.class, build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Builder.class);
  }

  public interface RequestOrBuilder extends
      // @@protoc_insertion_point(interface_extends:build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <pre>
     * The digest of the blob. This MUST be the digest of `data`.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.Digest digest = 1;</code>
     */
    boolean hasDigest();
    /**
     * <pre>
     * The digest of the blob. This MUST be the digest of `data`.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.Digest digest = 1;</code>
     */
    build.bazel.remote.execution.v2.Digest getDigest();
    /**
     * <pre>
     * The digest of the blob. This MUST be the digest of `data`.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.Digest digest = 1;</code>
     */
    build.bazel.remote.execution.v2.DigestOrBuilder getDigestOrBuilder();

    /**
     * <pre>
     * The raw binary data.
     * </pre>
     *
     * <code>bytes data = 2;</code>
     */
    com.google.protobuf.ByteString getData();
  }
  /**
   * <pre>
   * A request corresponding to a single blob that the client wants to upload.
   * </pre>
   *
   * Protobuf type {@code build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request}
   */
  public  static final class Request extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request)
      RequestOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use Request.newBuilder() to construct.
    private Request(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Request() {
      data_ = com.google.protobuf.ByteString.EMPTY;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return this.unknownFields;
    }
    private Request(
        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: {
              build.bazel.remote.execution.v2.Digest.Builder subBuilder = null;
              if (digest_ != null) {
                subBuilder = digest_.toBuilder();
              }
              digest_ = input.readMessage(build.bazel.remote.execution.v2.Digest.parser(), extensionRegistry);
              if (subBuilder != null) {
                subBuilder.mergeFrom(digest_);
                digest_ = subBuilder.buildPartial();
              }

              break;
            }
            case 18: {

              data_ = input.readBytes();
              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 {
        this.unknownFields = unknownFields.build();
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_BatchUpdateBlobsRequest_Request_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_BatchUpdateBlobsRequest_Request_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.class, build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.Builder.class);
    }

    public static final int DIGEST_FIELD_NUMBER = 1;
    private build.bazel.remote.execution.v2.Digest digest_;
    /**
     * <pre>
     * The digest of the blob. This MUST be the digest of `data`.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.Digest digest = 1;</code>
     */
    public boolean hasDigest() {
      return digest_ != null;
    }
    /**
     * <pre>
     * The digest of the blob. This MUST be the digest of `data`.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.Digest digest = 1;</code>
     */
    public build.bazel.remote.execution.v2.Digest getDigest() {
      return digest_ == null ? build.bazel.remote.execution.v2.Digest.getDefaultInstance() : digest_;
    }
    /**
     * <pre>
     * The digest of the blob. This MUST be the digest of `data`.
     * </pre>
     *
     * <code>.build.bazel.remote.execution.v2.Digest digest = 1;</code>
     */
    public build.bazel.remote.execution.v2.DigestOrBuilder getDigestOrBuilder() {
      return getDigest();
    }

    public static final int DATA_FIELD_NUMBER = 2;
    private com.google.protobuf.ByteString data_;
    /**
     * <pre>
     * The raw binary data.
     * </pre>
     *
     * <code>bytes data = 2;</code>
     */
    public com.google.protobuf.ByteString getData() {
      return data_;
    }

    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 (digest_ != null) {
        output.writeMessage(1, getDigest());
      }
      if (!data_.isEmpty()) {
        output.writeBytes(2, data_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (digest_ != null) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, getDigest());
      }
      if (!data_.isEmpty()) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(2, data_);
      }
      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 build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request)) {
        return super.equals(obj);
      }
      build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request other = (build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request) obj;

      boolean result = true;
      result = result && (hasDigest() == other.hasDigest());
      if (hasDigest()) {
        result = result && getDigest()
            .equals(other.getDigest());
      }
      result = result && getData()
          .equals(other.getData());
      result = result && unknownFields.equals(other.unknownFields);
      return result;
    }

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

    public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request 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 build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request 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 build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request 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(build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request 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>
     * A request corresponding to a single blob that the client wants to upload.
     * </pre>
     *
     * Protobuf type {@code build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request)
        build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.RequestOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_BatchUpdateBlobsRequest_Request_descriptor;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_BatchUpdateBlobsRequest_Request_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.class, build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.Builder.class);
      }

      // Construct using build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.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();
        if (digestBuilder_ == null) {
          digest_ = null;
        } else {
          digest_ = null;
          digestBuilder_ = null;
        }
        data_ = com.google.protobuf.ByteString.EMPTY;

        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_BatchUpdateBlobsRequest_Request_descriptor;
      }

      @java.lang.Override
      public build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request getDefaultInstanceForType() {
        return build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.getDefaultInstance();
      }

      @java.lang.Override
      public build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request build() {
        build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request buildPartial() {
        build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request result = new build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request(this);
        if (digestBuilder_ == null) {
          result.digest_ = digest_;
        } else {
          result.digest_ = digestBuilder_.build();
        }
        result.data_ = data_;
        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 build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request) {
          return mergeFrom((build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request other) {
        if (other == build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.getDefaultInstance()) return this;
        if (other.hasDigest()) {
          mergeDigest(other.getDigest());
        }
        if (other.getData() != com.google.protobuf.ByteString.EMPTY) {
          setData(other.getData());
        }
        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 {
        build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private build.bazel.remote.execution.v2.Digest digest_ = null;
      private com.google.protobuf.SingleFieldBuilderV3<
          build.bazel.remote.execution.v2.Digest, build.bazel.remote.execution.v2.Digest.Builder, build.bazel.remote.execution.v2.DigestOrBuilder> digestBuilder_;
      /**
       * <pre>
       * The digest of the blob. This MUST be the digest of `data`.
       * </pre>
       *
       * <code>.build.bazel.remote.execution.v2.Digest digest = 1;</code>
       */
      public boolean hasDigest() {
        return digestBuilder_ != null || digest_ != null;
      }
      /**
       * <pre>
       * The digest of the blob. This MUST be the digest of `data`.
       * </pre>
       *
       * <code>.build.bazel.remote.execution.v2.Digest digest = 1;</code>
       */
      public build.bazel.remote.execution.v2.Digest getDigest() {
        if (digestBuilder_ == null) {
          return digest_ == null ? build.bazel.remote.execution.v2.Digest.getDefaultInstance() : digest_;
        } else {
          return digestBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * The digest of the blob. This MUST be the digest of `data`.
       * </pre>
       *
       * <code>.build.bazel.remote.execution.v2.Digest digest = 1;</code>
       */
      public Builder setDigest(build.bazel.remote.execution.v2.Digest value) {
        if (digestBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          digest_ = value;
          onChanged();
        } else {
          digestBuilder_.setMessage(value);
        }

        return this;
      }
      /**
       * <pre>
       * The digest of the blob. This MUST be the digest of `data`.
       * </pre>
       *
       * <code>.build.bazel.remote.execution.v2.Digest digest = 1;</code>
       */
      public Builder setDigest(
          build.bazel.remote.execution.v2.Digest.Builder builderForValue) {
        if (digestBuilder_ == null) {
          digest_ = builderForValue.build();
          onChanged();
        } else {
          digestBuilder_.setMessage(builderForValue.build());
        }

        return this;
      }
      /**
       * <pre>
       * The digest of the blob. This MUST be the digest of `data`.
       * </pre>
       *
       * <code>.build.bazel.remote.execution.v2.Digest digest = 1;</code>
       */
      public Builder mergeDigest(build.bazel.remote.execution.v2.Digest value) {
        if (digestBuilder_ == null) {
          if (digest_ != null) {
            digest_ =
              build.bazel.remote.execution.v2.Digest.newBuilder(digest_).mergeFrom(value).buildPartial();
          } else {
            digest_ = value;
          }
          onChanged();
        } else {
          digestBuilder_.mergeFrom(value);
        }

        return this;
      }
      /**
       * <pre>
       * The digest of the blob. This MUST be the digest of `data`.
       * </pre>
       *
       * <code>.build.bazel.remote.execution.v2.Digest digest = 1;</code>
       */
      public Builder clearDigest() {
        if (digestBuilder_ == null) {
          digest_ = null;
          onChanged();
        } else {
          digest_ = null;
          digestBuilder_ = null;
        }

        return this;
      }
      /**
       * <pre>
       * The digest of the blob. This MUST be the digest of `data`.
       * </pre>
       *
       * <code>.build.bazel.remote.execution.v2.Digest digest = 1;</code>
       */
      public build.bazel.remote.execution.v2.Digest.Builder getDigestBuilder() {
        
        onChanged();
        return getDigestFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * The digest of the blob. This MUST be the digest of `data`.
       * </pre>
       *
       * <code>.build.bazel.remote.execution.v2.Digest digest = 1;</code>
       */
      public build.bazel.remote.execution.v2.DigestOrBuilder getDigestOrBuilder() {
        if (digestBuilder_ != null) {
          return digestBuilder_.getMessageOrBuilder();
        } else {
          return digest_ == null ?
              build.bazel.remote.execution.v2.Digest.getDefaultInstance() : digest_;
        }
      }
      /**
       * <pre>
       * The digest of the blob. This MUST be the digest of `data`.
       * </pre>
       *
       * <code>.build.bazel.remote.execution.v2.Digest digest = 1;</code>
       */
      private com.google.protobuf.SingleFieldBuilderV3<
          build.bazel.remote.execution.v2.Digest, build.bazel.remote.execution.v2.Digest.Builder, build.bazel.remote.execution.v2.DigestOrBuilder> 
          getDigestFieldBuilder() {
        if (digestBuilder_ == null) {
          digestBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
              build.bazel.remote.execution.v2.Digest, build.bazel.remote.execution.v2.Digest.Builder, build.bazel.remote.execution.v2.DigestOrBuilder>(
                  getDigest(),
                  getParentForChildren(),
                  isClean());
          digest_ = null;
        }
        return digestBuilder_;
      }

      private com.google.protobuf.ByteString data_ = com.google.protobuf.ByteString.EMPTY;
      /**
       * <pre>
       * The raw binary data.
       * </pre>
       *
       * <code>bytes data = 2;</code>
       */
      public com.google.protobuf.ByteString getData() {
        return data_;
      }
      /**
       * <pre>
       * The raw binary data.
       * </pre>
       *
       * <code>bytes data = 2;</code>
       */
      public Builder setData(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        data_ = value;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The raw binary data.
       * </pre>
       *
       * <code>bytes data = 2;</code>
       */
      public Builder clearData() {
        
        data_ = getDefaultInstance().getData();
        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:build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request)
    }

    // @@protoc_insertion_point(class_scope:build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request)
    private static final build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request();
    }

    public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

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

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

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

    @java.lang.Override
    public build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private int bitField0_;
  public static final int INSTANCE_NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object instanceName_;
  /**
   * <pre>
   * The instance of the execution system to operate against. A server may
   * support multiple instances of the execution system (with their own workers,
   * storage, caches, etc.). The server MAY require use of this field to select
   * between them in an implementation-defined fashion, otherwise it can be
   * omitted.
   * </pre>
   *
   * <code>string instance_name = 1;</code>
   */
  public java.lang.String getInstanceName() {
    java.lang.Object ref = instanceName_;
    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();
      instanceName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The instance of the execution system to operate against. A server may
   * support multiple instances of the execution system (with their own workers,
   * storage, caches, etc.). The server MAY require use of this field to select
   * between them in an implementation-defined fashion, otherwise it can be
   * omitted.
   * </pre>
   *
   * <code>string instance_name = 1;</code>
   */
  public com.google.protobuf.ByteString
      getInstanceNameBytes() {
    java.lang.Object ref = instanceName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      instanceName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int REQUESTS_FIELD_NUMBER = 2;
  private java.util.List<build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request> requests_;
  /**
   * <pre>
   * The individual upload requests.
   * </pre>
   *
   * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
   */
  public java.util.List<build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request> getRequestsList() {
    return requests_;
  }
  /**
   * <pre>
   * The individual upload requests.
   * </pre>
   *
   * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
   */
  public java.util.List<? extends build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.RequestOrBuilder> 
      getRequestsOrBuilderList() {
    return requests_;
  }
  /**
   * <pre>
   * The individual upload requests.
   * </pre>
   *
   * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
   */
  public int getRequestsCount() {
    return requests_.size();
  }
  /**
   * <pre>
   * The individual upload requests.
   * </pre>
   *
   * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
   */
  public build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request getRequests(int index) {
    return requests_.get(index);
  }
  /**
   * <pre>
   * The individual upload requests.
   * </pre>
   *
   * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
   */
  public build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.RequestOrBuilder getRequestsOrBuilder(
      int index) {
    return requests_.get(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 (!getInstanceNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, instanceName_);
    }
    for (int i = 0; i < requests_.size(); i++) {
      output.writeMessage(2, requests_.get(i));
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!getInstanceNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, instanceName_);
    }
    for (int i = 0; i < requests_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, requests_.get(i));
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof build.bazel.remote.execution.v2.BatchUpdateBlobsRequest)) {
      return super.equals(obj);
    }
    build.bazel.remote.execution.v2.BatchUpdateBlobsRequest other = (build.bazel.remote.execution.v2.BatchUpdateBlobsRequest) obj;

    boolean result = true;
    result = result && getInstanceName()
        .equals(other.getInstanceName());
    result = result && getRequestsList()
        .equals(other.getRequestsList());
    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) + INSTANCE_NAME_FIELD_NUMBER;
    hash = (53 * hash) + getInstanceName().hashCode();
    if (getRequestsCount() > 0) {
      hash = (37 * hash) + REQUESTS_FIELD_NUMBER;
      hash = (53 * hash) + getRequestsList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest 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 build.bazel.remote.execution.v2.BatchUpdateBlobsRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest 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 build.bazel.remote.execution.v2.BatchUpdateBlobsRequest parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest 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(build.bazel.remote.execution.v2.BatchUpdateBlobsRequest 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>
   * A request message for
   * [ContentAddressableStorage.BatchUpdateBlobs][build.bazel.remote.execution.v2.ContentAddressableStorage.BatchUpdateBlobs].
   * </pre>
   *
   * Protobuf type {@code build.bazel.remote.execution.v2.BatchUpdateBlobsRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:build.bazel.remote.execution.v2.BatchUpdateBlobsRequest)
      build.bazel.remote.execution.v2.BatchUpdateBlobsRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_BatchUpdateBlobsRequest_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_BatchUpdateBlobsRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.class, build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Builder.class);
    }

    // Construct using build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

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

      if (requestsBuilder_ == null) {
        requests_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
      } else {
        requestsBuilder_.clear();
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return build.bazel.remote.execution.v2.RemoteExecutionProto.internal_static_build_bazel_remote_execution_v2_BatchUpdateBlobsRequest_descriptor;
    }

    @java.lang.Override
    public build.bazel.remote.execution.v2.BatchUpdateBlobsRequest getDefaultInstanceForType() {
      return build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.getDefaultInstance();
    }

    @java.lang.Override
    public build.bazel.remote.execution.v2.BatchUpdateBlobsRequest build() {
      build.bazel.remote.execution.v2.BatchUpdateBlobsRequest result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public build.bazel.remote.execution.v2.BatchUpdateBlobsRequest buildPartial() {
      build.bazel.remote.execution.v2.BatchUpdateBlobsRequest result = new build.bazel.remote.execution.v2.BatchUpdateBlobsRequest(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.instanceName_ = instanceName_;
      if (requestsBuilder_ == null) {
        if (((bitField0_ & 0x00000002) == 0x00000002)) {
          requests_ = java.util.Collections.unmodifiableList(requests_);
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.requests_ = requests_;
      } else {
        result.requests_ = requestsBuilder_.build();
      }
      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 build.bazel.remote.execution.v2.BatchUpdateBlobsRequest) {
        return mergeFrom((build.bazel.remote.execution.v2.BatchUpdateBlobsRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(build.bazel.remote.execution.v2.BatchUpdateBlobsRequest other) {
      if (other == build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.getDefaultInstance()) return this;
      if (!other.getInstanceName().isEmpty()) {
        instanceName_ = other.instanceName_;
        onChanged();
      }
      if (requestsBuilder_ == null) {
        if (!other.requests_.isEmpty()) {
          if (requests_.isEmpty()) {
            requests_ = other.requests_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureRequestsIsMutable();
            requests_.addAll(other.requests_);
          }
          onChanged();
        }
      } else {
        if (!other.requests_.isEmpty()) {
          if (requestsBuilder_.isEmpty()) {
            requestsBuilder_.dispose();
            requestsBuilder_ = null;
            requests_ = other.requests_;
            bitField0_ = (bitField0_ & ~0x00000002);
            requestsBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getRequestsFieldBuilder() : null;
          } else {
            requestsBuilder_.addAllMessages(other.requests_);
          }
        }
      }
      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 {
      build.bazel.remote.execution.v2.BatchUpdateBlobsRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (build.bazel.remote.execution.v2.BatchUpdateBlobsRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private java.lang.Object instanceName_ = "";
    /**
     * <pre>
     * The instance of the execution system to operate against. A server may
     * support multiple instances of the execution system (with their own workers,
     * storage, caches, etc.). The server MAY require use of this field to select
     * between them in an implementation-defined fashion, otherwise it can be
     * omitted.
     * </pre>
     *
     * <code>string instance_name = 1;</code>
     */
    public java.lang.String getInstanceName() {
      java.lang.Object ref = instanceName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        instanceName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The instance of the execution system to operate against. A server may
     * support multiple instances of the execution system (with their own workers,
     * storage, caches, etc.). The server MAY require use of this field to select
     * between them in an implementation-defined fashion, otherwise it can be
     * omitted.
     * </pre>
     *
     * <code>string instance_name = 1;</code>
     */
    public com.google.protobuf.ByteString
        getInstanceNameBytes() {
      java.lang.Object ref = instanceName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        instanceName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The instance of the execution system to operate against. A server may
     * support multiple instances of the execution system (with their own workers,
     * storage, caches, etc.). The server MAY require use of this field to select
     * between them in an implementation-defined fashion, otherwise it can be
     * omitted.
     * </pre>
     *
     * <code>string instance_name = 1;</code>
     */
    public Builder setInstanceName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      instanceName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The instance of the execution system to operate against. A server may
     * support multiple instances of the execution system (with their own workers,
     * storage, caches, etc.). The server MAY require use of this field to select
     * between them in an implementation-defined fashion, otherwise it can be
     * omitted.
     * </pre>
     *
     * <code>string instance_name = 1;</code>
     */
    public Builder clearInstanceName() {
      
      instanceName_ = getDefaultInstance().getInstanceName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The instance of the execution system to operate against. A server may
     * support multiple instances of the execution system (with their own workers,
     * storage, caches, etc.). The server MAY require use of this field to select
     * between them in an implementation-defined fashion, otherwise it can be
     * omitted.
     * </pre>
     *
     * <code>string instance_name = 1;</code>
     */
    public Builder setInstanceNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      instanceName_ = value;
      onChanged();
      return this;
    }

    private java.util.List<build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request> requests_ =
      java.util.Collections.emptyList();
    private void ensureRequestsIsMutable() {
      if (!((bitField0_ & 0x00000002) == 0x00000002)) {
        requests_ = new java.util.ArrayList<build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request>(requests_);
        bitField0_ |= 0x00000002;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request, build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.Builder, build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.RequestOrBuilder> requestsBuilder_;

    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public java.util.List<build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request> getRequestsList() {
      if (requestsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(requests_);
      } else {
        return requestsBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public int getRequestsCount() {
      if (requestsBuilder_ == null) {
        return requests_.size();
      } else {
        return requestsBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request getRequests(int index) {
      if (requestsBuilder_ == null) {
        return requests_.get(index);
      } else {
        return requestsBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public Builder setRequests(
        int index, build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request value) {
      if (requestsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureRequestsIsMutable();
        requests_.set(index, value);
        onChanged();
      } else {
        requestsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public Builder setRequests(
        int index, build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.Builder builderForValue) {
      if (requestsBuilder_ == null) {
        ensureRequestsIsMutable();
        requests_.set(index, builderForValue.build());
        onChanged();
      } else {
        requestsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public Builder addRequests(build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request value) {
      if (requestsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureRequestsIsMutable();
        requests_.add(value);
        onChanged();
      } else {
        requestsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public Builder addRequests(
        int index, build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request value) {
      if (requestsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureRequestsIsMutable();
        requests_.add(index, value);
        onChanged();
      } else {
        requestsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public Builder addRequests(
        build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.Builder builderForValue) {
      if (requestsBuilder_ == null) {
        ensureRequestsIsMutable();
        requests_.add(builderForValue.build());
        onChanged();
      } else {
        requestsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public Builder addRequests(
        int index, build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.Builder builderForValue) {
      if (requestsBuilder_ == null) {
        ensureRequestsIsMutable();
        requests_.add(index, builderForValue.build());
        onChanged();
      } else {
        requestsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public Builder addAllRequests(
        java.lang.Iterable<? extends build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request> values) {
      if (requestsBuilder_ == null) {
        ensureRequestsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, requests_);
        onChanged();
      } else {
        requestsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public Builder clearRequests() {
      if (requestsBuilder_ == null) {
        requests_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
      } else {
        requestsBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public Builder removeRequests(int index) {
      if (requestsBuilder_ == null) {
        ensureRequestsIsMutable();
        requests_.remove(index);
        onChanged();
      } else {
        requestsBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.Builder getRequestsBuilder(
        int index) {
      return getRequestsFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.RequestOrBuilder getRequestsOrBuilder(
        int index) {
      if (requestsBuilder_ == null) {
        return requests_.get(index);  } else {
        return requestsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public java.util.List<? extends build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.RequestOrBuilder> 
         getRequestsOrBuilderList() {
      if (requestsBuilder_ != null) {
        return requestsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(requests_);
      }
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.Builder addRequestsBuilder() {
      return getRequestsFieldBuilder().addBuilder(
          build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.getDefaultInstance());
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.Builder addRequestsBuilder(
        int index) {
      return getRequestsFieldBuilder().addBuilder(
          index, build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.getDefaultInstance());
    }
    /**
     * <pre>
     * The individual upload requests.
     * </pre>
     *
     * <code>repeated .build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request requests = 2;</code>
     */
    public java.util.List<build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.Builder> 
         getRequestsBuilderList() {
      return getRequestsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request, build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.Builder, build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.RequestOrBuilder> 
        getRequestsFieldBuilder() {
      if (requestsBuilder_ == null) {
        requestsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request, build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.Request.Builder, build.bazel.remote.execution.v2.BatchUpdateBlobsRequest.RequestOrBuilder>(
                requests_,
                ((bitField0_ & 0x00000002) == 0x00000002),
                getParentForChildren(),
                isClean());
        requests_ = null;
      }
      return requestsBuilder_;
    }
    @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:build.bazel.remote.execution.v2.BatchUpdateBlobsRequest)
  }

  // @@protoc_insertion_point(class_scope:build.bazel.remote.execution.v2.BatchUpdateBlobsRequest)
  private static final build.bazel.remote.execution.v2.BatchUpdateBlobsRequest DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new build.bazel.remote.execution.v2.BatchUpdateBlobsRequest();
  }

  public static build.bazel.remote.execution.v2.BatchUpdateBlobsRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public build.bazel.remote.execution.v2.BatchUpdateBlobsRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

