Package org.a2aproject.sdk.grpc
Class Part
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
org.a2aproject.sdk.grpc.Part
- All Implemented Interfaces:
com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable,PartOrBuilder
@Generated
public final class Part
extends com.google.protobuf.GeneratedMessage
implements PartOrBuilder
`Part` represents a container for a section of communication content. Parts can be purely textual, some sort of file (image, video, etc) or a structured data blob (i.e. JSON).Protobuf type
lf.a2a.v1.Part- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class`Part` represents a container for a section of communication content.static enumNested 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 TypeMethodDescriptionbooleancom.google.protobuf.ValuegetData()Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null).com.google.protobuf.ValueOrBuilderArbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null).static Partstatic final com.google.protobuf.Descriptors.DescriptorAn optional `filename` for the file (e.g., "document.pdf").com.google.protobuf.ByteStringAn optional `filename` for the file (e.g., "document.pdf").The `media_type` (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png").com.google.protobuf.ByteStringThe `media_type` (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png").com.google.protobuf.StructOptional. metadata associated with this part.com.google.protobuf.StructOrBuilderOptional. metadata associated with this part.com.google.protobuf.Parser<Part>com.google.protobuf.ByteStringgetRaw()The `raw` byte content of a file.intgetText()The string content of the `text` part.com.google.protobuf.ByteStringThe string content of the `text` part.getUrl()A `url` pointing to the file's content.com.google.protobuf.ByteStringA `url` pointing to the file's content.booleanhasData()Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null).inthashCode()booleanOptional. metadata associated with this part.booleanhasRaw()The `raw` byte content of a file.booleanhasText()The string content of the `text` part.booleanhasUrl()A `url` pointing to the file's content.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic Part.Builderstatic Part.BuildernewBuilder(Part prototype) protected Part.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static PartparseDelimitedFrom(InputStream input) static PartparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static PartparseFrom(byte[] data) static PartparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static PartparseFrom(com.google.protobuf.ByteString data) static PartparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static PartparseFrom(com.google.protobuf.CodedInputStream input) static PartparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static PartparseFrom(InputStream input) static PartparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static PartparseFrom(ByteBuffer data) static PartparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<Part>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
-
TEXT_FIELD_NUMBER
public static final int TEXT_FIELD_NUMBER- See Also:
-
RAW_FIELD_NUMBER
public static final int RAW_FIELD_NUMBER- See Also:
-
URL_FIELD_NUMBER
public static final int URL_FIELD_NUMBER- See Also:
-
DATA_FIELD_NUMBER
public static final int DATA_FIELD_NUMBER- See Also:
-
METADATA_FIELD_NUMBER
public static final int METADATA_FIELD_NUMBER- See Also:
-
FILENAME_FIELD_NUMBER
public static final int FILENAME_FIELD_NUMBER- See Also:
-
MEDIA_TYPE_FIELD_NUMBER
public static final int MEDIA_TYPE_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
-
getContentCase
- Specified by:
getContentCasein interfacePartOrBuilder
-
hasText
public boolean hasText()The string content of the `text` part.
string text = 1;- Specified by:
hasTextin interfacePartOrBuilder- Returns:
- Whether the text field is set.
-
getText
The string content of the `text` part.
string text = 1;- Specified by:
getTextin interfacePartOrBuilder- Returns:
- The text.
-
getTextBytes
public com.google.protobuf.ByteString getTextBytes()The string content of the `text` part.
string text = 1;- Specified by:
getTextBytesin interfacePartOrBuilder- Returns:
- The bytes for text.
-
hasRaw
public boolean hasRaw()The `raw` byte content of a file. In JSON serialization, this is encoded as a base64 string.
bytes raw = 2;- Specified by:
hasRawin interfacePartOrBuilder- Returns:
- Whether the raw field is set.
-
getRaw
public com.google.protobuf.ByteString getRaw()The `raw` byte content of a file. In JSON serialization, this is encoded as a base64 string.
bytes raw = 2;- Specified by:
getRawin interfacePartOrBuilder- Returns:
- The raw.
-
hasUrl
public boolean hasUrl()A `url` pointing to the file's content.
string url = 3;- Specified by:
hasUrlin interfacePartOrBuilder- Returns:
- Whether the url field is set.
-
getUrl
A `url` pointing to the file's content.
string url = 3;- Specified by:
getUrlin interfacePartOrBuilder- Returns:
- The url.
-
getUrlBytes
public com.google.protobuf.ByteString getUrlBytes()A `url` pointing to the file's content.
string url = 3;- Specified by:
getUrlBytesin interfacePartOrBuilder- Returns:
- The bytes for url.
-
hasData
public boolean hasData()Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null).
.google.protobuf.Value data = 4;- Specified by:
hasDatain interfacePartOrBuilder- Returns:
- Whether the data field is set.
-
getData
public com.google.protobuf.Value getData()Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null).
.google.protobuf.Value data = 4;- Specified by:
getDatain interfacePartOrBuilder- Returns:
- The data.
-
getDataOrBuilder
public com.google.protobuf.ValueOrBuilder getDataOrBuilder()Arbitrary structured `data` as a JSON value (object, array, string, number, boolean, or null).
.google.protobuf.Value data = 4;- Specified by:
getDataOrBuilderin interfacePartOrBuilder
-
hasMetadata
public boolean hasMetadata()Optional. metadata associated with this part.
.google.protobuf.Struct metadata = 5;- Specified by:
hasMetadatain interfacePartOrBuilder- Returns:
- Whether the metadata field is set.
-
getMetadata
public com.google.protobuf.Struct getMetadata()Optional. metadata associated with this part.
.google.protobuf.Struct metadata = 5;- Specified by:
getMetadatain interfacePartOrBuilder- Returns:
- The metadata.
-
getMetadataOrBuilder
public com.google.protobuf.StructOrBuilder getMetadataOrBuilder()Optional. metadata associated with this part.
.google.protobuf.Struct metadata = 5;- Specified by:
getMetadataOrBuilderin interfacePartOrBuilder
-
getFilename
An optional `filename` for the file (e.g., "document.pdf").
string filename = 6;- Specified by:
getFilenamein interfacePartOrBuilder- Returns:
- The filename.
-
getFilenameBytes
public com.google.protobuf.ByteString getFilenameBytes()An optional `filename` for the file (e.g., "document.pdf").
string filename = 6;- Specified by:
getFilenameBytesin interfacePartOrBuilder- Returns:
- The bytes for filename.
-
getMediaType
The `media_type` (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png"). This field is available for all part types.
string media_type = 7;- Specified by:
getMediaTypein interfacePartOrBuilder- Returns:
- The mediaType.
-
getMediaTypeBytes
public com.google.protobuf.ByteString getMediaTypeBytes()The `media_type` (MIME type) of the part content (e.g., "text/plain", "application/json", "image/png"). This field is available for all part types.
string media_type = 7;- Specified by:
getMediaTypeBytesin interfacePartOrBuilder- Returns:
- The bytes for mediaType.
-
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 Part parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Part parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Part parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Part parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static Part parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Part parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static Part parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static Part 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
- 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
-