Class LegacyProcessorRun.Builder
- java.lang.Object
-
- ai.extend.types.LegacyProcessorRun.Builder
-
- All Implemented Interfaces:
LegacyProcessorRun._FinalStage,LegacyProcessorRun.ConfigStage,LegacyProcessorRun.EditedStage,LegacyProcessorRun.IdStage,LegacyProcessorRun.ObjectStage,LegacyProcessorRun.OutputStage,LegacyProcessorRun.ProcessorIdStage,LegacyProcessorRun.ProcessorNameStage,LegacyProcessorRun.ProcessorVersionIdStage,LegacyProcessorRun.ReviewedStage,LegacyProcessorRun.StatusStage,LegacyProcessorRun.TypeStage,LegacyProcessorRun.UrlStage
- Enclosing class:
- LegacyProcessorRun
public static final class LegacyProcessorRun.Builder extends java.lang.Object implements LegacyProcessorRun.ObjectStage, LegacyProcessorRun.IdStage, LegacyProcessorRun.ProcessorIdStage, LegacyProcessorRun.ProcessorVersionIdStage, LegacyProcessorRun.ProcessorNameStage, LegacyProcessorRun.StatusStage, LegacyProcessorRun.OutputStage, LegacyProcessorRun.ReviewedStage, LegacyProcessorRun.EditedStage, LegacyProcessorRun.TypeStage, LegacyProcessorRun.ConfigStage, LegacyProcessorRun.UrlStage, LegacyProcessorRun._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LegacyProcessorRun._FinalStageaddAllFiles(java.util.List<File> files)Details of the processed files.LegacyProcessorRun._FinalStageaddAllMergedProcessors(java.util.List<LegacyProcessorRunMergedProcessorsItem> mergedProcessors)An array of processors that were merged to create this output.LegacyProcessorRun._FinalStageaddFiles(File files)Details of the processed files.LegacyProcessorRun._FinalStageaddMergedProcessors(LegacyProcessorRunMergedProcessorsItem mergedProcessors)An array of processors that were merged to create this output.LegacyProcessorRunbuild()LegacyProcessorRun.UrlStageconfig(LegacyProcessorRunConfig config)The configuration used for this processor run.LegacyProcessorRun.TypeStageedited(boolean edited)Indicates whether the run results have been edited.LegacyProcessorRun._FinalStageedits(java.lang.String key, LegacyExtractionOutputEdits value)LegacyProcessorRun._FinalStageedits(java.util.Map<java.lang.String,LegacyExtractionOutputEdits> edits)LegacyProcessorRun._FinalStagefailureMessage(java.lang.String failureMessage)If the run failed, provides a detailed message about the failure.LegacyProcessorRun._FinalStagefailureMessage(java.util.Optional<java.lang.String> failureMessage)If the run failed, provides a detailed message about the failure.LegacyProcessorRun._FinalStagefailureReason(java.lang.String failureReason)If the run failed, indicates the reason for failure.LegacyProcessorRun._FinalStagefailureReason(java.util.Optional<java.lang.String> failureReason)If the run failed, indicates the reason for failure.LegacyProcessorRun._FinalStagefiles(java.util.List<File> files)Details of the processed files.LegacyProcessorRun.Builderfrom(LegacyProcessorRun other)LegacyProcessorRun.ProcessorIdStageid(java.lang.String id)The unique identifier for this processor run.LegacyProcessorRun._FinalStageinitialOutput(LegacyProcessorOutput initialOutput)The initial output from the processor run.LegacyProcessorRun._FinalStageinitialOutput(java.util.Optional<LegacyProcessorOutput> initialOutput)The initial output from the processor run.LegacyProcessorRun._FinalStagemergedProcessors(java.util.List<LegacyProcessorRunMergedProcessorsItem> mergedProcessors)An array of processors that were merged to create this output.LegacyProcessorRun._FinalStagemetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)Any metadata that was provided when creating the processor run.LegacyProcessorRun._FinalStagemetadata(java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> metadata)Any metadata that was provided when creating the processor run.LegacyProcessorRun.IdStageobject(java.lang.String object)The type of response.LegacyProcessorRun.ReviewedStageoutput(LegacyProcessorOutput output)The final output, either reviewed or initial.LegacyProcessorRun.ProcessorVersionIdStageprocessorId(java.lang.String processorId)The ID of the processor used for this run.LegacyProcessorRun.StatusStageprocessorName(java.lang.String processorName)The name of the processor.LegacyProcessorRun.ProcessorNameStageprocessorVersionId(java.lang.String processorVersionId)The ID of the specific processor version used.LegacyProcessorRun._FinalStageputAllEdits(java.util.Map<java.lang.String,LegacyExtractionOutputEdits> edits)LegacyProcessorRun.EditedStagereviewed(boolean reviewed)Indicates whether the run has been reviewed.LegacyProcessorRun._FinalStagereviewedOutput(LegacyProcessorOutput reviewedOutput)The output after review, if any.LegacyProcessorRun._FinalStagereviewedOutput(java.util.Optional<LegacyProcessorOutput> reviewedOutput)The output after review, if any.LegacyProcessorRun.OutputStagestatus(LegacyProcessorStatus status)LegacyProcessorRun.ConfigStagetype(LegacyProcessorRunType type)The type of processor:LegacyProcessorRun._FinalStageurl(java.lang.String url)The URL to view the processor run.LegacyProcessorRun._FinalStageusage(LegacyDocumentProcessorRunCredits usage)LegacyProcessorRun._FinalStageusage(java.util.Optional<LegacyDocumentProcessorRunCredits> usage)
-
-
-
Method Detail
-
from
public LegacyProcessorRun.Builder from(LegacyProcessorRun other)
- Specified by:
fromin interfaceLegacyProcessorRun.ObjectStage
-
object
public LegacyProcessorRun.IdStage object(@NotNull java.lang.String object)
The type of response. In this case, it will always be
"document_processor_run".The type of response. In this case, it will always be
"document_processor_run".- Specified by:
objectin interfaceLegacyProcessorRun.ObjectStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
id
public LegacyProcessorRun.ProcessorIdStage id(@NotNull java.lang.String id)
The unique identifier for this processor run.
Example:
"exr_Xj8mK2pL9nR4vT7qY5wZ"The unique identifier for this processor run.
Example:
"exr_Xj8mK2pL9nR4vT7qY5wZ"- Specified by:
idin interfaceLegacyProcessorRun.IdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
processorId
public LegacyProcessorRun.ProcessorVersionIdStage processorId(@NotNull java.lang.String processorId)
The ID of the processor used for this run.
Example:
"ex_Xj8mK2pL9nR4vT7qY5wZ"The ID of the processor used for this run.
Example:
"ex_Xj8mK2pL9nR4vT7qY5wZ"- Specified by:
processorIdin interfaceLegacyProcessorRun.ProcessorIdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
processorVersionId
public LegacyProcessorRun.ProcessorNameStage processorVersionId(@NotNull java.lang.String processorVersionId)
The ID of the specific processor version used.
The ID of the specific processor version used.
- Specified by:
processorVersionIdin interfaceLegacyProcessorRun.ProcessorVersionIdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
processorName
public LegacyProcessorRun.StatusStage processorName(@NotNull java.lang.String processorName)
The name of the processor.
Example:
"Invoice Processor"The name of the processor.
Example:
"Invoice Processor"- Specified by:
processorNamein interfaceLegacyProcessorRun.ProcessorNameStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
status
public LegacyProcessorRun.OutputStage status(@NotNull LegacyProcessorStatus status)
- Specified by:
statusin interfaceLegacyProcessorRun.StatusStage
-
output
public LegacyProcessorRun.ReviewedStage output(@NotNull LegacyProcessorOutput output)
The final output, either reviewed or initial.
Conforms to the shape of output types and depends on the processor type and configuration shape.
The final output, either reviewed or initial.
Conforms to the shape of output types and depends on the processor type and configuration shape.
- Specified by:
outputin interfaceLegacyProcessorRun.OutputStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
reviewed
public LegacyProcessorRun.EditedStage reviewed(boolean reviewed)
Indicates whether the run has been reviewed.
Indicates whether the run has been reviewed.
- Specified by:
reviewedin interfaceLegacyProcessorRun.ReviewedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
edited
public LegacyProcessorRun.TypeStage edited(boolean edited)
Indicates whether the run results have been edited.
Indicates whether the run results have been edited.
- Specified by:
editedin interfaceLegacyProcessorRun.EditedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
type
public LegacyProcessorRun.ConfigStage type(@NotNull LegacyProcessorRunType type)
The type of processor:
"CLASSIFY"- Classifies documents into categories"EXTRACT"- Extracts structured data from documents"SPLITTER"- Splits documents into multiple parts
The type of processor:
"CLASSIFY"- Classifies documents into categories"EXTRACT"- Extracts structured data from documents"SPLITTER"- Splits documents into multiple parts
- Specified by:
typein interfaceLegacyProcessorRun.TypeStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
config
public LegacyProcessorRun.UrlStage config(@NotNull LegacyProcessorRunConfig config)
The configuration used for this processor run. The type of configuration will match the processor type.
The configuration used for this processor run. The type of configuration will match the processor type.
- Specified by:
configin interfaceLegacyProcessorRun.ConfigStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
url
public LegacyProcessorRun._FinalStage url(@NotNull java.lang.String url)
The URL to view the processor run.
The URL to view the processor run.
- Specified by:
urlin interfaceLegacyProcessorRun.UrlStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
usage
public LegacyProcessorRun._FinalStage usage(LegacyDocumentProcessorRunCredits usage)
- Specified by:
usagein interfaceLegacyProcessorRun._FinalStage
-
usage
public LegacyProcessorRun._FinalStage usage(java.util.Optional<LegacyDocumentProcessorRunCredits> usage)
- Specified by:
usagein interfaceLegacyProcessorRun._FinalStage
-
addAllMergedProcessors
public LegacyProcessorRun._FinalStage addAllMergedProcessors(java.util.List<LegacyProcessorRunMergedProcessorsItem> mergedProcessors)
An array of processors that were merged to create this output. Will be an empty array unless this output was the result of a MergeExtraction step in a workflow.
- Specified by:
addAllMergedProcessorsin interfaceLegacyProcessorRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
addMergedProcessors
public LegacyProcessorRun._FinalStage addMergedProcessors(LegacyProcessorRunMergedProcessorsItem mergedProcessors)
An array of processors that were merged to create this output. Will be an empty array unless this output was the result of a MergeExtraction step in a workflow.
- Specified by:
addMergedProcessorsin interfaceLegacyProcessorRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
mergedProcessors
public LegacyProcessorRun._FinalStage mergedProcessors(java.util.List<LegacyProcessorRunMergedProcessorsItem> mergedProcessors)
An array of processors that were merged to create this output. Will be an empty array unless this output was the result of a MergeExtraction step in a workflow.
- Specified by:
mergedProcessorsin interfaceLegacyProcessorRun._FinalStage
-
addAllFiles
public LegacyProcessorRun._FinalStage addAllFiles(java.util.List<File> files)
Details of the processed files.
If this was a file generated from a splitter processor, this will be the sub file.
See the File object for more details.
- Specified by:
addAllFilesin interfaceLegacyProcessorRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
addFiles
public LegacyProcessorRun._FinalStage addFiles(File files)
Details of the processed files.
If this was a file generated from a splitter processor, this will be the sub file.
See the File object for more details.
- Specified by:
addFilesin interfaceLegacyProcessorRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
files
public LegacyProcessorRun._FinalStage files(java.util.List<File> files)
Details of the processed files.
If this was a file generated from a splitter processor, this will be the sub file.
See the File object for more details.
- Specified by:
filesin interfaceLegacyProcessorRun._FinalStage
-
reviewedOutput
public LegacyProcessorRun._FinalStage reviewedOutput(LegacyProcessorOutput reviewedOutput)
The output after review, if any.
- Specified by:
reviewedOutputin interfaceLegacyProcessorRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
reviewedOutput
public LegacyProcessorRun._FinalStage reviewedOutput(java.util.Optional<LegacyProcessorOutput> reviewedOutput)
The output after review, if any.
- Specified by:
reviewedOutputin interfaceLegacyProcessorRun._FinalStage
-
initialOutput
public LegacyProcessorRun._FinalStage initialOutput(LegacyProcessorOutput initialOutput)
The initial output from the processor run. The type of output will match the processor type.
- Specified by:
initialOutputin interfaceLegacyProcessorRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
initialOutput
public LegacyProcessorRun._FinalStage initialOutput(java.util.Optional<LegacyProcessorOutput> initialOutput)
The initial output from the processor run. The type of output will match the processor type.
- Specified by:
initialOutputin interfaceLegacyProcessorRun._FinalStage
-
edits
public LegacyProcessorRun._FinalStage edits(java.lang.String key, LegacyExtractionOutputEdits value)
- Specified by:
editsin interfaceLegacyProcessorRun._FinalStage
-
putAllEdits
public LegacyProcessorRun._FinalStage putAllEdits(java.util.Map<java.lang.String,LegacyExtractionOutputEdits> edits)
- Specified by:
putAllEditsin interfaceLegacyProcessorRun._FinalStage
-
edits
public LegacyProcessorRun._FinalStage edits(java.util.Map<java.lang.String,LegacyExtractionOutputEdits> edits)
- Specified by:
editsin interfaceLegacyProcessorRun._FinalStage
-
metadata
public LegacyProcessorRun._FinalStage metadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
Any metadata that was provided when creating the processor run.
- Specified by:
metadatain interfaceLegacyProcessorRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
metadata
public LegacyProcessorRun._FinalStage metadata(java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> metadata)
Any metadata that was provided when creating the processor run.
- Specified by:
metadatain interfaceLegacyProcessorRun._FinalStage
-
failureMessage
public LegacyProcessorRun._FinalStage failureMessage(java.lang.String failureMessage)
If the run failed, provides a detailed message about the failure.
- Specified by:
failureMessagein interfaceLegacyProcessorRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureMessage
public LegacyProcessorRun._FinalStage failureMessage(java.util.Optional<java.lang.String> failureMessage)
If the run failed, provides a detailed message about the failure.
- Specified by:
failureMessagein interfaceLegacyProcessorRun._FinalStage
-
failureReason
public LegacyProcessorRun._FinalStage failureReason(java.lang.String failureReason)
If the run failed, indicates the reason for failure.
- Specified by:
failureReasonin interfaceLegacyProcessorRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureReason
public LegacyProcessorRun._FinalStage failureReason(java.util.Optional<java.lang.String> failureReason)
If the run failed, indicates the reason for failure.
- Specified by:
failureReasonin interfaceLegacyProcessorRun._FinalStage
-
build
public LegacyProcessorRun build()
- Specified by:
buildin interfaceLegacyProcessorRun._FinalStage
-
-