Package ai.extend.types
Class LegacyProcessorRun
- java.lang.Object
-
- ai.extend.types.LegacyProcessorRun
-
public final class LegacyProcessorRun extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceLegacyProcessorRun._FinalStagestatic classLegacyProcessorRun.Builderstatic interfaceLegacyProcessorRun.ConfigStagestatic interfaceLegacyProcessorRun.EditedStagestatic interfaceLegacyProcessorRun.IdStagestatic interfaceLegacyProcessorRun.ObjectStagestatic interfaceLegacyProcessorRun.OutputStagestatic interfaceLegacyProcessorRun.ProcessorIdStagestatic interfaceLegacyProcessorRun.ProcessorNameStagestatic interfaceLegacyProcessorRun.ProcessorVersionIdStagestatic interfaceLegacyProcessorRun.ReviewedStagestatic interfaceLegacyProcessorRun.StatusStagestatic interfaceLegacyProcessorRun.TypeStagestatic interfaceLegacyProcessorRun.UrlStage
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static LegacyProcessorRun.ObjectStagebuilder()booleanequals(java.lang.Object other)java.util.Map<java.lang.String,java.lang.Object>getAdditionalProperties()LegacyProcessorRunConfiggetConfig()booleangetEdited()java.util.Map<java.lang.String,LegacyExtractionOutputEdits>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<LegacyProcessorOutput>getInitialOutput()java.util.List<LegacyProcessorRunMergedProcessorsItem>getMergedProcessors()java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>getMetadata()java.lang.StringgetObject()LegacyProcessorOutputgetOutput()java.lang.StringgetProcessorId()java.lang.StringgetProcessorName()java.lang.StringgetProcessorVersionId()booleangetReviewed()java.util.Optional<LegacyProcessorOutput>getReviewedOutput()LegacyProcessorStatusgetStatus()LegacyProcessorRunTypegetType()java.lang.StringgetUrl()java.util.Optional<LegacyDocumentProcessorRunCredits>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:
"exr_Xj8mK2pL9nR4vT7qY5wZ"
-
getProcessorId
public java.lang.String getProcessorId()
- Returns:
- The ID of the processor used for this run.
Example:
"ex_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 LegacyProcessorStatus getStatus()
-
getOutput
public LegacyProcessorOutput 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,LegacyExtractionOutputEdits> getEdits()
-
getType
public LegacyProcessorRunType 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 LegacyProcessorRunConfig getConfig()
- Returns:
- The configuration used for this processor run. The type of configuration will match the processor type.
-
getInitialOutput
public java.util.Optional<LegacyProcessorOutput> getInitialOutput()
- Returns:
- The initial output from the processor run. The type of output will match the processor type.
-
getReviewedOutput
public java.util.Optional<LegacyProcessorOutput> 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<LegacyProcessorRunMergedProcessorsItem> 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<LegacyDocumentProcessorRunCredits> 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 LegacyProcessorRun.ObjectStage builder()
-
-