Package org.a2aproject.sdk.compat03.grpc
Class Message
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
org.a2aproject.sdk.compat03.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 is associated with a context and optionally a task. Since the server is responsible for the context definition, it must always provide a context_id in its messages. The client can optionally provide the context_id if it knows the context to associate the message to. Similarly for task_id, except the server decides if a task is created and whether to include the task_id.Protobuf type
a2a.v1.Message- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classMessage 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 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 TypeMethodDescriptionbooleangetContent(int index) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.intprotolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.getContentOrBuilder(int index) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.List<? extends PartOrBuilder>protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.The context id of the message.com.google.protobuf.ByteStringThe context id of the message.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 message id of the message.com.google.protobuf.ByteStringThe message id of the message.com.google.protobuf.Structprotolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message.com.google.protobuf.StructOrBuilderprotolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message.com.google.protobuf.Parser<Message>getRole()A role for the message.intA role for the message.intThe task id of the message.com.google.protobuf.ByteStringThe task id of the message.inthashCode()booleanprotolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message.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:
-
CONTENT_FIELD_NUMBER
public static final int CONTENT_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:
-
-
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 message id of the message. This is required and created by the message creator.
string message_id = 1;- Specified by:
getMessageIdin interfaceMessageOrBuilder- Returns:
- The messageId.
-
getMessageIdBytes
public com.google.protobuf.ByteString getMessageIdBytes()The message id of the message. This is required and created by the message creator.
string message_id = 1;- Specified by:
getMessageIdBytesin interfaceMessageOrBuilder- Returns:
- The bytes for messageId.
-
getContextId
The context id of the message. This is optional and 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()The context id of the message. This is optional and 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
The task id of the message. This is optional and 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()The task id of the message. This is optional and 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()A role for the message.
.a2a.v1.Role role = 4;- Specified by:
getRoleValuein interfaceMessageOrBuilder- Returns:
- The enum numeric value on the wire for role.
-
getRole
A role for the message.
.a2a.v1.Role role = 4;- Specified by:
getRolein interfaceMessageOrBuilder- Returns:
- The role.
-
getContentList
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5;- Specified by:
getContentListin interfaceMessageOrBuilder
-
getContentOrBuilderList
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5;- Specified by:
getContentOrBuilderListin interfaceMessageOrBuilder
-
getContentCount
public int getContentCount()protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5;- Specified by:
getContentCountin interfaceMessageOrBuilder
-
getContent
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5;- Specified by:
getContentin interfaceMessageOrBuilder
-
getContentOrBuilder
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5;- Specified by:
getContentOrBuilderin interfaceMessageOrBuilder
-
hasMetadata
public boolean hasMetadata()protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional 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()protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional 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()protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional 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.
-
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
-