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 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
     

    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
     
    getContent(int index)
    protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
    int
    protolint: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.
    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.ByteString
    The context id of the message.
    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 message id of the message.
    com.google.protobuf.ByteString
    The message id of the message.
    com.google.protobuf.Struct
    protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message.
    com.google.protobuf.StructOrBuilder
    protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message.
    com.google.protobuf.Parser<Message>
     
    A role for the message.
    int
    A role for the message.
    int
     
    The task id of the message.
    com.google.protobuf.ByteString
    The task id of the message.
    int
     
    boolean
    protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message.
    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 message id of the message. This is required and created by the
       message creator.
       
      string message_id = 1;
      Specified by:
      getMessageId in interface MessageOrBuilder
      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:
      getMessageIdBytes in interface MessageOrBuilder
      Returns:
      The bytes for messageId.
    • getContextId

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

      public String 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:
      getTaskId in interface MessageOrBuilder
      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:
      getTaskIdBytes in interface MessageOrBuilder
      Returns:
      The bytes for taskId.
    • getRoleValue

      public int getRoleValue()
       A role for the message.
       
      .a2a.v1.Role role = 4;
      Specified by:
      getRoleValue in interface MessageOrBuilder
      Returns:
      The enum numeric value on the wire for role.
    • getRole

      public Role getRole()
       A role for the message.
       
      .a2a.v1.Role role = 4;
      Specified by:
      getRole in interface MessageOrBuilder
      Returns:
      The role.
    • getContentList

      public List<Part> getContentList()
       protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       Content is the container of the message content.
       
      repeated .a2a.v1.Part content = 5;
      Specified by:
      getContentList in interface MessageOrBuilder
    • getContentOrBuilderList

      public List<? extends PartOrBuilder> getContentOrBuilderList()
       protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       Content is the container of the message content.
       
      repeated .a2a.v1.Part content = 5;
      Specified by:
      getContentOrBuilderList in interface MessageOrBuilder
    • 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:
      getContentCount in interface MessageOrBuilder
    • getContent

      public Part getContent(int index)
       protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       Content is the container of the message content.
       
      repeated .a2a.v1.Part content = 5;
      Specified by:
      getContent in interface MessageOrBuilder
    • getContentOrBuilder

      public PartOrBuilder getContentOrBuilder(int index)
       protolint:disable REPEATED_FIELD_NAMES_PLURALIZED
       Content is the container of the message content.
       
      repeated .a2a.v1.Part content = 5;
      Specified by:
      getContentOrBuilder in interface MessageOrBuilder
    • 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:
      hasMetadata in interface MessageOrBuilder
      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:
      getMetadata in interface MessageOrBuilder
      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:
      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.
    • 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