Class SplitRun.Builder
- java.lang.Object
-
- ai.extend.types.SplitRun.Builder
-
- All Implemented Interfaces:
SplitRun._FinalStage,SplitRun.ConfigStage,SplitRun.CreatedAtStage,SplitRun.DashboardUrlStage,SplitRun.EditedStage,SplitRun.FileStage,SplitRun.IdStage,SplitRun.ReviewedStage,SplitRun.StatusStage,SplitRun.UpdatedAtStage
- Enclosing class:
- SplitRun
public static final class SplitRun.Builder extends java.lang.Object implements SplitRun.IdStage, SplitRun.StatusStage, SplitRun.ReviewedStage, SplitRun.EditedStage, SplitRun.ConfigStage, SplitRun.FileStage, SplitRun.DashboardUrlStage, SplitRun.CreatedAtStage, SplitRun.UpdatedAtStage, SplitRun._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SplitRunbuild()SplitRun.FileStageconfig(SplitConfig config)The configuration used for this split run.SplitRun.UpdatedAtStagecreatedAt(java.time.OffsetDateTime createdAt)SplitRun.CreatedAtStagedashboardUrl(java.lang.String dashboardUrl)The URL to view the split run in the Extend dashboard.SplitRun.ConfigStageedited(boolean edited)Indicates whether the run results have been edited during review.SplitRun._FinalStagefailureMessage(Nullable<java.lang.String> failureMessage)A detailed message about the failure.SplitRun._FinalStagefailureMessage(java.lang.String failureMessage)A detailed message about the failure.SplitRun._FinalStagefailureMessage(java.util.Optional<java.lang.String> failureMessage)A detailed message about the failure.SplitRun._FinalStagefailureReason(Nullable<java.lang.String> failureReason)The reason for failure.SplitRun._FinalStagefailureReason(java.lang.String failureReason)The reason for failure.SplitRun._FinalStagefailureReason(java.util.Optional<java.lang.String> failureReason)The reason for failure.SplitRun.DashboardUrlStagefile(FileSummary file)The file that was processed.SplitRun.Builderfrom(SplitRun other)SplitRun.StatusStageid(java.lang.String id)The unique identifier for this split run.SplitRun._FinalStageinitialOutput(Nullable<SplitOutput> initialOutput)The initial output from the split run, before any review edits.SplitRun._FinalStageinitialOutput(SplitOutput initialOutput)The initial output from the split run, before any review edits.SplitRun._FinalStageinitialOutput(java.util.Optional<SplitOutput> initialOutput)The initial output from the split run, before any review edits.SplitRun._FinalStagemetadata(Nullable<java.util.Map<java.lang.String,java.lang.Object>> metadata)Any metadata that was provided when creating the split run.SplitRun._FinalStagemetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)Any metadata that was provided when creating the split run.SplitRun._FinalStagemetadata(java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> metadata)Any metadata that was provided when creating the split run.SplitRun._FinalStageoutput(Nullable<SplitOutput> output)The final output, either reviewed or initial.SplitRun._FinalStageoutput(SplitOutput output)The final output, either reviewed or initial.SplitRun._FinalStageoutput(java.util.Optional<SplitOutput> output)The final output, either reviewed or initial.SplitRun._FinalStageparseRunId(Nullable<java.lang.String> parseRunId)The ID of the parse run that was used for this split run.SplitRun._FinalStageparseRunId(java.lang.String parseRunId)The ID of the parse run that was used for this split run.SplitRun._FinalStageparseRunId(java.util.Optional<java.lang.String> parseRunId)The ID of the parse run that was used for this split run.SplitRun.EditedStagereviewed(boolean reviewed)Indicates whether the run has been reviewed by a human.SplitRun._FinalStagereviewedOutput(Nullable<SplitOutput> reviewedOutput)The output after human review.SplitRun._FinalStagereviewedOutput(SplitOutput reviewedOutput)The output after human review.SplitRun._FinalStagereviewedOutput(java.util.Optional<SplitOutput> reviewedOutput)The output after human review.SplitRun._FinalStagesplitter(Nullable<SplitterSummary> splitter)The splitter that was used for this run.SplitRun._FinalStagesplitter(SplitterSummary splitter)The splitter that was used for this run.SplitRun._FinalStagesplitter(java.util.Optional<SplitterSummary> splitter)The splitter that was used for this run.SplitRun._FinalStagesplitterVersion(Nullable<SplitterVersionSummary> splitterVersion)The version of the splitter that was used for this run.SplitRun._FinalStagesplitterVersion(SplitterVersionSummary splitterVersion)The version of the splitter that was used for this run.SplitRun._FinalStagesplitterVersion(java.util.Optional<SplitterVersionSummary> splitterVersion)The version of the splitter that was used for this run.SplitRun.ReviewedStagestatus(ProcessorRunStatus status)SplitRun._FinalStageupdatedAt(java.time.OffsetDateTime updatedAt)SplitRun._FinalStageusage(Nullable<RunUsage> usage)Usage credits consumed by this split run.SplitRun._FinalStageusage(RunUsage usage)Usage credits consumed by this split run.SplitRun._FinalStageusage(java.util.Optional<RunUsage> usage)Usage credits consumed by this split run.
-
-
-
Method Detail
-
from
public SplitRun.Builder from(SplitRun other)
- Specified by:
fromin interfaceSplitRun.IdStage
-
id
public SplitRun.StatusStage id(@NotNull java.lang.String id)
The unique identifier for this split run.
Example:
"splr_Xj8mK2pL9nR4vT7qY5wZ"The unique identifier for this split run.
Example:
"splr_Xj8mK2pL9nR4vT7qY5wZ"- Specified by:
idin interfaceSplitRun.IdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
status
public SplitRun.ReviewedStage status(@NotNull ProcessorRunStatus status)
- Specified by:
statusin interfaceSplitRun.StatusStage
-
reviewed
public SplitRun.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 interfaceSplitRun.ReviewedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
edited
public SplitRun.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 interfaceSplitRun.EditedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
config
public SplitRun.FileStage config(@NotNull SplitConfig config)
The configuration used for this split run.
The configuration used for this split run.
- Specified by:
configin interfaceSplitRun.ConfigStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
file
public SplitRun.DashboardUrlStage file(@NotNull FileSummary file)
The file that was processed.
The file that was processed.
- Specified by:
filein interfaceSplitRun.FileStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
dashboardUrl
public SplitRun.CreatedAtStage dashboardUrl(@NotNull java.lang.String dashboardUrl)
The URL to view the split run in the Extend dashboard.
The URL to view the split run in the Extend dashboard.
- Specified by:
dashboardUrlin interfaceSplitRun.DashboardUrlStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
createdAt
public SplitRun.UpdatedAtStage createdAt(@NotNull java.time.OffsetDateTime createdAt)
- Specified by:
createdAtin interfaceSplitRun.CreatedAtStage
-
updatedAt
public SplitRun._FinalStage updatedAt(@NotNull java.time.OffsetDateTime updatedAt)
- Specified by:
updatedAtin interfaceSplitRun.UpdatedAtStage
-
usage
public SplitRun._FinalStage usage(Nullable<RunUsage> usage)
Usage credits consumed by this split 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 interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
usage
public SplitRun._FinalStage usage(RunUsage usage)
Usage credits consumed by this split 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 interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
usage
public SplitRun._FinalStage usage(java.util.Optional<RunUsage> usage)
Usage credits consumed by this split 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 interfaceSplitRun._FinalStage
-
parseRunId
public SplitRun._FinalStage parseRunId(Nullable<java.lang.String> parseRunId)
The ID of the parse run that was used for this split run.
Availability: Present when a parse run was created.
- Specified by:
parseRunIdin interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
parseRunId
public SplitRun._FinalStage parseRunId(java.lang.String parseRunId)
The ID of the parse run that was used for this split run.
Availability: Present when a parse run was created.
- Specified by:
parseRunIdin interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
parseRunId
public SplitRun._FinalStage parseRunId(java.util.Optional<java.lang.String> parseRunId)
The ID of the parse run that was used for this split run.
Availability: Present when a parse run was created.
- Specified by:
parseRunIdin interfaceSplitRun._FinalStage
-
metadata
public SplitRun._FinalStage metadata(Nullable<java.util.Map<java.lang.String,java.lang.Object>> metadata)
Any metadata that was provided when creating the split run.
Availability: Present when metadata was provided during creation.
- Specified by:
metadatain interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
metadata
public SplitRun._FinalStage metadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
Any metadata that was provided when creating the split run.
Availability: Present when metadata was provided during creation.
- Specified by:
metadatain interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
metadata
public SplitRun._FinalStage metadata(java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> metadata)
Any metadata that was provided when creating the split run.
Availability: Present when metadata was provided during creation.
- Specified by:
metadatain interfaceSplitRun._FinalStage
-
failureMessage
public SplitRun._FinalStage failureMessage(Nullable<java.lang.String> failureMessage)
A detailed message about the failure.
Availability: Present when
statusis"FAILED".- Specified by:
failureMessagein interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureMessage
public SplitRun._FinalStage failureMessage(java.lang.String failureMessage)
A detailed message about the failure.
Availability: Present when
statusis"FAILED".- Specified by:
failureMessagein interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureMessage
public SplitRun._FinalStage failureMessage(java.util.Optional<java.lang.String> failureMessage)
A detailed message about the failure.
Availability: Present when
statusis"FAILED".- Specified by:
failureMessagein interfaceSplitRun._FinalStage
-
failureReason
public SplitRun._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 splitting outputPRE_PROCESSING_FAILURE- An error occurred during preprocessingPOST_PROCESSING_FAILURE- An error occurred during postprocessingOUT_OF_CREDITS- Insufficient credits to run the splitter
Note: Additional failure reasons may be added in the future. Your integration should handle unknown values gracefully.
- Specified by:
failureReasonin interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureReason
public SplitRun._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 splitting outputPRE_PROCESSING_FAILURE- An error occurred during preprocessingPOST_PROCESSING_FAILURE- An error occurred during postprocessingOUT_OF_CREDITS- Insufficient credits to run the splitter
Note: Additional failure reasons may be added in the future. Your integration should handle unknown values gracefully.
- Specified by:
failureReasonin interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureReason
public SplitRun._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 splitting outputPRE_PROCESSING_FAILURE- An error occurred during preprocessingPOST_PROCESSING_FAILURE- An error occurred during postprocessingOUT_OF_CREDITS- Insufficient credits to run the splitter
Note: Additional failure reasons may be added in the future. Your integration should handle unknown values gracefully.
- Specified by:
failureReasonin interfaceSplitRun._FinalStage
-
reviewedOutput
public SplitRun._FinalStage reviewedOutput(Nullable<SplitOutput> reviewedOutput)
The output after human review.
Availability: Present when
reviewedistrue.- Specified by:
reviewedOutputin interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
reviewedOutput
public SplitRun._FinalStage reviewedOutput(SplitOutput reviewedOutput)
The output after human review.
Availability: Present when
reviewedistrue.- Specified by:
reviewedOutputin interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
reviewedOutput
public SplitRun._FinalStage reviewedOutput(java.util.Optional<SplitOutput> reviewedOutput)
The output after human review.
Availability: Present when
reviewedistrue.- Specified by:
reviewedOutputin interfaceSplitRun._FinalStage
-
initialOutput
public SplitRun._FinalStage initialOutput(Nullable<SplitOutput> initialOutput)
The initial output from the split run, before any review edits.
Availability: Present when
reviewedistrue.- Specified by:
initialOutputin interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
initialOutput
public SplitRun._FinalStage initialOutput(SplitOutput initialOutput)
The initial output from the split run, before any review edits.
Availability: Present when
reviewedistrue.- Specified by:
initialOutputin interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
initialOutput
public SplitRun._FinalStage initialOutput(java.util.Optional<SplitOutput> initialOutput)
The initial output from the split run, before any review edits.
Availability: Present when
reviewedistrue.- Specified by:
initialOutputin interfaceSplitRun._FinalStage
-
splitterVersion
public SplitRun._FinalStage splitterVersion(Nullable<SplitterVersionSummary> splitterVersion)
The version of the splitter that was used for this run.
Availability: Present when a splitter reference was provided. Not present when using inline
config.- Specified by:
splitterVersionin interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
splitterVersion
public SplitRun._FinalStage splitterVersion(SplitterVersionSummary splitterVersion)
The version of the splitter that was used for this run.
Availability: Present when a splitter reference was provided. Not present when using inline
config.- Specified by:
splitterVersionin interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
splitterVersion
public SplitRun._FinalStage splitterVersion(java.util.Optional<SplitterVersionSummary> splitterVersion)
The version of the splitter that was used for this run.
Availability: Present when a splitter reference was provided. Not present when using inline
config.- Specified by:
splitterVersionin interfaceSplitRun._FinalStage
-
splitter
public SplitRun._FinalStage splitter(Nullable<SplitterSummary> splitter)
The splitter that was used for this run.
Availability: Present when a splitter reference was provided. Not present when using inline
config.- Specified by:
splitterin interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
splitter
public SplitRun._FinalStage splitter(SplitterSummary splitter)
The splitter that was used for this run.
Availability: Present when a splitter reference was provided. Not present when using inline
config.- Specified by:
splitterin interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
splitter
public SplitRun._FinalStage splitter(java.util.Optional<SplitterSummary> splitter)
The splitter that was used for this run.
Availability: Present when a splitter reference was provided. Not present when using inline
config.- Specified by:
splitterin interfaceSplitRun._FinalStage
-
output
public SplitRun._FinalStage output(Nullable<SplitOutput> output)
The final output, either reviewed or initial.
Availability: Present when
statusis"PROCESSED".- Specified by:
outputin interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
output
public SplitRun._FinalStage output(SplitOutput output)
The final output, either reviewed or initial.
Availability: Present when
statusis"PROCESSED".- Specified by:
outputin interfaceSplitRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
output
public SplitRun._FinalStage output(java.util.Optional<SplitOutput> output)
The final output, either reviewed or initial.
Availability: Present when
statusis"PROCESSED".- Specified by:
outputin interfaceSplitRun._FinalStage
-
build
public SplitRun build()
- Specified by:
buildin interfaceSplitRun._FinalStage
-
-