From 2a883ea78a13d5db997f5bcefac8592d283c3903 Mon Sep 17 00:00:00 2001
From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com>
Date: Wed, 29 Jul 2026 22:25:43 +0000
Subject: [PATCH 1/2] [fern-generated] Update SDK
Generated by Fern
CLI Version: unknown
Generators:
- fernapi/fern-java-sdk: 3.34.8
---
.fern/metadata.json | 4 +-
build.gradle | 4 +-
reference.md | 16 +-
.../java/ai/extend/core/ClientOptions.java | 4 +-
.../AsyncRawWorkflowRunsClient.java | 6 +-
.../workflowruns/AsyncWorkflowRunsClient.java | 6 +-
.../workflowruns/RawWorkflowRunsClient.java | 6 +-
.../workflowruns/WorkflowRunsClient.java | 6 +-
.../requests/WorkflowRunsCreateRequest.java | 119 +++-
.../java/ai/extend/types/BlockMetadata.java | 35 +-
.../types/BlockMetadataTextDirection.java | 84 ---
.../ai/extend/types/ClassificationMetric.java | 255 ++++++++
.../ai/extend/types/ClassifierVersion.java | 66 +-
.../types/ClassifierVersionSummary.java | 59 +-
.../ClassifyEvaluationSetRunMetrics.java | 435 ++++++++++++++
src/main/java/ai/extend/types/CreatedBy.java | 203 +++++++
.../java/ai/extend/types/CreatedByApiKey.java | 113 ++++
.../java/ai/extend/types/CreatedByUser.java | 113 ++++
.../java/ai/extend/types/EvaluationSet.java | 66 +-
.../ai/extend/types/EvaluationSetItem.java | 64 +-
.../types/EvaluationSetItemSummary.java | 65 +-
.../ai/extend/types/EvaluationSetRun.java | 11 +
.../types/EvaluationSetRunFieldMetric.java | 224 +++++++
.../extend/types/EvaluationSetRunMetrics.java | 293 ++++++---
.../types/EvaluationSetRunMetricsBase.java | 371 ++++++++++++
.../types/ExtractEvaluationSetRunMetrics.java | 435 ++++++++++++++
.../ai/extend/types/ExtractorVersion.java | 61 +-
.../extend/types/ExtractorVersionSummary.java | 60 +-
.../types/IEvaluationSetRunMetricsBase.java | 26 +
.../SplitterEvaluationSetRunMetrics.java | 563 ++++++++++++++++++
.../java/ai/extend/types/SplitterVersion.java | 61 +-
.../extend/types/SplitterVersionSummary.java | 60 +-
.../java/ai/extend/types/WebhookEndpoint.java | 69 ++-
.../extend/types/WebhookEndpointCreate.java | 59 +-
src/main/java/ai/extend/types/Workflow.java | 64 +-
.../ai/extend/types/WorkflowRunPackage.java | 114 ++++
.../types/WorkflowRunPackageFilesItem.java | 96 +++
.../java/ai/extend/types/WorkflowSummary.java | 64 +-
.../java/ai/extend/types/WorkflowVersion.java | 59 +-
.../extend/types/WorkflowVersionSummary.java | 59 +-
40 files changed, 4186 insertions(+), 292 deletions(-)
delete mode 100644 src/main/java/ai/extend/types/BlockMetadataTextDirection.java
create mode 100644 src/main/java/ai/extend/types/ClassificationMetric.java
create mode 100644 src/main/java/ai/extend/types/ClassifyEvaluationSetRunMetrics.java
create mode 100644 src/main/java/ai/extend/types/CreatedBy.java
create mode 100644 src/main/java/ai/extend/types/CreatedByApiKey.java
create mode 100644 src/main/java/ai/extend/types/CreatedByUser.java
create mode 100644 src/main/java/ai/extend/types/EvaluationSetRunFieldMetric.java
create mode 100644 src/main/java/ai/extend/types/EvaluationSetRunMetricsBase.java
create mode 100644 src/main/java/ai/extend/types/ExtractEvaluationSetRunMetrics.java
create mode 100644 src/main/java/ai/extend/types/IEvaluationSetRunMetricsBase.java
create mode 100644 src/main/java/ai/extend/types/SplitterEvaluationSetRunMetrics.java
create mode 100644 src/main/java/ai/extend/types/WorkflowRunPackage.java
create mode 100644 src/main/java/ai/extend/types/WorkflowRunPackageFilesItem.java
diff --git a/.fern/metadata.json b/.fern/metadata.json
index 57faac3..573862c 100644
--- a/.fern/metadata.json
+++ b/.fern/metadata.json
@@ -18,6 +18,6 @@
"testImplementation org.mockito:mockito-inline:4.11.0"
]
},
- "originGitCommit": "094c36681badc82afeb39a2c91a716461a5a0bd2",
- "sdkVersion": "1.17.0"
+ "originGitCommit": "a5c1143a7b724689db7c5e4cee897834882c9d69",
+ "sdkVersion": "1.18.0"
}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 78077a1..c5db996 100644
--- a/build.gradle
+++ b/build.gradle
@@ -50,7 +50,7 @@ java {
group = 'ai.extend'
-version = '1.17.0'
+version = '1.18.0'
jar {
dependsOn(":generatePomFileForMavenPublication")
@@ -81,7 +81,7 @@ publishing {
maven(MavenPublication) {
groupId = 'ai.extend'
artifactId = 'extend-java-sdk'
- version = '1.17.0'
+ version = '1.18.0'
from components.java
pom {
name = 'Extend.ai'
diff --git a/reference.md b/reference.md
index b1b9fff..f6b0daa 100644
--- a/reference.md
+++ b/reference.md
@@ -6713,7 +6713,9 @@ Example: `"invoice"`
-Run a workflow with a file. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+Run a workflow. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+
+Pass `file` for a single document, or `package` to process 2-50 files together as one package in a single run. Exactly one of `file` or `package` must be provided.
The request returns immediately with a `PROCESSING` status. Use webhooks or poll the Get Workflow Run endpoint for results.
@@ -6771,7 +6773,15 @@ client.workflowRuns().create(
-**file:** `WorkflowRunsCreateRequestFile` — The file to be processed. Supported file types can be found [here](https://docs.extend.ai/2026-02-09/general/supported-file-types). Files can be provided as a URL, an Extend file ID, or raw text. If you wish to process more at a time, consider using the [Batch Run Workflow](https://docs.extend.ai/2026-02-09/api-reference/endpoints/workflow/batch-create-workflow-runs) endpoint.
+**file:** `Optional` — The file to be processed. Supported file types can be found [here](https://docs.extend.ai/2026-02-09/general/supported-file-types). Files can be provided as a URL, an Extend file ID, or raw text. Mutually exclusive with `package` — provide one or the other. If you wish to process many files as independent runs, consider using the [Batch Run Workflow](https://docs.extend.ai/2026-02-09/api-reference/endpoints/workflow/batch-create-workflow-runs) endpoint.
+
+
+
+
+
+
+
+**package_:** `Optional` — A set of 2–50 files to process together in a single workflow run. Mutually exclusive with `file` — provide one or the other.
@@ -6779,7 +6789,7 @@ client.workflowRuns().create(
-**outputs:** `Optional>` — Predetermined outputs to be used for the workflow run. Generally not recommended for most use cases, however, can be useful in cases of overriding a classification in a workflow, or a subset of extraction fields when data is known.
+**outputs:** `Optional>` — Predetermined outputs to be used for the workflow run. Generally not recommended for most use cases, however, can be useful in cases of overriding a classification in a workflow, or a subset of extraction fields when data is known. Not supported on package runs — a package run produces a single merged result across all files and cannot accept pre-supplied per-processor outputs.
diff --git a/src/main/java/ai/extend/core/ClientOptions.java b/src/main/java/ai/extend/core/ClientOptions.java
index 43e09a5..4d1b8f6 100644
--- a/src/main/java/ai/extend/core/ClientOptions.java
+++ b/src/main/java/ai/extend/core/ClientOptions.java
@@ -35,10 +35,10 @@ private ClientOptions(
this.headers.putAll(headers);
this.headers.putAll(new HashMap() {
{
- put("User-Agent", "ai.extend:extend-java-sdk/1.17.0");
+ put("User-Agent", "ai.extend:extend-java-sdk/1.18.0");
put("X-Fern-Language", "JAVA");
put("X-Fern-SDK-Name", "com.extendconfig.fern:api-sdk");
- put("X-Fern-SDK-Version", "1.17.0");
+ put("X-Fern-SDK-Version", "1.18.0");
}
});
this.headerSuppliers = headerSuppliers;
diff --git a/src/main/java/ai/extend/resources/workflowruns/AsyncRawWorkflowRunsClient.java b/src/main/java/ai/extend/resources/workflowruns/AsyncRawWorkflowRunsClient.java
index 8218d71..2b712fb 100644
--- a/src/main/java/ai/extend/resources/workflowruns/AsyncRawWorkflowRunsClient.java
+++ b/src/main/java/ai/extend/resources/workflowruns/AsyncRawWorkflowRunsClient.java
@@ -210,7 +210,8 @@ public void onFailure(@NotNull Call call, @NotNull IOException e) {
}
/**
- * Run a workflow with a file. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+ * Run a workflow. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+ * Pass file for a single document, or package to process 2-50 files together as one package in a single run. Exactly one of file or package must be provided.
* The request returns immediately with a PROCESSING status. Use webhooks or poll the Get Workflow Run endpoint for results.
*/
public CompletableFuture> create(WorkflowRunsCreateRequest request) {
@@ -218,7 +219,8 @@ public CompletableFuture> create(Workf
}
/**
- * Run a workflow with a file. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+ * Run a workflow. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+ * Pass file for a single document, or package to process 2-50 files together as one package in a single run. Exactly one of file or package must be provided.
* The request returns immediately with a PROCESSING status. Use webhooks or poll the Get Workflow Run endpoint for results.
*/
public CompletableFuture> create(
diff --git a/src/main/java/ai/extend/resources/workflowruns/AsyncWorkflowRunsClient.java b/src/main/java/ai/extend/resources/workflowruns/AsyncWorkflowRunsClient.java
index 260d58a..fb865ec 100644
--- a/src/main/java/ai/extend/resources/workflowruns/AsyncWorkflowRunsClient.java
+++ b/src/main/java/ai/extend/resources/workflowruns/AsyncWorkflowRunsClient.java
@@ -65,7 +65,8 @@ public CompletableFuture list(
}
/**
- * Run a workflow with a file. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+ * Run a workflow. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+ * Pass file for a single document, or package to process 2-50 files together as one package in a single run. Exactly one of file or package must be provided.
* The request returns immediately with a PROCESSING status. Use webhooks or poll the Get Workflow Run endpoint for results.
*/
public CompletableFuture create(WorkflowRunsCreateRequest request) {
@@ -73,7 +74,8 @@ public CompletableFuture create(WorkflowRunsCreateRequest request)
}
/**
- * Run a workflow with a file. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+ * Run a workflow. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+ * Pass file for a single document, or package to process 2-50 files together as one package in a single run. Exactly one of file or package must be provided.
* The request returns immediately with a PROCESSING status. Use webhooks or poll the Get Workflow Run endpoint for results.
*/
public CompletableFuture create(WorkflowRunsCreateRequest request, RequestOptions requestOptions) {
diff --git a/src/main/java/ai/extend/resources/workflowruns/RawWorkflowRunsClient.java b/src/main/java/ai/extend/resources/workflowruns/RawWorkflowRunsClient.java
index 478d185..9ed0b6c 100644
--- a/src/main/java/ai/extend/resources/workflowruns/RawWorkflowRunsClient.java
+++ b/src/main/java/ai/extend/resources/workflowruns/RawWorkflowRunsClient.java
@@ -175,7 +175,8 @@ public ExtendClientBaseHttpResponse list(
}
/**
- * Run a workflow with a file. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+ * Run a workflow. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+ * Pass file for a single document, or package to process 2-50 files together as one package in a single run. Exactly one of file or package must be provided.
* The request returns immediately with a PROCESSING status. Use webhooks or poll the Get Workflow Run endpoint for results.
*/
public ExtendClientBaseHttpResponse create(WorkflowRunsCreateRequest request) {
@@ -183,7 +184,8 @@ public ExtendClientBaseHttpResponse create(WorkflowRunsCreateReques
}
/**
- * Run a workflow with a file. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+ * Run a workflow. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+ * Pass file for a single document, or package to process 2-50 files together as one package in a single run. Exactly one of file or package must be provided.
* The request returns immediately with a PROCESSING status. Use webhooks or poll the Get Workflow Run endpoint for results.
*/
public ExtendClientBaseHttpResponse create(
diff --git a/src/main/java/ai/extend/resources/workflowruns/WorkflowRunsClient.java b/src/main/java/ai/extend/resources/workflowruns/WorkflowRunsClient.java
index e859a13..116a42c 100644
--- a/src/main/java/ai/extend/resources/workflowruns/WorkflowRunsClient.java
+++ b/src/main/java/ai/extend/resources/workflowruns/WorkflowRunsClient.java
@@ -63,7 +63,8 @@ public WorkflowRunsListResponse list(WorkflowRunsListRequest request, RequestOpt
}
/**
- * Run a workflow with a file. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+ * Run a workflow. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+ * Pass file for a single document, or package to process 2-50 files together as one package in a single run. Exactly one of file or package must be provided.
* The request returns immediately with a PROCESSING status. Use webhooks or poll the Get Workflow Run endpoint for results.
*/
public WorkflowRun create(WorkflowRunsCreateRequest request) {
@@ -71,7 +72,8 @@ public WorkflowRun create(WorkflowRunsCreateRequest request) {
}
/**
- * Run a workflow with a file. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+ * Run a workflow. A workflow is a sequence of steps that process files and data in a specific order to achieve a desired outcome.
+ * Pass file for a single document, or package to process 2-50 files together as one package in a single run. Exactly one of file or package must be provided.
* The request returns immediately with a PROCESSING status. Use webhooks or poll the Get Workflow Run endpoint for results.
*/
public WorkflowRun create(WorkflowRunsCreateRequest request, RequestOptions requestOptions) {
diff --git a/src/main/java/ai/extend/resources/workflowruns/requests/WorkflowRunsCreateRequest.java b/src/main/java/ai/extend/resources/workflowruns/requests/WorkflowRunsCreateRequest.java
index 1530f0c..ae497bd 100644
--- a/src/main/java/ai/extend/resources/workflowruns/requests/WorkflowRunsCreateRequest.java
+++ b/src/main/java/ai/extend/resources/workflowruns/requests/WorkflowRunsCreateRequest.java
@@ -7,6 +7,7 @@
import ai.extend.resources.workflowruns.types.WorkflowRunsCreateRequestFile;
import ai.extend.resources.workflowruns.types.WorkflowRunsCreateRequestOutputsItem;
import ai.extend.types.WorkflowReference;
+import ai.extend.types.WorkflowRunPackage;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
@@ -27,7 +28,9 @@
public final class WorkflowRunsCreateRequest {
private final WorkflowReference workflow;
- private final WorkflowRunsCreateRequestFile file;
+ private final Optional file;
+
+ private final Optional package_;
private final Optional> outputs;
@@ -41,7 +44,8 @@ public final class WorkflowRunsCreateRequest {
private WorkflowRunsCreateRequest(
WorkflowReference workflow,
- WorkflowRunsCreateRequestFile file,
+ Optional file,
+ Optional package_,
Optional> outputs,
Optional priority,
Optional> metadata,
@@ -49,6 +53,7 @@ private WorkflowRunsCreateRequest(
Map additionalProperties) {
this.workflow = workflow;
this.file = file;
+ this.package_ = package_;
this.outputs = outputs;
this.priority = priority;
this.metadata = metadata;
@@ -62,15 +67,23 @@ public WorkflowReference getWorkflow() {
}
/**
- * @return The file to be processed. Supported file types can be found here . Files can be provided as a URL, an Extend file ID, or raw text. If you wish to process more at a time, consider using the Batch Run Workflow endpoint.
+ * @return The file to be processed. Supported file types can be found here . Files can be provided as a URL, an Extend file ID, or raw text. Mutually exclusive with package — provide one or the other. If you wish to process many files as independent runs, consider using the Batch Run Workflow endpoint.
*/
@JsonProperty("file")
- public WorkflowRunsCreateRequestFile getFile() {
+ public Optional getFile() {
return file;
}
/**
- * @return Predetermined outputs to be used for the workflow run. Generally not recommended for most use cases, however, can be useful in cases of overriding a classification in a workflow, or a subset of extraction fields when data is known.
+ * @return A set of 2–50 files to process together in a single workflow run. Mutually exclusive with file — provide one or the other.
+ */
+ @JsonProperty("package")
+ public Optional getPackage() {
+ return package_;
+ }
+
+ /**
+ * @return Predetermined outputs to be used for the workflow run. Generally not recommended for most use cases, however, can be useful in cases of overriding a classification in a workflow, or a subset of extraction fields when data is known. Not supported on package runs — a package run produces a single merged result across all files and cannot accept pre-supplied per-processor outputs.
*/
@JsonProperty("outputs")
public Optional> getOutputs() {
@@ -106,6 +119,7 @@ public Map getAdditionalProperties() {
private boolean equalTo(WorkflowRunsCreateRequest other) {
return workflow.equals(other.workflow)
&& file.equals(other.file)
+ && package_.equals(other.package_)
&& outputs.equals(other.outputs)
&& priority.equals(other.priority)
&& metadata.equals(other.metadata)
@@ -114,7 +128,8 @@ private boolean equalTo(WorkflowRunsCreateRequest other) {
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.workflow, this.file, this.outputs, this.priority, this.metadata, this.secrets);
+ return Objects.hash(
+ this.workflow, this.file, this.package_, this.outputs, this.priority, this.metadata, this.secrets);
}
@java.lang.Override
@@ -127,23 +142,30 @@ public static WorkflowStage builder() {
}
public interface WorkflowStage {
- FileStage workflow(@NotNull WorkflowReference workflow);
+ _FinalStage workflow(@NotNull WorkflowReference workflow);
Builder from(WorkflowRunsCreateRequest other);
}
- public interface FileStage {
+ public interface _FinalStage {
+ WorkflowRunsCreateRequest build();
+
/**
- * The file to be processed. Supported file types can be found here . Files can be provided as a URL, an Extend file ID, or raw text. If you wish to process more at a time, consider using the Batch Run Workflow endpoint.
+ * The file to be processed. Supported file types can be found here . Files can be provided as a URL, an Extend file ID, or raw text. Mutually exclusive with package — provide one or the other. If you wish to process many files as independent runs, consider using the Batch Run Workflow endpoint.
*/
- _FinalStage file(@NotNull WorkflowRunsCreateRequestFile file);
- }
+ _FinalStage file(Optional file);
- public interface _FinalStage {
- WorkflowRunsCreateRequest build();
+ _FinalStage file(WorkflowRunsCreateRequestFile file);
+
+ /**
+ * A set of 2–50 files to process together in a single workflow run. Mutually exclusive with file — provide one or the other.
+ */
+ _FinalStage package_(Optional package_);
+
+ _FinalStage package_(WorkflowRunPackage package_);
/**
- * Predetermined outputs to be used for the workflow run. Generally not recommended for most use cases, however, can be useful in cases of overriding a classification in a workflow, or a subset of extraction fields when data is known.
+ * Predetermined outputs to be used for the workflow run. Generally not recommended for most use cases, however, can be useful in cases of overriding a classification in a workflow, or a subset of extraction fields when data is known. Not supported on package runs — a package run produces a single merged result across all files and cannot accept pre-supplied per-processor outputs.
*/
_FinalStage outputs(Optional> outputs);
@@ -163,11 +185,9 @@ public interface _FinalStage {
}
@JsonIgnoreProperties(ignoreUnknown = true)
- public static final class Builder implements WorkflowStage, FileStage, _FinalStage {
+ public static final class Builder implements WorkflowStage, _FinalStage {
private WorkflowReference workflow;
- private WorkflowRunsCreateRequestFile file;
-
private Optional> secrets = Optional.empty();
private Optional> metadata = Optional.empty();
@@ -176,6 +196,10 @@ public static final class Builder implements WorkflowStage, FileStage, _FinalSta
private Optional> outputs = Optional.empty();
+ private Optional package_ = Optional.empty();
+
+ private Optional file = Optional.empty();
+
@JsonAnySetter
private Map additionalProperties = new HashMap<>();
@@ -185,6 +209,7 @@ private Builder() {}
public Builder from(WorkflowRunsCreateRequest other) {
workflow(other.getWorkflow());
file(other.getFile());
+ package_(other.getPackage());
outputs(other.getOutputs());
priority(other.getPriority());
metadata(other.getMetadata());
@@ -194,23 +219,11 @@ public Builder from(WorkflowRunsCreateRequest other) {
@java.lang.Override
@JsonSetter("workflow")
- public FileStage workflow(@NotNull WorkflowReference workflow) {
+ public _FinalStage workflow(@NotNull WorkflowReference workflow) {
this.workflow = Objects.requireNonNull(workflow, "workflow must not be null");
return this;
}
- /**
- * The file to be processed. Supported file types can be found here . Files can be provided as a URL, an Extend file ID, or raw text. If you wish to process more at a time, consider using the Batch Run Workflow endpoint.
- * The file to be processed. Supported file types can be found here . Files can be provided as a URL, an Extend file ID, or raw text. If you wish to process more at a time, consider using the Batch Run Workflow endpoint.
- * @return Reference to {@code this} so that method calls can be chained together.
- */
- @java.lang.Override
- @JsonSetter("file")
- public _FinalStage file(@NotNull WorkflowRunsCreateRequestFile file) {
- this.file = Objects.requireNonNull(file, "file must not be null");
- return this;
- }
-
@java.lang.Override
public _FinalStage secrets(Map secrets) {
this.secrets = Optional.ofNullable(secrets);
@@ -251,7 +264,7 @@ public _FinalStage priority(Optional priority) {
}
/**
- * Predetermined outputs to be used for the workflow run. Generally not recommended for most use cases, however, can be useful in cases of overriding a classification in a workflow, or a subset of extraction fields when data is known.
+ * Predetermined outputs to be used for the workflow run. Generally not recommended for most use cases, however, can be useful in cases of overriding a classification in a workflow, or a subset of extraction fields when data is known. Not supported on package runs — a package run produces a single merged result across all files and cannot accept pre-supplied per-processor outputs.
* @return Reference to {@code this} so that method calls can be chained together.
*/
@java.lang.Override
@@ -261,7 +274,7 @@ public _FinalStage outputs(List outputs) {
}
/**
- * Predetermined outputs to be used for the workflow run. Generally not recommended for most use cases, however, can be useful in cases of overriding a classification in a workflow, or a subset of extraction fields when data is known.
+ * Predetermined outputs to be used for the workflow run. Generally not recommended for most use cases, however, can be useful in cases of overriding a classification in a workflow, or a subset of extraction fields when data is known. Not supported on package runs — a package run produces a single merged result across all files and cannot accept pre-supplied per-processor outputs.
*/
@java.lang.Override
@JsonSetter(value = "outputs", nulls = Nulls.SKIP)
@@ -270,10 +283,50 @@ public _FinalStage outputs(Optional>
return this;
}
+ /**
+ * A set of 2–50 files to process together in a single workflow run. Mutually exclusive with file — provide one or the other.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage package_(WorkflowRunPackage package_) {
+ this.package_ = Optional.ofNullable(package_);
+ return this;
+ }
+
+ /**
+ * A set of 2–50 files to process together in a single workflow run. Mutually exclusive with file — provide one or the other.
+ */
+ @java.lang.Override
+ @JsonSetter(value = "package", nulls = Nulls.SKIP)
+ public _FinalStage package_(Optional package_) {
+ this.package_ = package_;
+ return this;
+ }
+
+ /**
+ * The file to be processed. Supported file types can be found here . Files can be provided as a URL, an Extend file ID, or raw text. Mutually exclusive with package — provide one or the other. If you wish to process many files as independent runs, consider using the Batch Run Workflow endpoint.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ public _FinalStage file(WorkflowRunsCreateRequestFile file) {
+ this.file = Optional.ofNullable(file);
+ return this;
+ }
+
+ /**
+ * The file to be processed. Supported file types can be found here . Files can be provided as a URL, an Extend file ID, or raw text. Mutually exclusive with package — provide one or the other. If you wish to process many files as independent runs, consider using the Batch Run Workflow endpoint.
+ */
+ @java.lang.Override
+ @JsonSetter(value = "file", nulls = Nulls.SKIP)
+ public _FinalStage file(Optional file) {
+ this.file = file;
+ return this;
+ }
+
@java.lang.Override
public WorkflowRunsCreateRequest build() {
return new WorkflowRunsCreateRequest(
- workflow, file, outputs, priority, metadata, secrets, additionalProperties);
+ workflow, file, package_, outputs, priority, metadata, secrets, additionalProperties);
}
}
}
diff --git a/src/main/java/ai/extend/types/BlockMetadata.java b/src/main/java/ai/extend/types/BlockMetadata.java
index 6c90a97..95311b5 100644
--- a/src/main/java/ai/extend/types/BlockMetadata.java
+++ b/src/main/java/ai/extend/types/BlockMetadata.java
@@ -27,8 +27,6 @@ public final class BlockMetadata {
private final Optional sheet;
- private final Optional textDirection;
-
private final Optional minOcrConfidence;
private final Optional avgOcrConfidence;
@@ -38,13 +36,11 @@ public final class BlockMetadata {
private BlockMetadata(
Optional page,
Optional sheet,
- Optional textDirection,
Optional minOcrConfidence,
Optional avgOcrConfidence,
Map additionalProperties) {
this.page = page;
this.sheet = sheet;
- this.textDirection = textDirection;
this.minOcrConfidence = minOcrConfidence;
this.avgOcrConfidence = avgOcrConfidence;
this.additionalProperties = additionalProperties;
@@ -66,14 +62,6 @@ public Optional getSheet() {
return sheet;
}
- /**
- * @return Text direction for this block's content ("ltr" for left-to-right, "rtl" for right-to-left).
- */
- @JsonProperty("textDirection")
- public Optional getTextDirection() {
- return textDirection;
- }
-
/**
* @return Lowest per-word OCR confidence across words in this block, or null when word-level confidence is unavailable.
*/
@@ -122,14 +110,13 @@ public Map getAdditionalProperties() {
private boolean equalTo(BlockMetadata other) {
return page.equals(other.page)
&& sheet.equals(other.sheet)
- && textDirection.equals(other.textDirection)
&& minOcrConfidence.equals(other.minOcrConfidence)
&& avgOcrConfidence.equals(other.avgOcrConfidence);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.page, this.sheet, this.textDirection, this.minOcrConfidence, this.avgOcrConfidence);
+ return Objects.hash(this.page, this.sheet, this.minOcrConfidence, this.avgOcrConfidence);
}
@java.lang.Override
@@ -147,8 +134,6 @@ public static final class Builder {
private Optional sheet = Optional.empty();
- private Optional textDirection = Optional.empty();
-
private Optional minOcrConfidence = Optional.empty();
private Optional avgOcrConfidence = Optional.empty();
@@ -161,7 +146,6 @@ private Builder() {}
public Builder from(BlockMetadata other) {
page(other.getPage());
sheet(other.getSheet());
- textDirection(other.getTextDirection());
minOcrConfidence(other.getMinOcrConfidence());
avgOcrConfidence(other.getAvgOcrConfidence());
return this;
@@ -195,20 +179,6 @@ public Builder sheet(BlockMetadataSheet sheet) {
return this;
}
- /**
- * Text direction for this block's content ("ltr" for left-to-right, "rtl" for right-to-left).
- */
- @JsonSetter(value = "textDirection", nulls = Nulls.SKIP)
- public Builder textDirection(Optional textDirection) {
- this.textDirection = textDirection;
- return this;
- }
-
- public Builder textDirection(BlockMetadataTextDirection textDirection) {
- this.textDirection = Optional.ofNullable(textDirection);
- return this;
- }
-
/**
* Lowest per-word OCR confidence across words in this block, or null when word-level confidence is unavailable.
*/
@@ -260,8 +230,7 @@ public Builder avgOcrConfidence(Nullable avgOcrConfidence) {
}
public BlockMetadata build() {
- return new BlockMetadata(
- page, sheet, textDirection, minOcrConfidence, avgOcrConfidence, additionalProperties);
+ return new BlockMetadata(page, sheet, minOcrConfidence, avgOcrConfidence, additionalProperties);
}
}
}
diff --git a/src/main/java/ai/extend/types/BlockMetadataTextDirection.java b/src/main/java/ai/extend/types/BlockMetadataTextDirection.java
deleted file mode 100644
index 081fc0e..0000000
--- a/src/main/java/ai/extend/types/BlockMetadataTextDirection.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * This file was auto-generated by Fern from our API Definition.
- */
-package ai.extend.types;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-
-public final class BlockMetadataTextDirection {
- public static final BlockMetadataTextDirection LTR = new BlockMetadataTextDirection(Value.LTR, "ltr");
-
- public static final BlockMetadataTextDirection RTL = new BlockMetadataTextDirection(Value.RTL, "rtl");
-
- private final Value value;
-
- private final String string;
-
- BlockMetadataTextDirection(Value value, String string) {
- this.value = value;
- this.string = string;
- }
-
- public Value getEnumValue() {
- return value;
- }
-
- @java.lang.Override
- @JsonValue
- public String toString() {
- return this.string;
- }
-
- @java.lang.Override
- public boolean equals(Object other) {
- return (this == other)
- || (other instanceof BlockMetadataTextDirection
- && this.string.equals(((BlockMetadataTextDirection) other).string));
- }
-
- @java.lang.Override
- public int hashCode() {
- return this.string.hashCode();
- }
-
- public T visit(Visitor visitor) {
- switch (value) {
- case LTR:
- return visitor.visitLtr();
- case RTL:
- return visitor.visitRtl();
- case UNKNOWN:
- default:
- return visitor.visitUnknown(string);
- }
- }
-
- @JsonCreator(mode = JsonCreator.Mode.DELEGATING)
- public static BlockMetadataTextDirection valueOf(String value) {
- switch (value) {
- case "ltr":
- return LTR;
- case "rtl":
- return RTL;
- default:
- return new BlockMetadataTextDirection(Value.UNKNOWN, value);
- }
- }
-
- public enum Value {
- LTR,
-
- RTL,
-
- UNKNOWN
- }
-
- public interface Visitor {
- T visitLtr();
-
- T visitRtl();
-
- T visitUnknown(String unknownType);
- }
-}
diff --git a/src/main/java/ai/extend/types/ClassificationMetric.java b/src/main/java/ai/extend/types/ClassificationMetric.java
new file mode 100644
index 0000000..47a4804
--- /dev/null
+++ b/src/main/java/ai/extend/types/ClassificationMetric.java
@@ -0,0 +1,255 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package ai.extend.types;
+
+import ai.extend.core.ObjectMappers;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = ClassificationMetric.Builder.class)
+public final class ClassificationMetric {
+ private final Optional countExpected;
+
+ private final Optional countPredicted;
+
+ private final Optional countCorrect;
+
+ private final Optional precision;
+
+ private final Optional recall;
+
+ private final Optional f1;
+
+ private final Map additionalProperties;
+
+ private ClassificationMetric(
+ Optional countExpected,
+ Optional countPredicted,
+ Optional countCorrect,
+ Optional precision,
+ Optional recall,
+ Optional f1,
+ Map additionalProperties) {
+ this.countExpected = countExpected;
+ this.countPredicted = countPredicted;
+ this.countCorrect = countCorrect;
+ this.precision = precision;
+ this.recall = recall;
+ this.f1 = f1;
+ this.additionalProperties = additionalProperties;
+ }
+
+ /**
+ * @return The number of files whose expected classification was this class.
+ */
+ @JsonProperty("countExpected")
+ public Optional getCountExpected() {
+ return countExpected;
+ }
+
+ /**
+ * @return The number of files the model classified as this class.
+ */
+ @JsonProperty("countPredicted")
+ public Optional getCountPredicted() {
+ return countPredicted;
+ }
+
+ /**
+ * @return The number of files correctly classified as this class.
+ */
+ @JsonProperty("countCorrect")
+ public Optional getCountCorrect() {
+ return countCorrect;
+ }
+
+ /**
+ * @return countCorrect / countPredicted for this class.
+ */
+ @JsonProperty("precision")
+ public Optional getPrecision() {
+ return precision;
+ }
+
+ /**
+ * @return countCorrect / countExpected for this class.
+ */
+ @JsonProperty("recall")
+ public Optional getRecall() {
+ return recall;
+ }
+
+ /**
+ * @return Harmonic mean of precision and recall.
+ */
+ @JsonProperty("f1")
+ public Optional getF1() {
+ return f1;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof ClassificationMetric && equalTo((ClassificationMetric) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(ClassificationMetric other) {
+ return countExpected.equals(other.countExpected)
+ && countPredicted.equals(other.countPredicted)
+ && countCorrect.equals(other.countCorrect)
+ && precision.equals(other.precision)
+ && recall.equals(other.recall)
+ && f1.equals(other.f1);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(
+ this.countExpected, this.countPredicted, this.countCorrect, this.precision, this.recall, this.f1);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private Optional countExpected = Optional.empty();
+
+ private Optional countPredicted = Optional.empty();
+
+ private Optional countCorrect = Optional.empty();
+
+ private Optional precision = Optional.empty();
+
+ private Optional recall = Optional.empty();
+
+ private Optional f1 = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(ClassificationMetric other) {
+ countExpected(other.getCountExpected());
+ countPredicted(other.getCountPredicted());
+ countCorrect(other.getCountCorrect());
+ precision(other.getPrecision());
+ recall(other.getRecall());
+ f1(other.getF1());
+ return this;
+ }
+
+ /**
+ * The number of files whose expected classification was this class.
+ */
+ @JsonSetter(value = "countExpected", nulls = Nulls.SKIP)
+ public Builder countExpected(Optional countExpected) {
+ this.countExpected = countExpected;
+ return this;
+ }
+
+ public Builder countExpected(Double countExpected) {
+ this.countExpected = Optional.ofNullable(countExpected);
+ return this;
+ }
+
+ /**
+ * The number of files the model classified as this class.
+ */
+ @JsonSetter(value = "countPredicted", nulls = Nulls.SKIP)
+ public Builder countPredicted(Optional countPredicted) {
+ this.countPredicted = countPredicted;
+ return this;
+ }
+
+ public Builder countPredicted(Double countPredicted) {
+ this.countPredicted = Optional.ofNullable(countPredicted);
+ return this;
+ }
+
+ /**
+ * The number of files correctly classified as this class.
+ */
+ @JsonSetter(value = "countCorrect", nulls = Nulls.SKIP)
+ public Builder countCorrect(Optional countCorrect) {
+ this.countCorrect = countCorrect;
+ return this;
+ }
+
+ public Builder countCorrect(Double countCorrect) {
+ this.countCorrect = Optional.ofNullable(countCorrect);
+ return this;
+ }
+
+ /**
+ * countCorrect / countPredicted for this class.
+ */
+ @JsonSetter(value = "precision", nulls = Nulls.SKIP)
+ public Builder precision(Optional precision) {
+ this.precision = precision;
+ return this;
+ }
+
+ public Builder precision(Double precision) {
+ this.precision = Optional.ofNullable(precision);
+ return this;
+ }
+
+ /**
+ * countCorrect / countExpected for this class.
+ */
+ @JsonSetter(value = "recall", nulls = Nulls.SKIP)
+ public Builder recall(Optional recall) {
+ this.recall = recall;
+ return this;
+ }
+
+ public Builder recall(Double recall) {
+ this.recall = Optional.ofNullable(recall);
+ return this;
+ }
+
+ /**
+ * Harmonic mean of precision and recall.
+ */
+ @JsonSetter(value = "f1", nulls = Nulls.SKIP)
+ public Builder f1(Optional f1) {
+ this.f1 = f1;
+ return this;
+ }
+
+ public Builder f1(Double f1) {
+ this.f1 = Optional.ofNullable(f1);
+ return this;
+ }
+
+ public ClassificationMetric build() {
+ return new ClassificationMetric(
+ countExpected, countPredicted, countCorrect, precision, recall, f1, additionalProperties);
+ }
+ }
+}
diff --git a/src/main/java/ai/extend/types/ClassifierVersion.java b/src/main/java/ai/extend/types/ClassifierVersion.java
index 2cd3df0..174fb90 100644
--- a/src/main/java/ai/extend/types/ClassifierVersion.java
+++ b/src/main/java/ai/extend/types/ClassifierVersion.java
@@ -37,6 +37,8 @@ public final class ClassifierVersion {
private final OffsetDateTime createdAt;
+ private final Optional createdBy;
+
private final Map additionalProperties;
private ClassifierVersion(
@@ -46,6 +48,7 @@ private ClassifierVersion(
ClassifyConfig config,
String classifierId,
OffsetDateTime createdAt,
+ Optional createdBy,
Map additionalProperties) {
this.id = id;
this.description = description;
@@ -53,6 +56,7 @@ private ClassifierVersion(
this.config = config;
this.classifierId = classifierId;
this.createdAt = createdAt;
+ this.createdBy = createdBy;
this.additionalProperties = additionalProperties;
}
@@ -116,12 +120,26 @@ public OffsetDateTime getCreatedAt() {
return createdAt;
}
+ @JsonIgnore
+ public Optional getCreatedBy() {
+ if (createdBy == null) {
+ return Optional.empty();
+ }
+ return createdBy;
+ }
+
@JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class)
@JsonProperty("description")
private Optional _getDescription() {
return description;
}
+ @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class)
+ @JsonProperty("createdBy")
+ private Optional _getCreatedBy() {
+ return createdBy;
+ }
+
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
@@ -139,12 +157,20 @@ private boolean equalTo(ClassifierVersion other) {
&& version.equals(other.version)
&& config.equals(other.config)
&& classifierId.equals(other.classifierId)
- && createdAt.equals(other.createdAt);
+ && createdAt.equals(other.createdAt)
+ && createdBy.equals(other.createdBy);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.id, this.description, this.version, this.config, this.classifierId, this.createdAt);
+ return Objects.hash(
+ this.id,
+ this.description,
+ this.version,
+ this.config,
+ this.classifierId,
+ this.createdAt,
+ this.createdBy);
}
@java.lang.Override
@@ -205,6 +231,12 @@ public interface _FinalStage {
_FinalStage description(String description);
_FinalStage description(Nullable description);
+
+ _FinalStage createdBy(Optional createdBy);
+
+ _FinalStage createdBy(CreatedBy createdBy);
+
+ _FinalStage createdBy(Nullable createdBy);
}
@JsonIgnoreProperties(ignoreUnknown = true)
@@ -220,6 +252,8 @@ public static final class Builder
private OffsetDateTime createdAt;
+ private Optional createdBy = Optional.empty();
+
private Optional description = Optional.empty();
@JsonAnySetter
@@ -235,6 +269,7 @@ public Builder from(ClassifierVersion other) {
config(other.getConfig());
classifierId(other.getClassifierId());
createdAt(other.getCreatedAt());
+ createdBy(other.getCreatedBy());
return this;
}
@@ -299,6 +334,31 @@ public _FinalStage createdAt(@NotNull OffsetDateTime createdAt) {
return this;
}
+ @java.lang.Override
+ public _FinalStage createdBy(Nullable createdBy) {
+ if (createdBy.isNull()) {
+ this.createdBy = null;
+ } else if (createdBy.isEmpty()) {
+ this.createdBy = Optional.empty();
+ } else {
+ this.createdBy = Optional.of(createdBy.get());
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public _FinalStage createdBy(CreatedBy createdBy) {
+ this.createdBy = Optional.ofNullable(createdBy);
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter(value = "createdBy", nulls = Nulls.SKIP)
+ public _FinalStage createdBy(Optional createdBy) {
+ this.createdBy = createdBy;
+ return this;
+ }
+
/**
* A description of this version of the classifier.
* Example: "Added new document types for Q4 processing"
@@ -341,7 +401,7 @@ public _FinalStage description(Optional description) {
@java.lang.Override
public ClassifierVersion build() {
return new ClassifierVersion(
- id, description, version, config, classifierId, createdAt, additionalProperties);
+ id, description, version, config, classifierId, createdAt, createdBy, additionalProperties);
}
}
}
diff --git a/src/main/java/ai/extend/types/ClassifierVersionSummary.java b/src/main/java/ai/extend/types/ClassifierVersionSummary.java
index f2e3444..ee1c2dc 100644
--- a/src/main/java/ai/extend/types/ClassifierVersionSummary.java
+++ b/src/main/java/ai/extend/types/ClassifierVersionSummary.java
@@ -35,6 +35,8 @@ public final class ClassifierVersionSummary {
private final OffsetDateTime createdAt;
+ private final Optional createdBy;
+
private final Map additionalProperties;
private ClassifierVersionSummary(
@@ -43,12 +45,14 @@ private ClassifierVersionSummary(
String version,
String classifierId,
OffsetDateTime createdAt,
+ Optional createdBy,
Map additionalProperties) {
this.id = id;
this.description = description;
this.version = version;
this.classifierId = classifierId;
this.createdAt = createdAt;
+ this.createdBy = createdBy;
this.additionalProperties = additionalProperties;
}
@@ -104,12 +108,26 @@ public OffsetDateTime getCreatedAt() {
return createdAt;
}
+ @JsonIgnore
+ public Optional getCreatedBy() {
+ if (createdBy == null) {
+ return Optional.empty();
+ }
+ return createdBy;
+ }
+
@JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class)
@JsonProperty("description")
private Optional _getDescription() {
return description;
}
+ @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class)
+ @JsonProperty("createdBy")
+ private Optional _getCreatedBy() {
+ return createdBy;
+ }
+
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
@@ -126,12 +144,13 @@ private boolean equalTo(ClassifierVersionSummary other) {
&& description.equals(other.description)
&& version.equals(other.version)
&& classifierId.equals(other.classifierId)
- && createdAt.equals(other.createdAt);
+ && createdAt.equals(other.createdAt)
+ && createdBy.equals(other.createdBy);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.id, this.description, this.version, this.classifierId, this.createdAt);
+ return Objects.hash(this.id, this.description, this.version, this.classifierId, this.createdAt, this.createdBy);
}
@java.lang.Override
@@ -185,6 +204,12 @@ public interface _FinalStage {
_FinalStage description(String description);
_FinalStage description(Nullable description);
+
+ _FinalStage createdBy(Optional createdBy);
+
+ _FinalStage createdBy(CreatedBy createdBy);
+
+ _FinalStage createdBy(Nullable createdBy);
}
@JsonIgnoreProperties(ignoreUnknown = true)
@@ -197,6 +222,8 @@ public static final class Builder implements IdStage, VersionStage, ClassifierId
private OffsetDateTime createdAt;
+ private Optional createdBy = Optional.empty();
+
private Optional description = Optional.empty();
@JsonAnySetter
@@ -211,6 +238,7 @@ public Builder from(ClassifierVersionSummary other) {
version(other.getVersion());
classifierId(other.getClassifierId());
createdAt(other.getCreatedAt());
+ createdBy(other.getCreatedBy());
return this;
}
@@ -263,6 +291,31 @@ public _FinalStage createdAt(@NotNull OffsetDateTime createdAt) {
return this;
}
+ @java.lang.Override
+ public _FinalStage createdBy(Nullable createdBy) {
+ if (createdBy.isNull()) {
+ this.createdBy = null;
+ } else if (createdBy.isEmpty()) {
+ this.createdBy = Optional.empty();
+ } else {
+ this.createdBy = Optional.of(createdBy.get());
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public _FinalStage createdBy(CreatedBy createdBy) {
+ this.createdBy = Optional.ofNullable(createdBy);
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter(value = "createdBy", nulls = Nulls.SKIP)
+ public _FinalStage createdBy(Optional createdBy) {
+ this.createdBy = createdBy;
+ return this;
+ }
+
/**
* A description of this version of the classifier.
* Example: "Added new document types for Q4 processing"
@@ -305,7 +358,7 @@ public _FinalStage description(Optional description) {
@java.lang.Override
public ClassifierVersionSummary build() {
return new ClassifierVersionSummary(
- id, description, version, classifierId, createdAt, additionalProperties);
+ id, description, version, classifierId, createdAt, createdBy, additionalProperties);
}
}
}
diff --git a/src/main/java/ai/extend/types/ClassifyEvaluationSetRunMetrics.java b/src/main/java/ai/extend/types/ClassifyEvaluationSetRunMetrics.java
new file mode 100644
index 0000000..64ad018
--- /dev/null
+++ b/src/main/java/ai/extend/types/ClassifyEvaluationSetRunMetrics.java
@@ -0,0 +1,435 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package ai.extend.types;
+
+import ai.extend.core.ObjectMappers;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = ClassifyEvaluationSetRunMetrics.Builder.class)
+public final class ClassifyEvaluationSetRunMetrics implements IEvaluationSetRunMetricsBase {
+ private final Optional numFilesTotal;
+
+ private final Optional numFilesProcessed;
+
+ private final Optional numFiles;
+
+ private final Optional numPages;
+
+ private final Optional meanLatencyMs;
+
+ private final Optional p50LatencyMs;
+
+ private final Optional p90LatencyMs;
+
+ private final Optional p95LatencyMs;
+
+ private final Optional p99LatencyMs;
+
+ private final Optional accuracy;
+
+ private final Optional> classificationMetrics;
+
+ private final Map additionalProperties;
+
+ private ClassifyEvaluationSetRunMetrics(
+ Optional numFilesTotal,
+ Optional numFilesProcessed,
+ Optional numFiles,
+ Optional numPages,
+ Optional meanLatencyMs,
+ Optional p50LatencyMs,
+ Optional p90LatencyMs,
+ Optional p95LatencyMs,
+ Optional p99LatencyMs,
+ Optional accuracy,
+ Optional> classificationMetrics,
+ Map additionalProperties) {
+ this.numFilesTotal = numFilesTotal;
+ this.numFilesProcessed = numFilesProcessed;
+ this.numFiles = numFiles;
+ this.numPages = numPages;
+ this.meanLatencyMs = meanLatencyMs;
+ this.p50LatencyMs = p50LatencyMs;
+ this.p90LatencyMs = p90LatencyMs;
+ this.p95LatencyMs = p95LatencyMs;
+ this.p99LatencyMs = p99LatencyMs;
+ this.accuracy = accuracy;
+ this.classificationMetrics = classificationMetrics;
+ this.additionalProperties = additionalProperties;
+ }
+
+ /**
+ * @return The total number of files that will be processed in this evaluation set run.
+ */
+ @JsonProperty("numFilesTotal")
+ @java.lang.Override
+ public Optional getNumFilesTotal() {
+ return numFilesTotal;
+ }
+
+ /**
+ * @return The number of files that have finished processing.
+ */
+ @JsonProperty("numFilesProcessed")
+ @java.lang.Override
+ public Optional getNumFilesProcessed() {
+ return numFilesProcessed;
+ }
+
+ /**
+ * @return Deprecated. Use numFilesProcessed instead.
+ */
+ @JsonProperty("numFiles")
+ @java.lang.Override
+ public Optional getNumFiles() {
+ return numFiles;
+ }
+
+ /**
+ * @return The total number of pages processed across the completed files.
+ */
+ @JsonProperty("numPages")
+ @java.lang.Override
+ public Optional getNumPages() {
+ return numPages;
+ }
+
+ /**
+ * @return Mean per-file latency in milliseconds.
+ */
+ @JsonProperty("meanLatencyMs")
+ @java.lang.Override
+ public Optional getMeanLatencyMs() {
+ return meanLatencyMs;
+ }
+
+ /**
+ * @return 50th percentile per-file latency in milliseconds.
+ */
+ @JsonProperty("p50LatencyMs")
+ @java.lang.Override
+ public Optional getP50LatencyMs() {
+ return p50LatencyMs;
+ }
+
+ /**
+ * @return 90th percentile per-file latency in milliseconds.
+ */
+ @JsonProperty("p90LatencyMs")
+ @java.lang.Override
+ public Optional getP90LatencyMs() {
+ return p90LatencyMs;
+ }
+
+ /**
+ * @return 95th percentile per-file latency in milliseconds.
+ */
+ @JsonProperty("p95LatencyMs")
+ @java.lang.Override
+ public Optional getP95LatencyMs() {
+ return p95LatencyMs;
+ }
+
+ /**
+ * @return 99th percentile per-file latency in milliseconds.
+ */
+ @JsonProperty("p99LatencyMs")
+ @java.lang.Override
+ public Optional getP99LatencyMs() {
+ return p99LatencyMs;
+ }
+
+ /**
+ * @return Overall accuracy across the evaluation set, computed as the share of files whose predicted class matched the expected class.
+ */
+ @JsonProperty("accuracy")
+ public Optional getAccuracy() {
+ return accuracy;
+ }
+
+ /**
+ * @return Per-class precision, recall, and F1. Keys are the classifier's classification types as defined in the classifier configuration.
+ */
+ @JsonProperty("classificationMetrics")
+ public Optional> getClassificationMetrics() {
+ return classificationMetrics;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof ClassifyEvaluationSetRunMetrics && equalTo((ClassifyEvaluationSetRunMetrics) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(ClassifyEvaluationSetRunMetrics other) {
+ return numFilesTotal.equals(other.numFilesTotal)
+ && numFilesProcessed.equals(other.numFilesProcessed)
+ && numFiles.equals(other.numFiles)
+ && numPages.equals(other.numPages)
+ && meanLatencyMs.equals(other.meanLatencyMs)
+ && p50LatencyMs.equals(other.p50LatencyMs)
+ && p90LatencyMs.equals(other.p90LatencyMs)
+ && p95LatencyMs.equals(other.p95LatencyMs)
+ && p99LatencyMs.equals(other.p99LatencyMs)
+ && accuracy.equals(other.accuracy)
+ && classificationMetrics.equals(other.classificationMetrics);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(
+ this.numFilesTotal,
+ this.numFilesProcessed,
+ this.numFiles,
+ this.numPages,
+ this.meanLatencyMs,
+ this.p50LatencyMs,
+ this.p90LatencyMs,
+ this.p95LatencyMs,
+ this.p99LatencyMs,
+ this.accuracy,
+ this.classificationMetrics);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder {
+ private Optional numFilesTotal = Optional.empty();
+
+ private Optional numFilesProcessed = Optional.empty();
+
+ private Optional numFiles = Optional.empty();
+
+ private Optional numPages = Optional.empty();
+
+ private Optional meanLatencyMs = Optional.empty();
+
+ private Optional p50LatencyMs = Optional.empty();
+
+ private Optional p90LatencyMs = Optional.empty();
+
+ private Optional p95LatencyMs = Optional.empty();
+
+ private Optional p99LatencyMs = Optional.empty();
+
+ private Optional accuracy = Optional.empty();
+
+ private Optional> classificationMetrics = Optional.empty();
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ public Builder from(ClassifyEvaluationSetRunMetrics other) {
+ numFilesTotal(other.getNumFilesTotal());
+ numFilesProcessed(other.getNumFilesProcessed());
+ numFiles(other.getNumFiles());
+ numPages(other.getNumPages());
+ meanLatencyMs(other.getMeanLatencyMs());
+ p50LatencyMs(other.getP50LatencyMs());
+ p90LatencyMs(other.getP90LatencyMs());
+ p95LatencyMs(other.getP95LatencyMs());
+ p99LatencyMs(other.getP99LatencyMs());
+ accuracy(other.getAccuracy());
+ classificationMetrics(other.getClassificationMetrics());
+ return this;
+ }
+
+ /**
+ * The total number of files that will be processed in this evaluation set run.
+ */
+ @JsonSetter(value = "numFilesTotal", nulls = Nulls.SKIP)
+ public Builder numFilesTotal(Optional numFilesTotal) {
+ this.numFilesTotal = numFilesTotal;
+ return this;
+ }
+
+ public Builder numFilesTotal(Double numFilesTotal) {
+ this.numFilesTotal = Optional.ofNullable(numFilesTotal);
+ return this;
+ }
+
+ /**
+ * The number of files that have finished processing.
+ */
+ @JsonSetter(value = "numFilesProcessed", nulls = Nulls.SKIP)
+ public Builder numFilesProcessed(Optional numFilesProcessed) {
+ this.numFilesProcessed = numFilesProcessed;
+ return this;
+ }
+
+ public Builder numFilesProcessed(Double numFilesProcessed) {
+ this.numFilesProcessed = Optional.ofNullable(numFilesProcessed);
+ return this;
+ }
+
+ /**
+ * Deprecated. Use numFilesProcessed instead.
+ */
+ @JsonSetter(value = "numFiles", nulls = Nulls.SKIP)
+ public Builder numFiles(Optional numFiles) {
+ this.numFiles = numFiles;
+ return this;
+ }
+
+ public Builder numFiles(Double numFiles) {
+ this.numFiles = Optional.ofNullable(numFiles);
+ return this;
+ }
+
+ /**
+ * The total number of pages processed across the completed files.
+ */
+ @JsonSetter(value = "numPages", nulls = Nulls.SKIP)
+ public Builder numPages(Optional numPages) {
+ this.numPages = numPages;
+ return this;
+ }
+
+ public Builder numPages(Double numPages) {
+ this.numPages = Optional.ofNullable(numPages);
+ return this;
+ }
+
+ /**
+ * Mean per-file latency in milliseconds.
+ */
+ @JsonSetter(value = "meanLatencyMs", nulls = Nulls.SKIP)
+ public Builder meanLatencyMs(Optional meanLatencyMs) {
+ this.meanLatencyMs = meanLatencyMs;
+ return this;
+ }
+
+ public Builder meanLatencyMs(Double meanLatencyMs) {
+ this.meanLatencyMs = Optional.ofNullable(meanLatencyMs);
+ return this;
+ }
+
+ /**
+ * 50th percentile per-file latency in milliseconds.
+ */
+ @JsonSetter(value = "p50LatencyMs", nulls = Nulls.SKIP)
+ public Builder p50LatencyMs(Optional p50LatencyMs) {
+ this.p50LatencyMs = p50LatencyMs;
+ return this;
+ }
+
+ public Builder p50LatencyMs(Double p50LatencyMs) {
+ this.p50LatencyMs = Optional.ofNullable(p50LatencyMs);
+ return this;
+ }
+
+ /**
+ * 90th percentile per-file latency in milliseconds.
+ */
+ @JsonSetter(value = "p90LatencyMs", nulls = Nulls.SKIP)
+ public Builder p90LatencyMs(Optional p90LatencyMs) {
+ this.p90LatencyMs = p90LatencyMs;
+ return this;
+ }
+
+ public Builder p90LatencyMs(Double p90LatencyMs) {
+ this.p90LatencyMs = Optional.ofNullable(p90LatencyMs);
+ return this;
+ }
+
+ /**
+ * 95th percentile per-file latency in milliseconds.
+ */
+ @JsonSetter(value = "p95LatencyMs", nulls = Nulls.SKIP)
+ public Builder p95LatencyMs(Optional p95LatencyMs) {
+ this.p95LatencyMs = p95LatencyMs;
+ return this;
+ }
+
+ public Builder p95LatencyMs(Double p95LatencyMs) {
+ this.p95LatencyMs = Optional.ofNullable(p95LatencyMs);
+ return this;
+ }
+
+ /**
+ * 99th percentile per-file latency in milliseconds.
+ */
+ @JsonSetter(value = "p99LatencyMs", nulls = Nulls.SKIP)
+ public Builder p99LatencyMs(Optional p99LatencyMs) {
+ this.p99LatencyMs = p99LatencyMs;
+ return this;
+ }
+
+ public Builder p99LatencyMs(Double p99LatencyMs) {
+ this.p99LatencyMs = Optional.ofNullable(p99LatencyMs);
+ return this;
+ }
+
+ /**
+ * Overall accuracy across the evaluation set, computed as the share of files whose predicted class matched the expected class.
+ */
+ @JsonSetter(value = "accuracy", nulls = Nulls.SKIP)
+ public Builder accuracy(Optional accuracy) {
+ this.accuracy = accuracy;
+ return this;
+ }
+
+ public Builder accuracy(Double accuracy) {
+ this.accuracy = Optional.ofNullable(accuracy);
+ return this;
+ }
+
+ /**
+ * Per-class precision, recall, and F1. Keys are the classifier's classification types as defined in the classifier configuration.
+ */
+ @JsonSetter(value = "classificationMetrics", nulls = Nulls.SKIP)
+ public Builder classificationMetrics(Optional> classificationMetrics) {
+ this.classificationMetrics = classificationMetrics;
+ return this;
+ }
+
+ public Builder classificationMetrics(Map classificationMetrics) {
+ this.classificationMetrics = Optional.ofNullable(classificationMetrics);
+ return this;
+ }
+
+ public ClassifyEvaluationSetRunMetrics build() {
+ return new ClassifyEvaluationSetRunMetrics(
+ numFilesTotal,
+ numFilesProcessed,
+ numFiles,
+ numPages,
+ meanLatencyMs,
+ p50LatencyMs,
+ p90LatencyMs,
+ p95LatencyMs,
+ p99LatencyMs,
+ accuracy,
+ classificationMetrics,
+ additionalProperties);
+ }
+ }
+}
diff --git a/src/main/java/ai/extend/types/CreatedBy.java b/src/main/java/ai/extend/types/CreatedBy.java
new file mode 100644
index 0000000..bd8e54d
--- /dev/null
+++ b/src/main/java/ai/extend/types/CreatedBy.java
@@ -0,0 +1,203 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package ai.extend.types;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSubTypes;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonUnwrapped;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.util.Objects;
+import java.util.Optional;
+
+public final class CreatedBy {
+ private final Value value;
+
+ @JsonCreator(mode = JsonCreator.Mode.DELEGATING)
+ private CreatedBy(Value value) {
+ this.value = value;
+ }
+
+ public T visit(Visitor visitor) {
+ return value.visit(visitor);
+ }
+
+ public static CreatedBy user(CreatedByUser value) {
+ return new CreatedBy(new UserValue(value));
+ }
+
+ public static CreatedBy apiKey(CreatedByApiKey value) {
+ return new CreatedBy(new ApiKeyValue(value));
+ }
+
+ public boolean isUser() {
+ return value instanceof UserValue;
+ }
+
+ public boolean isApiKey() {
+ return value instanceof ApiKeyValue;
+ }
+
+ public boolean _isUnknown() {
+ return value instanceof _UnknownValue;
+ }
+
+ public Optional getUser() {
+ if (isUser()) {
+ return Optional.of(((UserValue) value).value);
+ }
+ return Optional.empty();
+ }
+
+ public Optional getApiKey() {
+ if (isApiKey()) {
+ return Optional.of(((ApiKeyValue) value).value);
+ }
+ return Optional.empty();
+ }
+
+ public Optional _getUnknown() {
+ if (_isUnknown()) {
+ return Optional.of(((_UnknownValue) value).value);
+ }
+ return Optional.empty();
+ }
+
+ @JsonValue
+ private Value getValue() {
+ return this.value;
+ }
+
+ public interface Visitor {
+ T visitUser(CreatedByUser user);
+
+ T visitApiKey(CreatedByApiKey apiKey);
+
+ T _visitUnknown(Object unknownType);
+ }
+
+ @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type", visible = true, defaultImpl = _UnknownValue.class)
+ @JsonSubTypes({@JsonSubTypes.Type(UserValue.class), @JsonSubTypes.Type(ApiKeyValue.class)})
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ private interface Value {
+ T visit(Visitor visitor);
+ }
+
+ @JsonTypeName("user")
+ @JsonIgnoreProperties("type")
+ private static final class UserValue implements Value {
+ @JsonUnwrapped
+ private CreatedByUser value;
+
+ @JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
+ private UserValue() {}
+
+ private UserValue(CreatedByUser value) {
+ this.value = value;
+ }
+
+ @java.lang.Override
+ public T visit(Visitor visitor) {
+ return visitor.visitUser(value);
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof UserValue && equalTo((UserValue) other);
+ }
+
+ private boolean equalTo(UserValue other) {
+ return value.equals(other.value);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.value);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return "CreatedBy{" + "value: " + value + "}";
+ }
+ }
+
+ @JsonTypeName("api_key")
+ @JsonIgnoreProperties("type")
+ private static final class ApiKeyValue implements Value {
+ @JsonUnwrapped
+ private CreatedByApiKey value;
+
+ @JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
+ private ApiKeyValue() {}
+
+ private ApiKeyValue(CreatedByApiKey value) {
+ this.value = value;
+ }
+
+ @java.lang.Override
+ public T visit(Visitor visitor) {
+ return visitor.visitApiKey(value);
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof ApiKeyValue && equalTo((ApiKeyValue) other);
+ }
+
+ private boolean equalTo(ApiKeyValue other) {
+ return value.equals(other.value);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.value);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return "CreatedBy{" + "value: " + value + "}";
+ }
+ }
+
+ @JsonIgnoreProperties("type")
+ private static final class _UnknownValue implements Value {
+ private String type;
+
+ @JsonValue
+ private Object value;
+
+ @JsonCreator(mode = JsonCreator.Mode.PROPERTIES)
+ private _UnknownValue(@JsonProperty("value") Object value) {}
+
+ @java.lang.Override
+ public T visit(Visitor visitor) {
+ return visitor._visitUnknown(value);
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof _UnknownValue && equalTo((_UnknownValue) other);
+ }
+
+ private boolean equalTo(_UnknownValue other) {
+ return type.equals(other.type) && value.equals(other.value);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.type, this.value);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return "CreatedBy{" + "type: " + type + ", value: " + value + "}";
+ }
+ }
+}
diff --git a/src/main/java/ai/extend/types/CreatedByApiKey.java b/src/main/java/ai/extend/types/CreatedByApiKey.java
new file mode 100644
index 0000000..942bd49
--- /dev/null
+++ b/src/main/java/ai/extend/types/CreatedByApiKey.java
@@ -0,0 +1,113 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package ai.extend.types;
+
+import ai.extend.core.ObjectMappers;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = CreatedByApiKey.Builder.class)
+public final class CreatedByApiKey {
+ private final String name;
+
+ private final Map additionalProperties;
+
+ private CreatedByApiKey(String name, Map additionalProperties) {
+ this.name = name;
+ this.additionalProperties = additionalProperties;
+ }
+
+ /**
+ * @return The name of the API key that created the resource.
+ */
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof CreatedByApiKey && equalTo((CreatedByApiKey) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(CreatedByApiKey other) {
+ return name.equals(other.name);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.name);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static NameStage builder() {
+ return new Builder();
+ }
+
+ public interface NameStage {
+ /**
+ * The name of the API key that created the resource.
+ */
+ _FinalStage name(@NotNull String name);
+
+ Builder from(CreatedByApiKey other);
+ }
+
+ public interface _FinalStage {
+ CreatedByApiKey build();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder implements NameStage, _FinalStage {
+ private String name;
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(CreatedByApiKey other) {
+ name(other.getName());
+ return this;
+ }
+
+ /**
+ * The name of the API key that created the resource.
+ * The name of the API key that created the resource.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ @JsonSetter("name")
+ public _FinalStage name(@NotNull String name) {
+ this.name = Objects.requireNonNull(name, "name must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ public CreatedByApiKey build() {
+ return new CreatedByApiKey(name, additionalProperties);
+ }
+ }
+}
diff --git a/src/main/java/ai/extend/types/CreatedByUser.java b/src/main/java/ai/extend/types/CreatedByUser.java
new file mode 100644
index 0000000..67c29bd
--- /dev/null
+++ b/src/main/java/ai/extend/types/CreatedByUser.java
@@ -0,0 +1,113 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package ai.extend.types;
+
+import ai.extend.core.ObjectMappers;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import org.jetbrains.annotations.NotNull;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = CreatedByUser.Builder.class)
+public final class CreatedByUser {
+ private final String email;
+
+ private final Map additionalProperties;
+
+ private CreatedByUser(String email, Map additionalProperties) {
+ this.email = email;
+ this.additionalProperties = additionalProperties;
+ }
+
+ /**
+ * @return The email address of the user who created the resource.
+ */
+ @JsonProperty("email")
+ public String getEmail() {
+ return email;
+ }
+
+ @java.lang.Override
+ public boolean equals(Object other) {
+ if (this == other) return true;
+ return other instanceof CreatedByUser && equalTo((CreatedByUser) other);
+ }
+
+ @JsonAnyGetter
+ public Map getAdditionalProperties() {
+ return this.additionalProperties;
+ }
+
+ private boolean equalTo(CreatedByUser other) {
+ return email.equals(other.email);
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ return Objects.hash(this.email);
+ }
+
+ @java.lang.Override
+ public String toString() {
+ return ObjectMappers.stringify(this);
+ }
+
+ public static EmailStage builder() {
+ return new Builder();
+ }
+
+ public interface EmailStage {
+ /**
+ * The email address of the user who created the resource.
+ */
+ _FinalStage email(@NotNull String email);
+
+ Builder from(CreatedByUser other);
+ }
+
+ public interface _FinalStage {
+ CreatedByUser build();
+ }
+
+ @JsonIgnoreProperties(ignoreUnknown = true)
+ public static final class Builder implements EmailStage, _FinalStage {
+ private String email;
+
+ @JsonAnySetter
+ private Map additionalProperties = new HashMap<>();
+
+ private Builder() {}
+
+ @java.lang.Override
+ public Builder from(CreatedByUser other) {
+ email(other.getEmail());
+ return this;
+ }
+
+ /**
+ * The email address of the user who created the resource.
+ * The email address of the user who created the resource.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
+ @java.lang.Override
+ @JsonSetter("email")
+ public _FinalStage email(@NotNull String email) {
+ this.email = Objects.requireNonNull(email, "email must not be null");
+ return this;
+ }
+
+ @java.lang.Override
+ public CreatedByUser build() {
+ return new CreatedByUser(email, additionalProperties);
+ }
+ }
+}
diff --git a/src/main/java/ai/extend/types/EvaluationSet.java b/src/main/java/ai/extend/types/EvaluationSet.java
index a265054..0d3159a 100644
--- a/src/main/java/ai/extend/types/EvaluationSet.java
+++ b/src/main/java/ai/extend/types/EvaluationSet.java
@@ -3,18 +3,23 @@
*/
package ai.extend.types;
+import ai.extend.core.Nullable;
+import ai.extend.core.NullableNonemptyFilter;
import ai.extend.core.ObjectMappers;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import java.util.Optional;
import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@@ -32,6 +37,8 @@ public final class EvaluationSet {
private final OffsetDateTime updatedAt;
+ private final Optional createdBy;
+
private final Map additionalProperties;
private EvaluationSet(
@@ -41,6 +48,7 @@ private EvaluationSet(
EvaluationSetEntity entity,
OffsetDateTime createdAt,
OffsetDateTime updatedAt,
+ Optional createdBy,
Map additionalProperties) {
this.id = id;
this.name = name;
@@ -48,6 +56,7 @@ private EvaluationSet(
this.entity = entity;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
+ this.createdBy = createdBy;
this.additionalProperties = additionalProperties;
}
@@ -104,6 +113,20 @@ public OffsetDateTime getUpdatedAt() {
return updatedAt;
}
+ @JsonIgnore
+ public Optional getCreatedBy() {
+ if (createdBy == null) {
+ return Optional.empty();
+ }
+ return createdBy;
+ }
+
+ @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class)
+ @JsonProperty("createdBy")
+ private Optional _getCreatedBy() {
+ return createdBy;
+ }
+
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
@@ -121,12 +144,14 @@ private boolean equalTo(EvaluationSet other) {
&& description.equals(other.description)
&& entity.equals(other.entity)
&& createdAt.equals(other.createdAt)
- && updatedAt.equals(other.updatedAt);
+ && updatedAt.equals(other.updatedAt)
+ && createdBy.equals(other.createdBy);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.id, this.name, this.description, this.entity, this.createdAt, this.updatedAt);
+ return Objects.hash(
+ this.id, this.name, this.description, this.entity, this.createdAt, this.updatedAt, this.createdBy);
}
@java.lang.Override
@@ -181,6 +206,12 @@ public interface UpdatedAtStage {
public interface _FinalStage {
EvaluationSet build();
+
+ _FinalStage createdBy(Optional createdBy);
+
+ _FinalStage createdBy(CreatedBy createdBy);
+
+ _FinalStage createdBy(Nullable createdBy);
}
@JsonIgnoreProperties(ignoreUnknown = true)
@@ -198,6 +229,8 @@ public static final class Builder
private OffsetDateTime updatedAt;
+ private Optional createdBy = Optional.empty();
+
@JsonAnySetter
private Map additionalProperties = new HashMap<>();
@@ -211,6 +244,7 @@ public Builder from(EvaluationSet other) {
entity(other.getEntity());
createdAt(other.getCreatedAt());
updatedAt(other.getUpdatedAt());
+ createdBy(other.getCreatedBy());
return this;
}
@@ -282,9 +316,35 @@ public _FinalStage updatedAt(@NotNull OffsetDateTime updatedAt) {
return this;
}
+ @java.lang.Override
+ public _FinalStage createdBy(Nullable createdBy) {
+ if (createdBy.isNull()) {
+ this.createdBy = null;
+ } else if (createdBy.isEmpty()) {
+ this.createdBy = Optional.empty();
+ } else {
+ this.createdBy = Optional.of(createdBy.get());
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public _FinalStage createdBy(CreatedBy createdBy) {
+ this.createdBy = Optional.ofNullable(createdBy);
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter(value = "createdBy", nulls = Nulls.SKIP)
+ public _FinalStage createdBy(Optional createdBy) {
+ this.createdBy = createdBy;
+ return this;
+ }
+
@java.lang.Override
public EvaluationSet build() {
- return new EvaluationSet(id, name, description, entity, createdAt, updatedAt, additionalProperties);
+ return new EvaluationSet(
+ id, name, description, entity, createdAt, updatedAt, createdBy, additionalProperties);
}
}
}
diff --git a/src/main/java/ai/extend/types/EvaluationSetItem.java b/src/main/java/ai/extend/types/EvaluationSetItem.java
index 95a7785..d5724a7 100644
--- a/src/main/java/ai/extend/types/EvaluationSetItem.java
+++ b/src/main/java/ai/extend/types/EvaluationSetItem.java
@@ -3,17 +3,22 @@
*/
package ai.extend.types;
+import ai.extend.core.Nullable;
+import ai.extend.core.NullableNonemptyFilter;
import ai.extend.core.ObjectMappers;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import java.util.Optional;
import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@@ -27,6 +32,8 @@ public final class EvaluationSetItem {
private final ProvidedProcessorOutput expectedOutput;
+ private final Optional createdBy;
+
private final Map additionalProperties;
private EvaluationSetItem(
@@ -34,11 +41,13 @@ private EvaluationSetItem(
String evaluationSetId,
FileSummary file,
ProvidedProcessorOutput expectedOutput,
+ Optional createdBy,
Map additionalProperties) {
this.id = id;
this.evaluationSetId = evaluationSetId;
this.file = file;
this.expectedOutput = expectedOutput;
+ this.createdBy = createdBy;
this.additionalProperties = additionalProperties;
}
@@ -84,6 +93,20 @@ public ProvidedProcessorOutput getExpectedOutput() {
return expectedOutput;
}
+ @JsonIgnore
+ public Optional getCreatedBy() {
+ if (createdBy == null) {
+ return Optional.empty();
+ }
+ return createdBy;
+ }
+
+ @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class)
+ @JsonProperty("createdBy")
+ private Optional _getCreatedBy() {
+ return createdBy;
+ }
+
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
@@ -99,12 +122,13 @@ private boolean equalTo(EvaluationSetItem other) {
return id.equals(other.id)
&& evaluationSetId.equals(other.evaluationSetId)
&& file.equals(other.file)
- && expectedOutput.equals(other.expectedOutput);
+ && expectedOutput.equals(other.expectedOutput)
+ && createdBy.equals(other.createdBy);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.id, this.evaluationSetId, this.file, this.expectedOutput);
+ return Objects.hash(this.id, this.evaluationSetId, this.file, this.expectedOutput, this.createdBy);
}
@java.lang.Override
@@ -150,6 +174,12 @@ public interface ExpectedOutputStage {
public interface _FinalStage {
EvaluationSetItem build();
+
+ _FinalStage createdBy(Optional createdBy);
+
+ _FinalStage createdBy(CreatedBy createdBy);
+
+ _FinalStage createdBy(Nullable createdBy);
}
@JsonIgnoreProperties(ignoreUnknown = true)
@@ -163,6 +193,8 @@ public static final class Builder
private ProvidedProcessorOutput expectedOutput;
+ private Optional createdBy = Optional.empty();
+
@JsonAnySetter
private Map additionalProperties = new HashMap<>();
@@ -174,6 +206,7 @@ public Builder from(EvaluationSetItem other) {
evaluationSetId(other.getEvaluationSetId());
file(other.getFile());
expectedOutput(other.getExpectedOutput());
+ createdBy(other.getCreatedBy());
return this;
}
@@ -229,9 +262,34 @@ public _FinalStage expectedOutput(@NotNull ProvidedProcessorOutput expectedOutpu
return this;
}
+ @java.lang.Override
+ public _FinalStage createdBy(Nullable createdBy) {
+ if (createdBy.isNull()) {
+ this.createdBy = null;
+ } else if (createdBy.isEmpty()) {
+ this.createdBy = Optional.empty();
+ } else {
+ this.createdBy = Optional.of(createdBy.get());
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public _FinalStage createdBy(CreatedBy createdBy) {
+ this.createdBy = Optional.ofNullable(createdBy);
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter(value = "createdBy", nulls = Nulls.SKIP)
+ public _FinalStage createdBy(Optional createdBy) {
+ this.createdBy = createdBy;
+ return this;
+ }
+
@java.lang.Override
public EvaluationSetItem build() {
- return new EvaluationSetItem(id, evaluationSetId, file, expectedOutput, additionalProperties);
+ return new EvaluationSetItem(id, evaluationSetId, file, expectedOutput, createdBy, additionalProperties);
}
}
}
diff --git a/src/main/java/ai/extend/types/EvaluationSetItemSummary.java b/src/main/java/ai/extend/types/EvaluationSetItemSummary.java
index 31d7179..f96c235 100644
--- a/src/main/java/ai/extend/types/EvaluationSetItemSummary.java
+++ b/src/main/java/ai/extend/types/EvaluationSetItemSummary.java
@@ -3,17 +3,22 @@
*/
package ai.extend.types;
+import ai.extend.core.Nullable;
+import ai.extend.core.NullableNonemptyFilter;
import ai.extend.core.ObjectMappers;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
+import java.util.Optional;
import org.jetbrains.annotations.NotNull;
@JsonInclude(JsonInclude.Include.NON_ABSENT)
@@ -23,11 +28,15 @@ public final class EvaluationSetItemSummary {
private final FileSummary file;
+ private final Optional createdBy;
+
private final Map additionalProperties;
- private EvaluationSetItemSummary(String id, FileSummary file, Map additionalProperties) {
+ private EvaluationSetItemSummary(
+ String id, FileSummary file, Optional createdBy, Map additionalProperties) {
this.id = id;
this.file = file;
+ this.createdBy = createdBy;
this.additionalProperties = additionalProperties;
}
@@ -56,6 +65,20 @@ public FileSummary getFile() {
return file;
}
+ @JsonIgnore
+ public Optional getCreatedBy() {
+ if (createdBy == null) {
+ return Optional.empty();
+ }
+ return createdBy;
+ }
+
+ @JsonInclude(value = JsonInclude.Include.CUSTOM, valueFilter = NullableNonemptyFilter.class)
+ @JsonProperty("createdBy")
+ private Optional _getCreatedBy() {
+ return createdBy;
+ }
+
@java.lang.Override
public boolean equals(Object other) {
if (this == other) return true;
@@ -68,12 +91,12 @@ public Map getAdditionalProperties() {
}
private boolean equalTo(EvaluationSetItemSummary other) {
- return id.equals(other.id) && file.equals(other.file);
+ return id.equals(other.id) && file.equals(other.file) && createdBy.equals(other.createdBy);
}
@java.lang.Override
public int hashCode() {
- return Objects.hash(this.id, this.file);
+ return Objects.hash(this.id, this.file, this.createdBy);
}
@java.lang.Override
@@ -104,6 +127,12 @@ public interface FileStage {
public interface _FinalStage {
EvaluationSetItemSummary build();
+
+ _FinalStage createdBy(Optional createdBy);
+
+ _FinalStage createdBy(CreatedBy createdBy);
+
+ _FinalStage createdBy(Nullable createdBy);
}
@JsonIgnoreProperties(ignoreUnknown = true)
@@ -112,6 +141,8 @@ public static final class Builder implements IdStage, FileStage, _FinalStage {
private FileSummary file;
+ private Optional createdBy = Optional.empty();
+
@JsonAnySetter
private Map additionalProperties = new HashMap<>();
@@ -121,6 +152,7 @@ private Builder() {}
public Builder from(EvaluationSetItemSummary other) {
id(other.getId());
file(other.getFile());
+ createdBy(other.getCreatedBy());
return this;
}
@@ -150,9 +182,34 @@ public _FinalStage file(@NotNull FileSummary file) {
return this;
}
+ @java.lang.Override
+ public _FinalStage createdBy(Nullable createdBy) {
+ if (createdBy.isNull()) {
+ this.createdBy = null;
+ } else if (createdBy.isEmpty()) {
+ this.createdBy = Optional.empty();
+ } else {
+ this.createdBy = Optional.of(createdBy.get());
+ }
+ return this;
+ }
+
+ @java.lang.Override
+ public _FinalStage createdBy(CreatedBy createdBy) {
+ this.createdBy = Optional.ofNullable(createdBy);
+ return this;
+ }
+
+ @java.lang.Override
+ @JsonSetter(value = "createdBy", nulls = Nulls.SKIP)
+ public _FinalStage createdBy(Optional createdBy) {
+ this.createdBy = createdBy;
+ return this;
+ }
+
@java.lang.Override
public EvaluationSetItemSummary build() {
- return new EvaluationSetItemSummary(id, file, additionalProperties);
+ return new EvaluationSetItemSummary(id, file, createdBy, additionalProperties);
}
}
}
diff --git a/src/main/java/ai/extend/types/EvaluationSetRun.java b/src/main/java/ai/extend/types/EvaluationSetRun.java
index 71f20c4..5c8d712 100644
--- a/src/main/java/ai/extend/types/EvaluationSetRun.java
+++ b/src/main/java/ai/extend/types/EvaluationSetRun.java
@@ -105,6 +105,9 @@ public EvaluationSetRunEntityVersion getEntityVersion() {
return entityVersion;
}
+ /**
+ * @return Metrics for the evaluation set run. The shape depends on the entity type.
+ */
@JsonProperty("metrics")
public EvaluationSetRunMetrics getMetrics() {
return metrics;
@@ -212,6 +215,9 @@ public interface EntityVersionStage {
}
public interface MetricsStage {
+ /**
+ * Metrics for the evaluation set run. The shape depends on the entity type.
+ */
StatusStage metrics(@NotNull EvaluationSetRunMetrics metrics);
}
@@ -339,6 +345,11 @@ public MetricsStage entityVersion(@NotNull EvaluationSetRunEntityVersion entityV
return this;
}
+ /**
+ * Metrics for the evaluation set run. The shape depends on the entity type.
+ * Metrics for the evaluation set run. The shape depends on the entity type.
+ * @return Reference to {@code this} so that method calls can be chained together.
+ */
@java.lang.Override
@JsonSetter("metrics")
public StatusStage metrics(@NotNull EvaluationSetRunMetrics metrics) {
diff --git a/src/main/java/ai/extend/types/EvaluationSetRunFieldMetric.java b/src/main/java/ai/extend/types/EvaluationSetRunFieldMetric.java
new file mode 100644
index 0000000..faf382c
--- /dev/null
+++ b/src/main/java/ai/extend/types/EvaluationSetRunFieldMetric.java
@@ -0,0 +1,224 @@
+/**
+ * This file was auto-generated by Fern from our API Definition.
+ */
+package ai.extend.types;
+
+import ai.extend.core.ObjectMappers;
+import com.fasterxml.jackson.annotation.JsonAnyGetter;
+import com.fasterxml.jackson.annotation.JsonAnySetter;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonSetter;
+import com.fasterxml.jackson.annotation.Nulls;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+
+@JsonInclude(JsonInclude.Include.NON_ABSENT)
+@JsonDeserialize(builder = EvaluationSetRunFieldMetric.Builder.class)
+public final class EvaluationSetRunFieldMetric {
+ private final Optional countTotal;
+
+ private final Optional countPresent;
+
+ private final Optional countExpected;
+
+ private final Optional countAccurate;
+
+ private final Optional accuracy;
+
+ private final Map additionalProperties;
+
+ private EvaluationSetRunFieldMetric(
+ Optional