From 5d56754e57ac66410dba08160d168cc2f9e1d6d6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 24 Aug 2024 04:15:13 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API (#36) --- .../api/models/CommitTestResultListParams.kt | 26 +-- .../models/CommitTestResultListResponse.kt | 191 +----------------- .../models/InferencePipelineRetrieveParams.kt | 27 +-- .../InferencePipelineTestResultListParams.kt | 26 +-- ...InferencePipelineTestResultListResponse.kt | 191 +----------------- .../api/models/ProjectCommitListParams.kt | 27 +-- .../api/models/ProjectCommitListResponse.kt | 191 +----------------- .../ProjectInferencePipelineListParams.kt | 29 +-- .../ProjectInferencePipelineListResponse.kt | 191 +----------------- .../openlayer/api/models/ProjectListParams.kt | 26 +-- .../api/models/ProjectListResponse.kt | 191 +----------------- .../CommitTestResultListResponseTest.kt | 19 -- ...rencePipelineTestResultListResponseTest.kt | 19 -- .../models/ProjectCommitListResponseTest.kt | 19 -- ...rojectInferencePipelineListResponseTest.kt | 19 -- .../api/models/ProjectListResponseTest.kt | 19 -- 16 files changed, 27 insertions(+), 1184 deletions(-) diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListParams.kt index 6b1c3e4..67f54ef 100755 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListParams.kt @@ -23,7 +23,6 @@ constructor( private val type: Type?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun projectVersionId(): String = projectVersionId @@ -63,8 +62,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -78,8 +75,7 @@ constructor( this.status == other.status && this.type == other.type && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -92,12 +88,11 @@ constructor( type, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "CommitTestResultListParams{projectVersionId=$projectVersionId, includeArchived=$includeArchived, page=$page, perPage=$perPage, status=$status, type=$type, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "CommitTestResultListParams{projectVersionId=$projectVersionId, includeArchived=$includeArchived, page=$page, perPage=$perPage, status=$status, type=$type, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -117,7 +112,6 @@ constructor( private var type: Type? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(commitTestResultListParams: CommitTestResultListParams) = apply { @@ -129,7 +123,6 @@ constructor( this.type = commitTestResultListParams.type additionalQueryParams(commitTestResultListParams.additionalQueryParams) additionalHeaders(commitTestResultListParams.additionalHeaders) - additionalBodyProperties(commitTestResultListParams.additionalBodyProperties) } fun projectVersionId(projectVersionId: String) = apply { @@ -199,20 +192,6 @@ constructor( fun removeHeader(name: String) = apply { this.additionalHeaders.put(name, mutableListOf()) } - fun additionalBodyProperties(additionalBodyProperties: Map) = apply { - this.additionalBodyProperties.clear() - this.additionalBodyProperties.putAll(additionalBodyProperties) - } - - fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply { - this.additionalBodyProperties.put(key, value) - } - - fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) = - apply { - this.additionalBodyProperties.putAll(additionalBodyProperties) - } - fun build(): CommitTestResultListParams = CommitTestResultListParams( checkNotNull(projectVersionId) { "`projectVersionId` is required but was not set" }, @@ -223,7 +202,6 @@ constructor( type, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListResponse.kt index 731f3b5..9c6554a 100755 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/CommitTestResultListResponse.kt @@ -32,7 +32,6 @@ import java.util.Optional @NoAutoDetect class CommitTestResultListResponse private constructor( - private val _meta: JsonField<_Meta>, private val items: JsonField>, private val additionalProperties: Map, ) { @@ -41,12 +40,8 @@ private constructor( private var hashCode: Int = 0 - fun _meta(): _Meta = _meta.getRequired("_meta") - fun items(): List = items.getRequired("items") - @JsonProperty("_meta") @ExcludeMissing fun __meta() = _meta - @JsonProperty("items") @ExcludeMissing fun _items() = items @JsonAnyGetter @@ -55,7 +50,6 @@ private constructor( fun validate(): CommitTestResultListResponse = apply { if (!validated) { - _meta().validate() items().forEach { it.validate() } validated = true } @@ -69,25 +63,19 @@ private constructor( } return other is CommitTestResultListResponse && - this._meta == other._meta && this.items == other.items && this.additionalProperties == other.additionalProperties } override fun hashCode(): Int { if (hashCode == 0) { - hashCode = - Objects.hash( - _meta, - items, - additionalProperties, - ) + hashCode = Objects.hash(items, additionalProperties) } return hashCode } override fun toString() = - "CommitTestResultListResponse{_meta=$_meta, items=$items, additionalProperties=$additionalProperties}" + "CommitTestResultListResponse{items=$items, additionalProperties=$additionalProperties}" companion object { @@ -96,23 +84,15 @@ private constructor( class Builder { - private var _meta: JsonField<_Meta> = JsonMissing.of() private var items: JsonField> = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(commitTestResultListResponse: CommitTestResultListResponse) = apply { - this._meta = commitTestResultListResponse._meta this.items = commitTestResultListResponse.items additionalProperties(commitTestResultListResponse.additionalProperties) } - fun _meta(_meta: _Meta) = _meta(JsonField.of(_meta)) - - @JsonProperty("_meta") - @ExcludeMissing - fun _meta(_meta: JsonField<_Meta>) = apply { this._meta = _meta } - fun items(items: List) = items(JsonField.of(items)) @JsonProperty("items") @@ -135,176 +115,11 @@ private constructor( fun build(): CommitTestResultListResponse = CommitTestResultListResponse( - _meta, items.map { it.toUnmodifiable() }, - additionalProperties.toUnmodifiable(), + additionalProperties.toUnmodifiable() ) } - @JsonDeserialize(builder = _Meta.Builder::class) - @NoAutoDetect - class _Meta - private constructor( - private val page: JsonField, - private val perPage: JsonField, - private val totalItems: JsonField, - private val totalPages: JsonField, - private val additionalProperties: Map, - ) { - - private var validated: Boolean = false - - private var hashCode: Int = 0 - - /** The current page. */ - fun page(): Long = page.getRequired("page") - - /** The number of items per page. */ - fun perPage(): Long = perPage.getRequired("perPage") - - /** The total number of items. */ - fun totalItems(): Long = totalItems.getRequired("totalItems") - - /** The total number of pages. */ - fun totalPages(): Long = totalPages.getRequired("totalPages") - - /** The current page. */ - @JsonProperty("page") @ExcludeMissing fun _page() = page - - /** The number of items per page. */ - @JsonProperty("perPage") @ExcludeMissing fun _perPage() = perPage - - /** The total number of items. */ - @JsonProperty("totalItems") @ExcludeMissing fun _totalItems() = totalItems - - /** The total number of pages. */ - @JsonProperty("totalPages") @ExcludeMissing fun _totalPages() = totalPages - - @JsonAnyGetter - @ExcludeMissing - fun _additionalProperties(): Map = additionalProperties - - fun validate(): _Meta = apply { - if (!validated) { - page() - perPage() - totalItems() - totalPages() - validated = true - } - } - - fun toBuilder() = Builder().from(this) - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is _Meta && - this.page == other.page && - this.perPage == other.perPage && - this.totalItems == other.totalItems && - this.totalPages == other.totalPages && - this.additionalProperties == other.additionalProperties - } - - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = - Objects.hash( - page, - perPage, - totalItems, - totalPages, - additionalProperties, - ) - } - return hashCode - } - - override fun toString() = - "_Meta{page=$page, perPage=$perPage, totalItems=$totalItems, totalPages=$totalPages, additionalProperties=$additionalProperties}" - - companion object { - - @JvmStatic fun builder() = Builder() - } - - class Builder { - - private var page: JsonField = JsonMissing.of() - private var perPage: JsonField = JsonMissing.of() - private var totalItems: JsonField = JsonMissing.of() - private var totalPages: JsonField = JsonMissing.of() - private var additionalProperties: MutableMap = mutableMapOf() - - @JvmSynthetic - internal fun from(_meta: _Meta) = apply { - this.page = _meta.page - this.perPage = _meta.perPage - this.totalItems = _meta.totalItems - this.totalPages = _meta.totalPages - additionalProperties(_meta.additionalProperties) - } - - /** The current page. */ - fun page(page: Long) = page(JsonField.of(page)) - - /** The current page. */ - @JsonProperty("page") - @ExcludeMissing - fun page(page: JsonField) = apply { this.page = page } - - /** The number of items per page. */ - fun perPage(perPage: Long) = perPage(JsonField.of(perPage)) - - /** The number of items per page. */ - @JsonProperty("perPage") - @ExcludeMissing - fun perPage(perPage: JsonField) = apply { this.perPage = perPage } - - /** The total number of items. */ - fun totalItems(totalItems: Long) = totalItems(JsonField.of(totalItems)) - - /** The total number of items. */ - @JsonProperty("totalItems") - @ExcludeMissing - fun totalItems(totalItems: JsonField) = apply { this.totalItems = totalItems } - - /** The total number of pages. */ - fun totalPages(totalPages: Long) = totalPages(JsonField.of(totalPages)) - - /** The total number of pages. */ - @JsonProperty("totalPages") - @ExcludeMissing - fun totalPages(totalPages: JsonField) = apply { this.totalPages = totalPages } - - 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(): _Meta = - _Meta( - page, - perPage, - totalItems, - totalPages, - additionalProperties.toUnmodifiable(), - ) - } - } - @JsonDeserialize(builder = Item.Builder::class) @NoAutoDetect class Item 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 1b2409f..41a7dd7 100755 --- 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,7 +2,6 @@ package com.openlayer.api.models -import com.openlayer.api.core.JsonValue import com.openlayer.api.core.NoAutoDetect import com.openlayer.api.core.toUnmodifiable import com.openlayer.api.models.* @@ -13,7 +12,6 @@ constructor( private val inferencePipelineId: String, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun inferencePipelineId(): String = inferencePipelineId @@ -33,8 +31,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -43,8 +39,7 @@ constructor( return other is InferencePipelineRetrieveParams && this.inferencePipelineId == other.inferencePipelineId && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -52,12 +47,11 @@ constructor( inferencePipelineId, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "InferencePipelineRetrieveParams{inferencePipelineId=$inferencePipelineId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "InferencePipelineRetrieveParams{inferencePipelineId=$inferencePipelineId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -72,7 +66,6 @@ constructor( private var inferencePipelineId: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(inferencePipelineRetrieveParams: InferencePipelineRetrieveParams) = @@ -80,7 +73,6 @@ constructor( this.inferencePipelineId = inferencePipelineRetrieveParams.inferencePipelineId additionalQueryParams(inferencePipelineRetrieveParams.additionalQueryParams) additionalHeaders(inferencePipelineRetrieveParams.additionalHeaders) - additionalBodyProperties(inferencePipelineRetrieveParams.additionalBodyProperties) } fun inferencePipelineId(inferencePipelineId: String) = apply { @@ -127,20 +119,6 @@ constructor( fun removeHeader(name: String) = apply { this.additionalHeaders.put(name, mutableListOf()) } - fun additionalBodyProperties(additionalBodyProperties: Map) = apply { - this.additionalBodyProperties.clear() - this.additionalBodyProperties.putAll(additionalBodyProperties) - } - - fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply { - this.additionalBodyProperties.put(key, value) - } - - fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) = - apply { - this.additionalBodyProperties.putAll(additionalBodyProperties) - } - fun build(): InferencePipelineRetrieveParams = InferencePipelineRetrieveParams( checkNotNull(inferencePipelineId) { @@ -148,7 +126,6 @@ constructor( }, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineTestResultListParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineTestResultListParams.kt index e82d5a1..f7ca906 100755 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineTestResultListParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineTestResultListParams.kt @@ -22,7 +22,6 @@ constructor( private val type: Type?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun inferencePipelineId(): String = inferencePipelineId @@ -59,8 +58,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -73,8 +70,7 @@ constructor( this.status == other.status && this.type == other.type && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -86,12 +82,11 @@ constructor( type, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "InferencePipelineTestResultListParams{inferencePipelineId=$inferencePipelineId, page=$page, perPage=$perPage, status=$status, type=$type, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "InferencePipelineTestResultListParams{inferencePipelineId=$inferencePipelineId, page=$page, perPage=$perPage, status=$status, type=$type, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -110,7 +105,6 @@ constructor( private var type: Type? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from( @@ -123,7 +117,6 @@ constructor( this.type = inferencePipelineTestResultListParams.type additionalQueryParams(inferencePipelineTestResultListParams.additionalQueryParams) additionalHeaders(inferencePipelineTestResultListParams.additionalHeaders) - additionalBodyProperties(inferencePipelineTestResultListParams.additionalBodyProperties) } fun inferencePipelineId(inferencePipelineId: String) = apply { @@ -188,20 +181,6 @@ constructor( fun removeHeader(name: String) = apply { this.additionalHeaders.put(name, mutableListOf()) } - fun additionalBodyProperties(additionalBodyProperties: Map) = apply { - this.additionalBodyProperties.clear() - this.additionalBodyProperties.putAll(additionalBodyProperties) - } - - fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply { - this.additionalBodyProperties.put(key, value) - } - - fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) = - apply { - this.additionalBodyProperties.putAll(additionalBodyProperties) - } - fun build(): InferencePipelineTestResultListParams = InferencePipelineTestResultListParams( checkNotNull(inferencePipelineId) { @@ -213,7 +192,6 @@ constructor( type, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineTestResultListResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineTestResultListResponse.kt index 045ce71..06f8ed6 100755 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineTestResultListResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineTestResultListResponse.kt @@ -32,7 +32,6 @@ import java.util.Optional @NoAutoDetect class InferencePipelineTestResultListResponse private constructor( - private val _meta: JsonField<_Meta>, private val items: JsonField>, private val additionalProperties: Map, ) { @@ -41,12 +40,8 @@ private constructor( private var hashCode: Int = 0 - fun _meta(): _Meta = _meta.getRequired("_meta") - fun items(): List = items.getRequired("items") - @JsonProperty("_meta") @ExcludeMissing fun __meta() = _meta - @JsonProperty("items") @ExcludeMissing fun _items() = items @JsonAnyGetter @@ -55,7 +50,6 @@ private constructor( fun validate(): InferencePipelineTestResultListResponse = apply { if (!validated) { - _meta().validate() items().forEach { it.validate() } validated = true } @@ -69,25 +63,19 @@ private constructor( } return other is InferencePipelineTestResultListResponse && - this._meta == other._meta && this.items == other.items && this.additionalProperties == other.additionalProperties } override fun hashCode(): Int { if (hashCode == 0) { - hashCode = - Objects.hash( - _meta, - items, - additionalProperties, - ) + hashCode = Objects.hash(items, additionalProperties) } return hashCode } override fun toString() = - "InferencePipelineTestResultListResponse{_meta=$_meta, items=$items, additionalProperties=$additionalProperties}" + "InferencePipelineTestResultListResponse{items=$items, additionalProperties=$additionalProperties}" companion object { @@ -96,7 +84,6 @@ private constructor( class Builder { - private var _meta: JsonField<_Meta> = JsonMissing.of() private var items: JsonField> = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -104,17 +91,10 @@ private constructor( internal fun from( inferencePipelineTestResultListResponse: InferencePipelineTestResultListResponse ) = apply { - this._meta = inferencePipelineTestResultListResponse._meta this.items = inferencePipelineTestResultListResponse.items additionalProperties(inferencePipelineTestResultListResponse.additionalProperties) } - fun _meta(_meta: _Meta) = _meta(JsonField.of(_meta)) - - @JsonProperty("_meta") - @ExcludeMissing - fun _meta(_meta: JsonField<_Meta>) = apply { this._meta = _meta } - fun items(items: List) = items(JsonField.of(items)) @JsonProperty("items") @@ -137,176 +117,11 @@ private constructor( fun build(): InferencePipelineTestResultListResponse = InferencePipelineTestResultListResponse( - _meta, items.map { it.toUnmodifiable() }, - additionalProperties.toUnmodifiable(), + additionalProperties.toUnmodifiable() ) } - @JsonDeserialize(builder = _Meta.Builder::class) - @NoAutoDetect - class _Meta - private constructor( - private val page: JsonField, - private val perPage: JsonField, - private val totalItems: JsonField, - private val totalPages: JsonField, - private val additionalProperties: Map, - ) { - - private var validated: Boolean = false - - private var hashCode: Int = 0 - - /** The current page. */ - fun page(): Long = page.getRequired("page") - - /** The number of items per page. */ - fun perPage(): Long = perPage.getRequired("perPage") - - /** The total number of items. */ - fun totalItems(): Long = totalItems.getRequired("totalItems") - - /** The total number of pages. */ - fun totalPages(): Long = totalPages.getRequired("totalPages") - - /** The current page. */ - @JsonProperty("page") @ExcludeMissing fun _page() = page - - /** The number of items per page. */ - @JsonProperty("perPage") @ExcludeMissing fun _perPage() = perPage - - /** The total number of items. */ - @JsonProperty("totalItems") @ExcludeMissing fun _totalItems() = totalItems - - /** The total number of pages. */ - @JsonProperty("totalPages") @ExcludeMissing fun _totalPages() = totalPages - - @JsonAnyGetter - @ExcludeMissing - fun _additionalProperties(): Map = additionalProperties - - fun validate(): _Meta = apply { - if (!validated) { - page() - perPage() - totalItems() - totalPages() - validated = true - } - } - - fun toBuilder() = Builder().from(this) - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is _Meta && - this.page == other.page && - this.perPage == other.perPage && - this.totalItems == other.totalItems && - this.totalPages == other.totalPages && - this.additionalProperties == other.additionalProperties - } - - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = - Objects.hash( - page, - perPage, - totalItems, - totalPages, - additionalProperties, - ) - } - return hashCode - } - - override fun toString() = - "_Meta{page=$page, perPage=$perPage, totalItems=$totalItems, totalPages=$totalPages, additionalProperties=$additionalProperties}" - - companion object { - - @JvmStatic fun builder() = Builder() - } - - class Builder { - - private var page: JsonField = JsonMissing.of() - private var perPage: JsonField = JsonMissing.of() - private var totalItems: JsonField = JsonMissing.of() - private var totalPages: JsonField = JsonMissing.of() - private var additionalProperties: MutableMap = mutableMapOf() - - @JvmSynthetic - internal fun from(_meta: _Meta) = apply { - this.page = _meta.page - this.perPage = _meta.perPage - this.totalItems = _meta.totalItems - this.totalPages = _meta.totalPages - additionalProperties(_meta.additionalProperties) - } - - /** The current page. */ - fun page(page: Long) = page(JsonField.of(page)) - - /** The current page. */ - @JsonProperty("page") - @ExcludeMissing - fun page(page: JsonField) = apply { this.page = page } - - /** The number of items per page. */ - fun perPage(perPage: Long) = perPage(JsonField.of(perPage)) - - /** The number of items per page. */ - @JsonProperty("perPage") - @ExcludeMissing - fun perPage(perPage: JsonField) = apply { this.perPage = perPage } - - /** The total number of items. */ - fun totalItems(totalItems: Long) = totalItems(JsonField.of(totalItems)) - - /** The total number of items. */ - @JsonProperty("totalItems") - @ExcludeMissing - fun totalItems(totalItems: JsonField) = apply { this.totalItems = totalItems } - - /** The total number of pages. */ - fun totalPages(totalPages: Long) = totalPages(JsonField.of(totalPages)) - - /** The total number of pages. */ - @JsonProperty("totalPages") - @ExcludeMissing - fun totalPages(totalPages: JsonField) = apply { this.totalPages = totalPages } - - 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(): _Meta = - _Meta( - page, - perPage, - totalItems, - totalPages, - additionalProperties.toUnmodifiable(), - ) - } - } - @JsonDeserialize(builder = Item.Builder::class) @NoAutoDetect class Item diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitListParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitListParams.kt index 9266137..70182de 100755 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitListParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitListParams.kt @@ -2,7 +2,6 @@ package com.openlayer.api.models -import com.openlayer.api.core.JsonValue import com.openlayer.api.core.NoAutoDetect import com.openlayer.api.core.toUnmodifiable import com.openlayer.api.models.* @@ -16,7 +15,6 @@ constructor( private val perPage: Long?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun projectId(): String = projectId @@ -47,8 +45,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -59,8 +55,7 @@ constructor( this.page == other.page && this.perPage == other.perPage && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -70,12 +65,11 @@ constructor( perPage, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ProjectCommitListParams{projectId=$projectId, page=$page, perPage=$perPage, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ProjectCommitListParams{projectId=$projectId, page=$page, perPage=$perPage, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -92,7 +86,6 @@ constructor( private var perPage: Long? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(projectCommitListParams: ProjectCommitListParams) = apply { @@ -101,7 +94,6 @@ constructor( this.perPage = projectCommitListParams.perPage additionalQueryParams(projectCommitListParams.additionalQueryParams) additionalHeaders(projectCommitListParams.additionalHeaders) - additionalBodyProperties(projectCommitListParams.additionalBodyProperties) } fun projectId(projectId: String) = apply { this.projectId = projectId } @@ -152,20 +144,6 @@ constructor( fun removeHeader(name: String) = apply { this.additionalHeaders.put(name, mutableListOf()) } - fun additionalBodyProperties(additionalBodyProperties: Map) = apply { - this.additionalBodyProperties.clear() - this.additionalBodyProperties.putAll(additionalBodyProperties) - } - - fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply { - this.additionalBodyProperties.put(key, value) - } - - fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) = - apply { - this.additionalBodyProperties.putAll(additionalBodyProperties) - } - fun build(): ProjectCommitListParams = ProjectCommitListParams( checkNotNull(projectId) { "`projectId` is required but was not set" }, @@ -173,7 +151,6 @@ constructor( perPage, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitListResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitListResponse.kt index da9d1fd..ee04f83 100755 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitListResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectCommitListResponse.kt @@ -23,7 +23,6 @@ import java.util.Optional @NoAutoDetect class ProjectCommitListResponse private constructor( - private val _meta: JsonField<_Meta>, private val items: JsonField>, private val additionalProperties: Map, ) { @@ -32,12 +31,8 @@ private constructor( private var hashCode: Int = 0 - fun _meta(): _Meta = _meta.getRequired("_meta") - fun items(): List = items.getRequired("items") - @JsonProperty("_meta") @ExcludeMissing fun __meta() = _meta - @JsonProperty("items") @ExcludeMissing fun _items() = items @JsonAnyGetter @@ -46,7 +41,6 @@ private constructor( fun validate(): ProjectCommitListResponse = apply { if (!validated) { - _meta().validate() items().forEach { it.validate() } validated = true } @@ -60,25 +54,19 @@ private constructor( } return other is ProjectCommitListResponse && - this._meta == other._meta && this.items == other.items && this.additionalProperties == other.additionalProperties } override fun hashCode(): Int { if (hashCode == 0) { - hashCode = - Objects.hash( - _meta, - items, - additionalProperties, - ) + hashCode = Objects.hash(items, additionalProperties) } return hashCode } override fun toString() = - "ProjectCommitListResponse{_meta=$_meta, items=$items, additionalProperties=$additionalProperties}" + "ProjectCommitListResponse{items=$items, additionalProperties=$additionalProperties}" companion object { @@ -87,23 +75,15 @@ private constructor( class Builder { - private var _meta: JsonField<_Meta> = JsonMissing.of() private var items: JsonField> = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(projectCommitListResponse: ProjectCommitListResponse) = apply { - this._meta = projectCommitListResponse._meta this.items = projectCommitListResponse.items additionalProperties(projectCommitListResponse.additionalProperties) } - fun _meta(_meta: _Meta) = _meta(JsonField.of(_meta)) - - @JsonProperty("_meta") - @ExcludeMissing - fun _meta(_meta: JsonField<_Meta>) = apply { this._meta = _meta } - fun items(items: List) = items(JsonField.of(items)) @JsonProperty("items") @@ -126,176 +106,11 @@ private constructor( fun build(): ProjectCommitListResponse = ProjectCommitListResponse( - _meta, items.map { it.toUnmodifiable() }, - additionalProperties.toUnmodifiable(), + additionalProperties.toUnmodifiable() ) } - @JsonDeserialize(builder = _Meta.Builder::class) - @NoAutoDetect - class _Meta - private constructor( - private val page: JsonField, - private val perPage: JsonField, - private val totalItems: JsonField, - private val totalPages: JsonField, - private val additionalProperties: Map, - ) { - - private var validated: Boolean = false - - private var hashCode: Int = 0 - - /** The current page. */ - fun page(): Long = page.getRequired("page") - - /** The number of items per page. */ - fun perPage(): Long = perPage.getRequired("perPage") - - /** The total number of items. */ - fun totalItems(): Long = totalItems.getRequired("totalItems") - - /** The total number of pages. */ - fun totalPages(): Long = totalPages.getRequired("totalPages") - - /** The current page. */ - @JsonProperty("page") @ExcludeMissing fun _page() = page - - /** The number of items per page. */ - @JsonProperty("perPage") @ExcludeMissing fun _perPage() = perPage - - /** The total number of items. */ - @JsonProperty("totalItems") @ExcludeMissing fun _totalItems() = totalItems - - /** The total number of pages. */ - @JsonProperty("totalPages") @ExcludeMissing fun _totalPages() = totalPages - - @JsonAnyGetter - @ExcludeMissing - fun _additionalProperties(): Map = additionalProperties - - fun validate(): _Meta = apply { - if (!validated) { - page() - perPage() - totalItems() - totalPages() - validated = true - } - } - - fun toBuilder() = Builder().from(this) - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is _Meta && - this.page == other.page && - this.perPage == other.perPage && - this.totalItems == other.totalItems && - this.totalPages == other.totalPages && - this.additionalProperties == other.additionalProperties - } - - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = - Objects.hash( - page, - perPage, - totalItems, - totalPages, - additionalProperties, - ) - } - return hashCode - } - - override fun toString() = - "_Meta{page=$page, perPage=$perPage, totalItems=$totalItems, totalPages=$totalPages, additionalProperties=$additionalProperties}" - - companion object { - - @JvmStatic fun builder() = Builder() - } - - class Builder { - - private var page: JsonField = JsonMissing.of() - private var perPage: JsonField = JsonMissing.of() - private var totalItems: JsonField = JsonMissing.of() - private var totalPages: JsonField = JsonMissing.of() - private var additionalProperties: MutableMap = mutableMapOf() - - @JvmSynthetic - internal fun from(_meta: _Meta) = apply { - this.page = _meta.page - this.perPage = _meta.perPage - this.totalItems = _meta.totalItems - this.totalPages = _meta.totalPages - additionalProperties(_meta.additionalProperties) - } - - /** The current page. */ - fun page(page: Long) = page(JsonField.of(page)) - - /** The current page. */ - @JsonProperty("page") - @ExcludeMissing - fun page(page: JsonField) = apply { this.page = page } - - /** The number of items per page. */ - fun perPage(perPage: Long) = perPage(JsonField.of(perPage)) - - /** The number of items per page. */ - @JsonProperty("perPage") - @ExcludeMissing - fun perPage(perPage: JsonField) = apply { this.perPage = perPage } - - /** The total number of items. */ - fun totalItems(totalItems: Long) = totalItems(JsonField.of(totalItems)) - - /** The total number of items. */ - @JsonProperty("totalItems") - @ExcludeMissing - fun totalItems(totalItems: JsonField) = apply { this.totalItems = totalItems } - - /** The total number of pages. */ - fun totalPages(totalPages: Long) = totalPages(JsonField.of(totalPages)) - - /** The total number of pages. */ - @JsonProperty("totalPages") - @ExcludeMissing - fun totalPages(totalPages: JsonField) = apply { this.totalPages = totalPages } - - 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(): _Meta = - _Meta( - page, - perPage, - totalItems, - totalPages, - additionalProperties.toUnmodifiable(), - ) - } - } - @JsonDeserialize(builder = Item.Builder::class) @NoAutoDetect class Item diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParams.kt index 1b909ab..44e3b6a 100755 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineListParams.kt @@ -2,7 +2,6 @@ package com.openlayer.api.models -import com.openlayer.api.core.JsonValue import com.openlayer.api.core.NoAutoDetect import com.openlayer.api.core.toUnmodifiable import com.openlayer.api.models.* @@ -17,7 +16,6 @@ constructor( private val perPage: Long?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun projectId(): String = projectId @@ -51,8 +49,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -64,8 +60,7 @@ constructor( this.page == other.page && this.perPage == other.perPage && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -76,12 +71,11 @@ constructor( perPage, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ProjectInferencePipelineListParams{projectId=$projectId, name=$name, page=$page, perPage=$perPage, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ProjectInferencePipelineListParams{projectId=$projectId, name=$name, page=$page, perPage=$perPage, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -99,7 +93,6 @@ constructor( private var perPage: Long? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(projectInferencePipelineListParams: ProjectInferencePipelineListParams) = @@ -110,9 +103,6 @@ constructor( this.perPage = projectInferencePipelineListParams.perPage additionalQueryParams(projectInferencePipelineListParams.additionalQueryParams) additionalHeaders(projectInferencePipelineListParams.additionalHeaders) - additionalBodyProperties( - projectInferencePipelineListParams.additionalBodyProperties - ) } fun projectId(projectId: String) = apply { this.projectId = projectId } @@ -166,20 +156,6 @@ constructor( fun removeHeader(name: String) = apply { this.additionalHeaders.put(name, mutableListOf()) } - fun additionalBodyProperties(additionalBodyProperties: Map) = apply { - this.additionalBodyProperties.clear() - this.additionalBodyProperties.putAll(additionalBodyProperties) - } - - fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply { - this.additionalBodyProperties.put(key, value) - } - - fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) = - apply { - this.additionalBodyProperties.putAll(additionalBodyProperties) - } - fun build(): ProjectInferencePipelineListParams = ProjectInferencePipelineListParams( checkNotNull(projectId) { "`projectId` is required but was not set" }, @@ -188,7 +164,6 @@ constructor( perPage, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineListResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineListResponse.kt index cb9e840..7e9850f 100755 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineListResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectInferencePipelineListResponse.kt @@ -23,7 +23,6 @@ import java.util.Optional @NoAutoDetect class ProjectInferencePipelineListResponse private constructor( - private val _meta: JsonField<_Meta>, private val items: JsonField>, private val additionalProperties: Map, ) { @@ -32,12 +31,8 @@ private constructor( private var hashCode: Int = 0 - fun _meta(): _Meta = _meta.getRequired("_meta") - fun items(): List = items.getRequired("items") - @JsonProperty("_meta") @ExcludeMissing fun __meta() = _meta - @JsonProperty("items") @ExcludeMissing fun _items() = items @JsonAnyGetter @@ -46,7 +41,6 @@ private constructor( fun validate(): ProjectInferencePipelineListResponse = apply { if (!validated) { - _meta().validate() items().forEach { it.validate() } validated = true } @@ -60,25 +54,19 @@ private constructor( } return other is ProjectInferencePipelineListResponse && - this._meta == other._meta && this.items == other.items && this.additionalProperties == other.additionalProperties } override fun hashCode(): Int { if (hashCode == 0) { - hashCode = - Objects.hash( - _meta, - items, - additionalProperties, - ) + hashCode = Objects.hash(items, additionalProperties) } return hashCode } override fun toString() = - "ProjectInferencePipelineListResponse{_meta=$_meta, items=$items, additionalProperties=$additionalProperties}" + "ProjectInferencePipelineListResponse{items=$items, additionalProperties=$additionalProperties}" companion object { @@ -87,7 +75,6 @@ private constructor( class Builder { - private var _meta: JsonField<_Meta> = JsonMissing.of() private var items: JsonField> = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @@ -95,17 +82,10 @@ private constructor( internal fun from( projectInferencePipelineListResponse: ProjectInferencePipelineListResponse ) = apply { - this._meta = projectInferencePipelineListResponse._meta this.items = projectInferencePipelineListResponse.items additionalProperties(projectInferencePipelineListResponse.additionalProperties) } - fun _meta(_meta: _Meta) = _meta(JsonField.of(_meta)) - - @JsonProperty("_meta") - @ExcludeMissing - fun _meta(_meta: JsonField<_Meta>) = apply { this._meta = _meta } - fun items(items: List) = items(JsonField.of(items)) @JsonProperty("items") @@ -128,176 +108,11 @@ private constructor( fun build(): ProjectInferencePipelineListResponse = ProjectInferencePipelineListResponse( - _meta, items.map { it.toUnmodifiable() }, - additionalProperties.toUnmodifiable(), + additionalProperties.toUnmodifiable() ) } - @JsonDeserialize(builder = _Meta.Builder::class) - @NoAutoDetect - class _Meta - private constructor( - private val page: JsonField, - private val perPage: JsonField, - private val totalItems: JsonField, - private val totalPages: JsonField, - private val additionalProperties: Map, - ) { - - private var validated: Boolean = false - - private var hashCode: Int = 0 - - /** The current page. */ - fun page(): Long = page.getRequired("page") - - /** The number of items per page. */ - fun perPage(): Long = perPage.getRequired("perPage") - - /** The total number of items. */ - fun totalItems(): Long = totalItems.getRequired("totalItems") - - /** The total number of pages. */ - fun totalPages(): Long = totalPages.getRequired("totalPages") - - /** The current page. */ - @JsonProperty("page") @ExcludeMissing fun _page() = page - - /** The number of items per page. */ - @JsonProperty("perPage") @ExcludeMissing fun _perPage() = perPage - - /** The total number of items. */ - @JsonProperty("totalItems") @ExcludeMissing fun _totalItems() = totalItems - - /** The total number of pages. */ - @JsonProperty("totalPages") @ExcludeMissing fun _totalPages() = totalPages - - @JsonAnyGetter - @ExcludeMissing - fun _additionalProperties(): Map = additionalProperties - - fun validate(): _Meta = apply { - if (!validated) { - page() - perPage() - totalItems() - totalPages() - validated = true - } - } - - fun toBuilder() = Builder().from(this) - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is _Meta && - this.page == other.page && - this.perPage == other.perPage && - this.totalItems == other.totalItems && - this.totalPages == other.totalPages && - this.additionalProperties == other.additionalProperties - } - - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = - Objects.hash( - page, - perPage, - totalItems, - totalPages, - additionalProperties, - ) - } - return hashCode - } - - override fun toString() = - "_Meta{page=$page, perPage=$perPage, totalItems=$totalItems, totalPages=$totalPages, additionalProperties=$additionalProperties}" - - companion object { - - @JvmStatic fun builder() = Builder() - } - - class Builder { - - private var page: JsonField = JsonMissing.of() - private var perPage: JsonField = JsonMissing.of() - private var totalItems: JsonField = JsonMissing.of() - private var totalPages: JsonField = JsonMissing.of() - private var additionalProperties: MutableMap = mutableMapOf() - - @JvmSynthetic - internal fun from(_meta: _Meta) = apply { - this.page = _meta.page - this.perPage = _meta.perPage - this.totalItems = _meta.totalItems - this.totalPages = _meta.totalPages - additionalProperties(_meta.additionalProperties) - } - - /** The current page. */ - fun page(page: Long) = page(JsonField.of(page)) - - /** The current page. */ - @JsonProperty("page") - @ExcludeMissing - fun page(page: JsonField) = apply { this.page = page } - - /** The number of items per page. */ - fun perPage(perPage: Long) = perPage(JsonField.of(perPage)) - - /** The number of items per page. */ - @JsonProperty("perPage") - @ExcludeMissing - fun perPage(perPage: JsonField) = apply { this.perPage = perPage } - - /** The total number of items. */ - fun totalItems(totalItems: Long) = totalItems(JsonField.of(totalItems)) - - /** The total number of items. */ - @JsonProperty("totalItems") - @ExcludeMissing - fun totalItems(totalItems: JsonField) = apply { this.totalItems = totalItems } - - /** The total number of pages. */ - fun totalPages(totalPages: Long) = totalPages(JsonField.of(totalPages)) - - /** The total number of pages. */ - @JsonProperty("totalPages") - @ExcludeMissing - fun totalPages(totalPages: JsonField) = apply { this.totalPages = totalPages } - - 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(): _Meta = - _Meta( - page, - perPage, - totalItems, - totalPages, - additionalProperties.toUnmodifiable(), - ) - } - } - @JsonDeserialize(builder = Item.Builder::class) @NoAutoDetect class Item diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectListParams.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectListParams.kt index b493cd2..ba784ac 100755 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectListParams.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectListParams.kt @@ -21,7 +21,6 @@ constructor( private val taskType: TaskType?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun name(): Optional = Optional.ofNullable(name) @@ -49,8 +48,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -62,8 +59,7 @@ constructor( this.perPage == other.perPage && this.taskType == other.taskType && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -74,12 +70,11 @@ constructor( taskType, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ProjectListParams{name=$name, page=$page, perPage=$perPage, taskType=$taskType, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ProjectListParams{name=$name, page=$page, perPage=$perPage, taskType=$taskType, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -97,7 +92,6 @@ constructor( private var taskType: TaskType? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(projectListParams: ProjectListParams) = apply { @@ -107,7 +101,6 @@ constructor( this.taskType = projectListParams.taskType additionalQueryParams(projectListParams.additionalQueryParams) additionalHeaders(projectListParams.additionalHeaders) - additionalBodyProperties(projectListParams.additionalBodyProperties) } /** Filter list of items by project name. */ @@ -162,20 +155,6 @@ constructor( fun removeHeader(name: String) = apply { this.additionalHeaders.put(name, mutableListOf()) } - fun additionalBodyProperties(additionalBodyProperties: Map) = apply { - this.additionalBodyProperties.clear() - this.additionalBodyProperties.putAll(additionalBodyProperties) - } - - fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply { - this.additionalBodyProperties.put(key, value) - } - - fun putAllAdditionalBodyProperties(additionalBodyProperties: Map) = - apply { - this.additionalBodyProperties.putAll(additionalBodyProperties) - } - fun build(): ProjectListParams = ProjectListParams( name, @@ -184,7 +163,6 @@ constructor( taskType, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectListResponse.kt b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectListResponse.kt index 69c6387..9c9d885 100755 --- a/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectListResponse.kt +++ b/openlayer-java-core/src/main/kotlin/com/openlayer/api/models/ProjectListResponse.kt @@ -23,7 +23,6 @@ import java.util.Optional @NoAutoDetect class ProjectListResponse private constructor( - private val _meta: JsonField<_Meta>, private val items: JsonField>, private val additionalProperties: Map, ) { @@ -32,12 +31,8 @@ private constructor( private var hashCode: Int = 0 - fun _meta(): _Meta = _meta.getRequired("_meta") - fun items(): List = items.getRequired("items") - @JsonProperty("_meta") @ExcludeMissing fun __meta() = _meta - @JsonProperty("items") @ExcludeMissing fun _items() = items @JsonAnyGetter @@ -46,7 +41,6 @@ private constructor( fun validate(): ProjectListResponse = apply { if (!validated) { - _meta().validate() items().forEach { it.validate() } validated = true } @@ -60,25 +54,19 @@ private constructor( } return other is ProjectListResponse && - this._meta == other._meta && this.items == other.items && this.additionalProperties == other.additionalProperties } override fun hashCode(): Int { if (hashCode == 0) { - hashCode = - Objects.hash( - _meta, - items, - additionalProperties, - ) + hashCode = Objects.hash(items, additionalProperties) } return hashCode } override fun toString() = - "ProjectListResponse{_meta=$_meta, items=$items, additionalProperties=$additionalProperties}" + "ProjectListResponse{items=$items, additionalProperties=$additionalProperties}" companion object { @@ -87,23 +75,15 @@ private constructor( class Builder { - private var _meta: JsonField<_Meta> = JsonMissing.of() private var items: JsonField> = JsonMissing.of() private var additionalProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(projectListResponse: ProjectListResponse) = apply { - this._meta = projectListResponse._meta this.items = projectListResponse.items additionalProperties(projectListResponse.additionalProperties) } - fun _meta(_meta: _Meta) = _meta(JsonField.of(_meta)) - - @JsonProperty("_meta") - @ExcludeMissing - fun _meta(_meta: JsonField<_Meta>) = apply { this._meta = _meta } - fun items(items: List) = items(JsonField.of(items)) @JsonProperty("items") @@ -126,176 +106,11 @@ private constructor( fun build(): ProjectListResponse = ProjectListResponse( - _meta, items.map { it.toUnmodifiable() }, - additionalProperties.toUnmodifiable(), + additionalProperties.toUnmodifiable() ) } - @JsonDeserialize(builder = _Meta.Builder::class) - @NoAutoDetect - class _Meta - private constructor( - private val page: JsonField, - private val perPage: JsonField, - private val totalItems: JsonField, - private val totalPages: JsonField, - private val additionalProperties: Map, - ) { - - private var validated: Boolean = false - - private var hashCode: Int = 0 - - /** The current page. */ - fun page(): Long = page.getRequired("page") - - /** The number of items per page. */ - fun perPage(): Long = perPage.getRequired("perPage") - - /** The total number of items. */ - fun totalItems(): Long = totalItems.getRequired("totalItems") - - /** The total number of pages. */ - fun totalPages(): Long = totalPages.getRequired("totalPages") - - /** The current page. */ - @JsonProperty("page") @ExcludeMissing fun _page() = page - - /** The number of items per page. */ - @JsonProperty("perPage") @ExcludeMissing fun _perPage() = perPage - - /** The total number of items. */ - @JsonProperty("totalItems") @ExcludeMissing fun _totalItems() = totalItems - - /** The total number of pages. */ - @JsonProperty("totalPages") @ExcludeMissing fun _totalPages() = totalPages - - @JsonAnyGetter - @ExcludeMissing - fun _additionalProperties(): Map = additionalProperties - - fun validate(): _Meta = apply { - if (!validated) { - page() - perPage() - totalItems() - totalPages() - validated = true - } - } - - fun toBuilder() = Builder().from(this) - - override fun equals(other: Any?): Boolean { - if (this === other) { - return true - } - - return other is _Meta && - this.page == other.page && - this.perPage == other.perPage && - this.totalItems == other.totalItems && - this.totalPages == other.totalPages && - this.additionalProperties == other.additionalProperties - } - - override fun hashCode(): Int { - if (hashCode == 0) { - hashCode = - Objects.hash( - page, - perPage, - totalItems, - totalPages, - additionalProperties, - ) - } - return hashCode - } - - override fun toString() = - "_Meta{page=$page, perPage=$perPage, totalItems=$totalItems, totalPages=$totalPages, additionalProperties=$additionalProperties}" - - companion object { - - @JvmStatic fun builder() = Builder() - } - - class Builder { - - private var page: JsonField = JsonMissing.of() - private var perPage: JsonField = JsonMissing.of() - private var totalItems: JsonField = JsonMissing.of() - private var totalPages: JsonField = JsonMissing.of() - private var additionalProperties: MutableMap = mutableMapOf() - - @JvmSynthetic - internal fun from(_meta: _Meta) = apply { - this.page = _meta.page - this.perPage = _meta.perPage - this.totalItems = _meta.totalItems - this.totalPages = _meta.totalPages - additionalProperties(_meta.additionalProperties) - } - - /** The current page. */ - fun page(page: Long) = page(JsonField.of(page)) - - /** The current page. */ - @JsonProperty("page") - @ExcludeMissing - fun page(page: JsonField) = apply { this.page = page } - - /** The number of items per page. */ - fun perPage(perPage: Long) = perPage(JsonField.of(perPage)) - - /** The number of items per page. */ - @JsonProperty("perPage") - @ExcludeMissing - fun perPage(perPage: JsonField) = apply { this.perPage = perPage } - - /** The total number of items. */ - fun totalItems(totalItems: Long) = totalItems(JsonField.of(totalItems)) - - /** The total number of items. */ - @JsonProperty("totalItems") - @ExcludeMissing - fun totalItems(totalItems: JsonField) = apply { this.totalItems = totalItems } - - /** The total number of pages. */ - fun totalPages(totalPages: Long) = totalPages(JsonField.of(totalPages)) - - /** The total number of pages. */ - @JsonProperty("totalPages") - @ExcludeMissing - fun totalPages(totalPages: JsonField) = apply { this.totalPages = totalPages } - - 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(): _Meta = - _Meta( - page, - perPage, - totalItems, - totalPages, - additionalProperties.toUnmodifiable(), - ) - } - } - @JsonDeserialize(builder = Item.Builder::class) @NoAutoDetect class Item diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/CommitTestResultListResponseTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/CommitTestResultListResponseTest.kt index 05c6717..73bb4f1 100755 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/CommitTestResultListResponseTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/CommitTestResultListResponseTest.kt @@ -13,15 +13,6 @@ class CommitTestResultListResponseTest { fun createCommitTestResultListResponse() { val commitTestResultListResponse = CommitTestResultListResponse.builder() - ._meta( - CommitTestResultListResponse._Meta - .builder() - .page(123L) - .perPage(100L) - .totalItems(123L) - .totalPages(123L) - .build() - ) .items( listOf( CommitTestResultListResponse.Item.builder() @@ -87,16 +78,6 @@ class CommitTestResultListResponseTest { ) .build() assertThat(commitTestResultListResponse).isNotNull - assertThat(commitTestResultListResponse._meta()) - .isEqualTo( - CommitTestResultListResponse._Meta - .builder() - .page(123L) - .perPage(100L) - .totalItems(123L) - .totalPages(123L) - .build() - ) assertThat(commitTestResultListResponse.items()) .containsExactly( CommitTestResultListResponse.Item.builder() diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineTestResultListResponseTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineTestResultListResponseTest.kt index d9eadbb..9395377 100755 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineTestResultListResponseTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineTestResultListResponseTest.kt @@ -13,15 +13,6 @@ class InferencePipelineTestResultListResponseTest { fun createInferencePipelineTestResultListResponse() { val inferencePipelineTestResultListResponse = InferencePipelineTestResultListResponse.builder() - ._meta( - InferencePipelineTestResultListResponse._Meta - .builder() - .page(123L) - .perPage(100L) - .totalItems(123L) - .totalPages(123L) - .build() - ) .items( listOf( InferencePipelineTestResultListResponse.Item.builder() @@ -90,16 +81,6 @@ class InferencePipelineTestResultListResponseTest { ) .build() assertThat(inferencePipelineTestResultListResponse).isNotNull - assertThat(inferencePipelineTestResultListResponse._meta()) - .isEqualTo( - InferencePipelineTestResultListResponse._Meta - .builder() - .page(123L) - .perPage(100L) - .totalItems(123L) - .totalPages(123L) - .build() - ) assertThat(inferencePipelineTestResultListResponse.items()) .containsExactly( InferencePipelineTestResultListResponse.Item.builder() diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitListResponseTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitListResponseTest.kt index 5793bd5..d76d210 100755 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitListResponseTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectCommitListResponseTest.kt @@ -12,15 +12,6 @@ class ProjectCommitListResponseTest { fun createProjectCommitListResponse() { val projectCommitListResponse = ProjectCommitListResponse.builder() - ._meta( - ProjectCommitListResponse._Meta - .builder() - .page(123L) - .perPage(100L) - .totalItems(123L) - .totalPages(123L) - .build() - ) .items( listOf( ProjectCommitListResponse.Item.builder() @@ -67,16 +58,6 @@ class ProjectCommitListResponseTest { ) .build() assertThat(projectCommitListResponse).isNotNull - assertThat(projectCommitListResponse._meta()) - .isEqualTo( - ProjectCommitListResponse._Meta - .builder() - .page(123L) - .perPage(100L) - .totalItems(123L) - .totalPages(123L) - .build() - ) assertThat(projectCommitListResponse.items()) .containsExactly( ProjectCommitListResponse.Item.builder() diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineListResponseTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineListResponseTest.kt index 37bb0ca..17d8e00 100755 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineListResponseTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectInferencePipelineListResponseTest.kt @@ -12,15 +12,6 @@ class ProjectInferencePipelineListResponseTest { fun createProjectInferencePipelineListResponse() { val projectInferencePipelineListResponse = ProjectInferencePipelineListResponse.builder() - ._meta( - ProjectInferencePipelineListResponse._Meta - .builder() - .page(123L) - .perPage(100L) - .totalItems(123L) - .totalPages(123L) - .build() - ) .items( listOf( ProjectInferencePipelineListResponse.Item.builder() @@ -52,16 +43,6 @@ class ProjectInferencePipelineListResponseTest { ) .build() assertThat(projectInferencePipelineListResponse).isNotNull - assertThat(projectInferencePipelineListResponse._meta()) - .isEqualTo( - ProjectInferencePipelineListResponse._Meta - .builder() - .page(123L) - .perPage(100L) - .totalItems(123L) - .totalPages(123L) - .build() - ) assertThat(projectInferencePipelineListResponse.items()) .containsExactly( ProjectInferencePipelineListResponse.Item.builder() diff --git a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListResponseTest.kt b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListResponseTest.kt index c30dee9..dd977ce 100755 --- a/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListResponseTest.kt +++ b/openlayer-java-core/src/test/kotlin/com/openlayer/api/models/ProjectListResponseTest.kt @@ -12,15 +12,6 @@ class ProjectListResponseTest { fun createProjectListResponse() { val projectListResponse = ProjectListResponse.builder() - ._meta( - ProjectListResponse._Meta - .builder() - .page(123L) - .perPage(100L) - .totalItems(123L) - .totalPages(123L) - .build() - ) .items( listOf( ProjectListResponse.Item.builder() @@ -66,16 +57,6 @@ class ProjectListResponseTest { ) .build() assertThat(projectListResponse).isNotNull - assertThat(projectListResponse._meta()) - .isEqualTo( - ProjectListResponse._Meta - .builder() - .page(123L) - .perPage(100L) - .totalItems(123L) - .totalPages(123L) - .build() - ) assertThat(projectListResponse.items()) .containsExactly( ProjectListResponse.Item.builder()