Class ProcessorRunCreateRequest
- java.lang.Object
-
- ai.extend.resources.processorrun.requests.ProcessorRunCreateRequest
-
public final class ProcessorRunCreateRequest extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceProcessorRunCreateRequest._FinalStagestatic classProcessorRunCreateRequest.Builderstatic interfaceProcessorRunCreateRequest.ProcessorIdStage
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ProcessorRunCreateRequest.ProcessorIdStagebuilder()booleanequals(java.lang.Object other)java.util.Map<java.lang.String,java.lang.Object>getAdditionalProperties()java.util.Optional<ProcessorRunCreateRequestConfig>getConfig()java.util.Optional<LegacyProcessorRunFileInput>getFile()java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>>getMetadata()java.util.Optional<java.lang.Integer>getPriority()java.lang.StringgetProcessorId()java.util.Optional<java.lang.String>getRawText()java.util.Optional<java.lang.Boolean>getSync()java.util.Optional<java.lang.String>getVersion()inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getProcessorId
public java.lang.String getProcessorId()
-
getVersion
public java.util.Optional<java.lang.String> getVersion()
- Returns:
- An optional version of the processor to use. When not supplied, the most recent published version of the processor will be used. Special values include:
"latest"for the most recent published version. If there are no published versions, the draft version will be used."draft"for the draft version.- Specific version numbers corresponding to versions your team has published, e.g.
"1.0","2.2", etc.
-
getFile
public java.util.Optional<LegacyProcessorRunFileInput> getFile()
- Returns:
- The file to be processed. One of
fileorrawTextmust be provided. Supported file types can be found here.
-
getRawText
public java.util.Optional<java.lang.String> getRawText()
- Returns:
- A raw string to be processed. Can be used in place of file when passing raw text data streams. One of
fileorrawTextmust be provided.
-
getSync
public java.util.Optional<java.lang.Boolean> getSync()
- Returns:
- Whether to run the processor synchronously. When
true, the request will wait for the processor run to complete and return the final results. Whenfalse(default), the request returns immediately with aPROCESSINGstatus, and you can poll for completion or use webhooks. For production use cases, we recommending leaving sync off and building around an async integration for more resiliency, unless your use case is predictably fast (e.g. sub < 30 seconds) run time or otherwise have integration constraints that require a synchronous API.Timeout: Synchronous requests have a 5-minute timeout. If the processor run takes longer, it will continue processing asynchronously and you can retrieve the results via the GET endpoint.
-
getPriority
public java.util.Optional<java.lang.Integer> getPriority()
- Returns:
- An optional value used to determine the relative order of ProcessorRuns when rate limiting is in effect. Lower values will be prioritized before higher values.
-
getMetadata
public java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> getMetadata()
- Returns:
- An optional object that can be passed in to identify the run of the document processor. It will be returned back to you in the response and webhooks.
To categorize processor runs for billing and usage tracking, include
extend:usage_tagswith an array of string values (e.g.,{"extend:usage_tags": ["production", "team-eng", "customer-123"]}). Tags must contain only alphanumeric characters, hyphens, and underscores; any special characters will be automatically removed.
-
getConfig
public java.util.Optional<ProcessorRunCreateRequestConfig> getConfig()
- Returns:
- The configuration for the processor run. If this is provided, this config will be used. If not provided, the config for the specific version you provide will be used. The type of configuration must match the processor type.
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
getAdditionalProperties
public java.util.Map<java.lang.String,java.lang.Object> getAdditionalProperties()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
builder
public static ProcessorRunCreateRequest.ProcessorIdStage builder()
-
-