Package org.a2aproject.sdk.grpc
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 ClassesModifier and TypeClassDescriptionstatic 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.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleangetArtifacts(int index) A set of output artifacts for a `Task`.intA set of output artifacts for a `Task`.A set of output artifacts for a `Task`.getArtifactsOrBuilder(int index) A set of output artifacts for a `Task`.List<? extends ArtifactOrBuilder>A set of output artifacts for a `Task`.Unique identifier (e.g.com.google.protobuf.ByteStringUnique identifier (e.g.static Taskstatic final com.google.protobuf.Descriptors.DescriptorgetHistory(int index) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.intprotolint: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`.getHistoryOrBuilder(int index) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.List<? extends MessageOrBuilder>protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.getId()Unique identifier (e.g.com.google.protobuf.ByteStringUnique identifier (e.g.com.google.protobuf.Structprotolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.com.google.protobuf.StructOrBuilderprotolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.com.google.protobuf.Parser<Task>intThe current status of a `Task`, including `state` and a `message`.The current status of a `Task`, including `state` and a `message`.inthashCode()booleanprotolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.booleanThe current status of a `Task`, including `state` and a `message`.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic Task.Builderstatic Task.BuildernewBuilder(Task prototype) protected Task.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static TaskparseDelimitedFrom(InputStream input) static TaskparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TaskparseFrom(byte[] data) static TaskparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TaskparseFrom(com.google.protobuf.ByteString data) static TaskparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TaskparseFrom(com.google.protobuf.CodedInputStream input) static TaskparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TaskparseFrom(InputStream input) static TaskparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static TaskparseFrom(ByteBuffer data) static TaskparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Task>parser()voidwriteTo(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, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
ID_FIELD_NUMBER
public static final int ID_FIELD_NUMBER- See Also:
-
CONTEXT_ID_FIELD_NUMBER
public static final int CONTEXT_ID_FIELD_NUMBER- See Also:
-
STATUS_FIELD_NUMBER
public static final int STATUS_FIELD_NUMBER- See Also:
-
ARTIFACTS_FIELD_NUMBER
public static final int ARTIFACTS_FIELD_NUMBER- See Also:
-
HISTORY_FIELD_NUMBER
public static final int HISTORY_FIELD_NUMBER- See Also:
-
METADATA_FIELD_NUMBER
public static final int METADATA_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
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:
getIdin interfaceTaskOrBuilder- 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:
getIdBytesin interfaceTaskOrBuilder- Returns:
- The bytes for id.
-
getContextId
Unique identifier (e.g. UUID) for the contextual collection of interactions (tasks and messages).
string context_id = 2;- Specified by:
getContextIdin interfaceTaskOrBuilder- 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:
getContextIdBytesin interfaceTaskOrBuilder- 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:
hasStatusin interfaceTaskOrBuilder- Returns:
- Whether the status field is set.
-
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:
getStatusin interfaceTaskOrBuilder- Returns:
- The status.
-
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:
getStatusOrBuilderin interfaceTaskOrBuilder
-
getArtifactsList
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4;- Specified by:
getArtifactsListin interfaceTaskOrBuilder
-
getArtifactsOrBuilderList
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4;- Specified by:
getArtifactsOrBuilderListin interfaceTaskOrBuilder
-
getArtifactsCount
public int getArtifactsCount()A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4;- Specified by:
getArtifactsCountin interfaceTaskOrBuilder
-
getArtifacts
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4;- Specified by:
getArtifactsin interfaceTaskOrBuilder
-
getArtifactsOrBuilder
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4;- Specified by:
getArtifactsOrBuilderin interfaceTaskOrBuilder
-
getHistoryList
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5;- Specified by:
getHistoryListin interfaceTaskOrBuilder
-
getHistoryOrBuilderList
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5;- Specified by:
getHistoryOrBuilderListin interfaceTaskOrBuilder
-
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:
getHistoryCountin interfaceTaskOrBuilder
-
getHistory
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5;- Specified by:
getHistoryin interfaceTaskOrBuilder
-
getHistoryOrBuilder
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5;- Specified by:
getHistoryOrBuilderin interfaceTaskOrBuilder
-
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:
hasMetadatain interfaceTaskOrBuilder- 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:
getMetadatain interfaceTaskOrBuilder- 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:
getMetadataOrBuilderin interfaceTaskOrBuilder
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.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
- 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
- Throws:
IOException
-
parseFrom
public static Task parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Task parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Task parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
- Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-