Package org.a2aproject.sdk.grpc
Class Message
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
org.a2aproject.sdk.grpc.Message
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable,MessageOrBuilder
@Generated
public final class Message
extends com.google.protobuf.GeneratedMessage
implements MessageOrBuilder
`Message` is one unit of communication between client and server. It can be associated with a context and/or a task. For server messages, `context_id` must be provided, and `task_id` only if a task was created. For client messages, both fields are optional, with the caveat that if both are provided, they have to match (the `context_id` has to be the one that is set on the task). If only `task_id` is provided, the server will infer `context_id` from it.Protobuf type
lf.a2a.v1.Message- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class`Message` is one unit of communication between client and server.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 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 TypeMethodDescriptionbooleanOptional.com.google.protobuf.ByteStringOptional.static Messagestatic final com.google.protobuf.Descriptors.DescriptorgetExtensions(int index) The URIs of extensions that are present or contributed to this Message.com.google.protobuf.ByteStringgetExtensionsBytes(int index) The URIs of extensions that are present or contributed to this Message.intThe URIs of extensions that are present or contributed to this Message.com.google.protobuf.ProtocolStringListThe URIs of extensions that are present or contributed to this Message.The unique identifier (e.g.com.google.protobuf.ByteStringThe unique identifier (e.g.com.google.protobuf.StructOptional.com.google.protobuf.StructOrBuilderOptional.com.google.protobuf.Parser<Message>getParts(int index) Parts is the container of the message content.intParts is the container of the message content.Parts is the container of the message content.getPartsOrBuilder(int index) Parts is the container of the message content.List<? extends PartOrBuilder>Parts is the container of the message content.getReferenceTaskIds(int index) A list of task IDs that this message references for additional context.com.google.protobuf.ByteStringgetReferenceTaskIdsBytes(int index) A list of task IDs that this message references for additional context.intA list of task IDs that this message references for additional context.com.google.protobuf.ProtocolStringListA list of task IDs that this message references for additional context.getRole()Identifies the sender of the message.intIdentifies the sender of the message.intOptional.com.google.protobuf.ByteStringOptional.inthashCode()booleanOptional.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic Message.Builderstatic Message.BuildernewBuilder(Message prototype) protected Message.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static MessageparseDelimitedFrom(InputStream input) static MessageparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MessageparseFrom(byte[] data) static MessageparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MessageparseFrom(com.google.protobuf.ByteString data) static MessageparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MessageparseFrom(com.google.protobuf.CodedInputStream input) static MessageparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MessageparseFrom(InputStream input) static MessageparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static MessageparseFrom(ByteBuffer data) static MessageparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Message>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
-
MESSAGE_ID_FIELD_NUMBER
public static final int MESSAGE_ID_FIELD_NUMBER- See Also:
-
CONTEXT_ID_FIELD_NUMBER
public static final int CONTEXT_ID_FIELD_NUMBER- See Also:
-
TASK_ID_FIELD_NUMBER
public static final int TASK_ID_FIELD_NUMBER- See Also:
-
ROLE_FIELD_NUMBER
public static final int ROLE_FIELD_NUMBER- See Also:
-
PARTS_FIELD_NUMBER
public static final int PARTS_FIELD_NUMBER- See Also:
-
METADATA_FIELD_NUMBER
public static final int METADATA_FIELD_NUMBER- See Also:
-
EXTENSIONS_FIELD_NUMBER
public static final int EXTENSIONS_FIELD_NUMBER- See Also:
-
REFERENCE_TASK_IDS_FIELD_NUMBER
public static final int REFERENCE_TASK_IDS_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
-
getMessageId
The unique identifier (e.g. UUID) of the message. This is created by the message creator.
string message_id = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getMessageIdin interfaceMessageOrBuilder- Returns:
- The messageId.
-
getMessageIdBytes
public com.google.protobuf.ByteString getMessageIdBytes()The unique identifier (e.g. UUID) of the message. This is created by the message creator.
string message_id = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getMessageIdBytesin interfaceMessageOrBuilder- Returns:
- The bytes for messageId.
-
getContextId
Optional. The context id of the message. If set, the message will be associated with the given context.
string context_id = 2;- Specified by:
getContextIdin interfaceMessageOrBuilder- Returns:
- The contextId.
-
getContextIdBytes
public com.google.protobuf.ByteString getContextIdBytes()Optional. The context id of the message. If set, the message will be associated with the given context.
string context_id = 2;- Specified by:
getContextIdBytesin interfaceMessageOrBuilder- Returns:
- The bytes for contextId.
-
getTaskId
Optional. The task id of the message. If set, the message will be associated with the given task.
string task_id = 3;- Specified by:
getTaskIdin interfaceMessageOrBuilder- Returns:
- The taskId.
-
getTaskIdBytes
public com.google.protobuf.ByteString getTaskIdBytes()Optional. The task id of the message. If set, the message will be associated with the given task.
string task_id = 3;- Specified by:
getTaskIdBytesin interfaceMessageOrBuilder- Returns:
- The bytes for taskId.
-
getRoleValue
public int getRoleValue()Identifies the sender of the message.
.lf.a2a.v1.Role role = 4 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getRoleValuein interfaceMessageOrBuilder- Returns:
- The enum numeric value on the wire for role.
-
getRole
Identifies the sender of the message.
.lf.a2a.v1.Role role = 4 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getRolein interfaceMessageOrBuilder- Returns:
- The role.
-
getPartsList
Parts is the container of the message content.
repeated .lf.a2a.v1.Part parts = 5 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPartsListin interfaceMessageOrBuilder
-
getPartsOrBuilderList
Parts is the container of the message content.
repeated .lf.a2a.v1.Part parts = 5 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPartsOrBuilderListin interfaceMessageOrBuilder
-
getPartsCount
public int getPartsCount()Parts is the container of the message content.
repeated .lf.a2a.v1.Part parts = 5 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPartsCountin interfaceMessageOrBuilder
-
getParts
Parts is the container of the message content.
repeated .lf.a2a.v1.Part parts = 5 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPartsin interfaceMessageOrBuilder
-
getPartsOrBuilder
Parts is the container of the message content.
repeated .lf.a2a.v1.Part parts = 5 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getPartsOrBuilderin interfaceMessageOrBuilder
-
hasMetadata
public boolean hasMetadata()Optional. Any metadata to provide along with the message.
.google.protobuf.Struct metadata = 6;- Specified by:
hasMetadatain interfaceMessageOrBuilder- Returns:
- Whether the metadata field is set.
-
getMetadata
public com.google.protobuf.Struct getMetadata()Optional. Any metadata to provide along with the message.
.google.protobuf.Struct metadata = 6;- Specified by:
getMetadatain interfaceMessageOrBuilder- Returns:
- The metadata.
-
getMetadataOrBuilder
public com.google.protobuf.StructOrBuilder getMetadataOrBuilder()Optional. Any metadata to provide along with the message.
.google.protobuf.Struct metadata = 6;- Specified by:
getMetadataOrBuilderin interfaceMessageOrBuilder
-
getExtensionsList
public com.google.protobuf.ProtocolStringList getExtensionsList()The URIs of extensions that are present or contributed to this Message.
repeated string extensions = 7;- Specified by:
getExtensionsListin interfaceMessageOrBuilder- Returns:
- A list containing the extensions.
-
getExtensionsCount
public int getExtensionsCount()The URIs of extensions that are present or contributed to this Message.
repeated string extensions = 7;- Specified by:
getExtensionsCountin interfaceMessageOrBuilder- Returns:
- The count of extensions.
-
getExtensions
The URIs of extensions that are present or contributed to this Message.
repeated string extensions = 7;- Specified by:
getExtensionsin interfaceMessageOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The extensions at the given index.
-
getExtensionsBytes
public com.google.protobuf.ByteString getExtensionsBytes(int index) The URIs of extensions that are present or contributed to this Message.
repeated string extensions = 7;- Specified by:
getExtensionsBytesin interfaceMessageOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the extensions at the given index.
-
getReferenceTaskIdsList
public com.google.protobuf.ProtocolStringList getReferenceTaskIdsList()A list of task IDs that this message references for additional context.
repeated string reference_task_ids = 8;- Specified by:
getReferenceTaskIdsListin interfaceMessageOrBuilder- Returns:
- A list containing the referenceTaskIds.
-
getReferenceTaskIdsCount
public int getReferenceTaskIdsCount()A list of task IDs that this message references for additional context.
repeated string reference_task_ids = 8;- Specified by:
getReferenceTaskIdsCountin interfaceMessageOrBuilder- Returns:
- The count of referenceTaskIds.
-
getReferenceTaskIds
A list of task IDs that this message references for additional context.
repeated string reference_task_ids = 8;- Specified by:
getReferenceTaskIdsin interfaceMessageOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The referenceTaskIds at the given index.
-
getReferenceTaskIdsBytes
public com.google.protobuf.ByteString getReferenceTaskIdsBytes(int index) A list of task IDs that this message references for additional context.
repeated string reference_task_ids = 8;- Specified by:
getReferenceTaskIdsBytesin interfaceMessageOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the referenceTaskIds at the given index.
-
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 Message parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Message parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Message parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Message parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Message parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Message parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Message parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Message parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Message 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
protected Message.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - 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
-