Class FormDetectionRun


  • public final class FormDetectionRun
    extends java.lang.Object
    • Method Detail

      • getObject

        public java.lang.String getObject()
        Returns:
        The type of object. Will always be "form_detection_run".
      • getId

        public java.lang.String getId()
        Returns:
        A unique identifier for the form detection run.

        Example: "sgr_xK9mLPqRtN3vS8wF5hB2cQ"

      • getFile

        public FileSummary getFile()
        Returns:
        The input PDF submitted for form detection.
      • getStatus

        public FormDetectionRunStatus getStatus()
        Returns:
        The status of the form detection run:
        • "PROCESSING" - The form is still being analyzed
        • "PROCESSED" - Form detection completed successfully
        • "FAILED" - Form detection failed (see failureReason for details)
      • getFailureReason

        public java.util.Optional<java.lang.String> getFailureReason()
        Returns:
        The reason for failure.

        Availability: Present when status is "FAILED".

        Possible values include:

        • UNABLE_TO_DOWNLOAD_FILE
        • FILE_TYPE_NOT_SUPPORTED
        • FILE_SIZE_TOO_LARGE
        • CORRUPT_FILE
        • FIELD_DETECTION_ERROR
        • PASSWORD_PROTECTED_FILE
        • FAILED_TO_CONVERT_TO_PDF
        • EMPTY_SCHEMA
        • INTERNAL_ERROR
        • INVALID_OPTIONS
        • OUT_OF_CREDITS

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

      • getFailureMessage

        public java.util.Optional<java.lang.String> getFailureMessage()
        Returns:
        A human-readable description of the failure.

        Availability: Present when status is "FAILED".

      • getConfig

        public EditSchemaGenerationConfig getConfig()
        Returns:
        The configuration used for this form detection run, including any default values that were applied.
      • getOutput

        public java.util.Optional<EditSchemaGenerationResponse> getOutput()
        Returns:
        The detected schema and optional mapping metadata.

        Availability: Present when status is "PROCESSED".

      • getMetrics

        public java.util.Optional<FormDetectionRunMetrics> getMetrics()
        Returns:
        Metrics about the form detection process.

        Availability: Present when status is "PROCESSED".

      • getUsage

        public java.util.Optional<RunUsage> getUsage()
        Returns:
        Usage credits consumed by this form detection run.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • getAdditionalProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getAdditionalProperties()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object