Record Class MistralOcrApi.ExtractedImage

java.lang.Object
java.lang.Record
org.springframework.ai.mistralai.ocr.MistralOcrApi.ExtractedImage
Record Components:
id - Image ID for the extracted image in a page.
topLeftX - X coordinate of the top-left corner of the extracted image.
topLeftY - Y coordinate of the top-left corner of the extracted image.
bottomRightX - X coordinate of the bottom-right corner of the extracted image.
bottomRightY - Y coordinate of the bottom-right corner of the extracted image.
imageBase64 - Base64 string of the extracted image.
Enclosing class:
MistralOcrApi

public static record MistralOcrApi.ExtractedImage(String id, Integer topLeftX, Integer topLeftY, Integer bottomRightX, Integer bottomRightY, String imageBase64) extends Record
Represents an extracted image from a page.
  • Constructor Details

    • ExtractedImage

      public ExtractedImage(String id, Integer topLeftX, Integer topLeftY, Integer bottomRightX, Integer bottomRightY, String imageBase64)
      Creates an instance of a ExtractedImage record class.
      Parameters:
      id - the value for the id record component
      topLeftX - the value for the topLeftX record component
      topLeftY - the value for the topLeftY record component
      bottomRightX - the value for the bottomRightX record component
      bottomRightY - the value for the bottomRightY record component
      imageBase64 - the value for the imageBase64 record component
  • Method Details

    • equals

      public boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • hashCode

      public int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • topLeftX

      public Integer topLeftX()
      Returns the value of the topLeftX record component.
      Returns:
      the value of the topLeftX record component
    • topLeftY

      public Integer topLeftY()
      Returns the value of the topLeftY record component.
      Returns:
      the value of the topLeftY record component
    • bottomRightX

      public Integer bottomRightX()
      Returns the value of the bottomRightX record component.
      Returns:
      the value of the bottomRightX record component
    • bottomRightY

      public Integer bottomRightY()
      Returns the value of the bottomRightY record component.
      Returns:
      the value of the bottomRightY record component
    • imageBase64

      public String imageBase64()
      Returns the value of the imageBase64 record component.
      Returns:
      the value of the imageBase64 record component