Class MessageDeltaContent
java.lang.Object
com.azure.ai.agents.persistent.models.MessageDeltaContent
- All Implemented Interfaces:
com.azure.json.JsonSerializable<MessageDeltaContent>
- Direct Known Subclasses:
MessageDeltaImageFileContent,MessageDeltaTextContent
public class MessageDeltaContent
extends Object
implements com.azure.json.JsonSerializable<MessageDeltaContent>
The abstract base representation of a partial streamed message content payload.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedMessageDeltaContent(int index) Creates an instance of MessageDeltaContent class. -
Method Summary
Modifier and TypeMethodDescriptionstatic MessageDeltaContentfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of MessageDeltaContent from the JsonReader.intgetIndex()Get the index property: The index of the content part of the message.getType()Get the type property: The type of content for this content part.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
-
MessageDeltaContent
protected MessageDeltaContent(int index) Creates an instance of MessageDeltaContent class.- Parameters:
index- the index value to set.
-
-
Method Details
-
getType
Get the type property: The type of content for this content part.- Returns:
- the type value.
-
getIndex
public int getIndex()Get the index property: The index of the content part of the message.- Returns:
- the index value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<MessageDeltaContent>- Throws:
IOException
-
fromJson
Reads an instance of MessageDeltaContent from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of MessageDeltaContent 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 MessageDeltaContent.
-