Class ExtractRun.Builder

    • Method Detail

      • id

        public ExtractRun.StatusStage id​(@NotNull
                                         java.lang.String id)

        The unique identifier for this extract run.

        Example: "exr_Xj8mK2pL9nR4vT7qY5wZ"

        The unique identifier for this extract run.

        Example: "exr_Xj8mK2pL9nR4vT7qY5wZ"

        Specified by:
        id in interface ExtractRun.IdStage
        Returns:
        Reference to this so that method calls can be chained together.
      • reviewed

        public ExtractRun.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:
        reviewed in interface ExtractRun.ReviewedStage
        Returns:
        Reference to this so that method calls can be chained together.
      • edited

        public ExtractRun.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:
        edited in interface ExtractRun.EditedStage
        Returns:
        Reference to this so that method calls can be chained together.
      • dashboardUrl

        public ExtractRun.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:
        dashboardUrl in interface ExtractRun.DashboardUrlStage
        Returns:
        Reference to this so that method calls can be chained together.
      • parseRunId

        public ExtractRun._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:
        parseRunId in interface ExtractRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • parseRunId

        public ExtractRun._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:
        parseRunId in interface ExtractRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • parseRunId

        public ExtractRun._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:
        parseRunId in interface ExtractRun._FinalStage
      • edits

        public ExtractRun._FinalStage edits​(java.util.Map<java.lang.String,​java.util.Optional<ExtractOutputEdits>> edits)

        Details of edits made during review.

        Availability: Present when edited is true.

        Specified by:
        edits in interface ExtractRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • metadata

        public ExtractRun._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:
        metadata in interface ExtractRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • metadata

        public ExtractRun._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:
        metadata in interface ExtractRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • metadata

        public ExtractRun._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:
        metadata in interface ExtractRun._FinalStage
      • failureMessage

        public ExtractRun._FinalStage failureMessage​(Nullable<java.lang.String> failureMessage)

        A detailed message about the failure.

        Availability: Present when status is "FAILED".

        Specified by:
        failureMessage in interface ExtractRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • failureMessage

        public ExtractRun._FinalStage failureMessage​(java.lang.String failureMessage)

        A detailed message about the failure.

        Availability: Present when status is "FAILED".

        Specified by:
        failureMessage in interface ExtractRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • failureReason

        public ExtractRun._FinalStage failureReason​(Nullable<java.lang.String> failureReason)

        The reason for failure.

        Availability: Present when status is "FAILED".

        Possible values include:

        • ABORTED - The run was aborted by the user
        • INTERNAL_ERROR - An unexpected internal error occurred
        • FAILED_TO_PROCESS_FILE - Failed to process the file (e.g., OCR failure, file access issues)
        • INVALID_PROCESSOR - The processor configuration is invalid
        • INVALID_CONFIGURATION - The provided configuration is incompatible with the selected model
        • PARSING_ERROR - Failed to parse the extraction output
        • PRE_PROCESSING_FAILURE - An error occurred during preprocessing (e.g., chunking)
        • POST_PROCESSING_FAILURE - An error occurred during postprocessing
        • OUT_OF_CREDITS - Insufficient credits to run the extraction

        Note: Additional failure reasons may be added in the future. Your integration should handle unknown values gracefully.

        Specified by:
        failureReason in interface ExtractRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • failureReason

        public ExtractRun._FinalStage failureReason​(java.lang.String failureReason)

        The reason for failure.

        Availability: Present when status is "FAILED".

        Possible values include:

        • ABORTED - The run was aborted by the user
        • INTERNAL_ERROR - An unexpected internal error occurred
        • FAILED_TO_PROCESS_FILE - Failed to process the file (e.g., OCR failure, file access issues)
        • INVALID_PROCESSOR - The processor configuration is invalid
        • INVALID_CONFIGURATION - The provided configuration is incompatible with the selected model
        • PARSING_ERROR - Failed to parse the extraction output
        • PRE_PROCESSING_FAILURE - An error occurred during preprocessing (e.g., chunking)
        • POST_PROCESSING_FAILURE - An error occurred during postprocessing
        • OUT_OF_CREDITS - Insufficient credits to run the extraction

        Note: Additional failure reasons may be added in the future. Your integration should handle unknown values gracefully.

        Specified by:
        failureReason in interface ExtractRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.
      • failureReason

        public ExtractRun._FinalStage failureReason​(java.util.Optional<java.lang.String> failureReason)

        The reason for failure.

        Availability: Present when status is "FAILED".

        Possible values include:

        • ABORTED - The run was aborted by the user
        • INTERNAL_ERROR - An unexpected internal error occurred
        • FAILED_TO_PROCESS_FILE - Failed to process the file (e.g., OCR failure, file access issues)
        • INVALID_PROCESSOR - The processor configuration is invalid
        • INVALID_CONFIGURATION - The provided configuration is incompatible with the selected model
        • PARSING_ERROR - Failed to parse the extraction output
        • PRE_PROCESSING_FAILURE - An error occurred during preprocessing (e.g., chunking)
        • POST_PROCESSING_FAILURE - An error occurred during postprocessing
        • OUT_OF_CREDITS - Insufficient credits to run the extraction

        Note: Additional failure reasons may be added in the future. Your integration should handle unknown values gracefully.

        Specified by:
        failureReason in interface ExtractRun._FinalStage
      • extractor

        public ExtractRun._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:
        extractor in interface ExtractRun._FinalStage
        Returns:
        Reference to this so that method calls can be chained together.