Class ClassifyRun
- java.lang.Object
-
- ai.extend.types.ClassifyRun
-
public final class ClassifyRun extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceClassifyRun._FinalStagestatic classClassifyRun.Builderstatic interfaceClassifyRun.ConfigStagestatic interfaceClassifyRun.CreatedAtStagestatic interfaceClassifyRun.DashboardUrlStagestatic interfaceClassifyRun.EditedStagestatic interfaceClassifyRun.FileStagestatic interfaceClassifyRun.IdStagestatic interfaceClassifyRun.ReviewedStagestatic interfaceClassifyRun.StatusStagestatic interfaceClassifyRun.UpdatedAtStage
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ClassifyRun.IdStagebuilder()booleanequals(java.lang.Object other)java.util.Map<java.lang.String,java.lang.Object>getAdditionalProperties()java.util.Optional<ClassifierSummary>getClassifier()java.util.Optional<ClassifierVersionSummary>getClassifierVersion()ClassifyConfiggetConfig()java.time.OffsetDateTimegetCreatedAt()java.lang.StringgetDashboardUrl()booleangetEdited()java.util.Optional<java.lang.String>getFailureMessage()java.util.Optional<java.lang.String>getFailureReason()FileSummarygetFile()java.lang.StringgetId()java.util.Optional<ClassifyOutput>getInitialOutput()java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>getMetadata()java.lang.StringgetObject()java.util.Optional<ClassifyOutput>getOutput()java.util.Optional<java.lang.String>getParseRunId()booleangetReviewed()java.util.Optional<ClassifyOutput>getReviewedOutput()ProcessorRunStatusgetStatus()java.time.OffsetDateTimegetUpdatedAt()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
"classify_run".
-
getId
public java.lang.String getId()
- Returns:
- The unique identifier for this classify run.
Example:
"clr_Xj8mK2pL9nR4vT7qY5wZ"
-
getClassifier
public java.util.Optional<ClassifierSummary> getClassifier()
- Returns:
- The classifier that was used for this run.
Availability: Present when a classifier reference was provided. Not present when using inline
config.
-
getClassifierVersion
public java.util.Optional<ClassifierVersionSummary> getClassifierVersion()
- Returns:
- The version of the classifier that was used for this run.
Availability: Present when a classifier reference was provided. Not present when using inline
config.
-
getStatus
public ProcessorRunStatus getStatus()
-
getOutput
public java.util.Optional<ClassifyOutput> getOutput()
- Returns:
- The final output, either reviewed or initial.
Availability: Present when
statusis"PROCESSED".
-
getInitialOutput
public java.util.Optional<ClassifyOutput> getInitialOutput()
- Returns:
- The initial output from the classify run, before any review edits.
Availability: Present when
reviewedistrue.
-
getReviewedOutput
public java.util.Optional<ClassifyOutput> getReviewedOutput()
- Returns:
- The output after human review.
Availability: Present when
reviewedistrue.
-
getFailureReason
public java.util.Optional<java.lang.String> getFailureReason()
- Returns:
- The reason for failure.
Availability: Present when
statusis"FAILED".Possible values include:
ABORTED- The run was aborted by the userINTERNAL_ERROR- An unexpected internal error occurredFAILED_TO_PROCESS_FILE- Failed to process the file (e.g., OCR failure, file access issues)INVALID_PROCESSOR- The processor configuration is invalidINVALID_CONFIGURATION- The provided configuration is incompatible with the selected modelPARSING_ERROR- Failed to parse the classification outputPRE_PROCESSING_FAILURE- An error occurred during preprocessingPOST_PROCESSING_FAILURE- An error occurred during postprocessingOUT_OF_CREDITS- Insufficient credits to run the classification
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 detailed message about 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 classify run.
Availability: Present when metadata was provided during creation.
-
getReviewed
public boolean getReviewed()
- Returns:
- Indicates whether the run has been reviewed by a human.
-
getEdited
public boolean getEdited()
- Returns:
- Indicates whether the run results have been edited during review.
-
getConfig
public ClassifyConfig getConfig()
- Returns:
- The configuration used for this classify run.
-
getFile
public FileSummary getFile()
- Returns:
- The file that was processed.
-
getParseRunId
public java.util.Optional<java.lang.String> getParseRunId()
- Returns:
- The ID of the parse run that was used for this classify run.
Availability: Present when a parse run was created.
-
getDashboardUrl
public java.lang.String getDashboardUrl()
- Returns:
- The URL to view the classify run in the Extend dashboard.
-
getUsage
public java.util.Optional<RunUsage> getUsage()
- Returns:
- Usage credits consumed by this classify run.
Availability: Present when
statusis"PROCESSED". Will not be returned for runs created before October 7, 2025 or for customers on legacy billing systems.
-
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 ClassifyRun.IdStage builder()
-
-