diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index fd0ccba9..3d2ac0bd 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.1.0-alpha.12"
+ ".": "0.1.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 9297db8c..aa5f69b8 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,3 +1,3 @@
-configured_endpoints: 19
+configured_endpoints: 24
openapi_spec_hash: 68055a774f3305fb11efa5b5b5881446
-config_hash: 00442fdab71911b02ab1e10f9ec05b79
+config_hash: f0743196c68fb84cbd06a95f134702b3
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5aa85519..bec1726d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,13 @@
# Changelog
+## 0.1.0 (2026-01-08)
+
+Full Changelog: [v0.1.0-alpha.12...v0.1.0](https://github.com/openlayer-ai/openlayer-java/compare/v0.1.0-alpha.12...v0.1.0)
+
+### Features
+
+* **api:** add missing endpoints ([db4b1fb](https://github.com/openlayer-ai/openlayer-java/commit/db4b1fbc7bd03820c3292f5e25bba78d606abb1f))
+
## 0.1.0-alpha.12 (2026-01-07)
Full Changelog: [v0.1.0-alpha.11...v0.1.0-alpha.12](https://github.com/openlayer-ai/openlayer-java/compare/v0.1.0-alpha.11...v0.1.0-alpha.12)
diff --git a/README.md b/README.md
index 5fe2d289..1dd08bfe 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.openlayer.api/openlayer-java/0.1.0-alpha.12)
-[](https://javadoc.io/doc/com.openlayer.api/openlayer-java/0.1.0-alpha.12)
+[](https://central.sonatype.com/artifact/com.openlayer.api/openlayer-java/0.1.0)
+[](https://javadoc.io/doc/com.openlayer.api/openlayer-java/0.1.0)
@@ -13,7 +13,7 @@ It is generated with [Stainless](https://www.stainless.com/).
-The REST API documentation can be found on [openlayer.com](https://openlayer.com/docs/api-reference/rest/overview). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.openlayer.api/openlayer-java/0.1.0-alpha.12).
+The REST API documentation can be found on [openlayer.com](https://openlayer.com/docs/api-reference/rest/overview). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.openlayer.api/openlayer-java/0.1.0).
@@ -24,7 +24,7 @@ The REST API documentation can be found on [openlayer.com](https://openlayer.com
### Gradle
```kotlin
-implementation("com.openlayer.api:openlayer-java:0.1.0-alpha.12")
+implementation("com.openlayer.api:openlayer-java:0.1.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.openlayer.api:openlayer-java:0.1.0-alpha.12")
com.openlayer.api
openlayer-java
- 0.1.0-alpha.12
+ 0.1.0
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 0f25f17d..368e5b16 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.openlayer.api"
- version = "0.1.0-alpha.12" // x-release-please-version
+ version = "0.1.0" // x-release-please-version
}
subprojects {
diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClient.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClient.kt
index 6a97cc73..61c86d06 100644
--- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClient.kt
+++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClient.kt
@@ -8,6 +8,7 @@ import com.openlayer.api.services.blocking.InferencePipelineService
import com.openlayer.api.services.blocking.ProjectService
import com.openlayer.api.services.blocking.StorageService
import com.openlayer.api.services.blocking.TestService
+import com.openlayer.api.services.blocking.WorkspaceService
import java.util.function.Consumer
/**
@@ -48,6 +49,8 @@ interface OpenlayerClient {
fun projects(): ProjectService
+ fun workspaces(): WorkspaceService
+
fun commits(): CommitService
fun inferencePipelines(): InferencePipelineService
@@ -81,6 +84,8 @@ interface OpenlayerClient {
fun projects(): ProjectService.WithRawResponse
+ fun workspaces(): WorkspaceService.WithRawResponse
+
fun commits(): CommitService.WithRawResponse
fun inferencePipelines(): InferencePipelineService.WithRawResponse
diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsync.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsync.kt
index 5894656c..960d3f89 100644
--- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsync.kt
+++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsync.kt
@@ -8,6 +8,7 @@ import com.openlayer.api.services.async.InferencePipelineServiceAsync
import com.openlayer.api.services.async.ProjectServiceAsync
import com.openlayer.api.services.async.StorageServiceAsync
import com.openlayer.api.services.async.TestServiceAsync
+import com.openlayer.api.services.async.WorkspaceServiceAsync
import java.util.function.Consumer
/**
@@ -48,6 +49,8 @@ interface OpenlayerClientAsync {
fun projects(): ProjectServiceAsync
+ fun workspaces(): WorkspaceServiceAsync
+
fun commits(): CommitServiceAsync
fun inferencePipelines(): InferencePipelineServiceAsync
@@ -85,6 +88,8 @@ interface OpenlayerClientAsync {
fun projects(): ProjectServiceAsync.WithRawResponse
+ fun workspaces(): WorkspaceServiceAsync.WithRawResponse
+
fun commits(): CommitServiceAsync.WithRawResponse
fun inferencePipelines(): InferencePipelineServiceAsync.WithRawResponse
diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsyncImpl.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsyncImpl.kt
index fb7c4680..6c590e95 100644
--- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsyncImpl.kt
+++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsyncImpl.kt
@@ -14,6 +14,8 @@ import com.openlayer.api.services.async.StorageServiceAsync
import com.openlayer.api.services.async.StorageServiceAsyncImpl
import com.openlayer.api.services.async.TestServiceAsync
import com.openlayer.api.services.async.TestServiceAsyncImpl
+import com.openlayer.api.services.async.WorkspaceServiceAsync
+import com.openlayer.api.services.async.WorkspaceServiceAsyncImpl
import java.util.function.Consumer
class OpenlayerClientAsyncImpl(private val clientOptions: ClientOptions) : OpenlayerClientAsync {
@@ -37,6 +39,10 @@ class OpenlayerClientAsyncImpl(private val clientOptions: ClientOptions) : Openl
ProjectServiceAsyncImpl(clientOptionsWithUserAgent)
}
+ private val workspaces: WorkspaceServiceAsync by lazy {
+ WorkspaceServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
+
private val commits: CommitServiceAsync by lazy {
CommitServiceAsyncImpl(clientOptionsWithUserAgent)
}
@@ -60,6 +66,8 @@ class OpenlayerClientAsyncImpl(private val clientOptions: ClientOptions) : Openl
override fun projects(): ProjectServiceAsync = projects
+ override fun workspaces(): WorkspaceServiceAsync = workspaces
+
override fun commits(): CommitServiceAsync = commits
override fun inferencePipelines(): InferencePipelineServiceAsync = inferencePipelines
@@ -77,6 +85,10 @@ class OpenlayerClientAsyncImpl(private val clientOptions: ClientOptions) : Openl
ProjectServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
+ private val workspaces: WorkspaceServiceAsync.WithRawResponse by lazy {
+ WorkspaceServiceAsyncImpl.WithRawResponseImpl(clientOptions)
+ }
+
private val commits: CommitServiceAsync.WithRawResponse by lazy {
CommitServiceAsyncImpl.WithRawResponseImpl(clientOptions)
}
@@ -102,6 +114,8 @@ class OpenlayerClientAsyncImpl(private val clientOptions: ClientOptions) : Openl
override fun projects(): ProjectServiceAsync.WithRawResponse = projects
+ override fun workspaces(): WorkspaceServiceAsync.WithRawResponse = workspaces
+
override fun commits(): CommitServiceAsync.WithRawResponse = commits
override fun inferencePipelines(): InferencePipelineServiceAsync.WithRawResponse =
diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientImpl.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientImpl.kt
index 61191e72..b82d4996 100644
--- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientImpl.kt
+++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientImpl.kt
@@ -14,6 +14,8 @@ import com.openlayer.api.services.blocking.StorageService
import com.openlayer.api.services.blocking.StorageServiceImpl
import com.openlayer.api.services.blocking.TestService
import com.openlayer.api.services.blocking.TestServiceImpl
+import com.openlayer.api.services.blocking.WorkspaceService
+import com.openlayer.api.services.blocking.WorkspaceServiceImpl
import java.util.function.Consumer
class OpenlayerClientImpl(private val clientOptions: ClientOptions) : OpenlayerClient {
@@ -35,6 +37,10 @@ class OpenlayerClientImpl(private val clientOptions: ClientOptions) : OpenlayerC
private val projects: ProjectService by lazy { ProjectServiceImpl(clientOptionsWithUserAgent) }
+ private val workspaces: WorkspaceService by lazy {
+ WorkspaceServiceImpl(clientOptionsWithUserAgent)
+ }
+
private val commits: CommitService by lazy { CommitServiceImpl(clientOptionsWithUserAgent) }
private val inferencePipelines: InferencePipelineService by lazy {
@@ -54,6 +60,8 @@ class OpenlayerClientImpl(private val clientOptions: ClientOptions) : OpenlayerC
override fun projects(): ProjectService = projects
+ override fun workspaces(): WorkspaceService = workspaces
+
override fun commits(): CommitService = commits
override fun inferencePipelines(): InferencePipelineService = inferencePipelines
@@ -71,6 +79,10 @@ class OpenlayerClientImpl(private val clientOptions: ClientOptions) : OpenlayerC
ProjectServiceImpl.WithRawResponseImpl(clientOptions)
}
+ private val workspaces: WorkspaceService.WithRawResponse by lazy {
+ WorkspaceServiceImpl.WithRawResponseImpl(clientOptions)
+ }
+
private val commits: CommitService.WithRawResponse by lazy {
CommitServiceImpl.WithRawResponseImpl(clientOptions)
}
@@ -96,6 +108,8 @@ class OpenlayerClientImpl(private val clientOptions: ClientOptions) : OpenlayerC
override fun projects(): ProjectService.WithRawResponse = projects
+ override fun workspaces(): WorkspaceService.WithRawResponse = workspaces
+
override fun commits(): CommitService.WithRawResponse = commits
override fun inferencePipelines(): InferencePipelineService.WithRawResponse =
diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/workspaces/WorkspaceRetrieveParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/workspaces/WorkspaceRetrieveParams.kt
new file mode 100644
index 00000000..f114b045
--- /dev/null
+++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/workspaces/WorkspaceRetrieveParams.kt
@@ -0,0 +1,194 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.openlayer.api.models.workspaces
+
+import com.openlayer.api.core.Params
+import com.openlayer.api.core.http.Headers
+import com.openlayer.api.core.http.QueryParams
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+/** Retrieve a workspace by its ID. */
+class WorkspaceRetrieveParams
+private constructor(
+ private val workspaceId: String?,
+ private val additionalHeaders: Headers,
+ private val additionalQueryParams: QueryParams,
+) : Params {
+
+ fun workspaceId(): Optional = Optional.ofNullable(workspaceId)
+
+ /** Additional headers to send with the request. */
+ fun _additionalHeaders(): Headers = additionalHeaders
+
+ /** Additional query param to send with the request. */
+ fun _additionalQueryParams(): QueryParams = additionalQueryParams
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ @JvmStatic fun none(): WorkspaceRetrieveParams = builder().build()
+
+ /** Returns a mutable builder for constructing an instance of [WorkspaceRetrieveParams]. */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [WorkspaceRetrieveParams]. */
+ class Builder internal constructor() {
+
+ private var workspaceId: String? = null
+ private var additionalHeaders: Headers.Builder = Headers.builder()
+ private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
+
+ @JvmSynthetic
+ internal fun from(workspaceRetrieveParams: WorkspaceRetrieveParams) = apply {
+ workspaceId = workspaceRetrieveParams.workspaceId
+ additionalHeaders = workspaceRetrieveParams.additionalHeaders.toBuilder()
+ additionalQueryParams = workspaceRetrieveParams.additionalQueryParams.toBuilder()
+ }
+
+ fun workspaceId(workspaceId: String?) = apply { this.workspaceId = workspaceId }
+
+ /** Alias for calling [Builder.workspaceId] with `workspaceId.orElse(null)`. */
+ fun workspaceId(workspaceId: Optional) = workspaceId(workspaceId.getOrNull())
+
+ fun additionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun additionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun putAdditionalHeader(name: String, value: String) = apply {
+ additionalHeaders.put(name, value)
+ }
+
+ fun putAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.put(name, values)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun replaceAdditionalHeaders(name: String, value: String) = apply {
+ additionalHeaders.replace(name, value)
+ }
+
+ fun replaceAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.replace(name, values)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) }
+
+ fun removeAllAdditionalHeaders(names: Set) = apply {
+ additionalHeaders.removeAll(names)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: Map>) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun putAdditionalQueryParam(key: String, value: String) = apply {
+ additionalQueryParams.put(key, value)
+ }
+
+ fun putAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.put(key, values)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, value: String) = apply {
+ additionalQueryParams.replace(key, value)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.replace(key, values)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) }
+
+ fun removeAllAdditionalQueryParams(keys: Set) = apply {
+ additionalQueryParams.removeAll(keys)
+ }
+
+ /**
+ * Returns an immutable instance of [WorkspaceRetrieveParams].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): WorkspaceRetrieveParams =
+ WorkspaceRetrieveParams(
+ workspaceId,
+ additionalHeaders.build(),
+ additionalQueryParams.build(),
+ )
+ }
+
+ fun _pathParam(index: Int): String =
+ when (index) {
+ 0 -> workspaceId ?: ""
+ else -> ""
+ }
+
+ override fun _headers(): Headers = additionalHeaders
+
+ override fun _queryParams(): QueryParams = additionalQueryParams
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is WorkspaceRetrieveParams &&
+ workspaceId == other.workspaceId &&
+ additionalHeaders == other.additionalHeaders &&
+ additionalQueryParams == other.additionalQueryParams
+ }
+
+ override fun hashCode(): Int =
+ Objects.hash(workspaceId, additionalHeaders, additionalQueryParams)
+
+ override fun toString() =
+ "WorkspaceRetrieveParams{workspaceId=$workspaceId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+}
diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/workspaces/WorkspaceRetrieveResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/workspaces/WorkspaceRetrieveResponse.kt
new file mode 100644
index 00000000..c760efa1
--- /dev/null
+++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/workspaces/WorkspaceRetrieveResponse.kt
@@ -0,0 +1,1250 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.openlayer.api.models.workspaces
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter
+import com.fasterxml.jackson.annotation.JsonAnySetter
+import com.fasterxml.jackson.annotation.JsonCreator
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.openlayer.api.core.Enum
+import com.openlayer.api.core.ExcludeMissing
+import com.openlayer.api.core.JsonField
+import com.openlayer.api.core.JsonMissing
+import com.openlayer.api.core.JsonValue
+import com.openlayer.api.core.checkKnown
+import com.openlayer.api.core.checkRequired
+import com.openlayer.api.core.toImmutable
+import com.openlayer.api.errors.OpenlayerInvalidDataException
+import java.time.LocalDate
+import java.time.OffsetDateTime
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+class WorkspaceRetrieveResponse
+@JsonCreator(mode = JsonCreator.Mode.DISABLED)
+private constructor(
+ private val id: JsonField,
+ private val creatorId: JsonField,
+ private val dateCreated: JsonField,
+ private val dateUpdated: JsonField,
+ private val inviteCount: JsonField,
+ private val memberCount: JsonField,
+ private val name: JsonField,
+ private val periodEndDate: JsonField,
+ private val periodStartDate: JsonField,
+ private val projectCount: JsonField,
+ private val slug: JsonField,
+ private val status: JsonField,
+ private val inviteCode: JsonField,
+ private val monthlyUsage: JsonField>,
+ private val samlOnlyAccess: JsonField,
+ private val wildcardDomains: JsonField>,
+ private val additionalProperties: MutableMap,
+) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("id") @ExcludeMissing id: JsonField = JsonMissing.of(),
+ @JsonProperty("creatorId") @ExcludeMissing creatorId: JsonField = JsonMissing.of(),
+ @JsonProperty("dateCreated")
+ @ExcludeMissing
+ dateCreated: JsonField = JsonMissing.of(),
+ @JsonProperty("dateUpdated")
+ @ExcludeMissing
+ dateUpdated: JsonField = JsonMissing.of(),
+ @JsonProperty("inviteCount")
+ @ExcludeMissing
+ inviteCount: JsonField = JsonMissing.of(),
+ @JsonProperty("memberCount")
+ @ExcludeMissing
+ memberCount: JsonField = JsonMissing.of(),
+ @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(),
+ @JsonProperty("periodEndDate")
+ @ExcludeMissing
+ periodEndDate: JsonField = JsonMissing.of(),
+ @JsonProperty("periodStartDate")
+ @ExcludeMissing
+ periodStartDate: JsonField = JsonMissing.of(),
+ @JsonProperty("projectCount")
+ @ExcludeMissing
+ projectCount: JsonField = JsonMissing.of(),
+ @JsonProperty("slug") @ExcludeMissing slug: JsonField = JsonMissing.of(),
+ @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(),
+ @JsonProperty("inviteCode")
+ @ExcludeMissing
+ inviteCode: JsonField = JsonMissing.of(),
+ @JsonProperty("monthlyUsage")
+ @ExcludeMissing
+ monthlyUsage: JsonField> = JsonMissing.of(),
+ @JsonProperty("samlOnlyAccess")
+ @ExcludeMissing
+ samlOnlyAccess: JsonField = JsonMissing.of(),
+ @JsonProperty("wildcardDomains")
+ @ExcludeMissing
+ wildcardDomains: JsonField> = JsonMissing.of(),
+ ) : this(
+ id,
+ creatorId,
+ dateCreated,
+ dateUpdated,
+ inviteCount,
+ memberCount,
+ name,
+ periodEndDate,
+ periodStartDate,
+ projectCount,
+ slug,
+ status,
+ inviteCode,
+ monthlyUsage,
+ samlOnlyAccess,
+ wildcardDomains,
+ mutableMapOf(),
+ )
+
+ /**
+ * The workspace id.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun id(): String = id.getRequired("id")
+
+ /**
+ * The workspace creator id.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun creatorId(): Optional = creatorId.getOptional("creatorId")
+
+ /**
+ * The workspace creation date.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun dateCreated(): OffsetDateTime = dateCreated.getRequired("dateCreated")
+
+ /**
+ * The workspace last updated date.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated")
+
+ /**
+ * The number of invites in the workspace.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun inviteCount(): Long = inviteCount.getRequired("inviteCount")
+
+ /**
+ * The number of members in the workspace.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun memberCount(): Long = memberCount.getRequired("memberCount")
+
+ /**
+ * The workspace name.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun name(): String = name.getRequired("name")
+
+ /**
+ * The end date of the current billing period.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun periodEndDate(): Optional = periodEndDate.getOptional("periodEndDate")
+
+ /**
+ * The start date of the current billing period.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun periodStartDate(): Optional = periodStartDate.getOptional("periodStartDate")
+
+ /**
+ * The number of projects in the workspace.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun projectCount(): Long = projectCount.getRequired("projectCount")
+
+ /**
+ * The workspace slug.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun slug(): String = slug.getRequired("slug")
+
+ /**
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun status(): Status = status.getRequired("status")
+
+ /**
+ * The workspace invite code.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun inviteCode(): Optional = inviteCode.getOptional("inviteCode")
+
+ /**
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun monthlyUsage(): Optional> = monthlyUsage.getOptional("monthlyUsage")
+
+ /**
+ * Whether the workspace only allows SAML authentication.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun samlOnlyAccess(): Optional = samlOnlyAccess.getOptional("samlOnlyAccess")
+
+ /**
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun wildcardDomains(): Optional> = wildcardDomains.getOptional("wildcardDomains")
+
+ /**
+ * Returns the raw JSON value of [id].
+ *
+ * Unlike [id], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
+
+ /**
+ * Returns the raw JSON value of [creatorId].
+ *
+ * Unlike [creatorId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("creatorId") @ExcludeMissing fun _creatorId(): JsonField = creatorId
+
+ /**
+ * Returns the raw JSON value of [dateCreated].
+ *
+ * Unlike [dateCreated], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("dateCreated")
+ @ExcludeMissing
+ fun _dateCreated(): JsonField = dateCreated
+
+ /**
+ * Returns the raw JSON value of [dateUpdated].
+ *
+ * Unlike [dateUpdated], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("dateUpdated")
+ @ExcludeMissing
+ fun _dateUpdated(): JsonField = dateUpdated
+
+ /**
+ * Returns the raw JSON value of [inviteCount].
+ *
+ * Unlike [inviteCount], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("inviteCount") @ExcludeMissing fun _inviteCount(): JsonField = inviteCount
+
+ /**
+ * Returns the raw JSON value of [memberCount].
+ *
+ * Unlike [memberCount], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("memberCount") @ExcludeMissing fun _memberCount(): JsonField = memberCount
+
+ /**
+ * Returns the raw JSON value of [name].
+ *
+ * Unlike [name], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name
+
+ /**
+ * Returns the raw JSON value of [periodEndDate].
+ *
+ * Unlike [periodEndDate], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("periodEndDate")
+ @ExcludeMissing
+ fun _periodEndDate(): JsonField = periodEndDate
+
+ /**
+ * Returns the raw JSON value of [periodStartDate].
+ *
+ * Unlike [periodStartDate], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("periodStartDate")
+ @ExcludeMissing
+ fun _periodStartDate(): JsonField = periodStartDate
+
+ /**
+ * Returns the raw JSON value of [projectCount].
+ *
+ * Unlike [projectCount], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("projectCount")
+ @ExcludeMissing
+ fun _projectCount(): JsonField = projectCount
+
+ /**
+ * Returns the raw JSON value of [slug].
+ *
+ * Unlike [slug], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("slug") @ExcludeMissing fun _slug(): JsonField = slug
+
+ /**
+ * Returns the raw JSON value of [status].
+ *
+ * Unlike [status], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status
+
+ /**
+ * Returns the raw JSON value of [inviteCode].
+ *
+ * Unlike [inviteCode], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("inviteCode") @ExcludeMissing fun _inviteCode(): JsonField = inviteCode
+
+ /**
+ * Returns the raw JSON value of [monthlyUsage].
+ *
+ * Unlike [monthlyUsage], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("monthlyUsage")
+ @ExcludeMissing
+ fun _monthlyUsage(): JsonField> = monthlyUsage
+
+ /**
+ * Returns the raw JSON value of [samlOnlyAccess].
+ *
+ * Unlike [samlOnlyAccess], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("samlOnlyAccess")
+ @ExcludeMissing
+ fun _samlOnlyAccess(): JsonField = samlOnlyAccess
+
+ /**
+ * Returns the raw JSON value of [wildcardDomains].
+ *
+ * Unlike [wildcardDomains], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("wildcardDomains")
+ @ExcludeMissing
+ fun _wildcardDomains(): JsonField> = wildcardDomains
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [WorkspaceRetrieveResponse].
+ *
+ * The following fields are required:
+ * ```java
+ * .id()
+ * .creatorId()
+ * .dateCreated()
+ * .dateUpdated()
+ * .inviteCount()
+ * .memberCount()
+ * .name()
+ * .periodEndDate()
+ * .periodStartDate()
+ * .projectCount()
+ * .slug()
+ * .status()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [WorkspaceRetrieveResponse]. */
+ class Builder internal constructor() {
+
+ private var id: JsonField? = null
+ private var creatorId: JsonField? = null
+ private var dateCreated: JsonField? = null
+ private var dateUpdated: JsonField? = null
+ private var inviteCount: JsonField? = null
+ private var memberCount: JsonField? = null
+ private var name: JsonField? = null
+ private var periodEndDate: JsonField? = null
+ private var periodStartDate: JsonField? = null
+ private var projectCount: JsonField? = null
+ private var slug: JsonField? = null
+ private var status: JsonField? = null
+ private var inviteCode: JsonField = JsonMissing.of()
+ private var monthlyUsage: JsonField>? = null
+ private var samlOnlyAccess: JsonField = JsonMissing.of()
+ private var wildcardDomains: JsonField>? = null
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(workspaceRetrieveResponse: WorkspaceRetrieveResponse) = apply {
+ id = workspaceRetrieveResponse.id
+ creatorId = workspaceRetrieveResponse.creatorId
+ dateCreated = workspaceRetrieveResponse.dateCreated
+ dateUpdated = workspaceRetrieveResponse.dateUpdated
+ inviteCount = workspaceRetrieveResponse.inviteCount
+ memberCount = workspaceRetrieveResponse.memberCount
+ name = workspaceRetrieveResponse.name
+ periodEndDate = workspaceRetrieveResponse.periodEndDate
+ periodStartDate = workspaceRetrieveResponse.periodStartDate
+ projectCount = workspaceRetrieveResponse.projectCount
+ slug = workspaceRetrieveResponse.slug
+ status = workspaceRetrieveResponse.status
+ inviteCode = workspaceRetrieveResponse.inviteCode
+ monthlyUsage = workspaceRetrieveResponse.monthlyUsage.map { it.toMutableList() }
+ samlOnlyAccess = workspaceRetrieveResponse.samlOnlyAccess
+ wildcardDomains = workspaceRetrieveResponse.wildcardDomains.map { it.toMutableList() }
+ additionalProperties = workspaceRetrieveResponse.additionalProperties.toMutableMap()
+ }
+
+ /** The workspace id. */
+ fun id(id: String) = id(JsonField.of(id))
+
+ /**
+ * Sets [Builder.id] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.id] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun id(id: JsonField) = apply { this.id = id }
+
+ /** The workspace creator id. */
+ fun creatorId(creatorId: String?) = creatorId(JsonField.ofNullable(creatorId))
+
+ /** Alias for calling [Builder.creatorId] with `creatorId.orElse(null)`. */
+ fun creatorId(creatorId: Optional) = creatorId(creatorId.getOrNull())
+
+ /**
+ * Sets [Builder.creatorId] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.creatorId] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun creatorId(creatorId: JsonField) = apply { this.creatorId = creatorId }
+
+ /** The workspace creation date. */
+ fun dateCreated(dateCreated: OffsetDateTime) = dateCreated(JsonField.of(dateCreated))
+
+ /**
+ * Sets [Builder.dateCreated] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.dateCreated] with a well-typed [OffsetDateTime] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun dateCreated(dateCreated: JsonField) = apply {
+ this.dateCreated = dateCreated
+ }
+
+ /** The workspace last updated date. */
+ fun dateUpdated(dateUpdated: OffsetDateTime) = dateUpdated(JsonField.of(dateUpdated))
+
+ /**
+ * Sets [Builder.dateUpdated] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.dateUpdated] with a well-typed [OffsetDateTime] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun dateUpdated(dateUpdated: JsonField) = apply {
+ this.dateUpdated = dateUpdated
+ }
+
+ /** The number of invites in the workspace. */
+ fun inviteCount(inviteCount: Long) = inviteCount(JsonField.of(inviteCount))
+
+ /**
+ * Sets [Builder.inviteCount] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.inviteCount] with a well-typed [Long] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun inviteCount(inviteCount: JsonField) = apply { this.inviteCount = inviteCount }
+
+ /** The number of members in the workspace. */
+ fun memberCount(memberCount: Long) = memberCount(JsonField.of(memberCount))
+
+ /**
+ * Sets [Builder.memberCount] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.memberCount] with a well-typed [Long] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun memberCount(memberCount: JsonField) = apply { this.memberCount = memberCount }
+
+ /** The workspace name. */
+ fun name(name: String) = name(JsonField.of(name))
+
+ /**
+ * Sets [Builder.name] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.name] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun name(name: JsonField) = apply { this.name = name }
+
+ /** The end date of the current billing period. */
+ fun periodEndDate(periodEndDate: OffsetDateTime?) =
+ periodEndDate(JsonField.ofNullable(periodEndDate))
+
+ /** Alias for calling [Builder.periodEndDate] with `periodEndDate.orElse(null)`. */
+ fun periodEndDate(periodEndDate: Optional) =
+ periodEndDate(periodEndDate.getOrNull())
+
+ /**
+ * Sets [Builder.periodEndDate] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.periodEndDate] with a well-typed [OffsetDateTime] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun periodEndDate(periodEndDate: JsonField) = apply {
+ this.periodEndDate = periodEndDate
+ }
+
+ /** The start date of the current billing period. */
+ fun periodStartDate(periodStartDate: OffsetDateTime?) =
+ periodStartDate(JsonField.ofNullable(periodStartDate))
+
+ /** Alias for calling [Builder.periodStartDate] with `periodStartDate.orElse(null)`. */
+ fun periodStartDate(periodStartDate: Optional) =
+ periodStartDate(periodStartDate.getOrNull())
+
+ /**
+ * Sets [Builder.periodStartDate] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.periodStartDate] with a well-typed [OffsetDateTime]
+ * value instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun periodStartDate(periodStartDate: JsonField) = apply {
+ this.periodStartDate = periodStartDate
+ }
+
+ /** The number of projects in the workspace. */
+ fun projectCount(projectCount: Long) = projectCount(JsonField.of(projectCount))
+
+ /**
+ * Sets [Builder.projectCount] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.projectCount] with a well-typed [Long] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun projectCount(projectCount: JsonField) = apply { this.projectCount = projectCount }
+
+ /** The workspace slug. */
+ fun slug(slug: String) = slug(JsonField.of(slug))
+
+ /**
+ * Sets [Builder.slug] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.slug] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun slug(slug: JsonField) = apply { this.slug = slug }
+
+ fun status(status: Status) = status(JsonField.of(status))
+
+ /**
+ * Sets [Builder.status] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.status] with a well-typed [Status] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun status(status: JsonField) = apply { this.status = status }
+
+ /** The workspace invite code. */
+ fun inviteCode(inviteCode: String) = inviteCode(JsonField.of(inviteCode))
+
+ /**
+ * Sets [Builder.inviteCode] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.inviteCode] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun inviteCode(inviteCode: JsonField) = apply { this.inviteCode = inviteCode }
+
+ fun monthlyUsage(monthlyUsage: List) =
+ monthlyUsage(JsonField.of(monthlyUsage))
+
+ /**
+ * Sets [Builder.monthlyUsage] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.monthlyUsage] with a well-typed `List`
+ * value instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun monthlyUsage(monthlyUsage: JsonField>) = apply {
+ this.monthlyUsage = monthlyUsage.map { it.toMutableList() }
+ }
+
+ /**
+ * Adds a single [MonthlyUsage] to [Builder.monthlyUsage].
+ *
+ * @throws IllegalStateException if the field was previously set to a non-list.
+ */
+ fun addMonthlyUsage(monthlyUsage: MonthlyUsage) = apply {
+ this.monthlyUsage =
+ (this.monthlyUsage ?: JsonField.of(mutableListOf())).also {
+ checkKnown("monthlyUsage", it).add(monthlyUsage)
+ }
+ }
+
+ /** Whether the workspace only allows SAML authentication. */
+ fun samlOnlyAccess(samlOnlyAccess: Boolean) = samlOnlyAccess(JsonField.of(samlOnlyAccess))
+
+ /**
+ * Sets [Builder.samlOnlyAccess] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.samlOnlyAccess] with a well-typed [Boolean] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun samlOnlyAccess(samlOnlyAccess: JsonField) = apply {
+ this.samlOnlyAccess = samlOnlyAccess
+ }
+
+ fun wildcardDomains(wildcardDomains: List) =
+ wildcardDomains(JsonField.of(wildcardDomains))
+
+ /**
+ * Sets [Builder.wildcardDomains] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.wildcardDomains] with a well-typed `List` value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun wildcardDomains(wildcardDomains: JsonField>) = apply {
+ this.wildcardDomains = wildcardDomains.map { it.toMutableList() }
+ }
+
+ /**
+ * Adds a single [String] to [wildcardDomains].
+ *
+ * @throws IllegalStateException if the field was previously set to a non-list.
+ */
+ fun addWildcardDomain(wildcardDomain: String) = apply {
+ wildcardDomains =
+ (wildcardDomains ?: JsonField.of(mutableListOf())).also {
+ checkKnown("wildcardDomains", it).add(wildcardDomain)
+ }
+ }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [WorkspaceRetrieveResponse].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ *
+ * The following fields are required:
+ * ```java
+ * .id()
+ * .creatorId()
+ * .dateCreated()
+ * .dateUpdated()
+ * .inviteCount()
+ * .memberCount()
+ * .name()
+ * .periodEndDate()
+ * .periodStartDate()
+ * .projectCount()
+ * .slug()
+ * .status()
+ * ```
+ *
+ * @throws IllegalStateException if any required field is unset.
+ */
+ fun build(): WorkspaceRetrieveResponse =
+ WorkspaceRetrieveResponse(
+ checkRequired("id", id),
+ checkRequired("creatorId", creatorId),
+ checkRequired("dateCreated", dateCreated),
+ checkRequired("dateUpdated", dateUpdated),
+ checkRequired("inviteCount", inviteCount),
+ checkRequired("memberCount", memberCount),
+ checkRequired("name", name),
+ checkRequired("periodEndDate", periodEndDate),
+ checkRequired("periodStartDate", periodStartDate),
+ checkRequired("projectCount", projectCount),
+ checkRequired("slug", slug),
+ checkRequired("status", status),
+ inviteCode,
+ (monthlyUsage ?: JsonMissing.of()).map { it.toImmutable() },
+ samlOnlyAccess,
+ (wildcardDomains ?: JsonMissing.of()).map { it.toImmutable() },
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): WorkspaceRetrieveResponse = apply {
+ if (validated) {
+ return@apply
+ }
+
+ id()
+ creatorId()
+ dateCreated()
+ dateUpdated()
+ inviteCount()
+ memberCount()
+ name()
+ periodEndDate()
+ periodStartDate()
+ projectCount()
+ slug()
+ status().validate()
+ inviteCode()
+ monthlyUsage().ifPresent { it.forEach { it.validate() } }
+ samlOnlyAccess()
+ wildcardDomains()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: OpenlayerInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic
+ internal fun validity(): Int =
+ (if (id.asKnown().isPresent) 1 else 0) +
+ (if (creatorId.asKnown().isPresent) 1 else 0) +
+ (if (dateCreated.asKnown().isPresent) 1 else 0) +
+ (if (dateUpdated.asKnown().isPresent) 1 else 0) +
+ (if (inviteCount.asKnown().isPresent) 1 else 0) +
+ (if (memberCount.asKnown().isPresent) 1 else 0) +
+ (if (name.asKnown().isPresent) 1 else 0) +
+ (if (periodEndDate.asKnown().isPresent) 1 else 0) +
+ (if (periodStartDate.asKnown().isPresent) 1 else 0) +
+ (if (projectCount.asKnown().isPresent) 1 else 0) +
+ (if (slug.asKnown().isPresent) 1 else 0) +
+ (status.asKnown().getOrNull()?.validity() ?: 0) +
+ (if (inviteCode.asKnown().isPresent) 1 else 0) +
+ (monthlyUsage.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
+ (if (samlOnlyAccess.asKnown().isPresent) 1 else 0) +
+ (wildcardDomains.asKnown().getOrNull()?.size ?: 0)
+
+ class Status @JsonCreator private constructor(private val value: JsonField) : Enum {
+
+ /**
+ * Returns this class instance's raw value.
+ *
+ * This is usually only useful if this instance was deserialized from data that doesn't
+ * match any known member, and you want to know that value. For example, if the SDK is on an
+ * older version than the API, then the API may respond with new members that the SDK is
+ * unaware of.
+ */
+ @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))
+ }
+
+ /** An enum containing [Status]'s known values. */
+ enum class Known {
+ ACTIVE,
+ PAST_DUE,
+ UNPAID,
+ CANCELED,
+ INCOMPLETE,
+ INCOMPLETE_EXPIRED,
+ TRIALING,
+ PAUSED,
+ }
+
+ /**
+ * An enum containing [Status]'s known values, as well as an [_UNKNOWN] member.
+ *
+ * An instance of [Status] can contain an unknown value in a couple of cases:
+ * - It was deserialized from data that doesn't match any known member. For example, if the
+ * SDK is on an older version than the API, then the API may respond with new members that
+ * the SDK is unaware of.
+ * - It was constructed with an arbitrary value using the [of] method.
+ */
+ enum class Value {
+ ACTIVE,
+ PAST_DUE,
+ UNPAID,
+ CANCELED,
+ INCOMPLETE,
+ INCOMPLETE_EXPIRED,
+ TRIALING,
+ PAUSED,
+ /** An enum member indicating that [Status] was instantiated with an unknown value. */
+ _UNKNOWN,
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value, or [Value._UNKNOWN]
+ * if the class was instantiated with an unknown value.
+ *
+ * Use the [known] method instead if you're certain the value is always known or if you want
+ * to throw for the unknown case.
+ */
+ 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
+ }
+
+ /**
+ * Returns an enum member corresponding to this class instance's value.
+ *
+ * Use the [value] method instead if you're uncertain the value is always known and don't
+ * want to throw for the unknown case.
+ *
+ * @throws OpenlayerInvalidDataException if this class instance's value is a not a known
+ * member.
+ */
+ 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")
+ }
+
+ /**
+ * Returns this class instance's primitive wire representation.
+ *
+ * This differs from the [toString] method because that method is primarily for debugging
+ * and generally doesn't throw.
+ *
+ * @throws OpenlayerInvalidDataException if this class instance's value does not have the
+ * expected primitive type.
+ */
+ fun asString(): String =
+ _value().asString().orElseThrow {
+ OpenlayerInvalidDataException("Value is not a String")
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Status = apply {
+ if (validated) {
+ return@apply
+ }
+
+ known()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: OpenlayerInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic internal fun validity(): Int = if (value() == Value._UNKNOWN) 0 else 1
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Status && value == other.value
+ }
+
+ override fun hashCode() = value.hashCode()
+
+ override fun toString() = value.toString()
+ }
+
+ class MonthlyUsage
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val executionTimeMs: JsonField,
+ private val monthYear: JsonField,
+ private val predictionCount: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("executionTimeMs")
+ @ExcludeMissing
+ executionTimeMs: JsonField = JsonMissing.of(),
+ @JsonProperty("monthYear")
+ @ExcludeMissing
+ monthYear: JsonField = JsonMissing.of(),
+ @JsonProperty("predictionCount")
+ @ExcludeMissing
+ predictionCount: JsonField = JsonMissing.of(),
+ ) : this(executionTimeMs, monthYear, predictionCount, mutableMapOf())
+
+ /**
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun executionTimeMs(): Optional = executionTimeMs.getOptional("executionTimeMs")
+
+ /**
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun monthYear(): Optional = monthYear.getOptional("monthYear")
+
+ /**
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun predictionCount(): Optional = predictionCount.getOptional("predictionCount")
+
+ /**
+ * Returns the raw JSON value of [executionTimeMs].
+ *
+ * Unlike [executionTimeMs], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("executionTimeMs")
+ @ExcludeMissing
+ fun _executionTimeMs(): JsonField = executionTimeMs
+
+ /**
+ * Returns the raw JSON value of [monthYear].
+ *
+ * Unlike [monthYear], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("monthYear")
+ @ExcludeMissing
+ fun _monthYear(): JsonField = monthYear
+
+ /**
+ * Returns the raw JSON value of [predictionCount].
+ *
+ * Unlike [predictionCount], this method doesn't throw if the JSON field has an unexpected
+ * type.
+ */
+ @JsonProperty("predictionCount")
+ @ExcludeMissing
+ fun _predictionCount(): JsonField = predictionCount
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /** Returns a mutable builder for constructing an instance of [MonthlyUsage]. */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [MonthlyUsage]. */
+ class Builder internal constructor() {
+
+ private var executionTimeMs: JsonField = JsonMissing.of()
+ private var monthYear: JsonField = JsonMissing.of()
+ private var predictionCount: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(monthlyUsage: MonthlyUsage) = apply {
+ executionTimeMs = monthlyUsage.executionTimeMs
+ monthYear = monthlyUsage.monthYear
+ predictionCount = monthlyUsage.predictionCount
+ additionalProperties = monthlyUsage.additionalProperties.toMutableMap()
+ }
+
+ fun executionTimeMs(executionTimeMs: Long?) =
+ executionTimeMs(JsonField.ofNullable(executionTimeMs))
+
+ /**
+ * Alias for [Builder.executionTimeMs].
+ *
+ * This unboxed primitive overload exists for backwards compatibility.
+ */
+ fun executionTimeMs(executionTimeMs: Long) = executionTimeMs(executionTimeMs as Long?)
+
+ /** Alias for calling [Builder.executionTimeMs] with `executionTimeMs.orElse(null)`. */
+ fun executionTimeMs(executionTimeMs: Optional) =
+ executionTimeMs(executionTimeMs.getOrNull())
+
+ /**
+ * Sets [Builder.executionTimeMs] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.executionTimeMs] with a well-typed [Long] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun executionTimeMs(executionTimeMs: JsonField) = apply {
+ this.executionTimeMs = executionTimeMs
+ }
+
+ fun monthYear(monthYear: LocalDate) = monthYear(JsonField.of(monthYear))
+
+ /**
+ * Sets [Builder.monthYear] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.monthYear] with a well-typed [LocalDate] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun monthYear(monthYear: JsonField) = apply { this.monthYear = monthYear }
+
+ fun predictionCount(predictionCount: Long) =
+ predictionCount(JsonField.of(predictionCount))
+
+ /**
+ * Sets [Builder.predictionCount] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.predictionCount] with a well-typed [Long] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun predictionCount(predictionCount: JsonField) = apply {
+ this.predictionCount = predictionCount
+ }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [MonthlyUsage].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): MonthlyUsage =
+ MonthlyUsage(
+ executionTimeMs,
+ monthYear,
+ predictionCount,
+ additionalProperties.toMutableMap(),
+ )
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): MonthlyUsage = apply {
+ if (validated) {
+ return@apply
+ }
+
+ executionTimeMs()
+ monthYear()
+ predictionCount()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: OpenlayerInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic
+ internal fun validity(): Int =
+ (if (executionTimeMs.asKnown().isPresent) 1 else 0) +
+ (if (monthYear.asKnown().isPresent) 1 else 0) +
+ (if (predictionCount.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is MonthlyUsage &&
+ executionTimeMs == other.executionTimeMs &&
+ monthYear == other.monthYear &&
+ predictionCount == other.predictionCount &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(executionTimeMs, monthYear, predictionCount, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "MonthlyUsage{executionTimeMs=$executionTimeMs, monthYear=$monthYear, predictionCount=$predictionCount, additionalProperties=$additionalProperties}"
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is WorkspaceRetrieveResponse &&
+ id == other.id &&
+ creatorId == other.creatorId &&
+ dateCreated == other.dateCreated &&
+ dateUpdated == other.dateUpdated &&
+ inviteCount == other.inviteCount &&
+ memberCount == other.memberCount &&
+ name == other.name &&
+ periodEndDate == other.periodEndDate &&
+ periodStartDate == other.periodStartDate &&
+ projectCount == other.projectCount &&
+ slug == other.slug &&
+ status == other.status &&
+ inviteCode == other.inviteCode &&
+ monthlyUsage == other.monthlyUsage &&
+ samlOnlyAccess == other.samlOnlyAccess &&
+ wildcardDomains == other.wildcardDomains &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(
+ id,
+ creatorId,
+ dateCreated,
+ dateUpdated,
+ inviteCount,
+ memberCount,
+ name,
+ periodEndDate,
+ periodStartDate,
+ projectCount,
+ slug,
+ status,
+ inviteCode,
+ monthlyUsage,
+ samlOnlyAccess,
+ wildcardDomains,
+ additionalProperties,
+ )
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "WorkspaceRetrieveResponse{id=$id, creatorId=$creatorId, dateCreated=$dateCreated, dateUpdated=$dateUpdated, inviteCount=$inviteCount, memberCount=$memberCount, name=$name, periodEndDate=$periodEndDate, periodStartDate=$periodStartDate, projectCount=$projectCount, slug=$slug, status=$status, inviteCode=$inviteCode, monthlyUsage=$monthlyUsage, samlOnlyAccess=$samlOnlyAccess, wildcardDomains=$wildcardDomains, additionalProperties=$additionalProperties}"
+}
diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/workspaces/WorkspaceUpdateParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/workspaces/WorkspaceUpdateParams.kt
new file mode 100644
index 00000000..8d5d1890
--- /dev/null
+++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/workspaces/WorkspaceUpdateParams.kt
@@ -0,0 +1,539 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.openlayer.api.models.workspaces
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter
+import com.fasterxml.jackson.annotation.JsonAnySetter
+import com.fasterxml.jackson.annotation.JsonCreator
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.openlayer.api.core.ExcludeMissing
+import com.openlayer.api.core.JsonField
+import com.openlayer.api.core.JsonMissing
+import com.openlayer.api.core.JsonValue
+import com.openlayer.api.core.Params
+import com.openlayer.api.core.http.Headers
+import com.openlayer.api.core.http.QueryParams
+import com.openlayer.api.errors.OpenlayerInvalidDataException
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+/** Update a workspace. */
+class WorkspaceUpdateParams
+private constructor(
+ private val workspaceId: String?,
+ private val body: Body,
+ private val additionalHeaders: Headers,
+ private val additionalQueryParams: QueryParams,
+) : Params {
+
+ fun workspaceId(): Optional = Optional.ofNullable(workspaceId)
+
+ /**
+ * The workspace invite code.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun inviteCode(): Optional = body.inviteCode()
+
+ /**
+ * The workspace name.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun name(): Optional = body.name()
+
+ /**
+ * The workspace slug.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun slug(): Optional = body.slug()
+
+ /**
+ * Returns the raw JSON value of [inviteCode].
+ *
+ * Unlike [inviteCode], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _inviteCode(): JsonField = body._inviteCode()
+
+ /**
+ * Returns the raw JSON value of [name].
+ *
+ * Unlike [name], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _name(): JsonField = body._name()
+
+ /**
+ * Returns the raw JSON value of [slug].
+ *
+ * Unlike [slug], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ fun _slug(): JsonField = body._slug()
+
+ fun _additionalBodyProperties(): Map = body._additionalProperties()
+
+ /** Additional headers to send with the request. */
+ fun _additionalHeaders(): Headers = additionalHeaders
+
+ /** Additional query param to send with the request. */
+ fun _additionalQueryParams(): QueryParams = additionalQueryParams
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ @JvmStatic fun none(): WorkspaceUpdateParams = builder().build()
+
+ /** Returns a mutable builder for constructing an instance of [WorkspaceUpdateParams]. */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [WorkspaceUpdateParams]. */
+ class Builder internal constructor() {
+
+ private var workspaceId: String? = null
+ private var body: Body.Builder = Body.builder()
+ private var additionalHeaders: Headers.Builder = Headers.builder()
+ private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
+
+ @JvmSynthetic
+ internal fun from(workspaceUpdateParams: WorkspaceUpdateParams) = apply {
+ workspaceId = workspaceUpdateParams.workspaceId
+ body = workspaceUpdateParams.body.toBuilder()
+ additionalHeaders = workspaceUpdateParams.additionalHeaders.toBuilder()
+ additionalQueryParams = workspaceUpdateParams.additionalQueryParams.toBuilder()
+ }
+
+ fun workspaceId(workspaceId: String?) = apply { this.workspaceId = workspaceId }
+
+ /** Alias for calling [Builder.workspaceId] with `workspaceId.orElse(null)`. */
+ fun workspaceId(workspaceId: Optional) = workspaceId(workspaceId.getOrNull())
+
+ /**
+ * Sets the entire request body.
+ *
+ * This is generally only useful if you are already constructing the body separately.
+ * Otherwise, it's more convenient to use the top-level setters instead:
+ * - [inviteCode]
+ * - [name]
+ * - [slug]
+ */
+ fun body(body: Body) = apply { this.body = body.toBuilder() }
+
+ /** The workspace invite code. */
+ fun inviteCode(inviteCode: String) = apply { body.inviteCode(inviteCode) }
+
+ /**
+ * Sets [Builder.inviteCode] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.inviteCode] with a well-typed [String] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun inviteCode(inviteCode: JsonField) = apply { body.inviteCode(inviteCode) }
+
+ /** The workspace name. */
+ fun name(name: String) = apply { body.name(name) }
+
+ /**
+ * Sets [Builder.name] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.name] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun name(name: JsonField) = apply { body.name(name) }
+
+ /** The workspace slug. */
+ fun slug(slug: String) = apply { body.slug(slug) }
+
+ /**
+ * Sets [Builder.slug] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.slug] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported value.
+ */
+ fun slug(slug: JsonField) = apply { body.slug(slug) }
+
+ fun additionalBodyProperties(additionalBodyProperties: Map) = apply {
+ body.additionalProperties(additionalBodyProperties)
+ }
+
+ fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply {
+ body.putAdditionalProperty(key, value)
+ }
+
+ fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) =
+ apply {
+ body.putAllAdditionalProperties(additionalBodyProperties)
+ }
+
+ fun removeAdditionalBodyProperty(key: String) = apply { body.removeAdditionalProperty(key) }
+
+ fun removeAllAdditionalBodyProperties(keys: Set) = apply {
+ body.removeAllAdditionalProperties(keys)
+ }
+
+ fun additionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun additionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun putAdditionalHeader(name: String, value: String) = apply {
+ additionalHeaders.put(name, value)
+ }
+
+ fun putAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.put(name, values)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.putAll(additionalHeaders)
+ }
+
+ fun replaceAdditionalHeaders(name: String, value: String) = apply {
+ additionalHeaders.replace(name, value)
+ }
+
+ fun replaceAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.replace(name, values)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.replaceAll(additionalHeaders)
+ }
+
+ fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) }
+
+ fun removeAllAdditionalHeaders(names: Set) = apply {
+ additionalHeaders.removeAll(names)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: Map>) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun putAdditionalQueryParam(key: String, value: String) = apply {
+ additionalQueryParams.put(key, value)
+ }
+
+ fun putAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.put(key, values)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.putAll(additionalQueryParams)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, value: String) = apply {
+ additionalQueryParams.replace(key, value)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.replace(key, values)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ this.additionalQueryParams.replaceAll(additionalQueryParams)
+ }
+
+ fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) }
+
+ fun removeAllAdditionalQueryParams(keys: Set) = apply {
+ additionalQueryParams.removeAll(keys)
+ }
+
+ /**
+ * Returns an immutable instance of [WorkspaceUpdateParams].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): WorkspaceUpdateParams =
+ WorkspaceUpdateParams(
+ workspaceId,
+ body.build(),
+ additionalHeaders.build(),
+ additionalQueryParams.build(),
+ )
+ }
+
+ fun _body(): Body = body
+
+ fun _pathParam(index: Int): String =
+ when (index) {
+ 0 -> workspaceId ?: ""
+ else -> ""
+ }
+
+ override fun _headers(): Headers = additionalHeaders
+
+ override fun _queryParams(): QueryParams = additionalQueryParams
+
+ class Body
+ @JsonCreator(mode = JsonCreator.Mode.DISABLED)
+ private constructor(
+ private val inviteCode: JsonField,
+ private val name: JsonField,
+ private val slug: JsonField,
+ private val additionalProperties: MutableMap,
+ ) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("inviteCode")
+ @ExcludeMissing
+ inviteCode: JsonField = JsonMissing.of(),
+ @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(),
+ @JsonProperty("slug") @ExcludeMissing slug: JsonField = JsonMissing.of(),
+ ) : this(inviteCode, name, slug, mutableMapOf())
+
+ /**
+ * The workspace invite code.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun inviteCode(): Optional = inviteCode.getOptional("inviteCode")
+
+ /**
+ * The workspace name.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun name(): Optional = name.getOptional("name")
+
+ /**
+ * The workspace slug.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun slug(): Optional = slug.getOptional("slug")
+
+ /**
+ * Returns the raw JSON value of [inviteCode].
+ *
+ * Unlike [inviteCode], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("inviteCode")
+ @ExcludeMissing
+ fun _inviteCode(): JsonField = inviteCode
+
+ /**
+ * Returns the raw JSON value of [name].
+ *
+ * Unlike [name], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name
+
+ /**
+ * Returns the raw JSON value of [slug].
+ *
+ * Unlike [slug], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("slug") @ExcludeMissing fun _slug(): JsonField = slug
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /** Returns a mutable builder for constructing an instance of [Body]. */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [Body]. */
+ class Builder internal constructor() {
+
+ private var inviteCode: JsonField = JsonMissing.of()
+ private var name: JsonField = JsonMissing.of()
+ private var slug: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(body: Body) = apply {
+ inviteCode = body.inviteCode
+ name = body.name
+ slug = body.slug
+ additionalProperties = body.additionalProperties.toMutableMap()
+ }
+
+ /** The workspace invite code. */
+ fun inviteCode(inviteCode: String) = inviteCode(JsonField.of(inviteCode))
+
+ /**
+ * Sets [Builder.inviteCode] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.inviteCode] with a well-typed [String] value
+ * instead. This method is primarily for setting the field to an undocumented or not yet
+ * supported value.
+ */
+ fun inviteCode(inviteCode: JsonField) = apply { this.inviteCode = inviteCode }
+
+ /** The workspace name. */
+ fun name(name: String) = name(JsonField.of(name))
+
+ /**
+ * Sets [Builder.name] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.name] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun name(name: JsonField) = apply { this.name = name }
+
+ /** The workspace slug. */
+ fun slug(slug: String) = slug(JsonField.of(slug))
+
+ /**
+ * Sets [Builder.slug] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.slug] with a well-typed [String] value instead. This
+ * method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun slug(slug: JsonField) = apply { this.slug = slug }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ putAllAdditionalProperties(additionalProperties)
+ }
+
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun removeAdditionalProperty(key: String) = apply { additionalProperties.remove(key) }
+
+ fun removeAllAdditionalProperties(keys: Set) = apply {
+ keys.forEach(::removeAdditionalProperty)
+ }
+
+ /**
+ * Returns an immutable instance of [Body].
+ *
+ * Further updates to this [Builder] will not mutate the returned instance.
+ */
+ fun build(): Body = Body(inviteCode, name, slug, additionalProperties.toMutableMap())
+ }
+
+ private var validated: Boolean = false
+
+ fun validate(): Body = apply {
+ if (validated) {
+ return@apply
+ }
+
+ inviteCode()
+ name()
+ slug()
+ validated = true
+ }
+
+ fun isValid(): Boolean =
+ try {
+ validate()
+ true
+ } catch (e: OpenlayerInvalidDataException) {
+ false
+ }
+
+ /**
+ * Returns a score indicating how many valid values are contained in this object
+ * recursively.
+ *
+ * Used for best match union deserialization.
+ */
+ @JvmSynthetic
+ internal fun validity(): Int =
+ (if (inviteCode.asKnown().isPresent) 1 else 0) +
+ (if (name.asKnown().isPresent) 1 else 0) +
+ (if (slug.asKnown().isPresent) 1 else 0)
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is Body &&
+ inviteCode == other.inviteCode &&
+ name == other.name &&
+ slug == other.slug &&
+ additionalProperties == other.additionalProperties
+ }
+
+ private val hashCode: Int by lazy {
+ Objects.hash(inviteCode, name, slug, additionalProperties)
+ }
+
+ override fun hashCode(): Int = hashCode
+
+ override fun toString() =
+ "Body{inviteCode=$inviteCode, name=$name, slug=$slug, additionalProperties=$additionalProperties}"
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return other is WorkspaceUpdateParams &&
+ workspaceId == other.workspaceId &&
+ body == other.body &&
+ additionalHeaders == other.additionalHeaders &&
+ additionalQueryParams == other.additionalQueryParams
+ }
+
+ override fun hashCode(): Int =
+ Objects.hash(workspaceId, body, additionalHeaders, additionalQueryParams)
+
+ override fun toString() =
+ "WorkspaceUpdateParams{workspaceId=$workspaceId, body=$body, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+}
diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/workspaces/WorkspaceUpdateResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/workspaces/WorkspaceUpdateResponse.kt
new file mode 100644
index 00000000..2b9e4048
--- /dev/null
+++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/workspaces/WorkspaceUpdateResponse.kt
@@ -0,0 +1,1250 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package com.openlayer.api.models.workspaces
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter
+import com.fasterxml.jackson.annotation.JsonAnySetter
+import com.fasterxml.jackson.annotation.JsonCreator
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.openlayer.api.core.Enum
+import com.openlayer.api.core.ExcludeMissing
+import com.openlayer.api.core.JsonField
+import com.openlayer.api.core.JsonMissing
+import com.openlayer.api.core.JsonValue
+import com.openlayer.api.core.checkKnown
+import com.openlayer.api.core.checkRequired
+import com.openlayer.api.core.toImmutable
+import com.openlayer.api.errors.OpenlayerInvalidDataException
+import java.time.LocalDate
+import java.time.OffsetDateTime
+import java.util.Collections
+import java.util.Objects
+import java.util.Optional
+import kotlin.jvm.optionals.getOrNull
+
+class WorkspaceUpdateResponse
+@JsonCreator(mode = JsonCreator.Mode.DISABLED)
+private constructor(
+ private val id: JsonField,
+ private val creatorId: JsonField,
+ private val dateCreated: JsonField,
+ private val dateUpdated: JsonField,
+ private val inviteCount: JsonField,
+ private val memberCount: JsonField,
+ private val name: JsonField,
+ private val periodEndDate: JsonField,
+ private val periodStartDate: JsonField,
+ private val projectCount: JsonField,
+ private val slug: JsonField,
+ private val status: JsonField,
+ private val inviteCode: JsonField,
+ private val monthlyUsage: JsonField>,
+ private val samlOnlyAccess: JsonField,
+ private val wildcardDomains: JsonField>,
+ private val additionalProperties: MutableMap,
+) {
+
+ @JsonCreator
+ private constructor(
+ @JsonProperty("id") @ExcludeMissing id: JsonField = JsonMissing.of(),
+ @JsonProperty("creatorId") @ExcludeMissing creatorId: JsonField = JsonMissing.of(),
+ @JsonProperty("dateCreated")
+ @ExcludeMissing
+ dateCreated: JsonField = JsonMissing.of(),
+ @JsonProperty("dateUpdated")
+ @ExcludeMissing
+ dateUpdated: JsonField = JsonMissing.of(),
+ @JsonProperty("inviteCount")
+ @ExcludeMissing
+ inviteCount: JsonField = JsonMissing.of(),
+ @JsonProperty("memberCount")
+ @ExcludeMissing
+ memberCount: JsonField = JsonMissing.of(),
+ @JsonProperty("name") @ExcludeMissing name: JsonField = JsonMissing.of(),
+ @JsonProperty("periodEndDate")
+ @ExcludeMissing
+ periodEndDate: JsonField = JsonMissing.of(),
+ @JsonProperty("periodStartDate")
+ @ExcludeMissing
+ periodStartDate: JsonField = JsonMissing.of(),
+ @JsonProperty("projectCount")
+ @ExcludeMissing
+ projectCount: JsonField = JsonMissing.of(),
+ @JsonProperty("slug") @ExcludeMissing slug: JsonField = JsonMissing.of(),
+ @JsonProperty("status") @ExcludeMissing status: JsonField = JsonMissing.of(),
+ @JsonProperty("inviteCode")
+ @ExcludeMissing
+ inviteCode: JsonField = JsonMissing.of(),
+ @JsonProperty("monthlyUsage")
+ @ExcludeMissing
+ monthlyUsage: JsonField> = JsonMissing.of(),
+ @JsonProperty("samlOnlyAccess")
+ @ExcludeMissing
+ samlOnlyAccess: JsonField = JsonMissing.of(),
+ @JsonProperty("wildcardDomains")
+ @ExcludeMissing
+ wildcardDomains: JsonField> = JsonMissing.of(),
+ ) : this(
+ id,
+ creatorId,
+ dateCreated,
+ dateUpdated,
+ inviteCount,
+ memberCount,
+ name,
+ periodEndDate,
+ periodStartDate,
+ projectCount,
+ slug,
+ status,
+ inviteCode,
+ monthlyUsage,
+ samlOnlyAccess,
+ wildcardDomains,
+ mutableMapOf(),
+ )
+
+ /**
+ * The workspace id.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun id(): String = id.getRequired("id")
+
+ /**
+ * The workspace creator id.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun creatorId(): Optional = creatorId.getOptional("creatorId")
+
+ /**
+ * The workspace creation date.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun dateCreated(): OffsetDateTime = dateCreated.getRequired("dateCreated")
+
+ /**
+ * The workspace last updated date.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun dateUpdated(): OffsetDateTime = dateUpdated.getRequired("dateUpdated")
+
+ /**
+ * The number of invites in the workspace.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun inviteCount(): Long = inviteCount.getRequired("inviteCount")
+
+ /**
+ * The number of members in the workspace.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun memberCount(): Long = memberCount.getRequired("memberCount")
+
+ /**
+ * The workspace name.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun name(): String = name.getRequired("name")
+
+ /**
+ * The end date of the current billing period.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun periodEndDate(): Optional = periodEndDate.getOptional("periodEndDate")
+
+ /**
+ * The start date of the current billing period.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun periodStartDate(): Optional = periodStartDate.getOptional("periodStartDate")
+
+ /**
+ * The number of projects in the workspace.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun projectCount(): Long = projectCount.getRequired("projectCount")
+
+ /**
+ * The workspace slug.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun slug(): String = slug.getRequired("slug")
+
+ /**
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type or is
+ * unexpectedly missing or null (e.g. if the server responded with an unexpected value).
+ */
+ fun status(): Status = status.getRequired("status")
+
+ /**
+ * The workspace invite code.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun inviteCode(): Optional = inviteCode.getOptional("inviteCode")
+
+ /**
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun monthlyUsage(): Optional> = monthlyUsage.getOptional("monthlyUsage")
+
+ /**
+ * Whether the workspace only allows SAML authentication.
+ *
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun samlOnlyAccess(): Optional = samlOnlyAccess.getOptional("samlOnlyAccess")
+
+ /**
+ * @throws OpenlayerInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun wildcardDomains(): Optional> = wildcardDomains.getOptional("wildcardDomains")
+
+ /**
+ * Returns the raw JSON value of [id].
+ *
+ * Unlike [id], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("id") @ExcludeMissing fun _id(): JsonField = id
+
+ /**
+ * Returns the raw JSON value of [creatorId].
+ *
+ * Unlike [creatorId], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("creatorId") @ExcludeMissing fun _creatorId(): JsonField = creatorId
+
+ /**
+ * Returns the raw JSON value of [dateCreated].
+ *
+ * Unlike [dateCreated], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("dateCreated")
+ @ExcludeMissing
+ fun _dateCreated(): JsonField = dateCreated
+
+ /**
+ * Returns the raw JSON value of [dateUpdated].
+ *
+ * Unlike [dateUpdated], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("dateUpdated")
+ @ExcludeMissing
+ fun _dateUpdated(): JsonField = dateUpdated
+
+ /**
+ * Returns the raw JSON value of [inviteCount].
+ *
+ * Unlike [inviteCount], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("inviteCount") @ExcludeMissing fun _inviteCount(): JsonField = inviteCount
+
+ /**
+ * Returns the raw JSON value of [memberCount].
+ *
+ * Unlike [memberCount], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("memberCount") @ExcludeMissing fun _memberCount(): JsonField = memberCount
+
+ /**
+ * Returns the raw JSON value of [name].
+ *
+ * Unlike [name], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("name") @ExcludeMissing fun _name(): JsonField = name
+
+ /**
+ * Returns the raw JSON value of [periodEndDate].
+ *
+ * Unlike [periodEndDate], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("periodEndDate")
+ @ExcludeMissing
+ fun _periodEndDate(): JsonField = periodEndDate
+
+ /**
+ * Returns the raw JSON value of [periodStartDate].
+ *
+ * Unlike [periodStartDate], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("periodStartDate")
+ @ExcludeMissing
+ fun _periodStartDate(): JsonField = periodStartDate
+
+ /**
+ * Returns the raw JSON value of [projectCount].
+ *
+ * Unlike [projectCount], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("projectCount")
+ @ExcludeMissing
+ fun _projectCount(): JsonField = projectCount
+
+ /**
+ * Returns the raw JSON value of [slug].
+ *
+ * Unlike [slug], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("slug") @ExcludeMissing fun _slug(): JsonField = slug
+
+ /**
+ * Returns the raw JSON value of [status].
+ *
+ * Unlike [status], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("status") @ExcludeMissing fun _status(): JsonField = status
+
+ /**
+ * Returns the raw JSON value of [inviteCode].
+ *
+ * Unlike [inviteCode], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("inviteCode") @ExcludeMissing fun _inviteCode(): JsonField = inviteCode
+
+ /**
+ * Returns the raw JSON value of [monthlyUsage].
+ *
+ * Unlike [monthlyUsage], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("monthlyUsage")
+ @ExcludeMissing
+ fun _monthlyUsage(): JsonField> = monthlyUsage
+
+ /**
+ * Returns the raw JSON value of [samlOnlyAccess].
+ *
+ * Unlike [samlOnlyAccess], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("samlOnlyAccess")
+ @ExcludeMissing
+ fun _samlOnlyAccess(): JsonField = samlOnlyAccess
+
+ /**
+ * Returns the raw JSON value of [wildcardDomains].
+ *
+ * Unlike [wildcardDomains], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("wildcardDomains")
+ @ExcludeMissing
+ fun _wildcardDomains(): JsonField> = wildcardDomains
+
+ @JsonAnySetter
+ private fun putAdditionalProperty(key: String, value: JsonValue) {
+ additionalProperties.put(key, value)
+ }
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map =
+ Collections.unmodifiableMap(additionalProperties)
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ /**
+ * Returns a mutable builder for constructing an instance of [WorkspaceUpdateResponse].
+ *
+ * The following fields are required:
+ * ```java
+ * .id()
+ * .creatorId()
+ * .dateCreated()
+ * .dateUpdated()
+ * .inviteCount()
+ * .memberCount()
+ * .name()
+ * .periodEndDate()
+ * .periodStartDate()
+ * .projectCount()
+ * .slug()
+ * .status()
+ * ```
+ */
+ @JvmStatic fun builder() = Builder()
+ }
+
+ /** A builder for [WorkspaceUpdateResponse]. */
+ class Builder internal constructor() {
+
+ private var id: JsonField? = null
+ private var creatorId: JsonField? = null
+ private var dateCreated: JsonField? = null
+ private var dateUpdated: JsonField? = null
+ private var inviteCount: JsonField? = null
+ private var memberCount: JsonField