Class MessageAttachment
java.lang.Object
com.azure.ai.agents.persistent.models.MessageAttachment
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MessageAttachment>
public final class MessageAttachment
extends Object
implements com.azure.json.JsonSerializable<MessageAttachment>
This describes to which tools a file has been attached.
-
Constructor Summary
ConstructorsConstructorDescriptionMessageAttachment(List<com.azure.core.util.BinaryData> tools) Creates an instance of MessageAttachment class. -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageAttachmentfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of MessageAttachment from the JsonReader.Get the dataSource property: Azure asset ID.Get the fileId property: The ID of the file to attach to the message.List<com.azure.core.util.BinaryData> getTools()Get the tools property: The tools to add to this file.setDataSource(VectorStoreDataSource dataSource) Set the dataSource property: Azure asset ID.Set the fileId property: The ID of the file to attach to the message.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
MessageAttachment
Creates an instance of MessageAttachment class.- Parameters:
tools- the tools value to set.
-
-
Method Details
-
getFileId
Get the fileId property: The ID of the file to attach to the message.- Returns:
- the fileId value.
-
setFileId
Set the fileId property: The ID of the file to attach to the message.- Parameters:
fileId- the fileId value to set.- Returns:
- the MessageAttachment object itself.
-
getDataSource
Get the dataSource property: Azure asset ID.- Returns:
- the dataSource value.
-
setDataSource
Set the dataSource property: Azure asset ID.- Parameters:
dataSource- the dataSource value to set.- Returns:
- the MessageAttachment object itself.
-
getTools
Get the tools property: The tools to add to this file.- Returns:
- the tools value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<MessageAttachment>- Throws:
IOException
-
fromJson
Reads an instance of MessageAttachment from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of MessageAttachment if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the MessageAttachment.
-