Class FormDetectionRun.Builder
- java.lang.Object
-
- ai.extend.types.FormDetectionRun.Builder
-
- All Implemented Interfaces:
FormDetectionRun._FinalStage,FormDetectionRun.ConfigStage,FormDetectionRun.FileStage,FormDetectionRun.IdStage,FormDetectionRun.StatusStage
- Enclosing class:
- FormDetectionRun
public static final class FormDetectionRun.Builder extends java.lang.Object implements FormDetectionRun.IdStage, FormDetectionRun.FileStage, FormDetectionRun.StatusStage, FormDetectionRun.ConfigStage, FormDetectionRun._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FormDetectionRunbuild()FormDetectionRun._FinalStageconfig(EditSchemaGenerationConfig config)The configuration used for this form detection run, including any default values that were applied.FormDetectionRun._FinalStagefailureMessage(Nullable<java.lang.String> failureMessage)A human-readable description of the failure.FormDetectionRun._FinalStagefailureMessage(java.lang.String failureMessage)A human-readable description of the failure.FormDetectionRun._FinalStagefailureMessage(java.util.Optional<java.lang.String> failureMessage)A human-readable description of the failure.FormDetectionRun._FinalStagefailureReason(Nullable<java.lang.String> failureReason)The reason for failure.FormDetectionRun._FinalStagefailureReason(java.lang.String failureReason)The reason for failure.FormDetectionRun._FinalStagefailureReason(java.util.Optional<java.lang.String> failureReason)The reason for failure.FormDetectionRun.StatusStagefile(FileSummary file)The input PDF submitted for form detection.FormDetectionRun.Builderfrom(FormDetectionRun other)FormDetectionRun.FileStageid(java.lang.String id)A unique identifier for the form detection run.FormDetectionRun._FinalStagemetrics(Nullable<FormDetectionRunMetrics> metrics)Metrics about the form detection process.FormDetectionRun._FinalStagemetrics(FormDetectionRunMetrics metrics)Metrics about the form detection process.FormDetectionRun._FinalStagemetrics(java.util.Optional<FormDetectionRunMetrics> metrics)Metrics about the form detection process.FormDetectionRun._FinalStageoutput(Nullable<EditSchemaGenerationResponse> output)The detected schema and optional mapping metadata.FormDetectionRun._FinalStageoutput(EditSchemaGenerationResponse output)The detected schema and optional mapping metadata.FormDetectionRun._FinalStageoutput(java.util.Optional<EditSchemaGenerationResponse> output)The detected schema and optional mapping metadata.FormDetectionRun.ConfigStagestatus(FormDetectionRunStatus status)The status of the form detection run:FormDetectionRun._FinalStageusage(Nullable<RunUsage> usage)Usage credits consumed by this form detection run.FormDetectionRun._FinalStageusage(RunUsage usage)Usage credits consumed by this form detection run.FormDetectionRun._FinalStageusage(java.util.Optional<RunUsage> usage)Usage credits consumed by this form detection run.
-
-
-
Method Detail
-
from
public FormDetectionRun.Builder from(FormDetectionRun other)
- Specified by:
fromin interfaceFormDetectionRun.IdStage
-
id
public FormDetectionRun.FileStage id(@NotNull java.lang.String id)
A unique identifier for the form detection run.
Example:
"sgr_xK9mLPqRtN3vS8wF5hB2cQ"A unique identifier for the form detection run.
Example:
"sgr_xK9mLPqRtN3vS8wF5hB2cQ"- Specified by:
idin interfaceFormDetectionRun.IdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
file
public FormDetectionRun.StatusStage file(@NotNull FileSummary file)
The input PDF submitted for form detection.
The input PDF submitted for form detection.
- Specified by:
filein interfaceFormDetectionRun.FileStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
status
public FormDetectionRun.ConfigStage status(@NotNull FormDetectionRunStatus status)
The status of the form detection run:
"PROCESSING"- The form is still being analyzed"PROCESSED"- Form detection completed successfully"FAILED"- Form detection failed (seefailureReasonfor details)
The status of the form detection run:
"PROCESSING"- The form is still being analyzed"PROCESSED"- Form detection completed successfully"FAILED"- Form detection failed (seefailureReasonfor details)
- Specified by:
statusin interfaceFormDetectionRun.StatusStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
config
public FormDetectionRun._FinalStage config(@NotNull EditSchemaGenerationConfig config)
The configuration used for this form detection run, including any default values that were applied.
The configuration used for this form detection run, including any default values that were applied.
- Specified by:
configin interfaceFormDetectionRun.ConfigStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
usage
public FormDetectionRun._FinalStage usage(Nullable<RunUsage> usage)
Usage credits consumed by this form detection run.
- Specified by:
usagein interfaceFormDetectionRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
usage
public FormDetectionRun._FinalStage usage(RunUsage usage)
Usage credits consumed by this form detection run.
- Specified by:
usagein interfaceFormDetectionRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
usage
public FormDetectionRun._FinalStage usage(java.util.Optional<RunUsage> usage)
Usage credits consumed by this form detection run.
- Specified by:
usagein interfaceFormDetectionRun._FinalStage
-
metrics
public FormDetectionRun._FinalStage metrics(Nullable<FormDetectionRunMetrics> metrics)
Metrics about the form detection process.
Availability: Present when
statusis"PROCESSED".- Specified by:
metricsin interfaceFormDetectionRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
metrics
public FormDetectionRun._FinalStage metrics(FormDetectionRunMetrics metrics)
Metrics about the form detection process.
Availability: Present when
statusis"PROCESSED".- Specified by:
metricsin interfaceFormDetectionRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
metrics
public FormDetectionRun._FinalStage metrics(java.util.Optional<FormDetectionRunMetrics> metrics)
Metrics about the form detection process.
Availability: Present when
statusis"PROCESSED".- Specified by:
metricsin interfaceFormDetectionRun._FinalStage
-
output
public FormDetectionRun._FinalStage output(Nullable<EditSchemaGenerationResponse> output)
The detected schema and optional mapping metadata.
Availability: Present when
statusis"PROCESSED".- Specified by:
outputin interfaceFormDetectionRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
output
public FormDetectionRun._FinalStage output(EditSchemaGenerationResponse output)
The detected schema and optional mapping metadata.
Availability: Present when
statusis"PROCESSED".- Specified by:
outputin interfaceFormDetectionRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
output
public FormDetectionRun._FinalStage output(java.util.Optional<EditSchemaGenerationResponse> output)
The detected schema and optional mapping metadata.
Availability: Present when
statusis"PROCESSED".- Specified by:
outputin interfaceFormDetectionRun._FinalStage
-
failureMessage
public FormDetectionRun._FinalStage failureMessage(Nullable<java.lang.String> failureMessage)
A human-readable description of the failure.
Availability: Present when
statusis"FAILED".- Specified by:
failureMessagein interfaceFormDetectionRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureMessage
public FormDetectionRun._FinalStage failureMessage(java.lang.String failureMessage)
A human-readable description of the failure.
Availability: Present when
statusis"FAILED".- Specified by:
failureMessagein interfaceFormDetectionRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureMessage
public FormDetectionRun._FinalStage failureMessage(java.util.Optional<java.lang.String> failureMessage)
A human-readable description of the failure.
Availability: Present when
statusis"FAILED".- Specified by:
failureMessagein interfaceFormDetectionRun._FinalStage
-
failureReason
public FormDetectionRun._FinalStage failureReason(Nullable<java.lang.String> failureReason)
The reason for failure.
Availability: Present when
statusis"FAILED".Possible values include:
UNABLE_TO_DOWNLOAD_FILEFILE_TYPE_NOT_SUPPORTEDFILE_SIZE_TOO_LARGECORRUPT_FILEFIELD_DETECTION_ERRORPASSWORD_PROTECTED_FILEFAILED_TO_CONVERT_TO_PDFEMPTY_SCHEMAINTERNAL_ERRORINVALID_OPTIONSOUT_OF_CREDITS
Note: Additional failure reasons may be added in the future. Your integration should handle unknown values gracefully.
- Specified by:
failureReasonin interfaceFormDetectionRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureReason
public FormDetectionRun._FinalStage failureReason(java.lang.String failureReason)
The reason for failure.
Availability: Present when
statusis"FAILED".Possible values include:
UNABLE_TO_DOWNLOAD_FILEFILE_TYPE_NOT_SUPPORTEDFILE_SIZE_TOO_LARGECORRUPT_FILEFIELD_DETECTION_ERRORPASSWORD_PROTECTED_FILEFAILED_TO_CONVERT_TO_PDFEMPTY_SCHEMAINTERNAL_ERRORINVALID_OPTIONSOUT_OF_CREDITS
Note: Additional failure reasons may be added in the future. Your integration should handle unknown values gracefully.
- Specified by:
failureReasonin interfaceFormDetectionRun._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
failureReason
public FormDetectionRun._FinalStage failureReason(java.util.Optional<java.lang.String> failureReason)
The reason for failure.
Availability: Present when
statusis"FAILED".Possible values include:
UNABLE_TO_DOWNLOAD_FILEFILE_TYPE_NOT_SUPPORTEDFILE_SIZE_TOO_LARGECORRUPT_FILEFIELD_DETECTION_ERRORPASSWORD_PROTECTED_FILEFAILED_TO_CONVERT_TO_PDFEMPTY_SCHEMAINTERNAL_ERRORINVALID_OPTIONSOUT_OF_CREDITS
Note: Additional failure reasons may be added in the future. Your integration should handle unknown values gracefully.
- Specified by:
failureReasonin interfaceFormDetectionRun._FinalStage
-
build
public FormDetectionRun build()
- Specified by:
buildin interfaceFormDetectionRun._FinalStage
-
-