diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 3b005e5..ee49ac2 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.1.0-alpha.10"
+ ".": "0.1.0-alpha.11"
}
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index b65d6ab..ab2c993 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,23 @@
# Changelog
+## 0.1.0-alpha.11 (2024-12-20)
+
+Full Changelog: [v0.1.0-alpha.10...v0.1.0-alpha.11](https://github.com/openlayer-ai/openlayer-java/compare/v0.1.0-alpha.10...v0.1.0-alpha.11)
+
+### Features
+
+* **api:** api update ([#68](https://github.com/openlayer-ai/openlayer-java/issues/68)) ([679ff1c](https://github.com/openlayer-ai/openlayer-java/commit/679ff1c2cd70530e6429d31766e1cad6165a7f6d))
+
+
+### Chores
+
+* **docs:** add example project ([#71](https://github.com/openlayer-ai/openlayer-java/issues/71)) ([7efeda9](https://github.com/openlayer-ai/openlayer-java/commit/7efeda9e63ec09ca07ec18e1647f4353ada3d218))
+* **docs:** add example project ([#75](https://github.com/openlayer-ai/openlayer-java/issues/75)) ([3c48537](https://github.com/openlayer-ai/openlayer-java/commit/3c485375542ec9c8f8daf996bf436c0e50773149))
+* **docs:** update readme ([#70](https://github.com/openlayer-ai/openlayer-java/issues/70)) ([91e2007](https://github.com/openlayer-ai/openlayer-java/commit/91e2007f4938d80ce30cc54651612e7d00ceda78))
+* **docs:** update readme ([#73](https://github.com/openlayer-ai/openlayer-java/issues/73)) ([1f3da27](https://github.com/openlayer-ai/openlayer-java/commit/1f3da279ac393c8d077d21b1605cb28e398fff8e))
+* **internal:** codegen related update ([#72](https://github.com/openlayer-ai/openlayer-java/issues/72)) ([029360f](https://github.com/openlayer-ai/openlayer-java/commit/029360f548e14f460168b7a0fe79e8914d7bfa48))
+* **internal:** codegen related update ([#74](https://github.com/openlayer-ai/openlayer-java/issues/74)) ([2561984](https://github.com/openlayer-ai/openlayer-java/commit/2561984b26c0b220318ef21c2201cb1b96702e29))
+
## 0.1.0-alpha.10 (2024-12-13)
Full Changelog: [v0.1.0-alpha.9...v0.1.0-alpha.10](https://github.com/openlayer-ai/openlayer-java/compare/v0.1.0-alpha.9...v0.1.0-alpha.10)
diff --git a/README.md b/README.md
index 600fab6..ed0596e 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
-[](https://central.sonatype.com/artifact/com.openlayer.api/openlayer-java/0.1.0-alpha.10)
+[](https://central.sonatype.com/artifact/com.openlayer.api/openlayer-java/0.1.0-alpha.11)
@@ -27,7 +27,7 @@ The REST API documentation can be foundĀ on [openlayer.com](https://openlayer.co
```kotlin
-implementation("com.openlayer.api:openlayer-java:0.1.0-alpha.10")
+implementation("com.openlayer.api:openlayer-java:0.1.0-alpha.11")
```
#### Maven
@@ -36,7 +36,7 @@ implementation("com.openlayer.api:openlayer-java:0.1.0-alpha.10")
com.openlayer.api
openlayer-java
- 0.1.0-alpha.10
+ 0.1.0-alpha.11
```
@@ -49,6 +49,9 @@ Use `OpenlayerOkHttpClient.builder()` to configure the client.
Alternately, set the environment with `OPENLAYER_API_KEY`, and use `OpenlayerOkHttpClient.fromEnv()` to read from the environment.
```java
+import com.openlayer.api.client.OpenlayerClient;
+import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
+
OpenlayerClient client = OpenlayerOkHttpClient.fromEnv();
// Note: you can also call fromEnv() from the client builder, for example if you need to set additional properties
@@ -68,10 +71,10 @@ Read the documentation for more configuration options.
### Example: creating a resource
-To create a new inference pipeline data, first use the `InferencePipelineDataStreamParams` builder to specify attributes,
-then pass that to the `stream` method of the `data` service.
+To create a new inference pipeline data, first use the `InferencePipelineDataStreamParams` builder to specify attributes, then pass that to the `stream` method of the `data` service.
```java
+import com.openlayer.api.core.JsonValue;
import com.openlayer.api.models.InferencePipelineDataStreamParams;
import com.openlayer.api.models.InferencePipelineDataStreamResponse;
import java.util.List;
@@ -85,7 +88,7 @@ InferencePipelineDataStreamParams params = InferencePipelineDataStreamParams.bui
.costColumnName("cost")
.timestampColumnName("timestamp")
.build()))
- .row(List.of(InferencePipelineDataStreamParams.Row.builder()
+ .rows(List.of(InferencePipelineDataStreamParams.Row.builder()
.putAdditionalProperty("user_query", JsonValue.from("what is the meaning of life?"))
.putAdditionalProperty("output", JsonValue.from("42"))
.putAdditionalProperty("tokens", JsonValue.from(7))
@@ -104,14 +107,14 @@ InferencePipelineDataStreamResponse response = client.inferencePipelines().data(
To make a request to the Openlayer API, you generally build an instance of the appropriate `Params` class.
-In [Example: creating a resource](#example-creating-a-resource) above, we used the `InferencePipelineDataStreamParams.builder()` to pass to
-the `stream` method of the `data` service.
+In [Example: creating a resource](#example-creating-a-resource) above, we used the `InferencePipelineDataStreamParams.builder()` to pass to the `stream` method of the `data` service.
-Sometimes, the API may support other properties that are not yet supported in the Java SDK types. In that case,
-you can attach them using the `putAdditionalProperty` method.
+Sometimes, the API may support other properties that are not yet supported in the Java SDK types. In that case, you can attach them using the `putAdditionalProperty` method.
```java
-import com.openlayer.api.models.core.JsonValue;
+import com.openlayer.api.core.JsonValue;
+import com.openlayer.api.models.InferencePipelineDataStreamParams;
+
InferencePipelineDataStreamParams params = InferencePipelineDataStreamParams.builder()
// ... normal properties
.putAdditionalProperty("secret_param", JsonValue.from("4242"))
@@ -125,15 +128,19 @@ InferencePipelineDataStreamParams params = InferencePipelineDataStreamParams.bui
When receiving a response, the Openlayer Java SDK will deserialize it into instances of the typed model classes. In rare cases, the API may return a response property that doesn't match the expected Java type. If you directly access the mistaken property, the SDK will throw an unchecked `OpenlayerInvalidDataException` at runtime. If you would prefer to check in advance that that response is completely well-typed, call `.validate()` on the returned model.
```java
+import com.openlayer.api.models.InferencePipelineDataStreamResponse;
+
InferencePipelineDataStreamResponse response = client.inferencePipelines().data().stream().validate();
```
### Response properties as JSON
-In rare cases, you may want to access the underlying JSON value for a response property rather than using the typed version provided by
-this SDK. Each model property has a corresponding JSON version, with an underscore before the method name, which returns a `JsonField` value.
+In rare cases, you may want to access the underlying JSON value for a response property rather than using the typed version provided by this SDK. Each model property has a corresponding JSON version, with an underscore before the method name, which returns a `JsonField` value.
```java
+import com.openlayer.api.core.JsonField;
+import java.util.Optional;
+
JsonField field = responseObj._field();
if (field.isMissing()) {
@@ -155,6 +162,8 @@ if (field.isMissing()) {
Sometimes, the server response may include additional properties that are not yet available in this library's types. You can access them using the model's `_additionalProperties` method:
```java
+import com.openlayer.api.core.JsonValue;
+
JsonValue secret = projectCreateResponse._additionalProperties().get("secret_field");
```
@@ -168,31 +177,33 @@ This library throws exceptions in a single hierarchy for easy handling:
- **`OpenlayerException`** - Base exception for all exceptions
- - **`OpenlayerServiceException`** - HTTP errors with a well-formed response body we were able to parse. The exception message and the `.debuggingRequestId()` will be set by the server.
+- **`OpenlayerServiceException`** - HTTP errors with a well-formed response body we were able to parse. The exception message and the `.debuggingRequestId()` will be set by the server.
- | 400 | BadRequestException |
- | ------ | ----------------------------- |
- | 401 | AuthenticationException |
- | 403 | PermissionDeniedException |
- | 404 | NotFoundException |
- | 422 | UnprocessableEntityException |
- | 429 | RateLimitException |
- | 5xx | InternalServerException |
- | others | UnexpectedStatusCodeException |
+ | 400 | BadRequestException |
+ | ------ | ----------------------------- |
+ | 401 | AuthenticationException |
+ | 403 | PermissionDeniedException |
+ | 404 | NotFoundException |
+ | 422 | UnprocessableEntityException |
+ | 429 | RateLimitException |
+ | 5xx | InternalServerException |
+ | others | UnexpectedStatusCodeException |
- - **`OpenlayerIoException`** - I/O networking errors
- - **`OpenlayerInvalidDataException`** - any other exceptions on the client side, e.g.:
- - We failed to serialize the request body
- - We failed to parse the response body (has access to response code and body)
+- **`OpenlayerIoException`** - I/O networking errors
+- **`OpenlayerInvalidDataException`** - any other exceptions on the client side, e.g.:
+ - We failed to serialize the request body
+ - We failed to parse the response body (has access to response code and body)
## Network options
### Retries
-Requests that experience certain errors are automatically retried 2 times by default, with a short exponential backoff. Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors will all be retried by default.
-You can provide a `maxRetries` on the client builder to configure this:
+Requests that experience certain errors are automatically retried 2 times by default, with a short exponential backoff. Connection errors (for example, due to a network connectivity problem), 408 Request Timeout, 409 Conflict, 429 Rate Limit, and >=500 Internal errors will all be retried by default. You can provide a `maxRetries` on the client builder to configure this:
```java
+import com.openlayer.api.client.OpenlayerClient;
+import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
+
OpenlayerClient client = OpenlayerOkHttpClient.builder()
.fromEnv()
.maxRetries(4)
@@ -204,6 +215,10 @@ OpenlayerClient client = OpenlayerOkHttpClient.builder()
Requests time out after 1 minute by default. You can configure this on the client builder:
```java
+import com.openlayer.api.client.OpenlayerClient;
+import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
+import java.time.Duration;
+
OpenlayerClient client = OpenlayerOkHttpClient.builder()
.fromEnv()
.timeout(Duration.ofSeconds(30))
@@ -215,24 +230,24 @@ OpenlayerClient client = OpenlayerOkHttpClient.builder()
Requests can be routed through a proxy. You can configure this on the client builder:
```java
+import com.openlayer.api.client.OpenlayerClient;
+import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient;
+import java.net.InetSocketAddress;
+import java.net.Proxy;
+
OpenlayerClient client = OpenlayerOkHttpClient.builder()
.fromEnv()
- .proxy(new Proxy(
- Type.HTTP,
- new InetSocketAddress("proxy.com", 8080)
- ))
+ .proxy(new Proxy(Proxy.Type.HTTP, new InetSocketAddress("example.com", 8080)))
.build();
```
## Making custom/undocumented requests
-This library is typed for convenient access to the documented API. If you need to access undocumented
-params or response properties, the library can still be used.
+This library is typed for convenient access to the documented API. If you need to access undocumented params or response properties, the library can still be used.
### Undocumented request params
-To make requests using undocumented parameters, you can provide or override parameters on the params object
-while building it.
+To make requests using undocumented parameters, you can provide or override parameters on the params object while building it.
```kotlin
FooCreateParams address = FooCreateParams.builder()
@@ -243,10 +258,7 @@ FooCreateParams address = FooCreateParams.builder()
### Undocumented response properties
-To access undocumented response properties, you can use `res._additionalProperties()` on a response object to
-get a map of untyped fields of type `Map`. You can then access fields like
-`._additionalProperties().get("secret_prop").asString()` or use other helpers defined on the `JsonValue` class
-to extract it to a desired type.
+To access undocumented response properties, you can use `res._additionalProperties()` on a response object to get a map of untyped fields of type `Map`. You can then access fields like `._additionalProperties().get("secret_prop").asString()` or use other helpers defined on the `JsonValue` class to extract it to a desired type.
## Logging
diff --git a/build.gradle.kts b/build.gradle.kts
index f485855..6466dce 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -4,7 +4,7 @@ plugins {
allprojects {
group = "com.openlayer.api"
- version = "0.1.0-alpha.10" // x-release-please-version
+ version = "0.1.0-alpha.11" // x-release-please-version
}
diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRetrieveParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRetrieveParams.kt
index 2dfa188..b5e6d1c 100644
--- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRetrieveParams.kt
+++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRetrieveParams.kt
@@ -2,27 +2,42 @@
package com.openlayer.api.models
+import com.fasterxml.jackson.annotation.JsonCreator
+import com.openlayer.api.core.Enum
+import com.openlayer.api.core.JsonField
import com.openlayer.api.core.NoAutoDetect
import com.openlayer.api.core.http.Headers
import com.openlayer.api.core.http.QueryParams
+import com.openlayer.api.core.toImmutable
+import com.openlayer.api.errors.OpenlayerInvalidDataException
import java.util.Objects
+import java.util.Optional
class InferencePipelineRetrieveParams
constructor(
private val inferencePipelineId: String,
+ private val expand: List?,
private val additionalHeaders: Headers,
private val additionalQueryParams: QueryParams,
) {
fun inferencePipelineId(): String = inferencePipelineId
+ fun expand(): Optional> = Optional.ofNullable(expand)
+
fun _additionalHeaders(): Headers = additionalHeaders
fun _additionalQueryParams(): QueryParams = additionalQueryParams
@JvmSynthetic internal fun getHeaders(): Headers = additionalHeaders
- @JvmSynthetic internal fun getQueryParams(): QueryParams = additionalQueryParams
+ @JvmSynthetic
+ internal fun getQueryParams(): QueryParams {
+ val queryParams = QueryParams.builder()
+ this.expand?.let { queryParams.put("expand", listOf(it.joinToString(separator = ","))) }
+ queryParams.putAll(additionalQueryParams)
+ return queryParams.build()
+ }
fun getPathParam(index: Int): String {
return when (index) {
@@ -42,6 +57,7 @@ constructor(
class Builder {
private var inferencePipelineId: String? = null
+ private var expand: MutableList = mutableListOf()
private var additionalHeaders: Headers.Builder = Headers.builder()
private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
@@ -49,6 +65,7 @@ constructor(
internal fun from(inferencePipelineRetrieveParams: InferencePipelineRetrieveParams) =
apply {
inferencePipelineId = inferencePipelineRetrieveParams.inferencePipelineId
+ expand = inferencePipelineRetrieveParams.expand?.toMutableList() ?: mutableListOf()
additionalHeaders = inferencePipelineRetrieveParams.additionalHeaders.toBuilder()
additionalQueryParams =
inferencePipelineRetrieveParams.additionalQueryParams.toBuilder()
@@ -58,6 +75,15 @@ constructor(
this.inferencePipelineId = inferencePipelineId
}
+ /** Expand specific nested objects. */
+ fun expand(expand: List) = apply {
+ this.expand.clear()
+ this.expand.addAll(expand)
+ }
+
+ /** Expand specific nested objects. */
+ fun addExpand(expand: Expand) = apply { this.expand.add(expand) }
+
fun additionalHeaders(additionalHeaders: Headers) = apply {
this.additionalHeaders.clear()
putAllAdditionalHeaders(additionalHeaders)
@@ -161,21 +187,79 @@ constructor(
checkNotNull(inferencePipelineId) {
"`inferencePipelineId` is required but was not set"
},
+ expand.toImmutable().ifEmpty { null },
additionalHeaders.build(),
additionalQueryParams.build(),
)
}
+ class Expand
+ @JsonCreator
+ private constructor(
+ private val value: JsonField,
+ ) : Enum {
+
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val PROJECT = of("project")
+
+ @JvmField val WORKSPACE = of("workspace")
+
+ @JvmStatic fun of(value: String) = Expand(JsonField.of(value))
+ }
+
+ enum class Known {
+ PROJECT,
+ WORKSPACE,
+ }
+
+ enum class Value {
+ PROJECT,
+ WORKSPACE,
+ _UNKNOWN,
+ }
+
+ fun value(): Value =
+ when (this) {
+ PROJECT -> Value.PROJECT
+ WORKSPACE -> Value.WORKSPACE
+ else -> Value._UNKNOWN
+ }
+
+ fun known(): Known =
+ when (this) {
+ PROJECT -> Known.PROJECT
+ WORKSPACE -> Known.WORKSPACE
+ else -> throw OpenlayerInvalidDataException("Unknown Expand: $value")
+ }
+
+ fun asString(): String = _value().asStringOrThrow()
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is Expand && value == other.value /* spotless:on */
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
- return /* spotless:off */ other is InferencePipelineRetrieveParams && inferencePipelineId == other.inferencePipelineId && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */
+ return /* spotless:off */ other is InferencePipelineRetrieveParams && inferencePipelineId == other.inferencePipelineId && expand == other.expand && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */
}
- override fun hashCode(): Int = /* spotless:off */ Objects.hash(inferencePipelineId, additionalHeaders, additionalQueryParams) /* spotless:on */
+ override fun hashCode(): Int = /* spotless:off */ Objects.hash(inferencePipelineId, expand, additionalHeaders, additionalQueryParams) /* spotless:on */
override fun toString() =
- "InferencePipelineRetrieveParams{inferencePipelineId=$inferencePipelineId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+ "InferencePipelineRetrieveParams{inferencePipelineId=$inferencePipelineId, expand=$expand, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
}
diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRetrieveResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRetrieveResponse.kt
index bfd6a1e..3dd305e 100644
--- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRetrieveResponse.kt
+++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRetrieveResponse.kt
@@ -15,6 +15,7 @@ import com.openlayer.api.core.JsonValue
import com.openlayer.api.core.NoAutoDetect
import com.openlayer.api.core.toImmutable
import com.openlayer.api.errors.OpenlayerInvalidDataException
+import java.time.LocalDate
import java.time.OffsetDateTime
import java.util.Objects
import java.util.Optional
@@ -25,6 +26,9 @@ class InferencePipelineRetrieveResponse
private constructor(
private val id: JsonField,
private val projectId: JsonField,
+ private val workspaceId: JsonField,
+ private val project: JsonField,
+ private val workspace: JsonField,
private val name: JsonField,
private val dateCreated: JsonField,
private val dateUpdated: JsonField,
@@ -49,6 +53,14 @@ private constructor(
/** The project id. */
fun projectId(): String = projectId.getRequired("projectId")
+ /** The workspace id. */
+ fun workspaceId(): Optional =
+ Optional.ofNullable(workspaceId.getNullable("workspaceId"))
+
+ fun project(): Optional = Optional.ofNullable(project.getNullable("project"))
+
+ fun workspace(): Optional = Optional.ofNullable(workspace.getNullable("workspace"))
+
/** The inference pipeline name. */
fun name(): String = name.getRequired("name")
@@ -98,6 +110,13 @@ private constructor(
/** The project id. */
@JsonProperty("projectId") @ExcludeMissing fun _projectId() = projectId
+ /** The workspace id. */
+ @JsonProperty("workspaceId") @ExcludeMissing fun _workspaceId() = workspaceId
+
+ @JsonProperty("project") @ExcludeMissing fun _project() = project
+
+ @JsonProperty("workspace") @ExcludeMissing fun _workspace() = workspace
+
/** The inference pipeline name. */
@JsonProperty("name") @ExcludeMissing fun _name() = name
@@ -148,6 +167,9 @@ private constructor(
if (!validated) {
id()
projectId()
+ workspaceId()
+ project().map { it.validate() }
+ workspace().map { it.validate() }
name()
dateCreated()
dateUpdated()
@@ -176,6 +198,9 @@ private constructor(
private var id: JsonField = JsonMissing.of()
private var projectId: JsonField = JsonMissing.of()
+ private var workspaceId: JsonField = JsonMissing.of()
+ private var project: JsonField = JsonMissing.of()
+ private var workspace: JsonField = JsonMissing.of()
private var name: JsonField = JsonMissing.of()
private var dateCreated: JsonField = JsonMissing.of()
private var dateUpdated: JsonField = JsonMissing.of()
@@ -196,6 +221,9 @@ private constructor(
apply {
this.id = inferencePipelineRetrieveResponse.id
this.projectId = inferencePipelineRetrieveResponse.projectId
+ this.workspaceId = inferencePipelineRetrieveResponse.workspaceId
+ this.project = inferencePipelineRetrieveResponse.project
+ this.workspace = inferencePipelineRetrieveResponse.workspace
this.name = inferencePipelineRetrieveResponse.name
this.dateCreated = inferencePipelineRetrieveResponse.dateCreated
this.dateUpdated = inferencePipelineRetrieveResponse.dateUpdated
@@ -227,6 +255,26 @@ private constructor(
@ExcludeMissing
fun projectId(projectId: JsonField) = apply { this.projectId = projectId }
+ /** The workspace id. */
+ fun workspaceId(workspaceId: String) = workspaceId(JsonField.of(workspaceId))
+
+ /** The workspace id. */
+ @JsonProperty("workspaceId")
+ @ExcludeMissing
+ fun workspaceId(workspaceId: JsonField) = apply { this.workspaceId = workspaceId }
+
+ fun project(project: Project) = project(JsonField.of(project))
+
+ @JsonProperty("project")
+ @ExcludeMissing
+ fun project(project: JsonField) = apply { this.project = project }
+
+ fun workspace(workspace: Workspace) = workspace(JsonField.of(workspace))
+
+ @JsonProperty("workspace")
+ @ExcludeMissing
+ fun workspace(workspace: JsonField) = apply { this.workspace = workspace }
+
/** The inference pipeline name. */
fun name(name: String) = name(JsonField.of(name))
@@ -370,6 +418,9 @@ private constructor(
InferencePipelineRetrieveResponse(
id,
projectId,
+ workspaceId,
+ project,
+ workspace,
name,
dateCreated,
dateUpdated,
@@ -551,20 +602,1467 @@ private constructor(
override fun toString() = value.toString()
}
+ @JsonDeserialize(builder = Project.Builder::class)
+ @NoAutoDetect
+ class Project
+ private constructor(
+ private val id: JsonField,
+ private val workspaceId: JsonField,
+ private val creatorId: JsonField,
+ private val name: JsonField,
+ private val dateCreated: JsonField,
+ private val dateUpdated: JsonField,
+ private val description: JsonField,
+ private val source: JsonField,
+ private val taskType: JsonField,
+ private val versionCount: JsonField,
+ private val inferencePipelineCount: JsonField,
+ private val goalCount: JsonField,
+ private val developmentGoalCount: JsonField,
+ private val monitoringGoalCount: JsonField,
+ private val links: JsonField,
+ private val gitRepo: JsonField,
+ private val additionalProperties: Map,
+ ) {
+
+ private var validated: Boolean = false
+
+ /** The project id. */
+ fun id(): String = id.getRequired("id")
+
+ /** The workspace id. */
+ fun workspaceId(): Optional =
+ Optional.ofNullable(workspaceId.getNullable("workspaceId"))
+
+ /** The project creator id. */
+ fun creatorId(): Optional = Optional.ofNullable(creatorId.getNullable("creatorId"))
+
+ /** The project name. */
+ fun name(): String = name.getRequired("name")
+
+ /** The project creation date. */
+ fun dateCreated(): OffsetDateTime = dateCreated.getRequired("dateCreated")
+
+ /** The project last updated date. */
+ fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated")
+
+ /** The project description. */
+ fun description(): Optional =
+ Optional.ofNullable(description.getNullable("description"))
+
+ /** The source of the project. */
+ fun source(): Optional = Optional.ofNullable(source.getNullable("source"))
+
+ /** The task type of the project. */
+ fun taskType(): TaskType = taskType.getRequired("taskType")
+
+ /** The number of versions (commits) in the project. */
+ fun versionCount(): Long = versionCount.getRequired("versionCount")
+
+ /** The number of inference pipelines in the project. */
+ fun inferencePipelineCount(): Long =
+ inferencePipelineCount.getRequired("inferencePipelineCount")
+
+ /** The total number of tests in the project. */
+ fun goalCount(): Long = goalCount.getRequired("goalCount")
+
+ /** The number of tests in the development mode of the project. */
+ fun developmentGoalCount(): Long = developmentGoalCount.getRequired("developmentGoalCount")
+
+ /** The number of tests in the monitoring mode of the project. */
+ fun monitoringGoalCount(): Long = monitoringGoalCount.getRequired("monitoringGoalCount")
+
+ /** Links to the project. */
+ fun links(): Links = links.getRequired("links")
+
+ fun gitRepo(): Optional = Optional.ofNullable(gitRepo.getNullable("gitRepo"))
+
+ /** The project id. */
+ @JsonProperty("id") @ExcludeMissing fun _id() = id
+
+ /** The workspace id. */
+ @JsonProperty("workspaceId") @ExcludeMissing fun _workspaceId() = workspaceId
+
+ /** The project creator id. */
+ @JsonProperty("creatorId") @ExcludeMissing fun _creatorId() = creatorId
+
+ /** The project name. */
+ @JsonProperty("name") @ExcludeMissing fun _name() = name
+
+ /** The project creation date. */
+ @JsonProperty("dateCreated") @ExcludeMissing fun _dateCreated() = dateCreated
+
+ /** The project last updated date. */
+ @JsonProperty("dateUpdated") @ExcludeMissing fun _dateUpdated() = dateUpdated
+
+ /** The project description. */
+ @JsonProperty("description") @ExcludeMissing fun _description() = description
+
+ /** The source of the project. */
+ @JsonProperty("source") @ExcludeMissing fun _source() = source
+
+ /** The task type of the project. */
+ @JsonProperty("taskType") @ExcludeMissing fun _taskType() = taskType
+
+ /** The number of versions (commits) in the project. */
+ @JsonProperty("versionCount") @ExcludeMissing fun _versionCount() = versionCount
+
+ /** The number of inference pipelines in the project. */
+ @JsonProperty("inferencePipelineCount")
+ @ExcludeMissing
+ fun _inferencePipelineCount() = inferencePipelineCount
+
+ /** The total number of tests in the project. */
+ @JsonProperty("goalCount") @ExcludeMissing fun _goalCount() = goalCount
+
+ /** The number of tests in the development mode of the project. */
+ @JsonProperty("developmentGoalCount")
+ @ExcludeMissing
+ fun _developmentGoalCount() = developmentGoalCount
+
+ /** The number of tests in the monitoring mode of the project. */
+ @JsonProperty("monitoringGoalCount")
+ @ExcludeMissing
+ fun _monitoringGoalCount() = monitoringGoalCount
+
+ /** Links to the project. */
+ @JsonProperty("links") @ExcludeMissing fun _links() = links
+
+ @JsonProperty("gitRepo") @ExcludeMissing fun _gitRepo() = gitRepo
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map = additionalProperties
+
+ fun validate(): Project = apply {
+ if (!validated) {
+ id()
+ workspaceId()
+ creatorId()
+ name()
+ dateCreated()
+ dateUpdated()
+ description()
+ source()
+ taskType()
+ versionCount()
+ inferencePipelineCount()
+ goalCount()
+ developmentGoalCount()
+ monitoringGoalCount()
+ links().validate()
+ gitRepo().map { it.validate() }
+ validated = true
+ }
+ }
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ @JvmStatic fun builder() = Builder()
+ }
+
+ class Builder {
+
+ private var id: JsonField = JsonMissing.of()
+ private var workspaceId: JsonField = JsonMissing.of()
+ private var creatorId: JsonField = JsonMissing.of()
+ private var name: JsonField = JsonMissing.of()
+ private var dateCreated: JsonField = JsonMissing.of()
+ private var dateUpdated: JsonField = JsonMissing.of()
+ private var description: JsonField = JsonMissing.of()
+ private var source: JsonField = JsonMissing.of()
+ private var taskType: JsonField = JsonMissing.of()
+ private var versionCount: JsonField = JsonMissing.of()
+ private var inferencePipelineCount: JsonField = JsonMissing.of()
+ private var goalCount: JsonField = JsonMissing.of()
+ private var developmentGoalCount: JsonField = JsonMissing.of()
+ private var monitoringGoalCount: JsonField = JsonMissing.of()
+ private var links: JsonField = JsonMissing.of()
+ private var gitRepo: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(project: Project) = apply {
+ this.id = project.id
+ this.workspaceId = project.workspaceId
+ this.creatorId = project.creatorId
+ this.name = project.name
+ this.dateCreated = project.dateCreated
+ this.dateUpdated = project.dateUpdated
+ this.description = project.description
+ this.source = project.source
+ this.taskType = project.taskType
+ this.versionCount = project.versionCount
+ this.inferencePipelineCount = project.inferencePipelineCount
+ this.goalCount = project.goalCount
+ this.developmentGoalCount = project.developmentGoalCount
+ this.monitoringGoalCount = project.monitoringGoalCount
+ this.links = project.links
+ this.gitRepo = project.gitRepo
+ additionalProperties(project.additionalProperties)
+ }
+
+ /** The project id. */
+ fun id(id: String) = id(JsonField.of(id))
+
+ /** The project id. */
+ @JsonProperty("id")
+ @ExcludeMissing
+ fun id(id: JsonField) = apply { this.id = id }
+
+ /** The workspace id. */
+ fun workspaceId(workspaceId: String) = workspaceId(JsonField.of(workspaceId))
+
+ /** The workspace id. */
+ @JsonProperty("workspaceId")
+ @ExcludeMissing
+ fun workspaceId(workspaceId: JsonField) = apply {
+ this.workspaceId = workspaceId
+ }
+
+ /** The project creator id. */
+ fun creatorId(creatorId: String) = creatorId(JsonField.of(creatorId))
+
+ /** The project creator id. */
+ @JsonProperty("creatorId")
+ @ExcludeMissing
+ fun creatorId(creatorId: JsonField) = apply { this.creatorId = creatorId }
+
+ /** The project name. */
+ fun name(name: String) = name(JsonField.of(name))
+
+ /** The project name. */
+ @JsonProperty("name")
+ @ExcludeMissing
+ fun name(name: JsonField) = apply { this.name = name }
+
+ /** The project creation date. */
+ fun dateCreated(dateCreated: OffsetDateTime) = dateCreated(JsonField.of(dateCreated))
+
+ /** The project creation date. */
+ @JsonProperty("dateCreated")
+ @ExcludeMissing
+ fun dateCreated(dateCreated: JsonField) = apply {
+ this.dateCreated = dateCreated
+ }
+
+ /** The project last updated date. */
+ fun dateUpdated(dateUpdated: OffsetDateTime) = dateUpdated(JsonField.of(dateUpdated))
+
+ /** The project last updated date. */
+ @JsonProperty("dateUpdated")
+ @ExcludeMissing
+ fun dateUpdated(dateUpdated: JsonField) = apply {
+ this.dateUpdated = dateUpdated
+ }
+
+ /** The project description. */
+ fun description(description: String) = description(JsonField.of(description))
+
+ /** The project description. */
+ @JsonProperty("description")
+ @ExcludeMissing
+ fun description(description: JsonField) = apply {
+ this.description = description
+ }
+
+ /** The source of the project. */
+ fun source(source: Source) = source(JsonField.of(source))
+
+ /** The source of the project. */
+ @JsonProperty("source")
+ @ExcludeMissing
+ fun source(source: JsonField) = apply { this.source = source }
+
+ /** The task type of the project. */
+ fun taskType(taskType: TaskType) = taskType(JsonField.of(taskType))
+
+ /** The task type of the project. */
+ @JsonProperty("taskType")
+ @ExcludeMissing
+ fun taskType(taskType: JsonField) = apply { this.taskType = taskType }
+
+ /** The number of versions (commits) in the project. */
+ fun versionCount(versionCount: Long) = versionCount(JsonField.of(versionCount))
+
+ /** The number of versions (commits) in the project. */
+ @JsonProperty("versionCount")
+ @ExcludeMissing
+ fun versionCount(versionCount: JsonField) = apply {
+ this.versionCount = versionCount
+ }
+
+ /** The number of inference pipelines in the project. */
+ fun inferencePipelineCount(inferencePipelineCount: Long) =
+ inferencePipelineCount(JsonField.of(inferencePipelineCount))
+
+ /** The number of inference pipelines in the project. */
+ @JsonProperty("inferencePipelineCount")
+ @ExcludeMissing
+ fun inferencePipelineCount(inferencePipelineCount: JsonField) = apply {
+ this.inferencePipelineCount = inferencePipelineCount
+ }
+
+ /** The total number of tests in the project. */
+ fun goalCount(goalCount: Long) = goalCount(JsonField.of(goalCount))
+
+ /** The total number of tests in the project. */
+ @JsonProperty("goalCount")
+ @ExcludeMissing
+ fun goalCount(goalCount: JsonField) = apply { this.goalCount = goalCount }
+
+ /** The number of tests in the development mode of the project. */
+ fun developmentGoalCount(developmentGoalCount: Long) =
+ developmentGoalCount(JsonField.of(developmentGoalCount))
+
+ /** The number of tests in the development mode of the project. */
+ @JsonProperty("developmentGoalCount")
+ @ExcludeMissing
+ fun developmentGoalCount(developmentGoalCount: JsonField) = apply {
+ this.developmentGoalCount = developmentGoalCount
+ }
+
+ /** The number of tests in the monitoring mode of the project. */
+ fun monitoringGoalCount(monitoringGoalCount: Long) =
+ monitoringGoalCount(JsonField.of(monitoringGoalCount))
+
+ /** The number of tests in the monitoring mode of the project. */
+ @JsonProperty("monitoringGoalCount")
+ @ExcludeMissing
+ fun monitoringGoalCount(monitoringGoalCount: JsonField) = apply {
+ this.monitoringGoalCount = monitoringGoalCount
+ }
+
+ /** Links to the project. */
+ fun links(links: Links) = links(JsonField.of(links))
+
+ /** Links to the project. */
+ @JsonProperty("links")
+ @ExcludeMissing
+ fun links(links: JsonField) = apply { this.links = links }
+
+ fun gitRepo(gitRepo: GitRepo) = gitRepo(JsonField.of(gitRepo))
+
+ @JsonProperty("gitRepo")
+ @ExcludeMissing
+ fun gitRepo(gitRepo: JsonField) = apply { this.gitRepo = gitRepo }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ @JsonAnySetter
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ this.additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun build(): Project =
+ Project(
+ id,
+ workspaceId,
+ creatorId,
+ name,
+ dateCreated,
+ dateUpdated,
+ description,
+ source,
+ taskType,
+ versionCount,
+ inferencePipelineCount,
+ goalCount,
+ developmentGoalCount,
+ monitoringGoalCount,
+ links,
+ gitRepo,
+ additionalProperties.toImmutable(),
+ )
+ }
+
+ /** Links to the project. */
+ @JsonDeserialize(builder = Links.Builder::class)
+ @NoAutoDetect
+ class Links
+ private constructor(
+ private val app: JsonField,
+ private val additionalProperties: Map,
+ ) {
+
+ private var validated: Boolean = false
+
+ fun app(): String = app.getRequired("app")
+
+ @JsonProperty("app") @ExcludeMissing fun _app() = app
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map = additionalProperties
+
+ fun validate(): Links = apply {
+ if (!validated) {
+ app()
+ validated = true
+ }
+ }
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ @JvmStatic fun builder() = Builder()
+ }
+
+ class Builder {
+
+ private var app: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(links: Links) = apply {
+ this.app = links.app
+ additionalProperties(links.additionalProperties)
+ }
+
+ fun app(app: String) = app(JsonField.of(app))
+
+ @JsonProperty("app")
+ @ExcludeMissing
+ fun app(app: JsonField) = apply { this.app = app }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ @JsonAnySetter
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ this.additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) =
+ apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun build(): Links = Links(app, additionalProperties.toImmutable())
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is Links && app == other.app && additionalProperties == other.additionalProperties /* spotless:on */
+ }
+
+ /* spotless:off */
+ private val hashCode: Int by lazy { Objects.hash(app, additionalProperties) }
+ /* spotless:on */
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() = "Links{app=$app, additionalProperties=$additionalProperties}"
+ }
+
+ class Source
+ @JsonCreator
+ private constructor(
+ private val value: JsonField,
+ ) : Enum {
+
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val WEB = of("web")
+
+ @JvmField val API = of("api")
+
+ @JvmField val NULL = of("null")
+
+ @JvmStatic fun of(value: String) = Source(JsonField.of(value))
+ }
+
+ enum class Known {
+ WEB,
+ API,
+ NULL,
+ }
+
+ enum class Value {
+ WEB,
+ API,
+ NULL,
+ _UNKNOWN,
+ }
+
+ fun value(): Value =
+ when (this) {
+ WEB -> Value.WEB
+ API -> Value.API
+ NULL -> Value.NULL
+ else -> Value._UNKNOWN
+ }
+
+ fun known(): Known =
+ when (this) {
+ WEB -> Known.WEB
+ API -> Known.API
+ NULL -> Known.NULL
+ else -> throw OpenlayerInvalidDataException("Unknown Source: $value")
+ }
+
+ fun asString(): String = _value().asStringOrThrow()
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is Source && value == other.value /* spotless:on */
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ class TaskType
+ @JsonCreator
+ private constructor(
+ private val value: JsonField,
+ ) : Enum {
+
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val LLM_BASE = of("llm-base")
+
+ @JvmField val TABULAR_CLASSIFICATION = of("tabular-classification")
+
+ @JvmField val TABULAR_REGRESSION = of("tabular-regression")
+
+ @JvmField val TEXT_CLASSIFICATION = of("text-classification")
+
+ @JvmStatic fun of(value: String) = TaskType(JsonField.of(value))
+ }
+
+ enum class Known {
+ LLM_BASE,
+ TABULAR_CLASSIFICATION,
+ TABULAR_REGRESSION,
+ TEXT_CLASSIFICATION,
+ }
+
+ enum class Value {
+ LLM_BASE,
+ TABULAR_CLASSIFICATION,
+ TABULAR_REGRESSION,
+ TEXT_CLASSIFICATION,
+ _UNKNOWN,
+ }
+
+ fun value(): Value =
+ when (this) {
+ LLM_BASE -> Value.LLM_BASE
+ TABULAR_CLASSIFICATION -> Value.TABULAR_CLASSIFICATION
+ TABULAR_REGRESSION -> Value.TABULAR_REGRESSION
+ TEXT_CLASSIFICATION -> Value.TEXT_CLASSIFICATION
+ else -> Value._UNKNOWN
+ }
+
+ fun known(): Known =
+ when (this) {
+ LLM_BASE -> Known.LLM_BASE
+ TABULAR_CLASSIFICATION -> Known.TABULAR_CLASSIFICATION
+ TABULAR_REGRESSION -> Known.TABULAR_REGRESSION
+ TEXT_CLASSIFICATION -> Known.TEXT_CLASSIFICATION
+ else -> throw OpenlayerInvalidDataException("Unknown TaskType: $value")
+ }
+
+ fun asString(): String = _value().asStringOrThrow()
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is TaskType && value == other.value /* spotless:on */
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ @JsonDeserialize(builder = GitRepo.Builder::class)
+ @NoAutoDetect
+ class GitRepo
+ private constructor(
+ private val id: JsonField,
+ private val gitId: JsonField,
+ private val dateConnected: JsonField,
+ private val dateUpdated: JsonField,
+ private val branch: JsonField,
+ private val name: JsonField,
+ private val private_: JsonField,
+ private val slug: JsonField,
+ private val url: JsonField,
+ private val rootDir: JsonField,
+ private val projectId: JsonField,
+ private val gitAccountId: JsonField,
+ private val additionalProperties: Map,
+ ) {
+
+ private var validated: Boolean = false
+
+ fun id(): String = id.getRequired("id")
+
+ fun gitId(): Long = gitId.getRequired("gitId")
+
+ fun dateConnected(): OffsetDateTime = dateConnected.getRequired("dateConnected")
+
+ fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated")
+
+ fun branch(): Optional = Optional.ofNullable(branch.getNullable("branch"))
+
+ fun name(): String = name.getRequired("name")
+
+ fun private_(): Boolean = private_.getRequired("private")
+
+ fun slug(): String = slug.getRequired("slug")
+
+ fun url(): String = url.getRequired("url")
+
+ fun rootDir(): Optional = Optional.ofNullable(rootDir.getNullable("rootDir"))
+
+ fun projectId(): String = projectId.getRequired("projectId")
+
+ fun gitAccountId(): String = gitAccountId.getRequired("gitAccountId")
+
+ @JsonProperty("id") @ExcludeMissing fun _id() = id
+
+ @JsonProperty("gitId") @ExcludeMissing fun _gitId() = gitId
+
+ @JsonProperty("dateConnected") @ExcludeMissing fun _dateConnected() = dateConnected
+
+ @JsonProperty("dateUpdated") @ExcludeMissing fun _dateUpdated() = dateUpdated
+
+ @JsonProperty("branch") @ExcludeMissing fun _branch() = branch
+
+ @JsonProperty("name") @ExcludeMissing fun _name() = name
+
+ @JsonProperty("private") @ExcludeMissing fun _private_() = private_
+
+ @JsonProperty("slug") @ExcludeMissing fun _slug() = slug
+
+ @JsonProperty("url") @ExcludeMissing fun _url() = url
+
+ @JsonProperty("rootDir") @ExcludeMissing fun _rootDir() = rootDir
+
+ @JsonProperty("projectId") @ExcludeMissing fun _projectId() = projectId
+
+ @JsonProperty("gitAccountId") @ExcludeMissing fun _gitAccountId() = gitAccountId
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map = additionalProperties
+
+ fun validate(): GitRepo = apply {
+ if (!validated) {
+ id()
+ gitId()
+ dateConnected()
+ dateUpdated()
+ branch()
+ name()
+ private_()
+ slug()
+ url()
+ rootDir()
+ projectId()
+ gitAccountId()
+ validated = true
+ }
+ }
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ @JvmStatic fun builder() = Builder()
+ }
+
+ class Builder {
+
+ private var id: JsonField = JsonMissing.of()
+ private var gitId: JsonField = JsonMissing.of()
+ private var dateConnected: JsonField = JsonMissing.of()
+ private var dateUpdated: JsonField = JsonMissing.of()
+ private var branch: JsonField = JsonMissing.of()
+ private var name: JsonField = JsonMissing.of()
+ private var private_: JsonField = JsonMissing.of()
+ private var slug: JsonField = JsonMissing.of()
+ private var url: JsonField = JsonMissing.of()
+ private var rootDir: JsonField = JsonMissing.of()
+ private var projectId: JsonField = JsonMissing.of()
+ private var gitAccountId: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(gitRepo: GitRepo) = apply {
+ this.id = gitRepo.id
+ this.gitId = gitRepo.gitId
+ this.dateConnected = gitRepo.dateConnected
+ this.dateUpdated = gitRepo.dateUpdated
+ this.branch = gitRepo.branch
+ this.name = gitRepo.name
+ this.private_ = gitRepo.private_
+ this.slug = gitRepo.slug
+ this.url = gitRepo.url
+ this.rootDir = gitRepo.rootDir
+ this.projectId = gitRepo.projectId
+ this.gitAccountId = gitRepo.gitAccountId
+ additionalProperties(gitRepo.additionalProperties)
+ }
+
+ fun id(id: String) = id(JsonField.of(id))
+
+ @JsonProperty("id")
+ @ExcludeMissing
+ fun id(id: JsonField) = apply { this.id = id }
+
+ fun gitId(gitId: Long) = gitId(JsonField.of(gitId))
+
+ @JsonProperty("gitId")
+ @ExcludeMissing
+ fun gitId(gitId: JsonField) = apply { this.gitId = gitId }
+
+ fun dateConnected(dateConnected: OffsetDateTime) =
+ dateConnected(JsonField.of(dateConnected))
+
+ @JsonProperty("dateConnected")
+ @ExcludeMissing
+ fun dateConnected(dateConnected: JsonField) = apply {
+ this.dateConnected = dateConnected
+ }
+
+ fun dateUpdated(dateUpdated: OffsetDateTime) =
+ dateUpdated(JsonField.of(dateUpdated))
+
+ @JsonProperty("dateUpdated")
+ @ExcludeMissing
+ fun dateUpdated(dateUpdated: JsonField) = apply {
+ this.dateUpdated = dateUpdated
+ }
+
+ fun branch(branch: String) = branch(JsonField.of(branch))
+
+ @JsonProperty("branch")
+ @ExcludeMissing
+ fun branch(branch: JsonField) = apply { this.branch = branch }
+
+ fun name(name: String) = name(JsonField.of(name))
+
+ @JsonProperty("name")
+ @ExcludeMissing
+ fun name(name: JsonField) = apply { this.name = name }
+
+ fun private_(private_: Boolean) = private_(JsonField.of(private_))
+
+ @JsonProperty("private")
+ @ExcludeMissing
+ fun private_(private_: JsonField) = apply { this.private_ = private_ }
+
+ fun slug(slug: String) = slug(JsonField.of(slug))
+
+ @JsonProperty("slug")
+ @ExcludeMissing
+ fun slug(slug: JsonField) = apply { this.slug = slug }
+
+ fun url(url: String) = url(JsonField.of(url))
+
+ @JsonProperty("url")
+ @ExcludeMissing
+ fun url(url: JsonField) = apply { this.url = url }
+
+ fun rootDir(rootDir: String) = rootDir(JsonField.of(rootDir))
+
+ @JsonProperty("rootDir")
+ @ExcludeMissing
+ fun rootDir(rootDir: JsonField) = apply { this.rootDir = rootDir }
+
+ fun projectId(projectId: String) = projectId(JsonField.of(projectId))
+
+ @JsonProperty("projectId")
+ @ExcludeMissing
+ fun projectId(projectId: JsonField) = apply { this.projectId = projectId }
+
+ fun gitAccountId(gitAccountId: String) = gitAccountId(JsonField.of(gitAccountId))
+
+ @JsonProperty("gitAccountId")
+ @ExcludeMissing
+ fun gitAccountId(gitAccountId: JsonField) = apply {
+ this.gitAccountId = gitAccountId
+ }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ @JsonAnySetter
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ this.additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) =
+ apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun build(): GitRepo =
+ GitRepo(
+ id,
+ gitId,
+ dateConnected,
+ dateUpdated,
+ branch,
+ name,
+ private_,
+ slug,
+ url,
+ rootDir,
+ projectId,
+ gitAccountId,
+ additionalProperties.toImmutable(),
+ )
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is GitRepo && id == other.id && gitId == other.gitId && dateConnected == other.dateConnected && dateUpdated == other.dateUpdated && branch == other.branch && name == other.name && private_ == other.private_ && slug == other.slug && url == other.url && rootDir == other.rootDir && projectId == other.projectId && gitAccountId == other.gitAccountId && additionalProperties == other.additionalProperties /* spotless:on */
+ }
+
+ /* spotless:off */
+ private val hashCode: Int by lazy { Objects.hash(id, gitId, dateConnected, dateUpdated, branch, name, private_, slug, url, rootDir, projectId, gitAccountId, additionalProperties) }
+ /* spotless:on */
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "GitRepo{id=$id, gitId=$gitId, dateConnected=$dateConnected, dateUpdated=$dateUpdated, branch=$branch, name=$name, private_=$private_, slug=$slug, url=$url, rootDir=$rootDir, projectId=$projectId, gitAccountId=$gitAccountId, additionalProperties=$additionalProperties}"
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is Project && id == other.id && workspaceId == other.workspaceId && creatorId == other.creatorId && name == other.name && dateCreated == other.dateCreated && dateUpdated == other.dateUpdated && description == other.description && source == other.source && taskType == other.taskType && versionCount == other.versionCount && inferencePipelineCount == other.inferencePipelineCount && goalCount == other.goalCount && developmentGoalCount == other.developmentGoalCount && monitoringGoalCount == other.monitoringGoalCount && links == other.links && gitRepo == other.gitRepo && additionalProperties == other.additionalProperties /* spotless:on */
+ }
+
+ /* spotless:off */
+ private val hashCode: Int by lazy { Objects.hash(id, workspaceId, creatorId, name, dateCreated, dateUpdated, description, source, taskType, versionCount, inferencePipelineCount, goalCount, developmentGoalCount, monitoringGoalCount, links, gitRepo, additionalProperties) }
+ /* spotless:on */
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Project{id=$id, workspaceId=$workspaceId, creatorId=$creatorId, name=$name, dateCreated=$dateCreated, dateUpdated=$dateUpdated, description=$description, source=$source, taskType=$taskType, versionCount=$versionCount, inferencePipelineCount=$inferencePipelineCount, goalCount=$goalCount, developmentGoalCount=$developmentGoalCount, monitoringGoalCount=$monitoringGoalCount, links=$links, gitRepo=$gitRepo, additionalProperties=$additionalProperties}"
+ }
+
+ @JsonDeserialize(builder = Workspace.Builder::class)
+ @NoAutoDetect
+ class Workspace
+ private constructor(
+ private val id: JsonField,
+ private val name: JsonField,
+ private val slug: JsonField,
+ private val dateCreated: JsonField,
+ private val dateUpdated: JsonField,
+ private val creatorId: JsonField,
+ private val inviteCode: JsonField,
+ private val wildcardDomains: JsonField>,
+ private val projectCount: JsonField,
+ private val memberCount: JsonField,
+ private val monthlyUsage: JsonField>,
+ private val inviteCount: JsonField,
+ private val periodStartDate: JsonField,
+ private val periodEndDate: JsonField,
+ private val samlOnlyAccess: JsonField,
+ private val status: JsonField,
+ private val additionalProperties: Map,
+ ) {
+
+ private var validated: Boolean = false
+
+ fun id(): String = id.getRequired("id")
+
+ fun name(): String = name.getRequired("name")
+
+ fun slug(): String = slug.getRequired("slug")
+
+ fun dateCreated(): OffsetDateTime = dateCreated.getRequired("dateCreated")
+
+ fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated")
+
+ fun creatorId(): Optional = Optional.ofNullable(creatorId.getNullable("creatorId"))
+
+ fun inviteCode(): Optional =
+ Optional.ofNullable(inviteCode.getNullable("inviteCode"))
+
+ fun wildcardDomains(): Optional> =
+ Optional.ofNullable(wildcardDomains.getNullable("wildcardDomains"))
+
+ fun projectCount(): Long = projectCount.getRequired("projectCount")
+
+ fun memberCount(): Long = memberCount.getRequired("memberCount")
+
+ fun monthlyUsage(): Optional> =
+ Optional.ofNullable(monthlyUsage.getNullable("monthlyUsage"))
+
+ fun inviteCount(): Long = inviteCount.getRequired("inviteCount")
+
+ fun periodStartDate(): Optional =
+ Optional.ofNullable(periodStartDate.getNullable("periodStartDate"))
+
+ fun periodEndDate(): Optional =
+ Optional.ofNullable(periodEndDate.getNullable("periodEndDate"))
+
+ fun samlOnlyAccess(): Optional =
+ Optional.ofNullable(samlOnlyAccess.getNullable("samlOnlyAccess"))
+
+ fun status(): Status = status.getRequired("status")
+
+ @JsonProperty("id") @ExcludeMissing fun _id() = id
+
+ @JsonProperty("name") @ExcludeMissing fun _name() = name
+
+ @JsonProperty("slug") @ExcludeMissing fun _slug() = slug
+
+ @JsonProperty("dateCreated") @ExcludeMissing fun _dateCreated() = dateCreated
+
+ @JsonProperty("dateUpdated") @ExcludeMissing fun _dateUpdated() = dateUpdated
+
+ @JsonProperty("creatorId") @ExcludeMissing fun _creatorId() = creatorId
+
+ @JsonProperty("inviteCode") @ExcludeMissing fun _inviteCode() = inviteCode
+
+ @JsonProperty("wildcardDomains") @ExcludeMissing fun _wildcardDomains() = wildcardDomains
+
+ @JsonProperty("projectCount") @ExcludeMissing fun _projectCount() = projectCount
+
+ @JsonProperty("memberCount") @ExcludeMissing fun _memberCount() = memberCount
+
+ @JsonProperty("monthlyUsage") @ExcludeMissing fun _monthlyUsage() = monthlyUsage
+
+ @JsonProperty("inviteCount") @ExcludeMissing fun _inviteCount() = inviteCount
+
+ @JsonProperty("periodStartDate") @ExcludeMissing fun _periodStartDate() = periodStartDate
+
+ @JsonProperty("periodEndDate") @ExcludeMissing fun _periodEndDate() = periodEndDate
+
+ @JsonProperty("samlOnlyAccess") @ExcludeMissing fun _samlOnlyAccess() = samlOnlyAccess
+
+ @JsonProperty("status") @ExcludeMissing fun _status() = status
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map = additionalProperties
+
+ fun validate(): Workspace = apply {
+ if (!validated) {
+ id()
+ name()
+ slug()
+ dateCreated()
+ dateUpdated()
+ creatorId()
+ inviteCode()
+ wildcardDomains()
+ projectCount()
+ memberCount()
+ monthlyUsage().map { it.forEach { it.validate() } }
+ inviteCount()
+ periodStartDate()
+ periodEndDate()
+ samlOnlyAccess()
+ status()
+ validated = true
+ }
+ }
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ @JvmStatic fun builder() = Builder()
+ }
+
+ class Builder {
+
+ private var id: JsonField = JsonMissing.of()
+ private var name: JsonField = JsonMissing.of()
+ private var slug: JsonField = JsonMissing.of()
+ private var dateCreated: JsonField = JsonMissing.of()
+ private var dateUpdated: JsonField = JsonMissing.of()
+ private var creatorId: JsonField = JsonMissing.of()
+ private var inviteCode: JsonField = JsonMissing.of()
+ private var wildcardDomains: JsonField> = JsonMissing.of()
+ private var projectCount: JsonField = JsonMissing.of()
+ private var memberCount: JsonField = JsonMissing.of()
+ private var monthlyUsage: JsonField> = JsonMissing.of()
+ private var inviteCount: JsonField = JsonMissing.of()
+ private var periodStartDate: JsonField = JsonMissing.of()
+ private var periodEndDate: JsonField = JsonMissing.of()
+ private var samlOnlyAccess: JsonField = JsonMissing.of()
+ private var status: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(workspace: Workspace) = apply {
+ this.id = workspace.id
+ this.name = workspace.name
+ this.slug = workspace.slug
+ this.dateCreated = workspace.dateCreated
+ this.dateUpdated = workspace.dateUpdated
+ this.creatorId = workspace.creatorId
+ this.inviteCode = workspace.inviteCode
+ this.wildcardDomains = workspace.wildcardDomains
+ this.projectCount = workspace.projectCount
+ this.memberCount = workspace.memberCount
+ this.monthlyUsage = workspace.monthlyUsage
+ this.inviteCount = workspace.inviteCount
+ this.periodStartDate = workspace.periodStartDate
+ this.periodEndDate = workspace.periodEndDate
+ this.samlOnlyAccess = workspace.samlOnlyAccess
+ this.status = workspace.status
+ additionalProperties(workspace.additionalProperties)
+ }
+
+ fun id(id: String) = id(JsonField.of(id))
+
+ @JsonProperty("id")
+ @ExcludeMissing
+ fun id(id: JsonField) = apply { this.id = id }
+
+ fun name(name: String) = name(JsonField.of(name))
+
+ @JsonProperty("name")
+ @ExcludeMissing
+ fun name(name: JsonField) = apply { this.name = name }
+
+ fun slug(slug: String) = slug(JsonField.of(slug))
+
+ @JsonProperty("slug")
+ @ExcludeMissing
+ fun slug(slug: JsonField) = apply { this.slug = slug }
+
+ fun dateCreated(dateCreated: OffsetDateTime) = dateCreated(JsonField.of(dateCreated))
+
+ @JsonProperty("dateCreated")
+ @ExcludeMissing
+ fun dateCreated(dateCreated: JsonField) = apply {
+ this.dateCreated = dateCreated
+ }
+
+ fun dateUpdated(dateUpdated: OffsetDateTime) = dateUpdated(JsonField.of(dateUpdated))
+
+ @JsonProperty("dateUpdated")
+ @ExcludeMissing
+ fun dateUpdated(dateUpdated: JsonField) = apply {
+ this.dateUpdated = dateUpdated
+ }
+
+ fun creatorId(creatorId: String) = creatorId(JsonField.of(creatorId))
+
+ @JsonProperty("creatorId")
+ @ExcludeMissing
+ fun creatorId(creatorId: JsonField) = apply { this.creatorId = creatorId }
+
+ fun inviteCode(inviteCode: String) = inviteCode(JsonField.of(inviteCode))
+
+ @JsonProperty("inviteCode")
+ @ExcludeMissing
+ fun inviteCode(inviteCode: JsonField) = apply { this.inviteCode = inviteCode }
+
+ fun wildcardDomains(wildcardDomains: List) =
+ wildcardDomains(JsonField.of(wildcardDomains))
+
+ @JsonProperty("wildcardDomains")
+ @ExcludeMissing
+ fun wildcardDomains(wildcardDomains: JsonField>) = apply {
+ this.wildcardDomains = wildcardDomains
+ }
+
+ fun projectCount(projectCount: Long) = projectCount(JsonField.of(projectCount))
+
+ @JsonProperty("projectCount")
+ @ExcludeMissing
+ fun projectCount(projectCount: JsonField) = apply {
+ this.projectCount = projectCount
+ }
+
+ fun memberCount(memberCount: Long) = memberCount(JsonField.of(memberCount))
+
+ @JsonProperty("memberCount")
+ @ExcludeMissing
+ fun memberCount(memberCount: JsonField) = apply { this.memberCount = memberCount }
+
+ fun monthlyUsage(monthlyUsage: List) =
+ monthlyUsage(JsonField.of(monthlyUsage))
+
+ @JsonProperty("monthlyUsage")
+ @ExcludeMissing
+ fun monthlyUsage(monthlyUsage: JsonField>) = apply {
+ this.monthlyUsage = monthlyUsage
+ }
+
+ fun inviteCount(inviteCount: Long) = inviteCount(JsonField.of(inviteCount))
+
+ @JsonProperty("inviteCount")
+ @ExcludeMissing
+ fun inviteCount(inviteCount: JsonField) = apply { this.inviteCount = inviteCount }
+
+ fun periodStartDate(periodStartDate: OffsetDateTime) =
+ periodStartDate(JsonField.of(periodStartDate))
+
+ @JsonProperty("periodStartDate")
+ @ExcludeMissing
+ fun periodStartDate(periodStartDate: JsonField) = apply {
+ this.periodStartDate = periodStartDate
+ }
+
+ fun periodEndDate(periodEndDate: OffsetDateTime) =
+ periodEndDate(JsonField.of(periodEndDate))
+
+ @JsonProperty("periodEndDate")
+ @ExcludeMissing
+ fun periodEndDate(periodEndDate: JsonField) = apply {
+ this.periodEndDate = periodEndDate
+ }
+
+ fun samlOnlyAccess(samlOnlyAccess: Boolean) =
+ samlOnlyAccess(JsonField.of(samlOnlyAccess))
+
+ @JsonProperty("samlOnlyAccess")
+ @ExcludeMissing
+ fun samlOnlyAccess(samlOnlyAccess: JsonField) = apply {
+ this.samlOnlyAccess = samlOnlyAccess
+ }
+
+ fun status(status: Status) = status(JsonField.of(status))
+
+ @JsonProperty("status")
+ @ExcludeMissing
+ fun status(status: JsonField) = apply { this.status = status }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ @JsonAnySetter
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ this.additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun build(): Workspace =
+ Workspace(
+ id,
+ name,
+ slug,
+ dateCreated,
+ dateUpdated,
+ creatorId,
+ inviteCode,
+ wildcardDomains.map { it.toImmutable() },
+ projectCount,
+ memberCount,
+ monthlyUsage.map { it.toImmutable() },
+ inviteCount,
+ periodStartDate,
+ periodEndDate,
+ samlOnlyAccess,
+ status,
+ additionalProperties.toImmutable(),
+ )
+ }
+
+ class Status
+ @JsonCreator
+ private constructor(
+ private val value: JsonField,
+ ) : Enum {
+
+ @com.fasterxml.jackson.annotation.JsonValue fun _value(): JsonField = value
+
+ companion object {
+
+ @JvmField val ACTIVE = of("active")
+
+ @JvmField val PAST_DUE = of("past_due")
+
+ @JvmField val UNPAID = of("unpaid")
+
+ @JvmField val CANCELED = of("canceled")
+
+ @JvmField val INCOMPLETE = of("incomplete")
+
+ @JvmField val INCOMPLETE_EXPIRED = of("incomplete_expired")
+
+ @JvmField val TRIALING = of("trialing")
+
+ @JvmField val PAUSED = of("paused")
+
+ @JvmStatic fun of(value: String) = Status(JsonField.of(value))
+ }
+
+ enum class Known {
+ ACTIVE,
+ PAST_DUE,
+ UNPAID,
+ CANCELED,
+ INCOMPLETE,
+ INCOMPLETE_EXPIRED,
+ TRIALING,
+ PAUSED,
+ }
+
+ enum class Value {
+ ACTIVE,
+ PAST_DUE,
+ UNPAID,
+ CANCELED,
+ INCOMPLETE,
+ INCOMPLETE_EXPIRED,
+ TRIALING,
+ PAUSED,
+ _UNKNOWN,
+ }
+
+ fun value(): Value =
+ when (this) {
+ ACTIVE -> Value.ACTIVE
+ PAST_DUE -> Value.PAST_DUE
+ UNPAID -> Value.UNPAID
+ CANCELED -> Value.CANCELED
+ INCOMPLETE -> Value.INCOMPLETE
+ INCOMPLETE_EXPIRED -> Value.INCOMPLETE_EXPIRED
+ TRIALING -> Value.TRIALING
+ PAUSED -> Value.PAUSED
+ else -> Value._UNKNOWN
+ }
+
+ fun known(): Known =
+ when (this) {
+ ACTIVE -> Known.ACTIVE
+ PAST_DUE -> Known.PAST_DUE
+ UNPAID -> Known.UNPAID
+ CANCELED -> Known.CANCELED
+ INCOMPLETE -> Known.INCOMPLETE
+ INCOMPLETE_EXPIRED -> Known.INCOMPLETE_EXPIRED
+ TRIALING -> Known.TRIALING
+ PAUSED -> Known.PAUSED
+ else -> throw OpenlayerInvalidDataException("Unknown Status: $value")
+ }
+
+ fun asString(): String = _value().asStringOrThrow()
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is Status && value == other.value /* spotless:on */
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ @JsonDeserialize(builder = MonthlyUsage.Builder::class)
+ @NoAutoDetect
+ class MonthlyUsage
+ private constructor(
+ private val monthYear: JsonField,
+ private val predictionCount: JsonField,
+ private val executionTimeMs: JsonField,
+ private val additionalProperties: Map,
+ ) {
+
+ private var validated: Boolean = false
+
+ fun monthYear(): Optional =
+ Optional.ofNullable(monthYear.getNullable("monthYear"))
+
+ fun predictionCount(): Optional =
+ Optional.ofNullable(predictionCount.getNullable("predictionCount"))
+
+ fun executionTimeMs(): Optional =
+ Optional.ofNullable(executionTimeMs.getNullable("executionTimeMs"))
+
+ @JsonProperty("monthYear") @ExcludeMissing fun _monthYear() = monthYear
+
+ @JsonProperty("predictionCount")
+ @ExcludeMissing
+ fun _predictionCount() = predictionCount
+
+ @JsonProperty("executionTimeMs")
+ @ExcludeMissing
+ fun _executionTimeMs() = executionTimeMs
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map = additionalProperties
+
+ fun validate(): MonthlyUsage = apply {
+ if (!validated) {
+ monthYear()
+ predictionCount()
+ executionTimeMs()
+ validated = true
+ }
+ }
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ @JvmStatic fun builder() = Builder()
+ }
+
+ class Builder {
+
+ private var monthYear: JsonField = JsonMissing.of()
+ private var predictionCount: JsonField = JsonMissing.of()
+ private var executionTimeMs: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(monthlyUsage: MonthlyUsage) = apply {
+ this.monthYear = monthlyUsage.monthYear
+ this.predictionCount = monthlyUsage.predictionCount
+ this.executionTimeMs = monthlyUsage.executionTimeMs
+ additionalProperties(monthlyUsage.additionalProperties)
+ }
+
+ fun monthYear(monthYear: LocalDate) = monthYear(JsonField.of(monthYear))
+
+ @JsonProperty("monthYear")
+ @ExcludeMissing
+ fun monthYear(monthYear: JsonField) = apply {
+ this.monthYear = monthYear
+ }
+
+ fun predictionCount(predictionCount: Long) =
+ predictionCount(JsonField.of(predictionCount))
+
+ @JsonProperty("predictionCount")
+ @ExcludeMissing
+ fun predictionCount(predictionCount: JsonField) = apply {
+ this.predictionCount = predictionCount
+ }
+
+ fun executionTimeMs(executionTimeMs: Long) =
+ executionTimeMs(JsonField.of(executionTimeMs))
+
+ @JsonProperty("executionTimeMs")
+ @ExcludeMissing
+ fun executionTimeMs(executionTimeMs: JsonField) = apply {
+ this.executionTimeMs = executionTimeMs
+ }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ @JsonAnySetter
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ this.additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) =
+ apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun build(): MonthlyUsage =
+ MonthlyUsage(
+ monthYear,
+ predictionCount,
+ executionTimeMs,
+ additionalProperties.toImmutable(),
+ )
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is MonthlyUsage && monthYear == other.monthYear && predictionCount == other.predictionCount && executionTimeMs == other.executionTimeMs && additionalProperties == other.additionalProperties /* spotless:on */
+ }
+
+ /* spotless:off */
+ private val hashCode: Int by lazy { Objects.hash(monthYear, predictionCount, executionTimeMs, additionalProperties) }
+ /* spotless:on */
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "MonthlyUsage{monthYear=$monthYear, predictionCount=$predictionCount, executionTimeMs=$executionTimeMs, additionalProperties=$additionalProperties}"
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is Workspace && id == other.id && name == other.name && slug == other.slug && dateCreated == other.dateCreated && dateUpdated == other.dateUpdated && creatorId == other.creatorId && inviteCode == other.inviteCode && wildcardDomains == other.wildcardDomains && projectCount == other.projectCount && memberCount == other.memberCount && monthlyUsage == other.monthlyUsage && inviteCount == other.inviteCount && periodStartDate == other.periodStartDate && periodEndDate == other.periodEndDate && samlOnlyAccess == other.samlOnlyAccess && status == other.status && additionalProperties == other.additionalProperties /* spotless:on */
+ }
+
+ /* spotless:off */
+ private val hashCode: Int by lazy { Objects.hash(id, name, slug, dateCreated, dateUpdated, creatorId, inviteCode, wildcardDomains, projectCount, memberCount, monthlyUsage, inviteCount, periodStartDate, periodEndDate, samlOnlyAccess, status, additionalProperties) }
+ /* spotless:on */
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Workspace{id=$id, name=$name, slug=$slug, dateCreated=$dateCreated, dateUpdated=$dateUpdated, creatorId=$creatorId, inviteCode=$inviteCode, wildcardDomains=$wildcardDomains, projectCount=$projectCount, memberCount=$memberCount, monthlyUsage=$monthlyUsage, inviteCount=$inviteCount, periodStartDate=$periodStartDate, periodEndDate=$periodEndDate, samlOnlyAccess=$samlOnlyAccess, status=$status, additionalProperties=$additionalProperties}"
+ }
+
override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}
- return /* spotless:off */ other is InferencePipelineRetrieveResponse && id == other.id && projectId == other.projectId && name == other.name && dateCreated == other.dateCreated && dateUpdated == other.dateUpdated && dateLastSampleReceived == other.dateLastSampleReceived && description == other.description && dateLastEvaluated == other.dateLastEvaluated && dateOfNextEvaluation == other.dateOfNextEvaluation && passingGoalCount == other.passingGoalCount && failingGoalCount == other.failingGoalCount && totalGoalCount == other.totalGoalCount && status == other.status && statusMessage == other.statusMessage && links == other.links && additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is InferencePipelineRetrieveResponse && id == other.id && projectId == other.projectId && workspaceId == other.workspaceId && project == other.project && workspace == other.workspace && name == other.name && dateCreated == other.dateCreated && dateUpdated == other.dateUpdated && dateLastSampleReceived == other.dateLastSampleReceived && description == other.description && dateLastEvaluated == other.dateLastEvaluated && dateOfNextEvaluation == other.dateOfNextEvaluation && passingGoalCount == other.passingGoalCount && failingGoalCount == other.failingGoalCount && totalGoalCount == other.totalGoalCount && status == other.status && statusMessage == other.statusMessage && links == other.links && additionalProperties == other.additionalProperties /* spotless:on */
}
/* spotless:off */
- private val hashCode: Int by lazy { Objects.hash(id, projectId, name, dateCreated, dateUpdated, dateLastSampleReceived, description, dateLastEvaluated, dateOfNextEvaluation, passingGoalCount, failingGoalCount, totalGoalCount, status, statusMessage, links, additionalProperties) }
+ private val hashCode: Int by lazy { Objects.hash(id, projectId, workspaceId, project, workspace, name, dateCreated, dateUpdated, dateLastSampleReceived, description, dateLastEvaluated, dateOfNextEvaluation, passingGoalCount, failingGoalCount, totalGoalCount, status, statusMessage, links, additionalProperties) }
/* spotless:on */
override fun hashCode(): Int = hashCode
override fun toString() =
- "InferencePipelineRetrieveResponse{id=$id, projectId=$projectId, name=$name, dateCreated=$dateCreated, dateUpdated=$dateUpdated, dateLastSampleReceived=$dateLastSampleReceived, description=$description, dateLastEvaluated=$dateLastEvaluated, dateOfNextEvaluation=$dateOfNextEvaluation, passingGoalCount=$passingGoalCount, failingGoalCount=$failingGoalCount, totalGoalCount=$totalGoalCount, status=$status, statusMessage=$statusMessage, links=$links, additionalProperties=$additionalProperties}"
+ "InferencePipelineRetrieveResponse{id=$id, projectId=$projectId, workspaceId=$workspaceId, project=$project, workspace=$workspace, name=$name, dateCreated=$dateCreated, dateUpdated=$dateUpdated, dateLastSampleReceived=$dateLastSampleReceived, description=$description, dateLastEvaluated=$dateLastEvaluated, dateOfNextEvaluation=$dateOfNextEvaluation, passingGoalCount=$passingGoalCount, failingGoalCount=$failingGoalCount, totalGoalCount=$totalGoalCount, status=$status, statusMessage=$statusMessage, links=$links, additionalProperties=$additionalProperties}"
}
diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineUpdateResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineUpdateResponse.kt
index 3c952f1..b570b22 100644
--- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineUpdateResponse.kt
+++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineUpdateResponse.kt
@@ -15,6 +15,7 @@ import com.openlayer.api.core.JsonValue
import com.openlayer.api.core.NoAutoDetect
import com.openlayer.api.core.toImmutable
import com.openlayer.api.errors.OpenlayerInvalidDataException
+import java.time.LocalDate
import java.time.OffsetDateTime
import java.util.Objects
import java.util.Optional
@@ -25,6 +26,9 @@ class InferencePipelineUpdateResponse
private constructor(
private val id: JsonField,
private val projectId: JsonField,
+ private val workspaceId: JsonField,
+ private val project: JsonField,
+ private val workspace: JsonField,
private val name: JsonField,
private val dateCreated: JsonField,
private val dateUpdated: JsonField,
@@ -49,6 +53,14 @@ private constructor(
/** The project id. */
fun projectId(): String = projectId.getRequired("projectId")
+ /** The workspace id. */
+ fun workspaceId(): Optional =
+ Optional.ofNullable(workspaceId.getNullable("workspaceId"))
+
+ fun project(): Optional = Optional.ofNullable(project.getNullable("project"))
+
+ fun workspace(): Optional = Optional.ofNullable(workspace.getNullable("workspace"))
+
/** The inference pipeline name. */
fun name(): String = name.getRequired("name")
@@ -98,6 +110,13 @@ private constructor(
/** The project id. */
@JsonProperty("projectId") @ExcludeMissing fun _projectId() = projectId
+ /** The workspace id. */
+ @JsonProperty("workspaceId") @ExcludeMissing fun _workspaceId() = workspaceId
+
+ @JsonProperty("project") @ExcludeMissing fun _project() = project
+
+ @JsonProperty("workspace") @ExcludeMissing fun _workspace() = workspace
+
/** The inference pipeline name. */
@JsonProperty("name") @ExcludeMissing fun _name() = name
@@ -148,6 +167,9 @@ private constructor(
if (!validated) {
id()
projectId()
+ workspaceId()
+ project().map { it.validate() }
+ workspace().map { it.validate() }
name()
dateCreated()
dateUpdated()
@@ -176,6 +198,9 @@ private constructor(
private var id: JsonField = JsonMissing.of()
private var projectId: JsonField = JsonMissing.of()
+ private var workspaceId: JsonField = JsonMissing.of()
+ private var project: JsonField = JsonMissing.of()
+ private var workspace: JsonField = JsonMissing.of()
private var name: JsonField = JsonMissing.of()
private var dateCreated: JsonField = JsonMissing.of()
private var dateUpdated: JsonField = JsonMissing.of()
@@ -196,6 +221,9 @@ private constructor(
apply {
this.id = inferencePipelineUpdateResponse.id
this.projectId = inferencePipelineUpdateResponse.projectId
+ this.workspaceId = inferencePipelineUpdateResponse.workspaceId
+ this.project = inferencePipelineUpdateResponse.project
+ this.workspace = inferencePipelineUpdateResponse.workspace
this.name = inferencePipelineUpdateResponse.name
this.dateCreated = inferencePipelineUpdateResponse.dateCreated
this.dateUpdated = inferencePipelineUpdateResponse.dateUpdated
@@ -226,6 +254,26 @@ private constructor(
@ExcludeMissing
fun projectId(projectId: JsonField) = apply { this.projectId = projectId }
+ /** The workspace id. */
+ fun workspaceId(workspaceId: String) = workspaceId(JsonField.of(workspaceId))
+
+ /** The workspace id. */
+ @JsonProperty("workspaceId")
+ @ExcludeMissing
+ fun workspaceId(workspaceId: JsonField) = apply { this.workspaceId = workspaceId }
+
+ fun project(project: Project) = project(JsonField.of(project))
+
+ @JsonProperty("project")
+ @ExcludeMissing
+ fun project(project: JsonField) = apply { this.project = project }
+
+ fun workspace(workspace: Workspace) = workspace(JsonField.of(workspace))
+
+ @JsonProperty("workspace")
+ @ExcludeMissing
+ fun workspace(workspace: JsonField) = apply { this.workspace = workspace }
+
/** The inference pipeline name. */
fun name(name: String) = name(JsonField.of(name))
@@ -369,6 +417,9 @@ private constructor(
InferencePipelineUpdateResponse(
id,
projectId,
+ workspaceId,
+ project,
+ workspace,
name,
dateCreated,
dateUpdated,
@@ -550,20 +601,1467 @@ private constructor(
override fun toString() = value.toString()
}
+ @JsonDeserialize(builder = Project.Builder::class)
+ @NoAutoDetect
+ class Project
+ private constructor(
+ private val id: JsonField,
+ private val workspaceId: JsonField,
+ private val creatorId: JsonField,
+ private val name: JsonField,
+ private val dateCreated: JsonField,
+ private val dateUpdated: JsonField,
+ private val description: JsonField