Class ParseRunSummary.Builder

    • Method Detail

      • id

        public ParseRunSummary.FileStage id​(@NotNull
                                            java.lang.String id)

        A unique identifier for the parse run.

        Example: "pr_xK9mLPqRtN3vS8wF5hB2cQ"

        A unique identifier for the parse run.

        Example: "pr_xK9mLPqRtN3vS8wF5hB2cQ"

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

        public ParseRunSummary.StatusStage file​(@NotNull
                                                FileSummary file)

        The file that was parsed. This file can be used as a parameter for other Extend endpoints, such as POST /workflow_runs. May be null for batch parse runs where file ingestion failed.

        The file that was parsed. This file can be used as a parameter for other Extend endpoints, such as POST /workflow_runs. May be null for batch parse runs where file ingestion failed.

        Specified by:
        file in interface ParseRunSummary.FileStage
        Returns:
        Reference to this so that method calls can be chained together.
      • status

        public ParseRunSummary.CreatedAtStage status​(@NotNull
                                                     ParseRunSummaryStatus status)

        The status of the parse run:

        • "PENDING" - The run has been created and is waiting to be processed. Only applies to runs created via POST /parse_runs/batch.
        • "PROCESSING" - The file is still being processed
        • "PROCESSED" - The file was successfully processed
        • "FAILED" - The processing failed (see failureReason for details)

        The status of the parse run:

        • "PENDING" - The run has been created and is waiting to be processed. Only applies to runs created via POST /parse_runs/batch.
        • "PROCESSING" - The file is still being processed
        • "PROCESSED" - The file was successfully processed
        • "FAILED" - The processing failed (see failureReason for details)
        Specified by:
        status in interface ParseRunSummary.StatusStage
        Returns:
        Reference to this so that method calls can be chained together.
      • usage

        public ParseRunSummary._FinalStage usage​(Nullable<RunUsageSummary> usage)

        Usage credits consumed by this parse run. Omits breakdown — fetch the full parse run by id to see the per-line items.

        Availability: Present when status is "PROCESSED", the run was created after October 7, 2025, and the customer is on the current billing system.

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

        public ParseRunSummary._FinalStage usage​(RunUsageSummary usage)

        Usage credits consumed by this parse run. Omits breakdown — fetch the full parse run by id to see the per-line items.

        Availability: Present when status is "PROCESSED", the run was created after October 7, 2025, and the customer is on the current billing system.

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

        public ParseRunSummary._FinalStage usage​(java.util.Optional<RunUsageSummary> usage)

        Usage credits consumed by this parse run. Omits breakdown — fetch the full parse run by id to see the per-line items.

        Availability: Present when status is "PROCESSED", the run was created after October 7, 2025, and the customer is on the current billing system.

        Specified by:
        usage in interface ParseRunSummary._FinalStage
      • metadata

        public ParseRunSummary._FinalStage metadata​(Nullable<java.util.Map<java.lang.String,​java.lang.Object>> metadata)

        Any metadata that was provided when creating the parse run.

        Availability: Present when metadata was provided during creation.

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

        public ParseRunSummary._FinalStage metadata​(java.util.Map<java.lang.String,​java.lang.Object> metadata)

        Any metadata that was provided when creating the parse run.

        Availability: Present when metadata was provided during creation.

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

        public ParseRunSummary._FinalStage metadata​(java.util.Optional<java.util.Map<java.lang.String,​java.lang.Object>> metadata)

        Any metadata that was provided when creating the parse run.

        Availability: Present when metadata was provided during creation.

        Specified by:
        metadata in interface ParseRunSummary._FinalStage
      • failureMessage

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

        A human-readable description of the failure.

        Availability: Present when status is "FAILED".

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

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

        The reason for failure.

        Availability: Present when status is "FAILED".

        Possible values include:

        • UNABLE_TO_DOWNLOAD_FILE - The file could not be downloaded from the provided URL
        • FILE_TYPE_NOT_SUPPORTED - The file type is not supported for parsing
        • FILE_SIZE_TOO_LARGE - The file exceeds the maximum allowed size
        • CORRUPT_FILE - The file appears to be corrupted or malformed
        • OCR_ERROR - An error occurred during optical character recognition
        • PASSWORD_PROTECTED_FILE - The file is password protected and cannot be processed
        • FAILED_TO_CONVERT_TO_PDF - The file could not be converted to PDF for processing
        • FAILED_TO_CONVERT_TO_JPEG - The file could not be converted to JPEG for processing
        • FAILED_TO_GENERATE_TARGET_FORMAT - The output could not be generated in the requested format
        • CHUNKING_ERROR - An error occurred while chunking the document
        • INTERNAL_ERROR - An unexpected internal error occurred
        • INVALID_CONFIG_OPTIONS - The provided configuration options are invalid
        • OUT_OF_CREDITS - Insufficient credits to process the file

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

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

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

        The reason for failure.

        Availability: Present when status is "FAILED".

        Possible values include:

        • UNABLE_TO_DOWNLOAD_FILE - The file could not be downloaded from the provided URL
        • FILE_TYPE_NOT_SUPPORTED - The file type is not supported for parsing
        • FILE_SIZE_TOO_LARGE - The file exceeds the maximum allowed size
        • CORRUPT_FILE - The file appears to be corrupted or malformed
        • OCR_ERROR - An error occurred during optical character recognition
        • PASSWORD_PROTECTED_FILE - The file is password protected and cannot be processed
        • FAILED_TO_CONVERT_TO_PDF - The file could not be converted to PDF for processing
        • FAILED_TO_CONVERT_TO_JPEG - The file could not be converted to JPEG for processing
        • FAILED_TO_GENERATE_TARGET_FORMAT - The output could not be generated in the requested format
        • CHUNKING_ERROR - An error occurred while chunking the document
        • INTERNAL_ERROR - An unexpected internal error occurred
        • INVALID_CONFIG_OPTIONS - The provided configuration options are invalid
        • OUT_OF_CREDITS - Insufficient credits to process the file

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

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

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

        The reason for failure.

        Availability: Present when status is "FAILED".

        Possible values include:

        • UNABLE_TO_DOWNLOAD_FILE - The file could not be downloaded from the provided URL
        • FILE_TYPE_NOT_SUPPORTED - The file type is not supported for parsing
        • FILE_SIZE_TOO_LARGE - The file exceeds the maximum allowed size
        • CORRUPT_FILE - The file appears to be corrupted or malformed
        • OCR_ERROR - An error occurred during optical character recognition
        • PASSWORD_PROTECTED_FILE - The file is password protected and cannot be processed
        • FAILED_TO_CONVERT_TO_PDF - The file could not be converted to PDF for processing
        • FAILED_TO_CONVERT_TO_JPEG - The file could not be converted to JPEG for processing
        • FAILED_TO_GENERATE_TARGET_FORMAT - The output could not be generated in the requested format
        • CHUNKING_ERROR - An error occurred while chunking the document
        • INTERNAL_ERROR - An unexpected internal error occurred
        • INVALID_CONFIG_OPTIONS - The provided configuration options are invalid
        • OUT_OF_CREDITS - Insufficient credits to process the file

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

        Specified by:
        failureReason in interface ParseRunSummary._FinalStage
      • batchId

        public ParseRunSummary._FinalStage batchId​(Nullable<java.lang.String> batchId)

        The ID of the batch this run belongs to, if created via POST /parse_runs/batch.

        Availability: Present when the run was submitted as part of a batch.

        Example: "bpar_Xj8mK2pL9nR4vT7qY5wZ"

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

        public ParseRunSummary._FinalStage batchId​(java.lang.String batchId)

        The ID of the batch this run belongs to, if created via POST /parse_runs/batch.

        Availability: Present when the run was submitted as part of a batch.

        Example: "bpar_Xj8mK2pL9nR4vT7qY5wZ"

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

        public ParseRunSummary._FinalStage batchId​(java.util.Optional<java.lang.String> batchId)

        The ID of the batch this run belongs to, if created via POST /parse_runs/batch.

        Availability: Present when the run was submitted as part of a batch.

        Example: "bpar_Xj8mK2pL9nR4vT7qY5wZ"

        Specified by:
        batchId in interface ParseRunSummary._FinalStage