Class MessageInputImageUrlBlock

java.lang.Object
com.azure.ai.agents.persistent.models.MessageInputContentBlock
com.azure.ai.agents.persistent.models.MessageInputImageUrlBlock
All Implemented Interfaces:
com.azure.json.JsonSerializable<MessageInputContentBlock>

public final class MessageInputImageUrlBlock extends MessageInputContentBlock
An image-URL block in a new message, referencing an external image by URL.
  • Constructor Details

    • MessageInputImageUrlBlock

      public MessageInputImageUrlBlock(MessageImageUrlParam imageUrl)
      Creates an instance of MessageInputImageUrlBlock class.
      Parameters:
      imageUrl - the imageUrl value to set.
  • Method Details

    • getType

      public MessageBlockType getType()
      Get the type property: Specifies which kind of content block this is (text, image_file, image_url, etc.).
      Overrides:
      getType in class MessageInputContentBlock
      Returns:
      the type value.
    • getImageUrl

      public MessageImageUrlParam getImageUrl()
      Get the imageUrl property: Information about the external image URL, including the URL and optional detail level.
      Returns:
      the imageUrl value.
    • toJson

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

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