Class MessageInputImageFileBlock

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

public final class MessageInputImageFileBlock extends MessageInputContentBlock
An image-file block in a new message, referencing an internally uploaded image by file ID.
  • Constructor Details

    • MessageInputImageFileBlock

      public MessageInputImageFileBlock(MessageImageFileParam imageFile)
      Creates an instance of MessageInputImageFileBlock class.
      Parameters:
      imageFile - the imageFile 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.
    • getImageFile

      public MessageImageFileParam getImageFile()
      Get the imageFile property: Information about the referenced image file, including file ID and optional detail level.
      Returns:
      the imageFile 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 MessageInputImageFileBlock fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of MessageInputImageFileBlock from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of MessageInputImageFileBlock 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 MessageInputImageFileBlock.