Package ai.extend.types
Class EditRun
- java.lang.Object
-
- ai.extend.types.EditRun
-
public final class EditRun extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceEditRun._FinalStagestatic classEditRun.Builderstatic interfaceEditRun.ConfigStagestatic interfaceEditRun.FileStagestatic interfaceEditRun.IdStagestatic interfaceEditRun.StatusStage
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EditRun.IdStagebuilder()booleanequals(java.lang.Object other)java.util.Map<java.lang.String,java.lang.Object>getAdditionalProperties()EditConfiggetConfig()java.util.Optional<java.lang.String>getFailureMessage()java.util.Optional<java.lang.String>getFailureReason()FileSummarygetFile()java.lang.StringgetId()java.util.Optional<EditRunMetrics>getMetrics()java.lang.StringgetObject()java.util.Optional<EditRunOutput>getOutput()EditRunStatusgetStatus()java.util.Optional<RunUsage>getUsage()inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getObject
public java.lang.String getObject()
- Returns:
- The type of object. Will always be
"edit_run".
-
getId
public java.lang.String getId()
- Returns:
- A unique identifier for the edit run.
Example:
"edr_xK9mLPqRtN3vS8wF5hB2cQ"
-
getFile
public FileSummary getFile()
- Returns:
- The input file that was submitted for editing.
-
getStatus
public EditRunStatus getStatus()
- Returns:
- The status of the edit run:
"PROCESSING"- The file is still being processed"PROCESSED"- The file was successfully edited"FAILED"- The editing 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- Failed to load the requested fileFILE_TYPE_NOT_SUPPORTED- File type not supported. Edit runs currently require a PDFFILE_SIZE_TOO_LARGE- The file exceeds the maximum allowed sizeCORRUPT_FILE- The file appears to be corrupted and cannot be editedFIELD_DETECTION_ERROR- An error occurred during field detectionPASSWORD_PROTECTED_FILE- The file is password protected and cannot be editedFAILED_TO_CONVERT_TO_PDF- The file could not be converted to PDF for processingINTERNAL_ERROR- An unexpected internal error occurredINVALID_OPTIONS- The provided configuration options are invalidEMPTY_SCHEMA- No schema was provided and no fields could be detectedOUT_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".
-
getConfig
public EditConfig getConfig()
- Returns:
- The configuration used for this edit run, including any default values that were applied.
-
getOutput
public java.util.Optional<EditRunOutput> getOutput()
- Returns:
- The output of the edit run.
Availability: Present when
statusis"PROCESSED".
-
getMetrics
public java.util.Optional<EditRunMetrics> getMetrics()
- Returns:
- Metrics about the editing process.
Availability: Present when
statusis"PROCESSED".
-
getUsage
public java.util.Optional<RunUsage> getUsage()
- Returns:
- Usage credits consumed by this edit run.
Availability: Present when
statusis"PROCESSED", the run was created after October 7, 2025, and the customer is on the current billing system.
-
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 EditRun.IdStage builder()
-
-