content: // Generated by the protocol buffer compiler.  DO NOT EDIT!
  // NO CHECKED-IN PROTOBUF GENCODE
  // source: a2a.proto
  // Protobuf Java Version: 4.31.1
  
  package io.a2a.grpc;
  
  /**
   * <pre>
   * Task is the core unit of action for A2A. It has a current status
   * and when results are created for the task they are stored in the
   * artifact. If there are multiple turns for a task, these are stored in
   * history.
   * </pre>
   *
   * Protobuf type {@code a2a.v1.Task}
   */
  @com.google.protobuf.Generated
  public final class Task extends
      com.google.protobuf.GeneratedMessage implements
      // @@protoc_insertion_point(message_implements:a2a.v1.Task)
      TaskOrBuilder {
  private static final long serialVersionUID = 0L;
    static {
      com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
        com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
        /* major= */ 4,
        /* minor= */ 31,
        /* patch= */ 1,
        /* suffix= */ "",
        Task.class.getName());
    }
    // Use Task.newBuilder() to construct.
    private Task(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
      super(builder);
    }
    private Task() {
      id_ = "";
      contextId_ = "";
      artifacts_ = java.util.Collections.emptyList();
      history_ = java.util.Collections.emptyList();
    }
  
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return io.a2a.grpc.A2A.internal_static_a2a_v1_Task_descriptor;
    }
  
    @java.lang.Override
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.a2a.grpc.A2A.internal_static_a2a_v1_Task_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.a2a.grpc.Task.class, io.a2a.grpc.Task.Builder.class);
    }
  
    private int bitField0_;
    public static final int ID_FIELD_NUMBER = 1;
    @SuppressWarnings("serial")
    private volatile java.lang.Object id_ = "";
    /**
     * <pre>
     * Unique identifier for a task, created by the A2A server.
     * </pre>
     *
     * <code>string id = 1;</code>
     * @return The id.
     */
    @java.lang.Override
    public java.lang.String getId() {
      java.lang.Object ref = id_;
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        id_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * Unique identifier for a task, created by the A2A server.
     * </pre>
     *
     * <code>string id = 1;</code>
     * @return The bytes for id.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getIdBytes() {
      java.lang.Object ref = id_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        id_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
  
    public static final int CONTEXT_ID_FIELD_NUMBER = 2;
    @SuppressWarnings("serial")
    private volatile java.lang.Object contextId_ = "";
    /**
     * <pre>
     * Unique identifier for the contextual collection of interactions (tasks
     * and messages). Created by the A2A server.
     * </pre>
     *
     * <code>string context_id = 2;</code>
     * @return The contextId.
     */
    @java.lang.Override
    public java.lang.String getContextId() {
      java.lang.Object ref = contextId_;
      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();
        contextId_ = s;
        return s;
      }
    }
    /**
     * <pre>
     * Unique identifier for the contextual collection of interactions (tasks
     * and messages). Created by the A2A server.
     * </pre>
     *
     * <code>string context_id = 2;</code>
     * @return The bytes for contextId.
     */
    @java.lang.Override
    public com.google.protobuf.ByteString
        getContextIdBytes() {
      java.lang.Object ref = contextId_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        contextId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
  
    public static final int STATUS_FIELD_NUMBER = 3;
    private io.a2a.grpc.TaskStatus status_;
    /**
     * <pre>
     * The current status of a Task, including state and a message.
     * </pre>
     *
     * <code>.a2a.v1.TaskStatus status = 3;</code>
     * @return Whether the status field is set.
     */
    @java.lang.Override
    public boolean hasStatus() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <pre>
     * The current status of a Task, including state and a message.
     * </pre>
     *
     * <code>.a2a.v1.TaskStatus status = 3;</code>
     * @return The status.
     */
    @java.lang.Override
    public io.a2a.grpc.TaskStatus getStatus() {
      return status_ == null ? io.a2a.grpc.TaskStatus.getDefaultInstance() : status_;
    }
    /**
     * <pre>
     * The current status of a Task, including state and a message.
     * </pre>
     *
     * <code>.a2a.v1.TaskStatus status = 3;</code>
     */
    @java.lang.Override
    public io.a2a.grpc.TaskStatusOrBuilder getStatusOrBuilder() {
      return status_ == null ? io.a2a.grpc.TaskStatus.getDefaultInstance() : status_;
    }
  
    public static final int ARTIFACTS_FIELD_NUMBER = 4;
    @SuppressWarnings("serial")
    private java.util.List<io.a2a.grpc.Artifact> artifacts_;
    /**
     * <pre>
     * A set of output artifacts for a Task.
     * </pre>
     *
     * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
     */
    @java.lang.Override
    public java.util.List<io.a2a.grpc.Artifact> getArtifactsList() {
      return artifacts_;
    }
    /**
     * <pre>
     * A set of output artifacts for a Task.
     * </pre>
     *
     * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
     */
    @java.lang.Override
    public java.util.List<? extends io.a2a.grpc.ArtifactOrBuilder> 
        getArtifactsOrBuilderList() {
      return artifacts_;
    }
    /**
     * <pre>
     * A set of output artifacts for a Task.
     * </pre>
     *
     * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
     */
    @java.lang.Override
    public int getArtifactsCount() {
      return artifacts_.size();
    }
    /**
     * <pre>
     * A set of output artifacts for a Task.
     * </pre>
     *
     * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
     */
    @java.lang.Override
    public io.a2a.grpc.Artifact getArtifacts(int index) {
      return artifacts_.get(index);
    }
    /**
     * <pre>
     * A set of output artifacts for a Task.
     * </pre>
     *
     * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
     */
    @java.lang.Override
    public io.a2a.grpc.ArtifactOrBuilder getArtifactsOrBuilder(
        int index) {
      return artifacts_.get(index);
    }
  
    public static final int HISTORY_FIELD_NUMBER = 5;
    @SuppressWarnings("serial")
    private java.util.List<io.a2a.grpc.Message> history_;
    /**
     * <pre>
     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
     * The history of interactions from a task.
     * </pre>
     *
     * <code>repeated .a2a.v1.Message history = 5;</code>
     */
    @java.lang.Override
    public java.util.List<io.a2a.grpc.Message> getHistoryList() {
      return history_;
    }
    /**
     * <pre>
     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
     * The history of interactions from a task.
     * </pre>
     *
     * <code>repeated .a2a.v1.Message history = 5;</code>
     */
    @java.lang.Override
    public java.util.List<? extends io.a2a.grpc.MessageOrBuilder> 
        getHistoryOrBuilderList() {
      return history_;
    }
    /**
     * <pre>
     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
     * The history of interactions from a task.
     * </pre>
     *
     * <code>repeated .a2a.v1.Message history = 5;</code>
     */
    @java.lang.Override
    public int getHistoryCount() {
      return history_.size();
    }
    /**
     * <pre>
     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
     * The history of interactions from a task.
     * </pre>
     *
     * <code>repeated .a2a.v1.Message history = 5;</code>
     */
    @java.lang.Override
    public io.a2a.grpc.Message getHistory(int index) {
      return history_.get(index);
    }
    /**
     * <pre>
     * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
     * The history of interactions from a task.
     * </pre>
     *
     * <code>repeated .a2a.v1.Message history = 5;</code>
     */
    @java.lang.Override
    public io.a2a.grpc.MessageOrBuilder getHistoryOrBuilder(
        int index) {
      return history_.get(index);
    }
  
    public static final int METADATA_FIELD_NUMBER = 6;
    private com.google.protobuf.Struct metadata_;
    /**
     * <pre>
     * protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
     * A key/value object to store custom metadata about a task.
     * </pre>
     *
     * <code>.google.protobuf.Struct metadata = 6;</code>
     * @return Whether the metadata field is set.
     */
    @java.lang.Override
    public boolean hasMetadata() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * <pre>
     * protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
     * A key/value object to store custom metadata about a task.
     * </pre>
     *
     * <code>.google.protobuf.Struct metadata = 6;</code>
     * @return The metadata.
     */
    @java.lang.Override
    public com.google.protobuf.Struct getMetadata() {
      return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_;
    }
    /**
     * <pre>
     * protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
     * A key/value object to store custom metadata about a task.
     * </pre>
     *
     * <code>.google.protobuf.Struct metadata = 6;</code>
     */
    @java.lang.Override
    public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {
      return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_;
    }
  
    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 (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {
        com.google.protobuf.GeneratedMessage.writeString(output, 1, id_);
      }
      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(contextId_)) {
        com.google.protobuf.GeneratedMessage.writeString(output, 2, contextId_);
      }
      if (((bitField0_ & 0x00000001) != 0)) {
        output.writeMessage(3, getStatus());
      }
      for (int i = 0; i < artifacts_.size(); i++) {
        output.writeMessage(4, artifacts_.get(i));
      }
      for (int i = 0; i < history_.size(); i++) {
        output.writeMessage(5, history_.get(i));
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        output.writeMessage(6, getMetadata());
      }
      getUnknownFields().writeTo(output);
    }
  
    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;
  
      size = 0;
      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(id_)) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(1, id_);
      }
      if (!com.google.protobuf.GeneratedMessage.isStringEmpty(contextId_)) {
        size += com.google.protobuf.GeneratedMessage.computeStringSize(2, contextId_);
      }
      if (((bitField0_ & 0x00000001) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, getStatus());
      }
      for (int i = 0; i < artifacts_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, artifacts_.get(i));
      }
      for (int i = 0; i < history_.size(); i++) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(5, history_.get(i));
      }
      if (((bitField0_ & 0x00000002) != 0)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(6, getMetadata());
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSize = size;
      return size;
    }
  
    @java.lang.Override
    public boolean equals(final java.lang.Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof io.a2a.grpc.Task)) {
        return super.equals(obj);
      }
      io.a2a.grpc.Task other = (io.a2a.grpc.Task) obj;
  
      if (!getId()
          .equals(other.getId())) return false;
      if (!getContextId()
          .equals(other.getContextId())) return false;
      if (hasStatus() != other.hasStatus()) return false;
      if (hasStatus()) {
        if (!getStatus()
            .equals(other.getStatus())) return false;
      }
      if (!getArtifactsList()
          .equals(other.getArtifactsList())) return false;
      if (!getHistoryList()
          .equals(other.getHistoryList())) return false;
      if (hasMetadata() != other.hasMetadata()) return false;
      if (hasMetadata()) {
        if (!getMetadata()
            .equals(other.getMetadata())) return false;
      }
      if (!getUnknownFields().equals(other.getUnknownFields())) return false;
      return true;
    }
  
    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + ID_FIELD_NUMBER;
      hash = (53 * hash) + getId().hashCode();
      hash = (37 * hash) + CONTEXT_ID_FIELD_NUMBER;
      hash = (53 * hash) + getContextId().hashCode();
      if (hasStatus()) {
        hash = (37 * hash) + STATUS_FIELD_NUMBER;
        hash = (53 * hash) + getStatus().hashCode();
      }
      if (getArtifactsCount() > 0) {
        hash = (37 * hash) + ARTIFACTS_FIELD_NUMBER;
        hash = (53 * hash) + getArtifactsList().hashCode();
      }
      if (getHistoryCount() > 0) {
        hash = (37 * hash) + HISTORY_FIELD_NUMBER;
        hash = (53 * hash) + getHistoryList().hashCode();
      }
      if (hasMetadata()) {
        hash = (37 * hash) + METADATA_FIELD_NUMBER;
        hash = (53 * hash) + getMetadata().hashCode();
      }
      hash = (29 * hash) + getUnknownFields().hashCode();
      memoizedHashCode = hash;
      return hash;
    }
  
    public static io.a2a.grpc.Task parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.a2a.grpc.Task parseFrom(
        java.nio.ByteBuffer data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.a2a.grpc.Task parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.a2a.grpc.Task parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.a2a.grpc.Task parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.a2a.grpc.Task parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data, extensionRegistry);
    }
    public static io.a2a.grpc.Task parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static io.a2a.grpc.Task parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
  
    public static io.a2a.grpc.Task parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input);
    }
  
    public static io.a2a.grpc.Task parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
    }
    public static io.a2a.grpc.Task parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input);
    }
    public static io.a2a.grpc.Task parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessage
          .parseWithIOException(PARSER, input, extensionRegistry);
    }
  
    @java.lang.Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(io.a2a.grpc.Task 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.GeneratedMessage.BuilderParent parent) {
      Builder builder = new Builder(parent);
      return builder;
    }
    /**
     * <pre>
     * Task is the core unit of action for A2A. It has a current status
     * and when results are created for the task they are stored in the
     * artifact. If there are multiple turns for a task, these are stored in
     * history.
     * </pre>
     *
     * Protobuf type {@code a2a.v1.Task}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:a2a.v1.Task)
        io.a2a.grpc.TaskOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return io.a2a.grpc.A2A.internal_static_a2a_v1_Task_descriptor;
      }
  
      @java.lang.Override
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return io.a2a.grpc.A2A.internal_static_a2a_v1_Task_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                io.a2a.grpc.Task.class, io.a2a.grpc.Task.Builder.class);
      }
  
      // Construct using io.a2a.grpc.Task.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }
  
      private Builder(
          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
        super(parent);
        maybeForceBuilderInitialization();
      }
      private void maybeForceBuilderInitialization() {
        if (com.google.protobuf.GeneratedMessage
                .alwaysUseFieldBuilders) {
          internalGetStatusFieldBuilder();
          internalGetArtifactsFieldBuilder();
          internalGetHistoryFieldBuilder();
          internalGetMetadataFieldBuilder();
        }
      }
      @java.lang.Override
      public Builder clear() {
        super.clear();
        bitField0_ = 0;
        id_ = "";
        contextId_ = "";
        status_ = null;
        if (statusBuilder_ != null) {
          statusBuilder_.dispose();
          statusBuilder_ = null;
        }
        if (artifactsBuilder_ == null) {
          artifacts_ = java.util.Collections.emptyList();
        } else {
          artifacts_ = null;
          artifactsBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000008);
        if (historyBuilder_ == null) {
          history_ = java.util.Collections.emptyList();
        } else {
          history_ = null;
          historyBuilder_.clear();
        }
        bitField0_ = (bitField0_ & ~0x00000010);
        metadata_ = null;
        if (metadataBuilder_ != null) {
          metadataBuilder_.dispose();
          metadataBuilder_ = null;
        }
        return this;
      }
  
      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return io.a2a.grpc.A2A.internal_static_a2a_v1_Task_descriptor;
      }
  
      @java.lang.Override
      public io.a2a.grpc.Task getDefaultInstanceForType() {
        return io.a2a.grpc.Task.getDefaultInstance();
      }
  
      @java.lang.Override
      public io.a2a.grpc.Task build() {
        io.a2a.grpc.Task result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }
  
      @java.lang.Override
      public io.a2a.grpc.Task buildPartial() {
        io.a2a.grpc.Task result = new io.a2a.grpc.Task(this);
        buildPartialRepeatedFields(result);
        if (bitField0_ != 0) { buildPartial0(result); }
        onBuilt();
        return result;
      }
  
      private void buildPartialRepeatedFields(io.a2a.grpc.Task result) {
        if (artifactsBuilder_ == null) {
          if (((bitField0_ & 0x00000008) != 0)) {
            artifacts_ = java.util.Collections.unmodifiableList(artifacts_);
            bitField0_ = (bitField0_ & ~0x00000008);
          }
          result.artifacts_ = artifacts_;
        } else {
          result.artifacts_ = artifactsBuilder_.build();
        }
        if (historyBuilder_ == null) {
          if (((bitField0_ & 0x00000010) != 0)) {
            history_ = java.util.Collections.unmodifiableList(history_);
            bitField0_ = (bitField0_ & ~0x00000010);
          }
          result.history_ = history_;
        } else {
          result.history_ = historyBuilder_.build();
        }
      }
  
      private void buildPartial0(io.a2a.grpc.Task result) {
        int from_bitField0_ = bitField0_;
        if (((from_bitField0_ & 0x00000001) != 0)) {
          result.id_ = id_;
        }
        if (((from_bitField0_ & 0x00000002) != 0)) {
          result.contextId_ = contextId_;
        }
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000004) != 0)) {
          result.status_ = statusBuilder_ == null
              ? status_
              : statusBuilder_.build();
          to_bitField0_ |= 0x00000001;
        }
        if (((from_bitField0_ & 0x00000020) != 0)) {
          result.metadata_ = metadataBuilder_ == null
              ? metadata_
              : metadataBuilder_.build();
          to_bitField0_ |= 0x00000002;
        }
        result.bitField0_ |= to_bitField0_;
      }
  
      @java.lang.Override
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof io.a2a.grpc.Task) {
          return mergeFrom((io.a2a.grpc.Task)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }
  
      public Builder mergeFrom(io.a2a.grpc.Task other) {
        if (other == io.a2a.grpc.Task.getDefaultInstance()) return this;
        if (!other.getId().isEmpty()) {
          id_ = other.id_;
          bitField0_ |= 0x00000001;
          onChanged();
        }
        if (!other.getContextId().isEmpty()) {
          contextId_ = other.contextId_;
          bitField0_ |= 0x00000002;
          onChanged();
        }
        if (other.hasStatus()) {
          mergeStatus(other.getStatus());
        }
        if (artifactsBuilder_ == null) {
          if (!other.artifacts_.isEmpty()) {
            if (artifacts_.isEmpty()) {
              artifacts_ = other.artifacts_;
              bitField0_ = (bitField0_ & ~0x00000008);
            } else {
              ensureArtifactsIsMutable();
              artifacts_.addAll(other.artifacts_);
            }
            onChanged();
          }
        } else {
          if (!other.artifacts_.isEmpty()) {
            if (artifactsBuilder_.isEmpty()) {
              artifactsBuilder_.dispose();
              artifactsBuilder_ = null;
              artifacts_ = other.artifacts_;
              bitField0_ = (bitField0_ & ~0x00000008);
              artifactsBuilder_ = 
                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                   internalGetArtifactsFieldBuilder() : null;
            } else {
              artifactsBuilder_.addAllMessages(other.artifacts_);
            }
          }
        }
        if (historyBuilder_ == null) {
          if (!other.history_.isEmpty()) {
            if (history_.isEmpty()) {
              history_ = other.history_;
              bitField0_ = (bitField0_ & ~0x00000010);
            } else {
              ensureHistoryIsMutable();
              history_.addAll(other.history_);
            }
            onChanged();
          }
        } else {
          if (!other.history_.isEmpty()) {
            if (historyBuilder_.isEmpty()) {
              historyBuilder_.dispose();
              historyBuilder_ = null;
              history_ = other.history_;
              bitField0_ = (bitField0_ & ~0x00000010);
              historyBuilder_ = 
                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
                   internalGetHistoryFieldBuilder() : null;
            } else {
              historyBuilder_.addAllMessages(other.history_);
            }
          }
        }
        if (other.hasMetadata()) {
          mergeMetadata(other.getMetadata());
        }
        this.mergeUnknownFields(other.getUnknownFields());
        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 {
        if (extensionRegistry == null) {
          throw new java.lang.NullPointerException();
        }
        try {
          boolean done = false;
          while (!done) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                done = true;
                break;
              case 10: {
                id_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 10
              case 18: {
                contextId_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000002;
                break;
              } // case 18
              case 26: {
                input.readMessage(
                    internalGetStatusFieldBuilder().getBuilder(),
                    extensionRegistry);
                bitField0_ |= 0x00000004;
                break;
              } // case 26
              case 34: {
                io.a2a.grpc.Artifact m =
                    input.readMessage(
                        io.a2a.grpc.Artifact.parser(),
                        extensionRegistry);
                if (artifactsBuilder_ == null) {
                  ensureArtifactsIsMutable();
                  artifacts_.add(m);
                } else {
                  artifactsBuilder_.addMessage(m);
                }
                break;
              } // case 34
              case 42: {
                io.a2a.grpc.Message m =
                    input.readMessage(
                        io.a2a.grpc.Message.parser(),
                        extensionRegistry);
                if (historyBuilder_ == null) {
                  ensureHistoryIsMutable();
                  history_.add(m);
                } else {
                  historyBuilder_.addMessage(m);
                }
                break;
              } // case 42
              case 50: {
                input.readMessage(
                    internalGetMetadataFieldBuilder().getBuilder(),
                    extensionRegistry);
                bitField0_ |= 0x00000020;
                break;
              } // case 50
              default: {
                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                  done = true; // was an endgroup tag
                }
                break;
              } // default:
            } // switch (tag)
          } // while (!done)
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.unwrapIOException();
        } finally {
          onChanged();
        } // finally
        return this;
      }
      private int bitField0_;
  
      private java.lang.Object id_ = "";
      /**
       * <pre>
       * Unique identifier for a task, created by the A2A server.
       * </pre>
       *
       * <code>string id = 1;</code>
       * @return The id.
       */
      public java.lang.String getId() {
        java.lang.Object ref = id_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          id_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * Unique identifier for a task, created by the A2A server.
       * </pre>
       *
       * <code>string id = 1;</code>
       * @return The bytes for id.
       */
      public com.google.protobuf.ByteString
          getIdBytes() {
        java.lang.Object ref = id_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          id_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * Unique identifier for a task, created by the A2A server.
       * </pre>
       *
       * <code>string id = 1;</code>
       * @param value The id to set.
       * @return This builder for chaining.
       */
      public Builder setId(
          java.lang.String value) {
        if (value == null) { throw new NullPointerException(); }
        id_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Unique identifier for a task, created by the A2A server.
       * </pre>
       *
       * <code>string id = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearId() {
        id_ = getDefaultInstance().getId();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Unique identifier for a task, created by the A2A server.
       * </pre>
       *
       * <code>string id = 1;</code>
       * @param value The bytes for id to set.
       * @return This builder for chaining.
       */
      public Builder setIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) { throw new NullPointerException(); }
        checkByteStringIsUtf8(value);
        id_ = value;
        bitField0_ |= 0x00000001;
        onChanged();
        return this;
      }
  
      private java.lang.Object contextId_ = "";
      /**
       * <pre>
       * Unique identifier for the contextual collection of interactions (tasks
       * and messages). Created by the A2A server.
       * </pre>
       *
       * <code>string context_id = 2;</code>
       * @return The contextId.
       */
      public java.lang.String getContextId() {
        java.lang.Object ref = contextId_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          contextId_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <pre>
       * Unique identifier for the contextual collection of interactions (tasks
       * and messages). Created by the A2A server.
       * </pre>
       *
       * <code>string context_id = 2;</code>
       * @return The bytes for contextId.
       */
      public com.google.protobuf.ByteString
          getContextIdBytes() {
        java.lang.Object ref = contextId_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          contextId_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <pre>
       * Unique identifier for the contextual collection of interactions (tasks
       * and messages). Created by the A2A server.
       * </pre>
       *
       * <code>string context_id = 2;</code>
       * @param value The contextId to set.
       * @return This builder for chaining.
       */
      public Builder setContextId(
          java.lang.String value) {
        if (value == null) { throw new NullPointerException(); }
        contextId_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Unique identifier for the contextual collection of interactions (tasks
       * and messages). Created by the A2A server.
       * </pre>
       *
       * <code>string context_id = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearContextId() {
        contextId_ = getDefaultInstance().getContextId();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
        return this;
      }
      /**
       * <pre>
       * Unique identifier for the contextual collection of interactions (tasks
       * and messages). Created by the A2A server.
       * </pre>
       *
       * <code>string context_id = 2;</code>
       * @param value The bytes for contextId to set.
       * @return This builder for chaining.
       */
      public Builder setContextIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) { throw new NullPointerException(); }
        checkByteStringIsUtf8(value);
        contextId_ = value;
        bitField0_ |= 0x00000002;
        onChanged();
        return this;
      }
  
      private io.a2a.grpc.TaskStatus status_;
      private com.google.protobuf.SingleFieldBuilder<
          io.a2a.grpc.TaskStatus, io.a2a.grpc.TaskStatus.Builder, io.a2a.grpc.TaskStatusOrBuilder> statusBuilder_;
      /**
       * <pre>
       * The current status of a Task, including state and a message.
       * </pre>
       *
       * <code>.a2a.v1.TaskStatus status = 3;</code>
       * @return Whether the status field is set.
       */
      public boolean hasStatus() {
        return ((bitField0_ & 0x00000004) != 0);
      }
      /**
       * <pre>
       * The current status of a Task, including state and a message.
       * </pre>
       *
       * <code>.a2a.v1.TaskStatus status = 3;</code>
       * @return The status.
       */
      public io.a2a.grpc.TaskStatus getStatus() {
        if (statusBuilder_ == null) {
          return status_ == null ? io.a2a.grpc.TaskStatus.getDefaultInstance() : status_;
        } else {
          return statusBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * The current status of a Task, including state and a message.
       * </pre>
       *
       * <code>.a2a.v1.TaskStatus status = 3;</code>
       */
      public Builder setStatus(io.a2a.grpc.TaskStatus value) {
        if (statusBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          status_ = value;
        } else {
          statusBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The current status of a Task, including state and a message.
       * </pre>
       *
       * <code>.a2a.v1.TaskStatus status = 3;</code>
       */
      public Builder setStatus(
          io.a2a.grpc.TaskStatus.Builder builderForValue) {
        if (statusBuilder_ == null) {
          status_ = builderForValue.build();
        } else {
          statusBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000004;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The current status of a Task, including state and a message.
       * </pre>
       *
       * <code>.a2a.v1.TaskStatus status = 3;</code>
       */
      public Builder mergeStatus(io.a2a.grpc.TaskStatus value) {
        if (statusBuilder_ == null) {
          if (((bitField0_ & 0x00000004) != 0) &&
            status_ != null &&
            status_ != io.a2a.grpc.TaskStatus.getDefaultInstance()) {
            getStatusBuilder().mergeFrom(value);
          } else {
            status_ = value;
          }
        } else {
          statusBuilder_.mergeFrom(value);
        }
        if (status_ != null) {
          bitField0_ |= 0x00000004;
          onChanged();
        }
        return this;
      }
      /**
       * <pre>
       * The current status of a Task, including state and a message.
       * </pre>
       *
       * <code>.a2a.v1.TaskStatus status = 3;</code>
       */
      public Builder clearStatus() {
        bitField0_ = (bitField0_ & ~0x00000004);
        status_ = null;
        if (statusBuilder_ != null) {
          statusBuilder_.dispose();
          statusBuilder_ = null;
        }
        onChanged();
        return this;
      }
      /**
       * <pre>
       * The current status of a Task, including state and a message.
       * </pre>
       *
       * <code>.a2a.v1.TaskStatus status = 3;</code>
       */
      public io.a2a.grpc.TaskStatus.Builder getStatusBuilder() {
        bitField0_ |= 0x00000004;
        onChanged();
        return internalGetStatusFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * The current status of a Task, including state and a message.
       * </pre>
       *
       * <code>.a2a.v1.TaskStatus status = 3;</code>
       */
      public io.a2a.grpc.TaskStatusOrBuilder getStatusOrBuilder() {
        if (statusBuilder_ != null) {
          return statusBuilder_.getMessageOrBuilder();
        } else {
          return status_ == null ?
              io.a2a.grpc.TaskStatus.getDefaultInstance() : status_;
        }
      }
      /**
       * <pre>
       * The current status of a Task, including state and a message.
       * </pre>
       *
       * <code>.a2a.v1.TaskStatus status = 3;</code>
       */
      private com.google.protobuf.SingleFieldBuilder<
          io.a2a.grpc.TaskStatus, io.a2a.grpc.TaskStatus.Builder, io.a2a.grpc.TaskStatusOrBuilder> 
          internalGetStatusFieldBuilder() {
        if (statusBuilder_ == null) {
          statusBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              io.a2a.grpc.TaskStatus, io.a2a.grpc.TaskStatus.Builder, io.a2a.grpc.TaskStatusOrBuilder>(
                  getStatus(),
                  getParentForChildren(),
                  isClean());
          status_ = null;
        }
        return statusBuilder_;
      }
  
      private java.util.List<io.a2a.grpc.Artifact> artifacts_ =
        java.util.Collections.emptyList();
      private void ensureArtifactsIsMutable() {
        if (!((bitField0_ & 0x00000008) != 0)) {
          artifacts_ = new java.util.ArrayList<io.a2a.grpc.Artifact>(artifacts_);
          bitField0_ |= 0x00000008;
         }
      }
  
      private com.google.protobuf.RepeatedFieldBuilder<
          io.a2a.grpc.Artifact, io.a2a.grpc.Artifact.Builder, io.a2a.grpc.ArtifactOrBuilder> artifactsBuilder_;
  
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public java.util.List<io.a2a.grpc.Artifact> getArtifactsList() {
        if (artifactsBuilder_ == null) {
          return java.util.Collections.unmodifiableList(artifacts_);
        } else {
          return artifactsBuilder_.getMessageList();
        }
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public int getArtifactsCount() {
        if (artifactsBuilder_ == null) {
          return artifacts_.size();
        } else {
          return artifactsBuilder_.getCount();
        }
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public io.a2a.grpc.Artifact getArtifacts(int index) {
        if (artifactsBuilder_ == null) {
          return artifacts_.get(index);
        } else {
          return artifactsBuilder_.getMessage(index);
        }
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public Builder setArtifacts(
          int index, io.a2a.grpc.Artifact value) {
        if (artifactsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureArtifactsIsMutable();
          artifacts_.set(index, value);
          onChanged();
        } else {
          artifactsBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public Builder setArtifacts(
          int index, io.a2a.grpc.Artifact.Builder builderForValue) {
        if (artifactsBuilder_ == null) {
          ensureArtifactsIsMutable();
          artifacts_.set(index, builderForValue.build());
          onChanged();
        } else {
          artifactsBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public Builder addArtifacts(io.a2a.grpc.Artifact value) {
        if (artifactsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureArtifactsIsMutable();
          artifacts_.add(value);
          onChanged();
        } else {
          artifactsBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public Builder addArtifacts(
          int index, io.a2a.grpc.Artifact value) {
        if (artifactsBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureArtifactsIsMutable();
          artifacts_.add(index, value);
          onChanged();
        } else {
          artifactsBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public Builder addArtifacts(
          io.a2a.grpc.Artifact.Builder builderForValue) {
        if (artifactsBuilder_ == null) {
          ensureArtifactsIsMutable();
          artifacts_.add(builderForValue.build());
          onChanged();
        } else {
          artifactsBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public Builder addArtifacts(
          int index, io.a2a.grpc.Artifact.Builder builderForValue) {
        if (artifactsBuilder_ == null) {
          ensureArtifactsIsMutable();
          artifacts_.add(index, builderForValue.build());
          onChanged();
        } else {
          artifactsBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public Builder addAllArtifacts(
          java.lang.Iterable<? extends io.a2a.grpc.Artifact> values) {
        if (artifactsBuilder_ == null) {
          ensureArtifactsIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, artifacts_);
          onChanged();
        } else {
          artifactsBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public Builder clearArtifacts() {
        if (artifactsBuilder_ == null) {
          artifacts_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000008);
          onChanged();
        } else {
          artifactsBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public Builder removeArtifacts(int index) {
        if (artifactsBuilder_ == null) {
          ensureArtifactsIsMutable();
          artifacts_.remove(index);
          onChanged();
        } else {
          artifactsBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public io.a2a.grpc.Artifact.Builder getArtifactsBuilder(
          int index) {
        return internalGetArtifactsFieldBuilder().getBuilder(index);
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public io.a2a.grpc.ArtifactOrBuilder getArtifactsOrBuilder(
          int index) {
        if (artifactsBuilder_ == null) {
          return artifacts_.get(index);  } else {
          return artifactsBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public java.util.List<? extends io.a2a.grpc.ArtifactOrBuilder> 
           getArtifactsOrBuilderList() {
        if (artifactsBuilder_ != null) {
          return artifactsBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(artifacts_);
        }
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public io.a2a.grpc.Artifact.Builder addArtifactsBuilder() {
        return internalGetArtifactsFieldBuilder().addBuilder(
            io.a2a.grpc.Artifact.getDefaultInstance());
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public io.a2a.grpc.Artifact.Builder addArtifactsBuilder(
          int index) {
        return internalGetArtifactsFieldBuilder().addBuilder(
            index, io.a2a.grpc.Artifact.getDefaultInstance());
      }
      /**
       * <pre>
       * A set of output artifacts for a Task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Artifact artifacts = 4;</code>
       */
      public java.util.List<io.a2a.grpc.Artifact.Builder> 
           getArtifactsBuilderList() {
        return internalGetArtifactsFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilder<
          io.a2a.grpc.Artifact, io.a2a.grpc.Artifact.Builder, io.a2a.grpc.ArtifactOrBuilder> 
          internalGetArtifactsFieldBuilder() {
        if (artifactsBuilder_ == null) {
          artifactsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
              io.a2a.grpc.Artifact, io.a2a.grpc.Artifact.Builder, io.a2a.grpc.ArtifactOrBuilder>(
                  artifacts_,
                  ((bitField0_ & 0x00000008) != 0),
                  getParentForChildren(),
                  isClean());
          artifacts_ = null;
        }
        return artifactsBuilder_;
      }
  
      private java.util.List<io.a2a.grpc.Message> history_ =
        java.util.Collections.emptyList();
      private void ensureHistoryIsMutable() {
        if (!((bitField0_ & 0x00000010) != 0)) {
          history_ = new java.util.ArrayList<io.a2a.grpc.Message>(history_);
          bitField0_ |= 0x00000010;
         }
      }
  
      private com.google.protobuf.RepeatedFieldBuilder<
          io.a2a.grpc.Message, io.a2a.grpc.Message.Builder, io.a2a.grpc.MessageOrBuilder> historyBuilder_;
  
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public java.util.List<io.a2a.grpc.Message> getHistoryList() {
        if (historyBuilder_ == null) {
          return java.util.Collections.unmodifiableList(history_);
        } else {
          return historyBuilder_.getMessageList();
        }
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public int getHistoryCount() {
        if (historyBuilder_ == null) {
          return history_.size();
        } else {
          return historyBuilder_.getCount();
        }
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public io.a2a.grpc.Message getHistory(int index) {
        if (historyBuilder_ == null) {
          return history_.get(index);
        } else {
          return historyBuilder_.getMessage(index);
        }
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public Builder setHistory(
          int index, io.a2a.grpc.Message value) {
        if (historyBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureHistoryIsMutable();
          history_.set(index, value);
          onChanged();
        } else {
          historyBuilder_.setMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public Builder setHistory(
          int index, io.a2a.grpc.Message.Builder builderForValue) {
        if (historyBuilder_ == null) {
          ensureHistoryIsMutable();
          history_.set(index, builderForValue.build());
          onChanged();
        } else {
          historyBuilder_.setMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public Builder addHistory(io.a2a.grpc.Message value) {
        if (historyBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureHistoryIsMutable();
          history_.add(value);
          onChanged();
        } else {
          historyBuilder_.addMessage(value);
        }
        return this;
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public Builder addHistory(
          int index, io.a2a.grpc.Message value) {
        if (historyBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          ensureHistoryIsMutable();
          history_.add(index, value);
          onChanged();
        } else {
          historyBuilder_.addMessage(index, value);
        }
        return this;
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public Builder addHistory(
          io.a2a.grpc.Message.Builder builderForValue) {
        if (historyBuilder_ == null) {
          ensureHistoryIsMutable();
          history_.add(builderForValue.build());
          onChanged();
        } else {
          historyBuilder_.addMessage(builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public Builder addHistory(
          int index, io.a2a.grpc.Message.Builder builderForValue) {
        if (historyBuilder_ == null) {
          ensureHistoryIsMutable();
          history_.add(index, builderForValue.build());
          onChanged();
        } else {
          historyBuilder_.addMessage(index, builderForValue.build());
        }
        return this;
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public Builder addAllHistory(
          java.lang.Iterable<? extends io.a2a.grpc.Message> values) {
        if (historyBuilder_ == null) {
          ensureHistoryIsMutable();
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
              values, history_);
          onChanged();
        } else {
          historyBuilder_.addAllMessages(values);
        }
        return this;
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public Builder clearHistory() {
        if (historyBuilder_ == null) {
          history_ = java.util.Collections.emptyList();
          bitField0_ = (bitField0_ & ~0x00000010);
          onChanged();
        } else {
          historyBuilder_.clear();
        }
        return this;
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public Builder removeHistory(int index) {
        if (historyBuilder_ == null) {
          ensureHistoryIsMutable();
          history_.remove(index);
          onChanged();
        } else {
          historyBuilder_.remove(index);
        }
        return this;
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public io.a2a.grpc.Message.Builder getHistoryBuilder(
          int index) {
        return internalGetHistoryFieldBuilder().getBuilder(index);
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public io.a2a.grpc.MessageOrBuilder getHistoryOrBuilder(
          int index) {
        if (historyBuilder_ == null) {
          return history_.get(index);  } else {
          return historyBuilder_.getMessageOrBuilder(index);
        }
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public java.util.List<? extends io.a2a.grpc.MessageOrBuilder> 
           getHistoryOrBuilderList() {
        if (historyBuilder_ != null) {
          return historyBuilder_.getMessageOrBuilderList();
        } else {
          return java.util.Collections.unmodifiableList(history_);
        }
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public io.a2a.grpc.Message.Builder addHistoryBuilder() {
        return internalGetHistoryFieldBuilder().addBuilder(
            io.a2a.grpc.Message.getDefaultInstance());
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public io.a2a.grpc.Message.Builder addHistoryBuilder(
          int index) {
        return internalGetHistoryFieldBuilder().addBuilder(
            index, io.a2a.grpc.Message.getDefaultInstance());
      }
      /**
       * <pre>
       * protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       * The history of interactions from a task.
       * </pre>
       *
       * <code>repeated .a2a.v1.Message history = 5;</code>
       */
      public java.util.List<io.a2a.grpc.Message.Builder> 
           getHistoryBuilderList() {
        return internalGetHistoryFieldBuilder().getBuilderList();
      }
      private com.google.protobuf.RepeatedFieldBuilder<
          io.a2a.grpc.Message, io.a2a.grpc.Message.Builder, io.a2a.grpc.MessageOrBuilder> 
          internalGetHistoryFieldBuilder() {
        if (historyBuilder_ == null) {
          historyBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<
              io.a2a.grpc.Message, io.a2a.grpc.Message.Builder, io.a2a.grpc.MessageOrBuilder>(
                  history_,
                  ((bitField0_ & 0x00000010) != 0),
                  getParentForChildren(),
                  isClean());
          history_ = null;
        }
        return historyBuilder_;
      }
  
      private com.google.protobuf.Struct metadata_;
      private com.google.protobuf.SingleFieldBuilder<
          com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> metadataBuilder_;
      /**
       * <pre>
       * protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
       * A key/value object to store custom metadata about a task.
       * </pre>
       *
       * <code>.google.protobuf.Struct metadata = 6;</code>
       * @return Whether the metadata field is set.
       */
      public boolean hasMetadata() {
        return ((bitField0_ & 0x00000020) != 0);
      }
      /**
       * <pre>
       * protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
       * A key/value object to store custom metadata about a task.
       * </pre>
       *
       * <code>.google.protobuf.Struct metadata = 6;</code>
       * @return The metadata.
       */
      public com.google.protobuf.Struct getMetadata() {
        if (metadataBuilder_ == null) {
          return metadata_ == null ? com.google.protobuf.Struct.getDefaultInstance() : metadata_;
        } else {
          return metadataBuilder_.getMessage();
        }
      }
      /**
       * <pre>
       * protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
       * A key/value object to store custom metadata about a task.
       * </pre>
       *
       * <code>.google.protobuf.Struct metadata = 6;</code>
       */
      public Builder setMetadata(com.google.protobuf.Struct value) {
        if (metadataBuilder_ == null) {
          if (value == null) {
            throw new NullPointerException();
          }
          metadata_ = value;
        } else {
          metadataBuilder_.setMessage(value);
        }
        bitField0_ |= 0x00000020;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
       * A key/value object to store custom metadata about a task.
       * </pre>
       *
       * <code>.google.protobuf.Struct metadata = 6;</code>
       */
      public Builder setMetadata(
          com.google.protobuf.Struct.Builder builderForValue) {
        if (metadataBuilder_ == null) {
          metadata_ = builderForValue.build();
        } else {
          metadataBuilder_.setMessage(builderForValue.build());
        }
        bitField0_ |= 0x00000020;
        onChanged();
        return this;
      }
      /**
       * <pre>
       * protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
       * A key/value object to store custom metadata about a task.
       * </pre>
       *
       * <code>.google.protobuf.Struct metadata = 6;</code>
       */
      public Builder mergeMetadata(com.google.protobuf.Struct value) {
        if (metadataBuilder_ == null) {
          if (((bitField0_ & 0x00000020) != 0) &&
            metadata_ != null &&
            metadata_ != com.google.protobuf.Struct.getDefaultInstance()) {
            getMetadataBuilder().mergeFrom(value);
          } else {
            metadata_ = value;
          }
        } else {
          metadataBuilder_.mergeFrom(value);
        }
        if (metadata_ != null) {
          bitField0_ |= 0x00000020;
          onChanged();
        }
        return this;
      }
      /**
       * <pre>
       * protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
       * A key/value object to store custom metadata about a task.
       * </pre>
       *
       * <code>.google.protobuf.Struct metadata = 6;</code>
       */
      public Builder clearMetadata() {
        bitField0_ = (bitField0_ & ~0x00000020);
        metadata_ = null;
        if (metadataBuilder_ != null) {
          metadataBuilder_.dispose();
          metadataBuilder_ = null;
        }
        onChanged();
        return this;
      }
      /**
       * <pre>
       * protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
       * A key/value object to store custom metadata about a task.
       * </pre>
       *
       * <code>.google.protobuf.Struct metadata = 6;</code>
       */
      public com.google.protobuf.Struct.Builder getMetadataBuilder() {
        bitField0_ |= 0x00000020;
        onChanged();
        return internalGetMetadataFieldBuilder().getBuilder();
      }
      /**
       * <pre>
       * protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
       * A key/value object to store custom metadata about a task.
       * </pre>
       *
       * <code>.google.protobuf.Struct metadata = 6;</code>
       */
      public com.google.protobuf.StructOrBuilder getMetadataOrBuilder() {
        if (metadataBuilder_ != null) {
          return metadataBuilder_.getMessageOrBuilder();
        } else {
          return metadata_ == null ?
              com.google.protobuf.Struct.getDefaultInstance() : metadata_;
        }
      }
      /**
       * <pre>
       * protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
       * A key/value object to store custom metadata about a task.
       * </pre>
       *
       * <code>.google.protobuf.Struct metadata = 6;</code>
       */
      private com.google.protobuf.SingleFieldBuilder<
          com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder> 
          internalGetMetadataFieldBuilder() {
        if (metadataBuilder_ == null) {
          metadataBuilder_ = new com.google.protobuf.SingleFieldBuilder<
              com.google.protobuf.Struct, com.google.protobuf.Struct.Builder, com.google.protobuf.StructOrBuilder>(
                  getMetadata(),
                  getParentForChildren(),
                  isClean());
          metadata_ = null;
        }
        return metadataBuilder_;
      }
  
      // @@protoc_insertion_point(builder_scope:a2a.v1.Task)
    }
  
    // @@protoc_insertion_point(class_scope:a2a.v1.Task)
    private static final io.a2a.grpc.Task DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new io.a2a.grpc.Task();
    }
  
    public static io.a2a.grpc.Task getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }
  
    private static final com.google.protobuf.Parser<Task>
        PARSER = new com.google.protobuf.AbstractParser<Task>() {
      @java.lang.Override
      public Task parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        Builder builder = newBuilder();
        try {
          builder.mergeFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          throw e.setUnfinishedMessage(builder.buildPartial());
        } catch (com.google.protobuf.UninitializedMessageException e) {
          throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
        } catch (java.io.IOException e) {
          throw new com.google.protobuf.InvalidProtocolBufferException(e)
              .setUnfinishedMessage(builder.buildPartial());
        }
        return builder.buildPartial();
      }
    };
  
    public static com.google.protobuf.Parser<Task> parser() {
      return PARSER;
    }
  
    @java.lang.Override
    public com.google.protobuf.Parser<Task> getParserForType() {
      return PARSER;
    }
  
    @java.lang.Override
    public io.a2a.grpc.Task getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }
  
  }
  
  