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.
- Since:
- 1.1.0
- Author:
- Alexandros Pappas
-
Constructor Summary
ConstructorsConstructorDescriptionOCRResponse(List<MistralOcrApi.OCRPage> pages, String model, MistralOcrApi.OCRUsageInfo usageInfo, Integer pagesProcessed, Integer docSizeBytes) Creates an instance of aOCRResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedocSizeBytesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.model()Returns the value of themodelrecord component.pages()Returns the value of thepagesrecord component.Returns the value of thepagesProcessedrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theusageInforecord component.
-
Constructor Details
-
OCRResponse
public OCRResponse(List<MistralOcrApi.OCRPage> pages, String model, MistralOcrApi.OCRUsageInfo usageInfo, Integer pagesProcessed, Integer docSizeBytes) Creates an instance of aOCRResponserecord class.- Parameters:
pages- the value for thepagesrecord componentmodel- the value for themodelrecord componentusageInfo- the value for theusageInforecord componentpagesProcessed- the value for thepagesProcessedrecord componentdocSizeBytes- the value for thedocSizeBytesrecord component
-
-
Method Details
-
toString
-
hashCode
-
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
-
model
-
usageInfo
-
pagesProcessed
Returns the value of thepagesProcessedrecord component.- Returns:
- the value of the
pagesProcessedrecord component
-
docSizeBytes
Returns the value of thedocSizeBytesrecord component.- Returns:
- the value of the
docSizeBytesrecord component
-