Class ExtractRunSummary.Builder
- java.lang.Object
-
- ai.extend.types.ExtractRunSummary.Builder
-
- All Implemented Interfaces:
ExtractRunSummary._FinalStage,ExtractRunSummary.CreatedAtStage,ExtractRunSummary.DashboardUrlStage,ExtractRunSummary.EditedStage,ExtractRunSummary.IdStage,ExtractRunSummary.ReviewedStage,ExtractRunSummary.StatusStage,ExtractRunSummary.UpdatedAtStage
- Enclosing class:
- ExtractRunSummary
public static final class ExtractRunSummary.Builder extends java.lang.Object implements ExtractRunSummary.IdStage, ExtractRunSummary.StatusStage, ExtractRunSummary.ReviewedStage, ExtractRunSummary.EditedStage, ExtractRunSummary.DashboardUrlStage, ExtractRunSummary.CreatedAtStage, ExtractRunSummary.UpdatedAtStage, ExtractRunSummary._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExtractRunSummarybuild()ExtractRunSummary.UpdatedAtStagecreatedAt(java.time.OffsetDateTime createdAt)ExtractRunSummary.CreatedAtStagedashboardUrl(java.lang.String dashboardUrl)The URL to view the extract run in the Extend dashboard.ExtractRunSummary.DashboardUrlStageedited(boolean edited)Indicates whether the run results have been edited during review.ExtractRunSummary._FinalStageextractor(Nullable<ExtractorSummary> extractor)The extractor that was used for this run.ExtractRunSummary._FinalStageextractor(ExtractorSummary extractor)The extractor that was used for this run.ExtractRunSummary._FinalStageextractor(java.util.Optional<ExtractorSummary> extractor)The extractor that was used for this run.ExtractRunSummary._FinalStageextractorVersion(Nullable<ExtractorVersionSummary> extractorVersion)The version of the extractor that was used for this run.ExtractRunSummary._FinalStageextractorVersion(ExtractorVersionSummary extractorVersion)The version of the extractor that was used for this run.ExtractRunSummary._FinalStageextractorVersion(java.util.Optional<ExtractorVersionSummary> extractorVersion)The version of the extractor that was used for this run.ExtractRunSummary._FinalStagefailureMessage(Nullable<java.lang.String> failureMessage)A detailed message about the failure.ExtractRunSummary._FinalStagefailureMessage(java.lang.String failureMessage)A detailed message about the failure.ExtractRunSummary._FinalStagefailureMessage(java.util.Optional<java.lang.String> failureMessage)A detailed message about the failure.ExtractRunSummary._FinalStagefailureReason(Nullable<java.lang.String> failureReason)The reason for failure.ExtractRunSummary._FinalStagefailureReason(java.lang.String failureReason)The reason for failure.ExtractRunSummary._FinalStagefailureReason(java.util.Optional<java.lang.String> failureReason)The reason for failure.ExtractRunSummary._FinalStagefile(Nullable<FileSummary> file)The file that was processed.ExtractRunSummary._FinalStagefile(FileSummary file)The file that was processed.ExtractRunSummary._FinalStagefile(java.util.Optional<FileSummary> file)The file that was processed.ExtractRunSummary._FinalStagefiles(Nullable<java.util.List<FileSummary>> files)The files that were processed, in the order they were submitted.ExtractRunSummary._FinalStagefiles(java.util.List<FileSummary> files)The files that were processed, in the order they were submitted.ExtractRunSummary._FinalStagefiles(java.util.Optional<java.util.List<FileSummary>> files)The files that were processed, in the order they were submitted.ExtractRunSummary.Builderfrom(ExtractRunSummary other)ExtractRunSummary.StatusStageid(java.lang.String id)The unique identifier for this extract run.ExtractRunSummary._FinalStagemetadata(Nullable<java.util.Map<java.lang.String,java.lang.Object>> metadata)Any metadata that was provided when creating the extract run.ExtractRunSummary._FinalStagemetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)Any metadata that was provided when creating the extract run.ExtractRunSummary._FinalStagemetadata(java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> metadata)Any metadata that was provided when creating the extract run.ExtractRunSummary._FinalStageparseRunId(Nullable<java.lang.String> parseRunId)The ID of the parse run that was used for this extract run.ExtractRunSummary._FinalStageparseRunId(java.lang.String parseRunId)The ID of the parse run that was used for this extract run.ExtractRunSummary._FinalStageparseRunId(java.util.Optional<java.lang.String> parseRunId)The ID of the parse run that was used for this extract run.ExtractRunSummary.EditedStagereviewed(boolean reviewed)Indicates whether the run has been reviewed by a human.ExtractRunSummary.ReviewedStagestatus(ProcessorRunStatus status)ExtractRunSummary._FinalStageupdatedAt(java.time.OffsetDateTime updatedAt)ExtractRunSummary._FinalStageusage(Nullable<RunUsageSummary> usage)Usage credits consumed by this extract run.ExtractRunSummary._FinalStageusage(RunUsageSummary usage)Usage credits consumed by this extract run.ExtractRunSummary._FinalStageusage(java.util.Optional<RunUsageSummary> usage)Usage credits consumed by this extract run.
-
-
-
Method Detail
-
from
public ExtractRunSummary.Builder from(ExtractRunSummary other)
- Specified by:
fromin interfaceExtractRunSummary.IdStage
-
id
public ExtractRunSummary.StatusStage id(@NotNull java.lang.String id)
The unique identifier for this extract run.
The unique identifier for this extract run.
- Specified by:
idin interfaceExtractRunSummary.IdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
status
public ExtractRunSummary.ReviewedStage status(@NotNull ProcessorRunStatus status)
- Specified by:
statusin interfaceExtractRunSummary.StatusStage
-
reviewed
public ExtractRunSummary.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 interfaceExtractRunSummary.ReviewedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
edited
public ExtractRunSummary.DashboardUrlStage 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 interfaceExtractRunSummary.EditedStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
dashboardUrl
public ExtractRunSummary.CreatedAtStage dashboardUrl(@NotNull java.lang.String dashboardUrl)
The URL to view the extract run in the Extend dashboard.
The URL to view the extract run in the Extend dashboard.
- Specified by:
dashboardUrlin interfaceExtractRunSummary.DashboardUrlStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
createdAt
public ExtractRunSummary.UpdatedAtStage createdAt(@NotNull java.time.OffsetDateTime createdAt)
- Specified by:
createdAtin interfaceExtractRunSummary.CreatedAtStage
-
updatedAt
public ExtractRunSummary._FinalStage updatedAt(@NotNull java.time.OffsetDateTime updatedAt)
- Specified by:
updatedAtin interfaceExtractRunSummary.UpdatedAtStage
-
usage
public ExtractRunSummary._FinalStage usage(Nullable<RunUsageSummary> usage)
Usage credits consumed by this extract run. Omits
breakdown— fetch the full extract run by id to see the per-line items.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 interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
usage
public ExtractRunSummary._FinalStage usage(RunUsageSummary usage)
Usage credits consumed by this extract run. Omits
breakdown— fetch the full extract run by id to see the per-line items.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 interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
usage
public ExtractRunSummary._FinalStage usage(java.util.Optional<RunUsageSummary> usage)
Usage credits consumed by this extract run. Omits
breakdown— fetch the full extract run by id to see the per-line items.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 interfaceExtractRunSummary._FinalStage
-
parseRunId
public ExtractRunSummary._FinalStage parseRunId(Nullable<java.lang.String> parseRunId)
The ID of the parse run that was used for this extract run.
Availability: Present when a parse run was created.
- Specified by:
parseRunIdin interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
parseRunId
public ExtractRunSummary._FinalStage parseRunId(java.lang.String parseRunId)
The ID of the parse run that was used for this extract run.
Availability: Present when a parse run was created.
- Specified by:
parseRunIdin interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
parseRunId
public ExtractRunSummary._FinalStage parseRunId(java.util.Optional<java.lang.String> parseRunId)
The ID of the parse run that was used for this extract run.
Availability: Present when a parse run was created.
- Specified by:
parseRunIdin interfaceExtractRunSummary._FinalStage
-
files
public ExtractRunSummary._FinalStage files(Nullable<java.util.List<FileSummary>> files)
The files that were processed, in the order they were submitted. Only populated for multifile runs (created with
package).For single-file runs, this is
null— usefileinstead.- Specified by:
filesin interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
files
public ExtractRunSummary._FinalStage files(java.util.List<FileSummary> files)
The files that were processed, in the order they were submitted. Only populated for multifile runs (created with
package).For single-file runs, this is
null— usefileinstead.- Specified by:
filesin interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
files
public ExtractRunSummary._FinalStage files(java.util.Optional<java.util.List<FileSummary>> files)
The files that were processed, in the order they were submitted. Only populated for multifile runs (created with
package).For single-file runs, this is
null— usefileinstead.- Specified by:
filesin interfaceExtractRunSummary._FinalStage
-
file
public ExtractRunSummary._FinalStage file(Nullable<FileSummary> file)
The file that was processed.
nullfor multifile runs (usefilesinstead), andnullwhen the file could not be accessed or processed (for example, a run that failed during file ingestion).- Specified by:
filein interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
file
public ExtractRunSummary._FinalStage file(FileSummary file)
The file that was processed.
nullfor multifile runs (usefilesinstead), andnullwhen the file could not be accessed or processed (for example, a run that failed during file ingestion).- Specified by:
filein interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
file
public ExtractRunSummary._FinalStage file(java.util.Optional<FileSummary> file)
The file that was processed.
nullfor multifile runs (usefilesinstead), andnullwhen the file could not be accessed or processed (for example, a run that failed during file ingestion).- Specified by:
filein interfaceExtractRunSummary._FinalStage
-
metadata
public ExtractRunSummary._FinalStage metadata(Nullable<java.util.Map<java.lang.String,java.lang.Object>> metadata)
Any metadata that was provided when creating the extract run.
Availability: Present when metadata was provided during creation.
- Specified by:
metadatain interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
metadata
public ExtractRunSummary._FinalStage metadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
Any metadata that was provided when creating the extract run.
Availability: Present when metadata was provided during creation.
- Specified by:
metadatain interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
metadata
public ExtractRunSummary._FinalStage metadata(java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> metadata)
Any metadata that was provided when creating the extract run.
Availability: Present when metadata was provided during creation.
- Specified by:
metadatain interfaceExtractRunSummary._FinalStage
-
failureMessage
public ExtractRunSummary._FinalStage failureMessage(Nullable<java.lang.String> failureMessage)
A detailed message about the failure.
Availability: Present when
statusis"FAILED".- Specified by:
failureMessagein interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureMessage
public ExtractRunSummary._FinalStage failureMessage(java.lang.String failureMessage)
A detailed message about the failure.
Availability: Present when
statusis"FAILED".- Specified by:
failureMessagein interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureMessage
public ExtractRunSummary._FinalStage failureMessage(java.util.Optional<java.lang.String> failureMessage)
A detailed message about the failure.
Availability: Present when
statusis"FAILED".- Specified by:
failureMessagein interfaceExtractRunSummary._FinalStage
-
failureReason
public ExtractRunSummary._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 extraction outputPRE_PROCESSING_FAILURE- An error occurred during preprocessing (e.g., chunking)POST_PROCESSING_FAILURE- An error occurred during postprocessingOUT_OF_CREDITS- Insufficient credits to run the extractionSCHEMA_GENERATION_FAILED- Automatic schema inference failed (only applies whenschemais omitted). The file could not be parsed or a schema could not be generated from it.
Note: Additional failure reasons may be added in the future. Your integration should handle unknown values gracefully.
- Specified by:
failureReasonin interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureReason
public ExtractRunSummary._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 extraction outputPRE_PROCESSING_FAILURE- An error occurred during preprocessing (e.g., chunking)POST_PROCESSING_FAILURE- An error occurred during postprocessingOUT_OF_CREDITS- Insufficient credits to run the extractionSCHEMA_GENERATION_FAILED- Automatic schema inference failed (only applies whenschemais omitted). The file could not be parsed or a schema could not be generated from it.
Note: Additional failure reasons may be added in the future. Your integration should handle unknown values gracefully.
- Specified by:
failureReasonin interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureReason
public ExtractRunSummary._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 extraction outputPRE_PROCESSING_FAILURE- An error occurred during preprocessing (e.g., chunking)POST_PROCESSING_FAILURE- An error occurred during postprocessingOUT_OF_CREDITS- Insufficient credits to run the extractionSCHEMA_GENERATION_FAILED- Automatic schema inference failed (only applies whenschemais omitted). The file could not be parsed or a schema could not be generated from it.
Note: Additional failure reasons may be added in the future. Your integration should handle unknown values gracefully.
- Specified by:
failureReasonin interfaceExtractRunSummary._FinalStage
-
extractorVersion
public ExtractRunSummary._FinalStage extractorVersion(Nullable<ExtractorVersionSummary> extractorVersion)
The version of the extractor that was used for this run.
Availability: Present when an extractor reference was provided. Not present when using inline
config.- Specified by:
extractorVersionin interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
extractorVersion
public ExtractRunSummary._FinalStage extractorVersion(ExtractorVersionSummary extractorVersion)
The version of the extractor that was used for this run.
Availability: Present when an extractor reference was provided. Not present when using inline
config.- Specified by:
extractorVersionin interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
extractorVersion
public ExtractRunSummary._FinalStage extractorVersion(java.util.Optional<ExtractorVersionSummary> extractorVersion)
The version of the extractor that was used for this run.
Availability: Present when an extractor reference was provided. Not present when using inline
config.- Specified by:
extractorVersionin interfaceExtractRunSummary._FinalStage
-
extractor
public ExtractRunSummary._FinalStage extractor(Nullable<ExtractorSummary> extractor)
The extractor that was used for this run.
Availability: Present when an extractor reference was provided. Not present when using inline
config.- Specified by:
extractorin interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
extractor
public ExtractRunSummary._FinalStage extractor(ExtractorSummary extractor)
The extractor that was used for this run.
Availability: Present when an extractor reference was provided. Not present when using inline
config.- Specified by:
extractorin interfaceExtractRunSummary._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
extractor
public ExtractRunSummary._FinalStage extractor(java.util.Optional<ExtractorSummary> extractor)
The extractor that was used for this run.
Availability: Present when an extractor reference was provided. Not present when using inline
config.- Specified by:
extractorin interfaceExtractRunSummary._FinalStage
-
build
public ExtractRunSummary build()
- Specified by:
buildin interfaceExtractRunSummary._FinalStage
-
-