Class ResponsesMessage

java.lang.Object
com.azure.ai.openai.responses.models.ResponsesItem
com.azure.ai.openai.responses.models.ResponsesMessage
All Implemented Interfaces:
com.azure.json.JsonSerializable<ResponsesItem>
Direct Known Subclasses:
ResponsesAssistantMessage, ResponsesDeveloperMessage, ResponsesSystemMessage, ResponsesUserMessage

public class ResponsesMessage extends ResponsesItem
A response message item, representing a role and content.
  • Constructor Details

    • ResponsesMessage

      public ResponsesMessage()
      Creates an instance of ResponsesMessage class.
  • Method Details

    • getType

      public ResponsesItemType getType()
      Get the type property: The type property.
      Overrides:
      getType in class ResponsesItem
      Returns:
      the type value.
    • getRole

      public ResponsesMessageRole getRole()
      Get the role property: The role associated with the message.
      Returns:
      the role value.
    • getStatus

      public ResponsesMessageStatus getStatus()
      Get the status property: The status property.
      Returns:
      the status value.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<ResponsesItem>
      Overrides:
      toJson in class ResponsesItem
      Throws:
      IOException
    • fromJson

      public static ResponsesMessage fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ResponsesMessage from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ResponsesMessage if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IOException - If an error occurs while reading the ResponsesMessage.