Package org.a2aproject.sdk.grpc
Class Task.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Task.Builder>
org.a2aproject.sdk.grpc.Task.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable,TaskOrBuilder
- Enclosing class:
- Task
public static final class Task.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Task.Builder>
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-
Method Summary
Modifier and TypeMethodDescriptionaddAllArtifacts(Iterable<? extends Artifact> values) A set of output artifacts for a `Task`.addAllHistory(Iterable<? extends Message> values) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.addArtifacts(int index, Artifact value) A set of output artifacts for a `Task`.addArtifacts(int index, Artifact.Builder builderForValue) A set of output artifacts for a `Task`.addArtifacts(Artifact value) A set of output artifacts for a `Task`.addArtifacts(Artifact.Builder builderForValue) A set of output artifacts for a `Task`.A set of output artifacts for a `Task`.addArtifactsBuilder(int index) A set of output artifacts for a `Task`.addHistory(int index, Message value) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.addHistory(int index, Message.Builder builderForValue) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.addHistory(Message value) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.addHistory(Message.Builder builderForValue) 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`.addHistoryBuilder(int index) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.build()clear()A set of output artifacts for a `Task`.Unique identifier (e.g.protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.clearId()Unique identifier (e.g.protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.The current status of a `Task`, including `state` and a `message`.getArtifacts(int index) A set of output artifacts for a `Task`.getArtifactsBuilder(int index) A set of output artifacts for a `Task`.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 final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetHistory(int index) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.getHistoryBuilder(int index) 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`.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.Struct.Builderprotolint: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.The current status of a `Task`, including `state` and a `message`.The current status of a `Task`, including `state` and a `message`.The current status of a `Task`, including `state` and a `message`.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 booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) mergeMetadata(com.google.protobuf.Struct value) protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.mergeStatus(TaskStatus value) The current status of a `Task`, including `state` and a `message`.removeArtifacts(int index) A set of output artifacts for a `Task`.removeHistory(int index) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.setArtifacts(int index, Artifact value) A set of output artifacts for a `Task`.setArtifacts(int index, Artifact.Builder builderForValue) A set of output artifacts for a `Task`.setContextId(String value) Unique identifier (e.g.setContextIdBytes(com.google.protobuf.ByteString value) Unique identifier (e.g.setHistory(int index, Message value) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.setHistory(int index, Message.Builder builderForValue) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.Unique identifier (e.g.setIdBytes(com.google.protobuf.ByteString value) Unique identifier (e.g.setMetadata(com.google.protobuf.Struct value) protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.setMetadata(com.google.protobuf.Struct.Builder builderForValue) protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.setStatus(TaskStatus value) The current status of a `Task`, including `state` and a `message`.setStatus(TaskStatus.Builder builderForValue) The current status of a `Task`, including `state` and a `message`.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
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.Builder<Task.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<Task.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<Task.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Task.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Task.Builder>
-
mergeFrom
public Task.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<Task.Builder>- Throws:
IOException
-
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.
-
setId
Unique identifier (e.g. UUID) for the task, generated by the server for a new task.
string id = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The id to set.- Returns:
- This builder for chaining.
-
clearId
Unique identifier (e.g. UUID) for the task, generated by the server for a new task.
string id = 1 [(.google.api.field_behavior) = REQUIRED];- Returns:
- This builder for chaining.
-
setIdBytes
Unique identifier (e.g. UUID) for the task, generated by the server for a new task.
string id = 1 [(.google.api.field_behavior) = REQUIRED];- Parameters:
value- The bytes for id to set.- Returns:
- This builder for chaining.
-
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.
-
setContextId
Unique identifier (e.g. UUID) for the contextual collection of interactions (tasks and messages).
string context_id = 2;- Parameters:
value- The contextId to set.- Returns:
- This builder for chaining.
-
clearContextId
Unique identifier (e.g. UUID) for the contextual collection of interactions (tasks and messages).
string context_id = 2;- Returns:
- This builder for chaining.
-
setContextIdBytes
Unique identifier (e.g. UUID) for the contextual collection of interactions (tasks and messages).
string context_id = 2;- Parameters:
value- The bytes for contextId to set.- Returns:
- This builder for chaining.
-
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.
-
setStatus
The current status of a `Task`, including `state` and a `message`.
.lf.a2a.v1.TaskStatus status = 3 [(.google.api.field_behavior) = REQUIRED]; -
setStatus
The current status of a `Task`, including `state` and a `message`.
.lf.a2a.v1.TaskStatus status = 3 [(.google.api.field_behavior) = REQUIRED]; -
mergeStatus
The current status of a `Task`, including `state` and a `message`.
.lf.a2a.v1.TaskStatus status = 3 [(.google.api.field_behavior) = REQUIRED]; -
clearStatus
The current status of a `Task`, including `state` and a `message`.
.lf.a2a.v1.TaskStatus status = 3 [(.google.api.field_behavior) = REQUIRED]; -
getStatusBuilder
The current status of a `Task`, including `state` and a `message`.
.lf.a2a.v1.TaskStatus status = 3 [(.google.api.field_behavior) = REQUIRED]; -
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
-
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
-
setArtifacts
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4; -
setArtifacts
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4; -
addArtifacts
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4; -
addArtifacts
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4; -
addArtifacts
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4; -
addArtifacts
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4; -
addAllArtifacts
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4; -
clearArtifacts
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4; -
removeArtifacts
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4; -
getArtifactsBuilder
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4; -
getArtifactsOrBuilder
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4;- Specified by:
getArtifactsOrBuilderin interfaceTaskOrBuilder
-
getArtifactsOrBuilderList
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4;- Specified by:
getArtifactsOrBuilderListin interfaceTaskOrBuilder
-
addArtifactsBuilder
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4; -
addArtifactsBuilder
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4; -
getArtifactsBuilderList
A set of output artifacts for a `Task`.
repeated .lf.a2a.v1.Artifact artifacts = 4; -
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
-
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
-
setHistory
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5; -
setHistory
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5; -
addHistory
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5; -
addHistory
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5; -
addHistory
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5; -
addHistory
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5; -
addAllHistory
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5; -
clearHistory
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5; -
removeHistory
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5; -
getHistoryBuilder
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5; -
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
-
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
-
addHistoryBuilder
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5; -
addHistoryBuilder
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5; -
getHistoryBuilderList
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED The history of interactions from a `Task`.
repeated .lf.a2a.v1.Message history = 5; -
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.
-
setMetadata
protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.
.google.protobuf.Struct metadata = 6; -
setMetadata
protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.
.google.protobuf.Struct metadata = 6; -
mergeMetadata
protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.
.google.protobuf.Struct metadata = 6; -
clearMetadata
protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.
.google.protobuf.Struct metadata = 6; -
getMetadataBuilder
public com.google.protobuf.Struct.Builder getMetadataBuilder()protolint:enable REPEATED_FIELD_NAMES_PLURALIZED A key/value object to store custom metadata about a task.
.google.protobuf.Struct metadata = 6; -
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
-