Class ClassifyRun.Builder
- java.lang.Object
-
- ai.extend.types.ClassifyRun.Builder
-
- All Implemented Interfaces:
ClassifyRun._FinalStage,ClassifyRun.ConfigStage,ClassifyRun.CreatedAtStage,ClassifyRun.DashboardUrlStage,ClassifyRun.EditedStage,ClassifyRun.IdStage,ClassifyRun.ReviewedStage,ClassifyRun.StatusStage,ClassifyRun.UpdatedAtStage
- Enclosing class:
- ClassifyRun
public static final class ClassifyRun.Builder extends java.lang.Object implements ClassifyRun.IdStage, ClassifyRun.StatusStage, ClassifyRun.ReviewedStage, ClassifyRun.EditedStage, ClassifyRun.ConfigStage, ClassifyRun.DashboardUrlStage, ClassifyRun.CreatedAtStage, ClassifyRun.UpdatedAtStage, ClassifyRun._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClassifyRunbuild()ClassifyRun._FinalStageclassifier(Nullable<ClassifierSummary> classifier)The classifier that was used for this run.ClassifyRun._FinalStageclassifier(ClassifierSummary classifier)The classifier that was used for this run.ClassifyRun._FinalStageclassifier(java.util.Optional<ClassifierSummary> classifier)The classifier that was used for this run.ClassifyRun._FinalStageclassifierVersion(Nullable<ClassifierVersionSummary> classifierVersion)The version of the classifier that was used for this run.ClassifyRun._FinalStageclassifierVersion(ClassifierVersionSummary classifierVersion)The version of the classifier that was used for this run.ClassifyRun._FinalStageclassifierVersion(java.util.Optional<ClassifierVersionSummary> classifierVersion)The version of the classifier that was used for this run.ClassifyRun.DashboardUrlStageconfig(ClassifyConfig config)The configuration used for this classify run.ClassifyRun.UpdatedAtStagecreatedAt(java.time.OffsetDateTime createdAt)ClassifyRun.CreatedAtStagedashboardUrl(java.lang.String dashboardUrl)The URL to view the classify run in the Extend dashboard.ClassifyRun.ConfigStageedited(boolean edited)Indicates whether the run results have been edited during review.ClassifyRun._FinalStagefailureMessage(Nullable<java.lang.String> failureMessage)A detailed message about the failure.ClassifyRun._FinalStagefailureMessage(java.lang.String failureMessage)A detailed message about the failure.ClassifyRun._FinalStagefailureMessage(java.util.Optional<java.lang.String> failureMessage)A detailed message about the failure.ClassifyRun._FinalStagefailureReason(Nullable<java.lang.String> failureReason)The reason for failure.ClassifyRun._FinalStagefailureReason(java.lang.String failureReason)The reason for failure.ClassifyRun._FinalStagefailureReason(java.util.Optional<java.lang.String> failureReason)The reason for failure.ClassifyRun._FinalStagefile(Nullable<FileSummary> file)The file that was processed.ClassifyRun._FinalStagefile(FileSummary file)The file that was processed.ClassifyRun._FinalStagefile(java.util.Optional<FileSummary> file)The file that was processed.ClassifyRun.Builderfrom(ClassifyRun other)ClassifyRun.StatusStageid(java.lang.String id)The unique identifier for this classify run.ClassifyRun._FinalStageinitialOutput(Nullable<ClassifyOutput> initialOutput)The initial output from the classify run, before any review edits.ClassifyRun._FinalStageinitialOutput(ClassifyOutput initialOutput)The initial output from the classify run, before any review edits.ClassifyRun._FinalStageinitialOutput(java.util.Optional<ClassifyOutput> initialOutput)The initial output from the classify run, before any review edits.ClassifyRun._FinalStagemetadata(Nullable<java.util.Map<java.lang.String,java.lang.Object>> metadata)Any metadata that was provided when creating the classify run.ClassifyRun._FinalStagemetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)Any metadata that was provided when creating the classify run.ClassifyRun._FinalStagemetadata(java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> metadata)Any metadata that was provided when creating the classify run.ClassifyRun._FinalStageoutput(Nullable<ClassifyOutput> output)The final output, either reviewed or initial.ClassifyRun._FinalStageoutput(ClassifyOutput output)The final output, either reviewed or initial.ClassifyRun._FinalStageoutput(java.util.Optional<ClassifyOutput> output)The final output, either reviewed or initial.ClassifyRun._FinalStageparseRunId(Nullable<java.lang.String> parseRunId)The ID of the parse run that was used for this classify run.ClassifyRun._FinalStageparseRunId(java.lang.String parseRunId)The ID of the parse run that was used for this classify run.ClassifyRun._FinalStageparseRunId(java.util.Optional<java.lang.String> parseRunId)The ID of the parse run that was used for this classify run.ClassifyRun.EditedStagereviewed(boolean reviewed)Indicates whether the run has been reviewed by a human.ClassifyRun._FinalStagereviewedOutput(Nullable<ClassifyOutput> reviewedOutput)The output after human review.ClassifyRun._FinalStagereviewedOutput(ClassifyOutput reviewedOutput)The output after human review.ClassifyRun._FinalStagereviewedOutput(java.util.Optional<ClassifyOutput> reviewedOutput)The output after human review.ClassifyRun.ReviewedStagestatus(ProcessorRunStatus status)ClassifyRun._FinalStageupdatedAt(java.time.OffsetDateTime updatedAt)ClassifyRun._FinalStageusage(Nullable<RunUsage> usage)Usage credits consumed by this classify run.ClassifyRun._FinalStageusage(RunUsage usage)Usage credits consumed by this classify run.ClassifyRun._FinalStageusage(java.util.Optional<RunUsage> usage)Usage credits consumed by this classify run.
-
-
-
Method Detail
-
from
public ClassifyRun.Builder from(ClassifyRun other)
- Specified by:
fromin interfaceClassifyRun.IdStage
-
id
public ClassifyRun.StatusStage id(@NotNull java.lang.String id)
The unique identifier for this classify run.
Example:
"clr_Xj8mK2pL9nR4vT7qY5wZ"The unique identifier for this classify run.
Example:
"clr_Xj8mK2pL9nR4vT7qY5wZ"- Specified by:
idin interfaceClassifyRun.IdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
status
public ClassifyRun.ReviewedStage status(@NotNull ProcessorRunStatus status)
- Specified by:
statusin interfaceClassifyRun.StatusStage
-
reviewed
public ClassifyRun.EditedStage reviewed(boolean reviewed)
Indicates whether the run has been reviewed by a human.
Indicates whether the run has been reviewed by a human.
- Specified by:
reviewedin interfaceClassifyRun.ReviewedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
edited
public ClassifyRun.ConfigStage edited(boolean edited)
Indicates whether the run results have been edited during review.
Indicates whether the run results have been edited during review.
- Specified by:
editedin interfaceClassifyRun.EditedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
config
public ClassifyRun.DashboardUrlStage config(@NotNull ClassifyConfig config)
The configuration used for this classify run.
The configuration used for this classify run.
- Specified by:
configin interfaceClassifyRun.ConfigStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
dashboardUrl
public ClassifyRun.CreatedAtStage dashboardUrl(@NotNull java.lang.String dashboardUrl)
The URL to view the classify run in the Extend dashboard.
The URL to view the classify run in the Extend dashboard.
- Specified by:
dashboardUrlin interfaceClassifyRun.DashboardUrlStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
createdAt
public ClassifyRun.UpdatedAtStage createdAt(@NotNull java.time.OffsetDateTime createdAt)
- Specified by:
createdAtin interfaceClassifyRun.CreatedAtStage
-
updatedAt
public ClassifyRun._FinalStage updatedAt(@NotNull java.time.OffsetDateTime updatedAt)
- Specified by:
updatedAtin interfaceClassifyRun.UpdatedAtStage
-
usage
public ClassifyRun._FinalStage usage(Nullable<RunUsage> usage)
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.- Specified by:
usagein interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
usage
public ClassifyRun._FinalStage usage(RunUsage usage)
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.- Specified by:
usagein interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
usage
public ClassifyRun._FinalStage usage(java.util.Optional<RunUsage> usage)
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.- Specified by:
usagein interfaceClassifyRun._FinalStage
-
parseRunId
public ClassifyRun._FinalStage parseRunId(Nullable<java.lang.String> parseRunId)
The ID of the parse run that was used for this classify run.
Availability: Present when a parse run was created.
- Specified by:
parseRunIdin interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
parseRunId
public ClassifyRun._FinalStage parseRunId(java.lang.String parseRunId)
The ID of the parse run that was used for this classify run.
Availability: Present when a parse run was created.
- Specified by:
parseRunIdin interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
parseRunId
public ClassifyRun._FinalStage parseRunId(java.util.Optional<java.lang.String> parseRunId)
The ID of the parse run that was used for this classify run.
Availability: Present when a parse run was created.
- Specified by:
parseRunIdin interfaceClassifyRun._FinalStage
-
file
public ClassifyRun._FinalStage file(Nullable<FileSummary> file)
The file that was processed.
nullwhen the file could not be accessed or processed (for example a run that failed during file ingestion, or a multi-file batch run).- Specified by:
filein interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
file
public ClassifyRun._FinalStage file(FileSummary file)
The file that was processed.
nullwhen the file could not be accessed or processed (for example a run that failed during file ingestion, or a multi-file batch run).- Specified by:
filein interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
file
public ClassifyRun._FinalStage file(java.util.Optional<FileSummary> file)
The file that was processed.
nullwhen the file could not be accessed or processed (for example a run that failed during file ingestion, or a multi-file batch run).- Specified by:
filein interfaceClassifyRun._FinalStage
-
metadata
public ClassifyRun._FinalStage metadata(Nullable<java.util.Map<java.lang.String,java.lang.Object>> metadata)
Any metadata that was provided when creating the classify run.
Availability: Present when metadata was provided during creation.
- Specified by:
metadatain interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
metadata
public ClassifyRun._FinalStage metadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
Any metadata that was provided when creating the classify run.
Availability: Present when metadata was provided during creation.
- Specified by:
metadatain interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
metadata
public ClassifyRun._FinalStage metadata(java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> metadata)
Any metadata that was provided when creating the classify run.
Availability: Present when metadata was provided during creation.
- Specified by:
metadatain interfaceClassifyRun._FinalStage
-
failureMessage
public ClassifyRun._FinalStage failureMessage(Nullable<java.lang.String> failureMessage)
A detailed message about the failure.
Availability: Present when
statusis"FAILED".- Specified by:
failureMessagein interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureMessage
public ClassifyRun._FinalStage failureMessage(java.lang.String failureMessage)
A detailed message about the failure.
Availability: Present when
statusis"FAILED".- Specified by:
failureMessagein interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureMessage
public ClassifyRun._FinalStage failureMessage(java.util.Optional<java.lang.String> failureMessage)
A detailed message about the failure.
Availability: Present when
statusis"FAILED".- Specified by:
failureMessagein interfaceClassifyRun._FinalStage
-
failureReason
public ClassifyRun._FinalStage failureReason(Nullable<java.lang.String> failureReason)
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.
- Specified by:
failureReasonin interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureReason
public ClassifyRun._FinalStage failureReason(java.lang.String failureReason)
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.
- Specified by:
failureReasonin interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureReason
public ClassifyRun._FinalStage failureReason(java.util.Optional<java.lang.String> failureReason)
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.
- Specified by:
failureReasonin interfaceClassifyRun._FinalStage
-
reviewedOutput
public ClassifyRun._FinalStage reviewedOutput(Nullable<ClassifyOutput> reviewedOutput)
The output after human review.
Availability: Present when
reviewedistrue.- Specified by:
reviewedOutputin interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
reviewedOutput
public ClassifyRun._FinalStage reviewedOutput(ClassifyOutput reviewedOutput)
The output after human review.
Availability: Present when
reviewedistrue.- Specified by:
reviewedOutputin interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
reviewedOutput
public ClassifyRun._FinalStage reviewedOutput(java.util.Optional<ClassifyOutput> reviewedOutput)
The output after human review.
Availability: Present when
reviewedistrue.- Specified by:
reviewedOutputin interfaceClassifyRun._FinalStage
-
initialOutput
public ClassifyRun._FinalStage initialOutput(Nullable<ClassifyOutput> initialOutput)
The initial output from the classify run, before any review edits.
Availability: Present when
reviewedistrue.- Specified by:
initialOutputin interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
initialOutput
public ClassifyRun._FinalStage initialOutput(ClassifyOutput initialOutput)
The initial output from the classify run, before any review edits.
Availability: Present when
reviewedistrue.- Specified by:
initialOutputin interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
initialOutput
public ClassifyRun._FinalStage initialOutput(java.util.Optional<ClassifyOutput> initialOutput)
The initial output from the classify run, before any review edits.
Availability: Present when
reviewedistrue.- Specified by:
initialOutputin interfaceClassifyRun._FinalStage
-
classifierVersion
public ClassifyRun._FinalStage classifierVersion(Nullable<ClassifierVersionSummary> classifierVersion)
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.- Specified by:
classifierVersionin interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
classifierVersion
public ClassifyRun._FinalStage classifierVersion(ClassifierVersionSummary classifierVersion)
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.- Specified by:
classifierVersionin interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
classifierVersion
public ClassifyRun._FinalStage classifierVersion(java.util.Optional<ClassifierVersionSummary> classifierVersion)
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.- Specified by:
classifierVersionin interfaceClassifyRun._FinalStage
-
classifier
public ClassifyRun._FinalStage classifier(Nullable<ClassifierSummary> classifier)
The classifier that was used for this run.
Availability: Present when a classifier reference was provided. Not present when using inline
config.- Specified by:
classifierin interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
classifier
public ClassifyRun._FinalStage classifier(ClassifierSummary classifier)
The classifier that was used for this run.
Availability: Present when a classifier reference was provided. Not present when using inline
config.- Specified by:
classifierin interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
classifier
public ClassifyRun._FinalStage classifier(java.util.Optional<ClassifierSummary> classifier)
The classifier that was used for this run.
Availability: Present when a classifier reference was provided. Not present when using inline
config.- Specified by:
classifierin interfaceClassifyRun._FinalStage
-
output
public ClassifyRun._FinalStage output(Nullable<ClassifyOutput> output)
The final output, either reviewed or initial.
Availability: Present when
statusis"PROCESSED".- Specified by:
outputin interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
output
public ClassifyRun._FinalStage output(ClassifyOutput output)
The final output, either reviewed or initial.
Availability: Present when
statusis"PROCESSED".- Specified by:
outputin interfaceClassifyRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
output
public ClassifyRun._FinalStage output(java.util.Optional<ClassifyOutput> output)
The final output, either reviewed or initial.
Availability: Present when
statusis"PROCESSED".- Specified by:
outputin interfaceClassifyRun._FinalStage
-
build
public ClassifyRun build()
- Specified by:
buildin interfaceClassifyRun._FinalStage
-
-