Record Class MistralOcrApi.OCRResponse
java.lang.Object
java.lang.Record
org.springframework.ai.mistralai.ocr.MistralOcrApi.OCRResponse
- Record Components:
pages
- List of OCR info for pages.model
- The model used to generate the OCR.usageInfo
- Usage info for the OCR request.pagesProcessed
- Number of pages processed.docSizeBytes
- Document size in bytes.
- Enclosing class:
- MistralOcrApi
public static record MistralOcrApi.OCRResponse(List<MistralOcrApi.OCRPage> pages, String model, MistralOcrApi.OCRUsageInfo usageInfo, Integer pagesProcessed, Integer docSizeBytes)
extends Record
Represents the response from the OCR API.
-
Constructor Summary
ConstructorsConstructorDescriptionOCRResponse
(List<MistralOcrApi.OCRPage> pages, String model, MistralOcrApi.OCRUsageInfo usageInfo, Integer pagesProcessed, Integer docSizeBytes) Creates an instance of aOCRResponse
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedocSizeBytes
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.model()
Returns the value of themodel
record component.pages()
Returns the value of thepages
record component.Returns the value of thepagesProcessed
record component.final String
toString()
Returns a string representation of this record class.Returns the value of theusageInfo
record component.
-
Constructor Details
-
OCRResponse
public OCRResponse(List<MistralOcrApi.OCRPage> pages, String model, MistralOcrApi.OCRUsageInfo usageInfo, Integer pagesProcessed, Integer docSizeBytes) Creates an instance of aOCRResponse
record class.- Parameters:
pages
- the value for thepages
record componentmodel
- the value for themodel
record componentusageInfo
- the value for theusageInfo
record componentpagesProcessed
- the value for thepagesProcessed
record componentdocSizeBytes
- the value for thedocSizeBytes
record component
-
-
Method Details
-
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. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
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 withObjects::equals(Object,Object)
. -
pages
Returns the value of thepages
record component.- Returns:
- the value of the
pages
record component
-
model
Returns the value of themodel
record component.- Returns:
- the value of the
model
record component
-
usageInfo
Returns the value of theusageInfo
record component.- Returns:
- the value of the
usageInfo
record component
-
pagesProcessed
Returns the value of thepagesProcessed
record component.- Returns:
- the value of the
pagesProcessed
record component
-
docSizeBytes
Returns the value of thedocSizeBytes
record component.- Returns:
- the value of the
docSizeBytes
record component
-