Class Task

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
org.a2aproject.sdk.grpc.Task
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable, TaskOrBuilder

@Generated public final class Task extends com.google.protobuf.GeneratedMessage implements TaskOrBuilder
 `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.
 
Protobuf type lf.a2a.v1.Task
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    `Task` is the core unit of action for A2A.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

    com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage

    com.google.protobuf.AbstractMessage.BuilderParent

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    getArtifacts(int index)
    A set of output artifacts for a `Task`.
    int
    A set of output artifacts for a `Task`.
    A set of output artifacts for a `Task`.
    A set of output artifacts for a `Task`.
    A set of output artifacts for a `Task`.
    Unique identifier (e.g.
    com.google.protobuf.ByteString
    Unique identifier (e.g.
    static Task
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    getHistory(int index)
    protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
    int
    protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
    protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
    protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
    protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
    Unique identifier (e.g.
    com.google.protobuf.ByteString
    Unique identifier (e.g.
    com.google.protobuf.Struct
    protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.
    com.google.protobuf.StructOrBuilder
    protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.
    com.google.protobuf.Parser<Task>
     
    int
     
    The current status of a `Task`, including `state` and a `message`.
    The current status of a `Task`, including `state` and a `message`.
    int
     
    boolean
    protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.
    boolean
    The current status of a `Task`, including `state` and a `message`.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    newBuilder(Task prototype)
     
     
    protected Task.Builder
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
    static Task
     
    static Task
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Task
    parseFrom(byte[] data)
     
    static Task
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Task
    parseFrom(com.google.protobuf.ByteString data)
     
    static Task
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Task
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    static Task
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Task
     
    static Task
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Task
     
    static Task
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<Task>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessage

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashFields, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Field Details

  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getId

      public String getId()
       Unique identifier (e.g. UUID) for the task, generated by the server for a
       new task.
       
      string id = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getId in interface TaskOrBuilder
      Returns:
      The id.
    • getIdBytes

      public com.google.protobuf.ByteString getIdBytes()
       Unique identifier (e.g. UUID) for the task, generated by the server for a
       new task.
       
      string id = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getIdBytes in interface TaskOrBuilder
      Returns:
      The bytes for id.
    • getContextId

      public String getContextId()
       Unique identifier (e.g. UUID) for the contextual collection of interactions
       (tasks and messages).
       
      string context_id = 2;
      Specified by:
      getContextId in interface TaskOrBuilder
      Returns:
      The contextId.
    • getContextIdBytes

      public com.google.protobuf.ByteString getContextIdBytes()
       Unique identifier (e.g. UUID) for the contextual collection of interactions
       (tasks and messages).
       
      string context_id = 2;
      Specified by:
      getContextIdBytes in interface TaskOrBuilder
      Returns:
      The bytes for contextId.
    • hasStatus

      public boolean hasStatus()
       The current status of a `Task`, including `state` and a `message`.
       
      .lf.a2a.v1.TaskStatus status = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasStatus in interface TaskOrBuilder
      Returns:
      Whether the status field is set.
    • getStatus

      public TaskStatus getStatus()
       The current status of a `Task`, including `state` and a `message`.
       
      .lf.a2a.v1.TaskStatus status = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getStatus in interface TaskOrBuilder
      Returns:
      The status.
    • getStatusOrBuilder

      public TaskStatusOrBuilder getStatusOrBuilder()
       The current status of a `Task`, including `state` and a `message`.
       
      .lf.a2a.v1.TaskStatus status = 3 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getStatusOrBuilder in interface TaskOrBuilder
    • getArtifactsList

      public List<Artifact> getArtifactsList()
       A set of output artifacts for a `Task`.
       
      repeated .lf.a2a.v1.Artifact artifacts = 4;
      Specified by:
      getArtifactsList in interface TaskOrBuilder
    • getArtifactsOrBuilderList

      public List<? extends ArtifactOrBuilder> getArtifactsOrBuilderList()
       A set of output artifacts for a `Task`.
       
      repeated .lf.a2a.v1.Artifact artifacts = 4;
      Specified by:
      getArtifactsOrBuilderList in interface TaskOrBuilder
    • getArtifactsCount

      public int getArtifactsCount()
       A set of output artifacts for a `Task`.
       
      repeated .lf.a2a.v1.Artifact artifacts = 4;
      Specified by:
      getArtifactsCount in interface TaskOrBuilder
    • getArtifacts

      public Artifact getArtifacts(int index)
       A set of output artifacts for a `Task`.
       
      repeated .lf.a2a.v1.Artifact artifacts = 4;
      Specified by:
      getArtifacts in interface TaskOrBuilder
    • getArtifactsOrBuilder

      public ArtifactOrBuilder getArtifactsOrBuilder(int index)
       A set of output artifacts for a `Task`.
       
      repeated .lf.a2a.v1.Artifact artifacts = 4;
      Specified by:
      getArtifactsOrBuilder in interface TaskOrBuilder
    • getHistoryList

      public List<Message> getHistoryList()
       protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       The history of interactions from a `Task`.
       
      repeated .lf.a2a.v1.Message history = 5;
      Specified by:
      getHistoryList in interface TaskOrBuilder
    • getHistoryOrBuilderList

      public List<? extends MessageOrBuilder> getHistoryOrBuilderList()
       protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       The history of interactions from a `Task`.
       
      repeated .lf.a2a.v1.Message history = 5;
      Specified by:
      getHistoryOrBuilderList in interface TaskOrBuilder
    • getHistoryCount

      public int getHistoryCount()
       protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       The history of interactions from a `Task`.
       
      repeated .lf.a2a.v1.Message history = 5;
      Specified by:
      getHistoryCount in interface TaskOrBuilder
    • getHistory

      public Message getHistory(int index)
       protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       The history of interactions from a `Task`.
       
      repeated .lf.a2a.v1.Message history = 5;
      Specified by:
      getHistory in interface TaskOrBuilder
    • getHistoryOrBuilder

      public MessageOrBuilder getHistoryOrBuilder(int index)
       protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       The history of interactions from a `Task`.
       
      repeated .lf.a2a.v1.Message history = 5;
      Specified by:
      getHistoryOrBuilder in interface TaskOrBuilder
    • hasMetadata

      public boolean hasMetadata()
       protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
       A key/value object to store custom metadata about a task.
       
      .google.protobuf.Struct metadata = 6;
      Specified by:
      hasMetadata in interface TaskOrBuilder
      Returns:
      Whether the metadata field is set.
    • getMetadata

      public com.google.protobuf.Struct getMetadata()
       protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
       A key/value object to store custom metadata about a task.
       
      .google.protobuf.Struct metadata = 6;
      Specified by:
      getMetadata in interface TaskOrBuilder
      Returns:
      The metadata.
    • getMetadataOrBuilder

      public com.google.protobuf.StructOrBuilder getMetadataOrBuilder()
       protolint:enable REPEATED_FIELD_NAMES_PLURALIZED
       A key/value object to store custom metadata about a task.
       
      .google.protobuf.Struct metadata = 6;
      Specified by:
      getMetadataOrBuilder in interface TaskOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static Task parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Task parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Task parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Task parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Task parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Task parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static Task parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Task parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Task parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static Task parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Task parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static Task parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public Task.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static Task.Builder newBuilder()
    • newBuilder

      public static Task.Builder newBuilder(Task prototype)
    • toBuilder

      public Task.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected Task.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static Task getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<Task> parser()
    • getParserForType

      public com.google.protobuf.Parser<Task> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public Task getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder