Package org.a2aproject.sdk.compat03.grpc
Class Message.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Message.Builder>
org.a2aproject.sdk.compat03.grpc.Message.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable,MessageOrBuilder
- Enclosing class:
- Message
public static final class Message.Builder
extends com.google.protobuf.GeneratedMessage.Builder<Message.Builder>
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-
Method Summary
Modifier and TypeMethodDescriptionaddAllContent(Iterable<? extends Part> values) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.addAllExtensions(Iterable<String> values) The URIs of extensions that are present or contributed to this Message.addContent(int index, Part value) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.addContent(int index, Part.Builder builderForValue) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.addContent(Part value) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.addContent(Part.Builder builderForValue) 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.addContentBuilder(int index) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.addExtensions(String value) The URIs of extensions that are present or contributed to this Message.addExtensionsBytes(com.google.protobuf.ByteString value) The URIs of extensions that are present or contributed to this Message.build()clear()protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.The context id of the message.The URIs of extensions that are present or contributed to this Message.The message id of the message.protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message.A role for the message.The task id of the message.getContent(int index) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.getContentBuilder(int index) 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.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 final com.google.protobuf.Descriptors.Descriptorcom.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.Struct.Builderprotolint: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.getRole()A role for the message.intA role for the message.The task id of the message.com.google.protobuf.ByteStringThe task id of the message.booleanprotolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the 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 Any optional metadata to provide along with the message.removeContent(int index) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.setContent(int index, Part value) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.setContent(int index, Part.Builder builderForValue) protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.setContextId(String value) The context id of the message.setContextIdBytes(com.google.protobuf.ByteString value) The context id of the message.setExtensions(int index, String value) The URIs of extensions that are present or contributed to this Message.setMessageId(String value) The message id of the message.setMessageIdBytes(com.google.protobuf.ByteString value) The message id of the message.setMetadata(com.google.protobuf.Struct value) protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message.setMetadata(com.google.protobuf.Struct.Builder builderForValue) protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message.A role for the message.setRoleValue(int value) A role for the message.The task id of the message.setTaskIdBytes(com.google.protobuf.ByteString value) The task id of the 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<Message.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<Message.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<Message.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<Message.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<Message.Builder>
-
mergeFrom
public Message.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<Message.Builder>- Throws:
IOException
-
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.
-
setMessageId
The message id of the message. This is required and created by the message creator.
string message_id = 1;- Parameters:
value- The messageId to set.- Returns:
- This builder for chaining.
-
clearMessageId
The message id of the message. This is required and created by the message creator.
string message_id = 1;- Returns:
- This builder for chaining.
-
setMessageIdBytes
The message id of the message. This is required and created by the message creator.
string message_id = 1;- Parameters:
value- The bytes for messageId to set.- Returns:
- This builder for chaining.
-
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.
-
setContextId
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;- Parameters:
value- The contextId to set.- Returns:
- This builder for chaining.
-
clearContextId
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;- Returns:
- This builder for chaining.
-
setContextIdBytes
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;- Parameters:
value- The bytes for contextId to set.- Returns:
- This builder for chaining.
-
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.
-
setTaskId
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;- Parameters:
value- The taskId to set.- Returns:
- This builder for chaining.
-
clearTaskId
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;- Returns:
- This builder for chaining.
-
setTaskIdBytes
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;- Parameters:
value- The bytes for taskId to set.- Returns:
- This builder for chaining.
-
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.
-
setRoleValue
A role for the message.
.a2a.v1.Role role = 4;- Parameters:
value- The enum numeric value on the wire for role to set.- Returns:
- This builder for chaining.
-
getRole
A role for the message.
.a2a.v1.Role role = 4;- Specified by:
getRolein interfaceMessageOrBuilder- Returns:
- The role.
-
setRole
A role for the message.
.a2a.v1.Role role = 4;- Parameters:
value- The role to set.- Returns:
- This builder for chaining.
-
clearRole
A role for the message.
.a2a.v1.Role role = 4;- Returns:
- This builder for chaining.
-
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
-
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
-
setContent
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5; -
setContent
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5; -
addContent
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5; -
addContent
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5; -
addContent
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5; -
addContent
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5; -
addAllContent
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5; -
clearContent
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5; -
removeContent
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5; -
getContentBuilder
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5; -
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
-
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
-
addContentBuilder
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5; -
addContentBuilder
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5; -
getContentBuilderList
protolint:disable REPEATED_FIELD_NAMES_PLURALIZED Content is the container of the message content.
repeated .a2a.v1.Part content = 5; -
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.
-
setMetadata
protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message.
.google.protobuf.Struct metadata = 6; -
setMetadata
protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message.
.google.protobuf.Struct metadata = 6; -
mergeMetadata
protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message.
.google.protobuf.Struct metadata = 6; -
clearMetadata
protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message.
.google.protobuf.Struct metadata = 6; -
getMetadataBuilder
public com.google.protobuf.Struct.Builder getMetadataBuilder()protolint:enable REPEATED_FIELD_NAMES_PLURALIZED Any optional metadata to provide along with the message.
.google.protobuf.Struct metadata = 6; -
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.
-
setExtensions
The URIs of extensions that are present or contributed to this Message.
repeated string extensions = 7;- Parameters:
index- The index to set the value at.value- The extensions to set.- Returns:
- This builder for chaining.
-
addExtensions
The URIs of extensions that are present or contributed to this Message.
repeated string extensions = 7;- Parameters:
value- The extensions to add.- Returns:
- This builder for chaining.
-
addAllExtensions
The URIs of extensions that are present or contributed to this Message.
repeated string extensions = 7;- Parameters:
values- The extensions to add.- Returns:
- This builder for chaining.
-
clearExtensions
The URIs of extensions that are present or contributed to this Message.
repeated string extensions = 7;- Returns:
- This builder for chaining.
-
addExtensionsBytes
The URIs of extensions that are present or contributed to this Message.
repeated string extensions = 7;- Parameters:
value- The bytes of the extensions to add.- Returns:
- This builder for chaining.
-