Package ai.extend.types
Class ParseRunSummary
- java.lang.Object
-
- ai.extend.types.ParseRunSummary
-
public final class ParseRunSummary extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceParseRunSummary._FinalStagestatic classParseRunSummary.Builderstatic interfaceParseRunSummary.CreatedAtStagestatic interfaceParseRunSummary.FileStagestatic interfaceParseRunSummary.IdStagestatic interfaceParseRunSummary.StatusStagestatic interfaceParseRunSummary.UpdatedAtStage
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParseRunSummary.IdStagebuilder()booleanequals(java.lang.Object other)java.util.Map<java.lang.String,java.lang.Object>getAdditionalProperties()java.util.Optional<java.lang.String>getBatchId()java.time.OffsetDateTimegetCreatedAt()java.util.Optional<java.lang.String>getFailureMessage()java.util.Optional<java.lang.String>getFailureReason()FileSummarygetFile()java.lang.StringgetId()java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>getMetadata()java.util.Optional<ParseRunSummaryMetrics>getMetrics()java.lang.StringgetObject()ParseRunSummaryStatusgetStatus()java.time.OffsetDateTimegetUpdatedAt()java.util.Optional<RunUsageSummary>getUsage()inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getObject
public java.lang.String getObject()
- Returns:
- The type of object. Will always be
"parse_run".
-
getId
public java.lang.String getId()
- Returns:
- A unique identifier for the parse run.
Example:
"pr_xK9mLPqRtN3vS8wF5hB2cQ"
-
getBatchId
public java.util.Optional<java.lang.String> getBatchId()
- Returns:
- The ID of the batch this run belongs to, if created via
POST /parse_runs/batch.Availability: Present when the run was submitted as part of a batch.
Example:
"bpar_Xj8mK2pL9nR4vT7qY5wZ"
-
getFile
public FileSummary getFile()
- Returns:
- The file that was parsed. This file can be used as a parameter for other Extend endpoints, such as
POST /workflow_runs. May benullfor batch parse runs where file ingestion failed.
-
getStatus
public ParseRunSummaryStatus getStatus()
- Returns:
- The status of the parse run:
"PENDING"- The run has been created and is waiting to be processed. Only applies to runs created viaPOST /parse_runs/batch."PROCESSING"- The file is still being processed"PROCESSED"- The file was successfully processed"FAILED"- The processing failed (seefailureReasonfor details)
-
getFailureReason
public java.util.Optional<java.lang.String> getFailureReason()
- Returns:
- The reason for failure.
Availability: Present when
statusis"FAILED".Possible values include:
UNABLE_TO_DOWNLOAD_FILE- The file could not be downloaded from the provided URLFILE_TYPE_NOT_SUPPORTED- The file type is not supported for parsingFILE_SIZE_TOO_LARGE- The file exceeds the maximum allowed sizeCORRUPT_FILE- The file appears to be corrupted or malformedOCR_ERROR- An error occurred during optical character recognitionPASSWORD_PROTECTED_FILE- The file is password protected and cannot be processedFAILED_TO_CONVERT_TO_PDF- The file could not be converted to PDF for processingFAILED_TO_CONVERT_TO_JPEG- The file could not be converted to JPEG for processingFAILED_TO_GENERATE_TARGET_FORMAT- The output could not be generated in the requested formatCHUNKING_ERROR- An error occurred while chunking the documentINTERNAL_ERROR- An unexpected internal error occurredINVALID_CONFIG_OPTIONS- The provided configuration options are invalidOUT_OF_CREDITS- Insufficient credits to process the file
Note: Additional failure reasons may be added in the future. Your integration should handle unknown values gracefully.
-
getFailureMessage
public java.util.Optional<java.lang.String> getFailureMessage()
- Returns:
- A human-readable description of the failure.
Availability: Present when
statusis"FAILED".
-
getMetadata
public java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> getMetadata()
- Returns:
- Any metadata that was provided when creating the parse run.
Availability: Present when metadata was provided during creation.
-
getMetrics
public java.util.Optional<ParseRunSummaryMetrics> getMetrics()
- Returns:
- Metrics about the parsing process.
Availability: Present when
statusis"PROCESSED".
-
getUsage
public java.util.Optional<RunUsageSummary> getUsage()
- Returns:
- Usage credits consumed by this parse run. Omits
breakdown— fetch the full parse run by id to see the per-line items.Availability: Present when
statusis"PROCESSED", the run was created after October 7, 2025, and the customer is on the current billing system.
-
getCreatedAt
public java.time.OffsetDateTime getCreatedAt()
-
getUpdatedAt
public java.time.OffsetDateTime getUpdatedAt()
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
getAdditionalProperties
public java.util.Map<java.lang.String,java.lang.Object> getAdditionalProperties()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
builder
public static ParseRunSummary.IdStage builder()
-
-