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 Classes
    Modifier and Type
    Class
    Description
    static 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.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
     
    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
     
    Optional.
    com.google.protobuf.ByteString
    Optional.
    static Message
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    getExtensions(int index)
    The URIs of extensions that are present or contributed to this Message.
    com.google.protobuf.ByteString
    getExtensionsBytes(int index)
    The URIs of extensions that are present or contributed to this Message.
    int
    The URIs of extensions that are present or contributed to this Message.
    com.google.protobuf.ProtocolStringList
    The URIs of extensions that are present or contributed to this Message.
    The unique identifier (e.g.
    com.google.protobuf.ByteString
    The unique identifier (e.g.
    com.google.protobuf.Struct
    Optional.
    com.google.protobuf.StructOrBuilder
    Optional.
    com.google.protobuf.Parser<Message>
     
    getParts(int index)
    Parts is the container of the message content.
    int
    Parts 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.
    A list of task IDs that this message references for additional context.
    com.google.protobuf.ByteString
    A list of task IDs that this message references for additional context.
    int
    A list of task IDs that this message references for additional context.
    com.google.protobuf.ProtocolStringList
    A list of task IDs that this message references for additional context.
    Identifies the sender of the message.
    int
    Identifies the sender of the message.
    int
     
    Optional.
    com.google.protobuf.ByteString
    Optional.
    int
     
    boolean
    Optional.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
    newBuilder(Message prototype)
     
     
    protected Message.Builder
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
    static Message
     
    static Message
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Message
    parseFrom(byte[] data)
     
    static Message
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Message
    parseFrom(com.google.protobuf.ByteString data)
     
    static Message
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Message
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    static Message
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Message
     
    static Message
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static Message
     
    static Message
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<Message>
     
     
    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
    • getMessageId

      public String 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:
      getMessageId in interface MessageOrBuilder
      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:
      getMessageIdBytes in interface MessageOrBuilder
      Returns:
      The bytes for messageId.
    • getContextId

      public String 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:
      getContextId in interface MessageOrBuilder
      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:
      getContextIdBytes in interface MessageOrBuilder
      Returns:
      The bytes for contextId.
    • getTaskId

      public String 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:
      getTaskId in interface MessageOrBuilder
      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:
      getTaskIdBytes in interface MessageOrBuilder
      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:
      getRoleValue in interface MessageOrBuilder
      Returns:
      The enum numeric value on the wire for role.
    • getRole

      public Role getRole()
       Identifies the sender of the message.
       
      .lf.a2a.v1.Role role = 4 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getRole in interface MessageOrBuilder
      Returns:
      The role.
    • getPartsList

      public List<Part> getPartsList()
       Parts is the container of the message content.
       
      repeated .lf.a2a.v1.Part parts = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPartsList in interface MessageOrBuilder
    • getPartsOrBuilderList

      public List<? extends PartOrBuilder> getPartsOrBuilderList()
       Parts is the container of the message content.
       
      repeated .lf.a2a.v1.Part parts = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPartsOrBuilderList in interface MessageOrBuilder
    • 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:
      getPartsCount in interface MessageOrBuilder
    • getParts

      public Part getParts(int index)
       Parts is the container of the message content.
       
      repeated .lf.a2a.v1.Part parts = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getParts in interface MessageOrBuilder
    • getPartsOrBuilder

      public PartOrBuilder getPartsOrBuilder(int index)
       Parts is the container of the message content.
       
      repeated .lf.a2a.v1.Part parts = 5 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getPartsOrBuilder in interface MessageOrBuilder
    • hasMetadata

      public boolean hasMetadata()
       Optional. Any metadata to provide along with the message.
       
      .google.protobuf.Struct metadata = 6;
      Specified by:
      hasMetadata in interface MessageOrBuilder
      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:
      getMetadata in interface MessageOrBuilder
      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:
      getMetadataOrBuilder in interface MessageOrBuilder
    • 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:
      getExtensionsList in interface MessageOrBuilder
      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:
      getExtensionsCount in interface MessageOrBuilder
      Returns:
      The count of extensions.
    • getExtensions

      public String getExtensions(int index)
       The URIs of extensions that are present or contributed to this Message.
       
      repeated string extensions = 7;
      Specified by:
      getExtensions in interface MessageOrBuilder
      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:
      getExtensionsBytes in interface MessageOrBuilder
      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:
      getReferenceTaskIdsList in interface MessageOrBuilder
      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:
      getReferenceTaskIdsCount in interface MessageOrBuilder
      Returns:
      The count of referenceTaskIds.
    • getReferenceTaskIds

      public String getReferenceTaskIds(int index)
       A list of task IDs that this message references for additional context.
       
      repeated string reference_task_ids = 8;
      Specified by:
      getReferenceTaskIds in interface MessageOrBuilder
      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:
      getReferenceTaskIdsBytes in interface MessageOrBuilder
      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:
      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 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

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

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

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

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

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

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

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

      public static Message.Builder newBuilder()
    • newBuilder

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

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

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

      public static Message getDefaultInstance()
    • parser

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

      public com.google.protobuf.Parser<Message> 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 Message getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder