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 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
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 thepagesrecord component.- Returns:
- the value of the
pagesrecord component
-
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
usageInfo
Returns the value of theusageInforecord component.- Returns:
- the value of the
usageInforecord component
-
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
-