Class WorkflowRunCreateRequest.Builder
- java.lang.Object
-
- ai.extend.resources.workflowrun.requests.WorkflowRunCreateRequest.Builder
-
- All Implemented Interfaces:
WorkflowRunCreateRequest._FinalStage,WorkflowRunCreateRequest.WorkflowIdStage
- Enclosing class:
- WorkflowRunCreateRequest
public static final class WorkflowRunCreateRequest.Builder extends java.lang.Object implements WorkflowRunCreateRequest.WorkflowIdStage, WorkflowRunCreateRequest._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WorkflowRunCreateRequestbuild()WorkflowRunCreateRequest._FinalStagefiles(java.util.List<WorkflowRunFileInput> files)An array of files to process through the workflow.WorkflowRunCreateRequest._FinalStagefiles(java.util.Optional<java.util.List<WorkflowRunFileInput>> files)An array of files to process through the workflow.WorkflowRunCreateRequest.Builderfrom(WorkflowRunCreateRequest other)WorkflowRunCreateRequest._FinalStagemetadata(java.util.Map<java.lang.String,java.lang.Object> metadata)An optional metadata object that can be assigned to a specific WorkflowRun to help identify it.WorkflowRunCreateRequest._FinalStagemetadata(java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> metadata)An optional metadata object that can be assigned to a specific WorkflowRun to help identify it.WorkflowRunCreateRequest._FinalStagepriority(java.lang.Integer priority)An optional value used to determine the relative order of WorkflowRuns when rate limiting is in effect.WorkflowRunCreateRequest._FinalStagepriority(java.util.Optional<java.lang.Integer> priority)An optional value used to determine the relative order of WorkflowRuns when rate limiting is in effect.WorkflowRunCreateRequest._FinalStagerawTexts(java.util.List<java.lang.String> rawTexts)An array of raw strings.WorkflowRunCreateRequest._FinalStagerawTexts(java.util.Optional<java.util.List<java.lang.String>> rawTexts)An array of raw strings.WorkflowRunCreateRequest._FinalStageversion(java.lang.String version)An optional version of the workflow that files will be run through.WorkflowRunCreateRequest._FinalStageversion(java.util.Optional<java.lang.String> version)An optional version of the workflow that files will be run through.WorkflowRunCreateRequest._FinalStageworkflowId(java.lang.String workflowId)The ID of the workflow to run.
-
-
-
Method Detail
-
from
public WorkflowRunCreateRequest.Builder from(WorkflowRunCreateRequest other)
- Specified by:
fromin interfaceWorkflowRunCreateRequest.WorkflowIdStage
-
workflowId
public WorkflowRunCreateRequest._FinalStage workflowId(@NotNull java.lang.String workflowId)
The ID of the workflow to run.
Example:
"workflow_BMdfq_yWM3sT-ZzvCnA3f"The ID of the workflow to run.
Example:
"workflow_BMdfq_yWM3sT-ZzvCnA3f"- Specified by:
workflowIdin interfaceWorkflowRunCreateRequest.WorkflowIdStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
metadata
public WorkflowRunCreateRequest._FinalStage metadata(java.util.Map<java.lang.String,java.lang.Object> metadata)
An optional metadata object that can be assigned to a specific WorkflowRun to help identify it. It will be returned in the response and webhooks. You can place any arbitrary
key : valuepairs in this object.To categorize workflow 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.- Specified by:
metadatain interfaceWorkflowRunCreateRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
metadata
public WorkflowRunCreateRequest._FinalStage metadata(java.util.Optional<java.util.Map<java.lang.String,java.lang.Object>> metadata)
An optional metadata object that can be assigned to a specific WorkflowRun to help identify it. It will be returned in the response and webhooks. You can place any arbitrary
key : valuepairs in this object.To categorize workflow 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.- Specified by:
metadatain interfaceWorkflowRunCreateRequest._FinalStage
-
priority
public WorkflowRunCreateRequest._FinalStage priority(java.lang.Integer priority)
An optional value used to determine the relative order of WorkflowRuns when rate limiting is in effect. Lower values will be prioritized before higher values.
- Specified by:
priorityin interfaceWorkflowRunCreateRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
priority
public WorkflowRunCreateRequest._FinalStage priority(java.util.Optional<java.lang.Integer> priority)
An optional value used to determine the relative order of WorkflowRuns when rate limiting is in effect. Lower values will be prioritized before higher values.
- Specified by:
priorityin interfaceWorkflowRunCreateRequest._FinalStage
-
version
public WorkflowRunCreateRequest._FinalStage version(java.lang.String version)
An optional version of the workflow that files will be run through. This number can be found when viewing the workflow on the Extend platform. When a version number is not supplied, the most recent published version of the workflow will be used. If no published versions exist, the draft version will be used. To run the
"draft"version of a workflow, use"draft"as the version.Examples:
"3"- Run version 3 of the workflow"draft"- Run the draft version of the workflow
- Specified by:
versionin interfaceWorkflowRunCreateRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
version
public WorkflowRunCreateRequest._FinalStage version(java.util.Optional<java.lang.String> version)
An optional version of the workflow that files will be run through. This number can be found when viewing the workflow on the Extend platform. When a version number is not supplied, the most recent published version of the workflow will be used. If no published versions exist, the draft version will be used. To run the
"draft"version of a workflow, use"draft"as the version.Examples:
"3"- Run version 3 of the workflow"draft"- Run the draft version of the workflow
- Specified by:
versionin interfaceWorkflowRunCreateRequest._FinalStage
-
rawTexts
public WorkflowRunCreateRequest._FinalStage rawTexts(java.util.List<java.lang.String> rawTexts)
An array of raw strings. Can be used in place of files when passing raw data. The raw data will be converted to
.txtfiles and run through the workflow. If the data follows a specific format, it is recommended to use the files parameter instead. EitherfilesorrawTextsmust be provided.- Specified by:
rawTextsin interfaceWorkflowRunCreateRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
rawTexts
public WorkflowRunCreateRequest._FinalStage rawTexts(java.util.Optional<java.util.List<java.lang.String>> rawTexts)
An array of raw strings. Can be used in place of files when passing raw data. The raw data will be converted to
.txtfiles and run through the workflow. If the data follows a specific format, it is recommended to use the files parameter instead. EitherfilesorrawTextsmust be provided.- Specified by:
rawTextsin interfaceWorkflowRunCreateRequest._FinalStage
-
files
public WorkflowRunCreateRequest._FinalStage files(java.util.List<WorkflowRunFileInput> files)
An array of files to process through the workflow. Either the
filesarray orrawTextsarray must be provided. Supported file types can be found here. There is a limit if 50 files that can be processed at once using this endpoint. If you wish to process more at a time, consider using the Batch Run Workflow endpoint.- Specified by:
filesin interfaceWorkflowRunCreateRequest._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
files
public WorkflowRunCreateRequest._FinalStage files(java.util.Optional<java.util.List<WorkflowRunFileInput>> files)
An array of files to process through the workflow. Either the
filesarray orrawTextsarray must be provided. Supported file types can be found here. There is a limit if 50 files that can be processed at once using this endpoint. If you wish to process more at a time, consider using the Batch Run Workflow endpoint.- Specified by:
filesin interfaceWorkflowRunCreateRequest._FinalStage
-
build
public WorkflowRunCreateRequest build()
- Specified by:
buildin interfaceWorkflowRunCreateRequest._FinalStage
-
-