Package ai.extend.types
Class ProcessorRun
- java.lang.Object
-
- ai.extend.types.ProcessorRun
-
public final class ProcessorRun extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceProcessorRun._FinalStagestatic classProcessorRun.Builderstatic interfaceProcessorRun.ConfigStagestatic interfaceProcessorRun.EditedStagestatic interfaceProcessorRun.IdStagestatic interfaceProcessorRun.ObjectStagestatic interfaceProcessorRun.OutputStagestatic interfaceProcessorRun.ProcessorIdStagestatic interfaceProcessorRun.ProcessorNameStagestatic interfaceProcessorRun.ProcessorVersionIdStagestatic interfaceProcessorRun.ReviewedStagestatic interfaceProcessorRun.StatusStagestatic interfaceProcessorRun.TypeStagestatic interfaceProcessorRun.UrlStage
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ProcessorRun.ObjectStagebuilder()booleanequals(java.lang.Object other)java.util.Map<java.lang.String,java.lang.Object>getAdditionalProperties()ProcessorRunConfiggetConfig()booleangetEdited()java.util.Map<java.lang.String,ExtractionOutputEdits>getEdits()java.util.Optional<java.lang.String>getFailureMessage()java.util.Optional<java.lang.String>getFailureReason()java.util.List<File>getFiles()java.lang.StringgetId()java.util.Optional<ProcessorOutput>getInitialOutput()java.util.List<ProcessorRunMergedProcessorsItem>getMergedProcessors()java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>getMetadata()java.lang.StringgetObject()ProcessorOutputgetOutput()java.lang.StringgetProcessorId()java.lang.StringgetProcessorName()java.lang.StringgetProcessorVersionId()booleangetReviewed()java.util.Optional<ProcessorOutput>getReviewedOutput()ProcessorStatusgetStatus()ProcessorRunTypegetType()java.lang.StringgetUrl()java.util.Optional<DocumentProcessorRunCredits>getUsage()inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getObject
public java.lang.String getObject()
- Returns:
- The type of response. In this case, it will always be
"document_processor_run".
-
getId
public java.lang.String getId()
- Returns:
- The unique identifier for this processor run.
Example:
"dpr_Xj8mK2pL9nR4vT7qY5wZ"
-
getProcessorId
public java.lang.String getProcessorId()
- Returns:
- The ID of the processor used for this run.
Example:
"dp_Xj8mK2pL9nR4vT7qY5wZ"
-
getProcessorVersionId
public java.lang.String getProcessorVersionId()
- Returns:
- The ID of the specific processor version used.
-
getProcessorName
public java.lang.String getProcessorName()
- Returns:
- The name of the processor.
Example:
"Invoice Processor"
-
getStatus
public ProcessorStatus getStatus()
-
getOutput
public ProcessorOutput getOutput()
- Returns:
- The final output, either reviewed or initial.
Conforms to the shape of output types and depends on the processor type and configuration shape.
-
getFailureReason
public java.util.Optional<java.lang.String> getFailureReason()
- Returns:
- If the run failed, indicates the reason for failure.
-
getFailureMessage
public java.util.Optional<java.lang.String> getFailureMessage()
- Returns:
- If the run failed, provides a detailed message about the failure.
-
getMetadata
public java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> getMetadata()
- Returns:
- Any metadata that was provided when creating the processor run.
-
getReviewed
public boolean getReviewed()
- Returns:
- Indicates whether the run has been reviewed.
-
getEdited
public boolean getEdited()
- Returns:
- Indicates whether the run results have been edited.
-
getEdits
public java.util.Map<java.lang.String,ExtractionOutputEdits> getEdits()
-
getType
public ProcessorRunType getType()
- Returns:
- The type of processor:
"CLASSIFY"- Classifies documents into categories"EXTRACT"- Extracts structured data from documents"SPLITTER"- Splits documents into multiple parts
-
getConfig
public ProcessorRunConfig getConfig()
- Returns:
- The configuration used for this processor run. The type of configuration will match the processor type.
-
getInitialOutput
public java.util.Optional<ProcessorOutput> getInitialOutput()
- Returns:
- The initial output from the processor run. The type of output will match the processor type.
-
getReviewedOutput
public java.util.Optional<ProcessorOutput> getReviewedOutput()
- Returns:
- The output after review, if any.
-
getFiles
public java.util.List<File> getFiles()
- Returns:
- 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.
-
getMergedProcessors
public java.util.List<ProcessorRunMergedProcessorsItem> getMergedProcessors()
- Returns:
- 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.
-
getUrl
public java.lang.String getUrl()
- Returns:
- The URL to view the processor run.
-
getUsage
public java.util.Optional<DocumentProcessorRunCredits> getUsage()
-
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 ProcessorRun.ObjectStage builder()
-
-