Class ChatMessageAudioContentItem

java.lang.Object
com.azure.ai.openai.models.ChatMessageContentItem
com.azure.ai.openai.models.ChatMessageAudioContentItem
All Implemented Interfaces:
com.azure.json.JsonSerializable<ChatMessageContentItem>

public final class ChatMessageAudioContentItem extends ChatMessageContentItem
A structured chat content item containing audio data.
  • Constructor Details

    • ChatMessageAudioContentItem

      public ChatMessageAudioContentItem(InputAudioContent inputAudio)
      Creates an instance of ChatMessageAudioContentItem class.
      Parameters:
      inputAudio - the inputAudio value to set.
  • Method Details

    • getType

      public String getType()
      Get the type property: The discriminated object type.
      Overrides:
      getType in class ChatMessageContentItem
      Returns:
      the type value.
    • getInputAudio

      public InputAudioContent getInputAudio()
      Get the inputAudio property: The audio data.
      Returns:
      the inputAudio value.
    • toJson

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

      public static ChatMessageAudioContentItem fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ChatMessageAudioContentItem from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ChatMessageAudioContentItem 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 ChatMessageAudioContentItem.