From 9ae6b159f5b7f1dd6f29b988e04a0f0a0116608b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 21 Sep 2024 21:35:32 +0000 Subject: [PATCH] chore(internal): codegen related update (#48) --- .devcontainer/Dockerfile | 4 +- README.md | 5 +- .../api/errors/BadRequestException.kt | 12 +-- .../api/errors/BraintrustServiceException.kt | 12 ++- .../api/errors/InternalServerException.kt | 14 +-- .../api/errors/NotFoundException.kt | 12 +-- .../api/errors/PermissionDeniedException.kt | 12 +-- .../api/errors/RateLimitException.kt | 12 +-- .../api/errors/UnauthorizedException.kt | 12 +-- .../errors/UnexpectedStatusCodeException.kt | 14 +-- .../errors/UnprocessableEntityException.kt | 12 +-- .../api/models/AclListParams.kt | 26 +---- .../api/models/AclRetrieveParams.kt | 27 +---- .../api/models/ApiKeyResourceListParams.kt | 26 +---- .../models/ApiKeyResourceRetrieveParams.kt | 27 +---- .../api/models/DatasetFetchParams.kt | 27 +---- .../api/models/DatasetListParams.kt | 26 +---- .../api/models/DatasetRetrieveParams.kt | 27 +---- .../api/models/DatasetSummarizeParams.kt | 27 +---- .../api/models/ExperimentFetchParams.kt | 27 +---- .../api/models/ExperimentListParams.kt | 26 +---- .../api/models/ExperimentRetrieveParams.kt | 27 +---- .../api/models/ExperimentSummarizeParams.kt | 27 +---- .../api/models/FunctionListParams.kt | 26 +---- .../api/models/FunctionRetrieveParams.kt | 27 +---- .../api/models/GroupListParams.kt | 26 +---- .../api/models/GroupRetrieveParams.kt | 27 +---- .../api/models/OrgSecretListParams.kt | 26 +---- .../api/models/OrgSecretRetrieveParams.kt | 27 +---- .../api/models/OrganizationListParams.kt | 26 +---- .../api/models/OrganizationRetrieveParams.kt | 27 +---- .../api/models/ProjectListParams.kt | 26 +---- .../api/models/ProjectLogFetchParams.kt | 27 +---- .../api/models/ProjectRetrieveParams.kt | 27 +---- .../api/models/ProjectScoreListParams.kt | 26 +---- .../api/models/ProjectScoreRetrieveParams.kt | 27 +---- .../api/models/ProjectTagListParams.kt | 26 +---- .../api/models/ProjectTagRetrieveParams.kt | 27 +---- .../api/models/PromptListParams.kt | 26 +---- .../api/models/PromptRetrieveParams.kt | 27 +---- .../api/models/RoleListParams.kt | 26 +---- .../api/models/RoleRetrieveParams.kt | 27 +---- .../api/models/TopLevelHelloWorldParams.kt | 34 +----- .../api/models/UserListParams.kt | 26 +---- .../api/models/UserRetrieveParams.kt | 27 +---- .../api/models/ViewListParams.kt | 26 +---- .../api/models/ViewRetrieveParams.kt | 26 +---- .../braintrustdata/api/services/Handlers.kt | 101 ++++++++++++++---- 48 files changed, 206 insertions(+), 979 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 6c9d27e..bd8e261 100755 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,14 +1,14 @@ # syntax=docker/dockerfile:1 FROM debian:bookworm-slim -RUN apt-get update && apt-get install -y \ +RUN apt-get update && apt-get install -y --no-install-recommends \ libxkbcommon0 \ ca-certificates \ ca-certificates-java \ make \ curl \ git \ - openjdk-17-jdk \ + openjdk-17-jdk-headless \ unzip \ libc++1 \ vim \ diff --git a/README.md b/README.md index 18c40cd..38b56c4 100755 --- a/README.md +++ b/README.md @@ -113,9 +113,10 @@ Sometimes, the API may support other properties that are not yet supported in th you can attach them using the `putAdditionalProperty` method. ```java +import com.braintrustdata.api.models.core.JsonValue; ProjectCreateParams params = ProjectCreateParams.builder() // ... normal properties - .putAdditionalProperty("secret_param", "4242") + .putAdditionalProperty("secret_param", JsonValue.from("4242")) .build(); ``` @@ -156,7 +157,7 @@ if (field.isMissing()) { Sometimes, the server response may include additional properties that are not yet available in this library's types. You can access them using the model's `_additionalProperties` method: ```java -JsonValue secret = project._additionalProperties().get("secret_field"); +JsonValue secret = acl._additionalProperties().get("secret_field"); ``` --- diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/BadRequestException.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/BadRequestException.kt index aef5942..a373ba5 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/BadRequestException.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/BadRequestException.kt @@ -2,12 +2,8 @@ package com.braintrustdata.api.errors import com.google.common.collect.ListMultimap -class BadRequestException -constructor( +class BadRequestException( headers: ListMultimap, - private val error: BraintrustError, -) : BraintrustServiceException(headers, "${error}") { - override fun statusCode(): Int = 400 - - fun error(): BraintrustError = error -} + body: String, + error: BraintrustError, +) : BraintrustServiceException(400, headers, body, error) diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/BraintrustServiceException.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/BraintrustServiceException.kt index 99a6ed5..35d9249 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/BraintrustServiceException.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/BraintrustServiceException.kt @@ -5,11 +5,19 @@ import com.google.common.collect.ListMultimap abstract class BraintrustServiceException @JvmOverloads constructor( + private val statusCode: Int, private val headers: ListMultimap, - message: String? = null, + private val body: String, + private val error: BraintrustError, + message: String = "$statusCode: $error", cause: Throwable? = null ) : BraintrustException(message, cause) { - abstract fun statusCode(): Int + + fun statusCode(): Int = statusCode fun headers(): ListMultimap = headers + + fun body(): String = body + + fun error(): BraintrustError = error } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/InternalServerException.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/InternalServerException.kt index 9b10b43..e43239e 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/InternalServerException.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/InternalServerException.kt @@ -2,13 +2,9 @@ package com.braintrustdata.api.errors import com.google.common.collect.ListMultimap -class InternalServerException -constructor( - private val statusCode: Int, +class InternalServerException( + statusCode: Int, headers: ListMultimap, - private val error: BraintrustError, -) : BraintrustServiceException(headers, "${error}") { - override fun statusCode(): Int = statusCode - - fun error(): BraintrustError = error -} + body: String, + error: BraintrustError, +) : BraintrustServiceException(statusCode, headers, body, error) diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/NotFoundException.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/NotFoundException.kt index 7939d7e..8e879cb 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/NotFoundException.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/NotFoundException.kt @@ -2,12 +2,8 @@ package com.braintrustdata.api.errors import com.google.common.collect.ListMultimap -class NotFoundException -constructor( +class NotFoundException( headers: ListMultimap, - private val error: BraintrustError, -) : BraintrustServiceException(headers, "${error}") { - override fun statusCode(): Int = 404 - - fun error(): BraintrustError = error -} + body: String, + error: BraintrustError, +) : BraintrustServiceException(404, headers, body, error) diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/PermissionDeniedException.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/PermissionDeniedException.kt index f7fb822..98c6f33 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/PermissionDeniedException.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/PermissionDeniedException.kt @@ -2,12 +2,8 @@ package com.braintrustdata.api.errors import com.google.common.collect.ListMultimap -class PermissionDeniedException -constructor( +class PermissionDeniedException( headers: ListMultimap, - private val error: BraintrustError, -) : BraintrustServiceException(headers, "${error}") { - override fun statusCode(): Int = 403 - - fun error(): BraintrustError = error -} + body: String, + error: BraintrustError, +) : BraintrustServiceException(403, headers, body, error) diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/RateLimitException.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/RateLimitException.kt index 394df1c..d98aed0 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/RateLimitException.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/RateLimitException.kt @@ -2,12 +2,8 @@ package com.braintrustdata.api.errors import com.google.common.collect.ListMultimap -class RateLimitException -constructor( +class RateLimitException( headers: ListMultimap, - private val error: BraintrustError, -) : BraintrustServiceException(headers, "${error}") { - override fun statusCode(): Int = 429 - - fun error(): BraintrustError = error -} + body: String, + error: BraintrustError, +) : BraintrustServiceException(429, headers, body, error) diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/UnauthorizedException.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/UnauthorizedException.kt index d54fcfc..7223649 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/UnauthorizedException.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/UnauthorizedException.kt @@ -2,12 +2,8 @@ package com.braintrustdata.api.errors import com.google.common.collect.ListMultimap -class UnauthorizedException -constructor( +class UnauthorizedException( headers: ListMultimap, - private val error: BraintrustError, -) : BraintrustServiceException(headers, "${error}") { - override fun statusCode(): Int = 401 - - fun error(): BraintrustError = error -} + body: String, + error: BraintrustError, +) : BraintrustServiceException(401, headers, body, error) diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/UnexpectedStatusCodeException.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/UnexpectedStatusCodeException.kt index c131779..7482559 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/UnexpectedStatusCodeException.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/UnexpectedStatusCodeException.kt @@ -2,13 +2,9 @@ package com.braintrustdata.api.errors import com.google.common.collect.ListMultimap -class UnexpectedStatusCodeException -constructor( - private val statusCode: Int, +class UnexpectedStatusCodeException( + statusCode: Int, headers: ListMultimap, - private val body: String -) : BraintrustServiceException(headers, "Unexpected status code: ${statusCode}") { - override fun statusCode(): Int = statusCode - - fun body() = body -} + body: String, + error: BraintrustError, +) : BraintrustServiceException(statusCode, headers, body, error) diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/UnprocessableEntityException.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/UnprocessableEntityException.kt index 420f322..095b1fc 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/UnprocessableEntityException.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/errors/UnprocessableEntityException.kt @@ -2,12 +2,8 @@ package com.braintrustdata.api.errors import com.google.common.collect.ListMultimap -class UnprocessableEntityException -constructor( +class UnprocessableEntityException( headers: ListMultimap, - private val error: BraintrustError, -) : BraintrustServiceException(headers, "${error}") { - override fun statusCode(): Int = 422 - - fun error(): BraintrustError = error -} + body: String, + error: BraintrustError, +) : BraintrustServiceException(422, headers, body, error) diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/AclListParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/AclListParams.kt index 67a9fac..8f83ff4 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/AclListParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/AclListParams.kt @@ -33,7 +33,6 @@ constructor( private val startingAfter: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun objectId(): String = objectId @@ -67,8 +66,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -82,8 +79,7 @@ constructor( this.limit == other.limit && this.startingAfter == other.startingAfter && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -96,12 +92,11 @@ constructor( startingAfter, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "AclListParams{objectId=$objectId, objectType=$objectType, endingBefore=$endingBefore, ids=$ids, limit=$limit, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "AclListParams{objectId=$objectId, objectType=$objectType, endingBefore=$endingBefore, ids=$ids, limit=$limit, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -121,7 +116,6 @@ constructor( private var startingAfter: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(aclListParams: AclListParams) = apply { @@ -133,7 +127,6 @@ constructor( this.startingAfter = aclListParams.startingAfter additionalQueryParams(aclListParams.additionalQueryParams) additionalHeaders(aclListParams.additionalHeaders) - additionalBodyProperties(aclListParams.additionalBodyProperties) } /** The id of the object the ACL applies to */ @@ -221,20 +214,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(): AclListParams = AclListParams( checkNotNull(objectId) { "`objectId` is required but was not set" }, @@ -245,7 +224,6 @@ constructor( startingAfter, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/AclRetrieveParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/AclRetrieveParams.kt index 8d33204..5281961 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/AclRetrieveParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/AclRetrieveParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -13,7 +12,6 @@ constructor( private val aclId: String, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun aclId(): String = aclId @@ -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 AclRetrieveParams && this.aclId == other.aclId && 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( aclId, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "AclRetrieveParams{aclId=$aclId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "AclRetrieveParams{aclId=$aclId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -72,14 +66,12 @@ constructor( private var aclId: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(aclRetrieveParams: AclRetrieveParams) = apply { this.aclId = aclRetrieveParams.aclId additionalQueryParams(aclRetrieveParams.additionalQueryParams) additionalHeaders(aclRetrieveParams.additionalHeaders) - additionalBodyProperties(aclRetrieveParams.additionalBodyProperties) } /** Acl id */ @@ -125,26 +117,11 @@ 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(): AclRetrieveParams = AclRetrieveParams( checkNotNull(aclId) { "`aclId` is required but was not set" }, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ApiKeyResourceListParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ApiKeyResourceListParams.kt index 71766af..98f3587 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ApiKeyResourceListParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ApiKeyResourceListParams.kt @@ -30,7 +30,6 @@ constructor( private val startingAfter: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun apiKeyName(): Optional = Optional.ofNullable(apiKeyName) @@ -64,8 +63,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -79,8 +76,7 @@ constructor( this.orgName == other.orgName && this.startingAfter == other.startingAfter && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -93,12 +89,11 @@ constructor( startingAfter, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ApiKeyResourceListParams{apiKeyName=$apiKeyName, endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ApiKeyResourceListParams{apiKeyName=$apiKeyName, endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -118,7 +113,6 @@ constructor( private var startingAfter: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(apiKeyResourceListParams: ApiKeyResourceListParams) = apply { @@ -130,7 +124,6 @@ constructor( this.startingAfter = apiKeyResourceListParams.startingAfter additionalQueryParams(apiKeyResourceListParams.additionalQueryParams) additionalHeaders(apiKeyResourceListParams.additionalHeaders) - additionalBodyProperties(apiKeyResourceListParams.additionalBodyProperties) } /** Name of the api_key to search for */ @@ -218,20 +211,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(): ApiKeyResourceListParams = ApiKeyResourceListParams( apiKeyName, @@ -242,7 +221,6 @@ constructor( startingAfter, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ApiKeyResourceRetrieveParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ApiKeyResourceRetrieveParams.kt index 01654c3..35f91e8 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ApiKeyResourceRetrieveParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ApiKeyResourceRetrieveParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -13,7 +12,6 @@ constructor( private val apiKeyId: String, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun apiKeyId(): String = apiKeyId @@ -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 ApiKeyResourceRetrieveParams && this.apiKeyId == other.apiKeyId && 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( apiKeyId, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ApiKeyResourceRetrieveParams{apiKeyId=$apiKeyId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ApiKeyResourceRetrieveParams{apiKeyId=$apiKeyId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -72,14 +66,12 @@ constructor( private var apiKeyId: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(apiKeyResourceRetrieveParams: ApiKeyResourceRetrieveParams) = apply { this.apiKeyId = apiKeyResourceRetrieveParams.apiKeyId additionalQueryParams(apiKeyResourceRetrieveParams.additionalQueryParams) additionalHeaders(apiKeyResourceRetrieveParams.additionalHeaders) - additionalBodyProperties(apiKeyResourceRetrieveParams.additionalBodyProperties) } /** ApiKey id */ @@ -125,26 +117,11 @@ 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(): ApiKeyResourceRetrieveParams = ApiKeyResourceRetrieveParams( checkNotNull(apiKeyId) { "`apiKeyId` is required but was not set" }, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/DatasetFetchParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/DatasetFetchParams.kt index 744f7a2..1698818 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/DatasetFetchParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/DatasetFetchParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -18,7 +17,6 @@ constructor( private val version: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun datasetId(): String = datasetId @@ -55,8 +53,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -69,8 +65,7 @@ constructor( this.maxXactId == other.maxXactId && this.version == other.version && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -82,12 +77,11 @@ constructor( version, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "DatasetFetchParams{datasetId=$datasetId, limit=$limit, maxRootSpanId=$maxRootSpanId, maxXactId=$maxXactId, version=$version, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "DatasetFetchParams{datasetId=$datasetId, limit=$limit, maxRootSpanId=$maxRootSpanId, maxXactId=$maxXactId, version=$version, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -106,7 +100,6 @@ constructor( private var version: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(datasetFetchParams: DatasetFetchParams) = apply { @@ -117,7 +110,6 @@ constructor( this.version = datasetFetchParams.version additionalQueryParams(datasetFetchParams.additionalQueryParams) additionalHeaders(datasetFetchParams.additionalHeaders) - additionalBodyProperties(datasetFetchParams.additionalBodyProperties) } /** Dataset id */ @@ -216,20 +208,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(): DatasetFetchParams = DatasetFetchParams( checkNotNull(datasetId) { "`datasetId` is required but was not set" }, @@ -239,7 +217,6 @@ constructor( version, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/DatasetListParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/DatasetListParams.kt index 1371522..d42871f 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/DatasetListParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/DatasetListParams.kt @@ -32,7 +32,6 @@ constructor( private val startingAfter: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun datasetName(): Optional = Optional.ofNullable(datasetName) @@ -72,8 +71,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -89,8 +86,7 @@ constructor( this.projectName == other.projectName && this.startingAfter == other.startingAfter && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -105,12 +101,11 @@ constructor( startingAfter, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "DatasetListParams{datasetName=$datasetName, endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, projectId=$projectId, projectName=$projectName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "DatasetListParams{datasetName=$datasetName, endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, projectId=$projectId, projectName=$projectName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -132,7 +127,6 @@ constructor( private var startingAfter: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(datasetListParams: DatasetListParams) = apply { @@ -146,7 +140,6 @@ constructor( this.startingAfter = datasetListParams.startingAfter additionalQueryParams(datasetListParams.additionalQueryParams) additionalHeaders(datasetListParams.additionalHeaders) - additionalBodyProperties(datasetListParams.additionalBodyProperties) } /** Name of the dataset to search for */ @@ -240,20 +233,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(): DatasetListParams = DatasetListParams( datasetName, @@ -266,7 +245,6 @@ constructor( startingAfter, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/DatasetRetrieveParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/DatasetRetrieveParams.kt index 68acf5a..963469a 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/DatasetRetrieveParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/DatasetRetrieveParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -13,7 +12,6 @@ constructor( private val datasetId: String, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun datasetId(): String = datasetId @@ -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 DatasetRetrieveParams && this.datasetId == other.datasetId && 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( datasetId, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "DatasetRetrieveParams{datasetId=$datasetId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "DatasetRetrieveParams{datasetId=$datasetId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -72,14 +66,12 @@ constructor( private var datasetId: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(datasetRetrieveParams: DatasetRetrieveParams) = apply { this.datasetId = datasetRetrieveParams.datasetId additionalQueryParams(datasetRetrieveParams.additionalQueryParams) additionalHeaders(datasetRetrieveParams.additionalHeaders) - additionalBodyProperties(datasetRetrieveParams.additionalBodyProperties) } /** Dataset id */ @@ -125,26 +117,11 @@ 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(): DatasetRetrieveParams = DatasetRetrieveParams( checkNotNull(datasetId) { "`datasetId` is required but was not set" }, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/DatasetSummarizeParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/DatasetSummarizeParams.kt index 427f1f0..434a6d1 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/DatasetSummarizeParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/DatasetSummarizeParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -15,7 +14,6 @@ constructor( private val summarizeData: Boolean?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun datasetId(): String = datasetId @@ -43,8 +41,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -54,8 +50,7 @@ constructor( this.datasetId == other.datasetId && this.summarizeData == other.summarizeData && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -64,12 +59,11 @@ constructor( summarizeData, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "DatasetSummarizeParams{datasetId=$datasetId, summarizeData=$summarizeData, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "DatasetSummarizeParams{datasetId=$datasetId, summarizeData=$summarizeData, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -85,7 +79,6 @@ constructor( private var summarizeData: Boolean? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(datasetSummarizeParams: DatasetSummarizeParams) = apply { @@ -93,7 +86,6 @@ constructor( this.summarizeData = datasetSummarizeParams.summarizeData additionalQueryParams(datasetSummarizeParams.additionalQueryParams) additionalHeaders(datasetSummarizeParams.additionalHeaders) - additionalBodyProperties(datasetSummarizeParams.additionalBodyProperties) } /** Dataset id */ @@ -144,27 +136,12 @@ 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(): DatasetSummarizeParams = DatasetSummarizeParams( checkNotNull(datasetId) { "`datasetId` is required but was not set" }, summarizeData, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ExperimentFetchParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ExperimentFetchParams.kt index a09a503..9f90dc2 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ExperimentFetchParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ExperimentFetchParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -18,7 +17,6 @@ constructor( private val version: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun experimentId(): String = experimentId @@ -55,8 +53,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -69,8 +65,7 @@ constructor( this.maxXactId == other.maxXactId && this.version == other.version && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -82,12 +77,11 @@ constructor( version, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ExperimentFetchParams{experimentId=$experimentId, limit=$limit, maxRootSpanId=$maxRootSpanId, maxXactId=$maxXactId, version=$version, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ExperimentFetchParams{experimentId=$experimentId, limit=$limit, maxRootSpanId=$maxRootSpanId, maxXactId=$maxXactId, version=$version, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -106,7 +100,6 @@ constructor( private var version: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(experimentFetchParams: ExperimentFetchParams) = apply { @@ -117,7 +110,6 @@ constructor( this.version = experimentFetchParams.version additionalQueryParams(experimentFetchParams.additionalQueryParams) additionalHeaders(experimentFetchParams.additionalHeaders) - additionalBodyProperties(experimentFetchParams.additionalBodyProperties) } /** Experiment id */ @@ -216,20 +208,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(): ExperimentFetchParams = ExperimentFetchParams( checkNotNull(experimentId) { "`experimentId` is required but was not set" }, @@ -239,7 +217,6 @@ constructor( version, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ExperimentListParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ExperimentListParams.kt index 22f5c9e..6c36c06 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ExperimentListParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ExperimentListParams.kt @@ -32,7 +32,6 @@ constructor( private val startingAfter: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun endingBefore(): Optional = Optional.ofNullable(endingBefore) @@ -72,8 +71,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -89,8 +86,7 @@ constructor( this.projectName == other.projectName && this.startingAfter == other.startingAfter && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -105,12 +101,11 @@ constructor( startingAfter, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ExperimentListParams{endingBefore=$endingBefore, experimentName=$experimentName, ids=$ids, limit=$limit, orgName=$orgName, projectId=$projectId, projectName=$projectName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ExperimentListParams{endingBefore=$endingBefore, experimentName=$experimentName, ids=$ids, limit=$limit, orgName=$orgName, projectId=$projectId, projectName=$projectName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -132,7 +127,6 @@ constructor( private var startingAfter: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(experimentListParams: ExperimentListParams) = apply { @@ -146,7 +140,6 @@ constructor( this.startingAfter = experimentListParams.startingAfter additionalQueryParams(experimentListParams.additionalQueryParams) additionalHeaders(experimentListParams.additionalHeaders) - additionalBodyProperties(experimentListParams.additionalBodyProperties) } /** @@ -240,20 +233,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(): ExperimentListParams = ExperimentListParams( endingBefore, @@ -266,7 +245,6 @@ constructor( startingAfter, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ExperimentRetrieveParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ExperimentRetrieveParams.kt index c5002c9..3062382 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ExperimentRetrieveParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ExperimentRetrieveParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -13,7 +12,6 @@ constructor( private val experimentId: String, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun experimentId(): String = experimentId @@ -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 ExperimentRetrieveParams && this.experimentId == other.experimentId && 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( experimentId, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ExperimentRetrieveParams{experimentId=$experimentId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ExperimentRetrieveParams{experimentId=$experimentId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -72,14 +66,12 @@ constructor( private var experimentId: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(experimentRetrieveParams: ExperimentRetrieveParams) = apply { this.experimentId = experimentRetrieveParams.experimentId additionalQueryParams(experimentRetrieveParams.additionalQueryParams) additionalHeaders(experimentRetrieveParams.additionalHeaders) - additionalBodyProperties(experimentRetrieveParams.additionalBodyProperties) } /** Experiment id */ @@ -125,26 +117,11 @@ 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(): ExperimentRetrieveParams = ExperimentRetrieveParams( checkNotNull(experimentId) { "`experimentId` is required but was not set" }, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ExperimentSummarizeParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ExperimentSummarizeParams.kt index 8f32628..c72fa65 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ExperimentSummarizeParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ExperimentSummarizeParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -16,7 +15,6 @@ constructor( private val summarizeScores: Boolean?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun experimentId(): String = experimentId @@ -49,8 +47,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -61,8 +57,7 @@ constructor( this.comparisonExperimentId == other.comparisonExperimentId && this.summarizeScores == other.summarizeScores && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -72,12 +67,11 @@ constructor( summarizeScores, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ExperimentSummarizeParams{experimentId=$experimentId, comparisonExperimentId=$comparisonExperimentId, summarizeScores=$summarizeScores, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ExperimentSummarizeParams{experimentId=$experimentId, comparisonExperimentId=$comparisonExperimentId, summarizeScores=$summarizeScores, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -94,7 +88,6 @@ constructor( private var summarizeScores: Boolean? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(experimentSummarizeParams: ExperimentSummarizeParams) = apply { @@ -103,7 +96,6 @@ constructor( this.summarizeScores = experimentSummarizeParams.summarizeScores additionalQueryParams(experimentSummarizeParams.additionalQueryParams) additionalHeaders(experimentSummarizeParams.additionalHeaders) - additionalBodyProperties(experimentSummarizeParams.additionalBodyProperties) } /** Experiment id */ @@ -167,20 +159,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(): ExperimentSummarizeParams = ExperimentSummarizeParams( checkNotNull(experimentId) { "`experimentId` is required but was not set" }, @@ -188,7 +166,6 @@ constructor( summarizeScores, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/FunctionListParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/FunctionListParams.kt index ec0f089..624cd77 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/FunctionListParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/FunctionListParams.kt @@ -34,7 +34,6 @@ constructor( private val version: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun endingBefore(): Optional = Optional.ofNullable(endingBefore) @@ -80,8 +79,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -99,8 +96,7 @@ constructor( this.startingAfter == other.startingAfter && this.version == other.version && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -117,12 +113,11 @@ constructor( version, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "FunctionListParams{endingBefore=$endingBefore, functionName=$functionName, ids=$ids, limit=$limit, orgName=$orgName, projectId=$projectId, projectName=$projectName, slug=$slug, startingAfter=$startingAfter, version=$version, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "FunctionListParams{endingBefore=$endingBefore, functionName=$functionName, ids=$ids, limit=$limit, orgName=$orgName, projectId=$projectId, projectName=$projectName, slug=$slug, startingAfter=$startingAfter, version=$version, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -146,7 +141,6 @@ constructor( private var version: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(functionListParams: FunctionListParams) = apply { @@ -162,7 +156,6 @@ constructor( this.version = functionListParams.version additionalQueryParams(functionListParams.additionalQueryParams) additionalHeaders(functionListParams.additionalHeaders) - additionalBodyProperties(functionListParams.additionalBodyProperties) } /** @@ -267,20 +260,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(): FunctionListParams = FunctionListParams( endingBefore, @@ -295,7 +274,6 @@ constructor( version, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/FunctionRetrieveParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/FunctionRetrieveParams.kt index b56c159..815fc34 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/FunctionRetrieveParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/FunctionRetrieveParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -13,7 +12,6 @@ constructor( private val functionId: String, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun functionId(): String = functionId @@ -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 FunctionRetrieveParams && this.functionId == other.functionId && 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( functionId, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "FunctionRetrieveParams{functionId=$functionId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "FunctionRetrieveParams{functionId=$functionId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -72,14 +66,12 @@ constructor( private var functionId: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(functionRetrieveParams: FunctionRetrieveParams) = apply { this.functionId = functionRetrieveParams.functionId additionalQueryParams(functionRetrieveParams.additionalQueryParams) additionalHeaders(functionRetrieveParams.additionalHeaders) - additionalBodyProperties(functionRetrieveParams.additionalBodyProperties) } /** Function id */ @@ -125,26 +117,11 @@ 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(): FunctionRetrieveParams = FunctionRetrieveParams( checkNotNull(functionId) { "`functionId` is required but was not set" }, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/GroupListParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/GroupListParams.kt index 29db15d..99922e4 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/GroupListParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/GroupListParams.kt @@ -30,7 +30,6 @@ constructor( private val startingAfter: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun endingBefore(): Optional = Optional.ofNullable(endingBefore) @@ -64,8 +63,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -79,8 +76,7 @@ constructor( this.orgName == other.orgName && this.startingAfter == other.startingAfter && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -93,12 +89,11 @@ constructor( startingAfter, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "GroupListParams{endingBefore=$endingBefore, groupName=$groupName, ids=$ids, limit=$limit, orgName=$orgName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "GroupListParams{endingBefore=$endingBefore, groupName=$groupName, ids=$ids, limit=$limit, orgName=$orgName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -118,7 +113,6 @@ constructor( private var startingAfter: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(groupListParams: GroupListParams) = apply { @@ -130,7 +124,6 @@ constructor( this.startingAfter = groupListParams.startingAfter additionalQueryParams(groupListParams.additionalQueryParams) additionalHeaders(groupListParams.additionalHeaders) - additionalBodyProperties(groupListParams.additionalBodyProperties) } /** @@ -218,20 +211,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(): GroupListParams = GroupListParams( endingBefore, @@ -242,7 +221,6 @@ constructor( startingAfter, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/GroupRetrieveParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/GroupRetrieveParams.kt index 619c786..7a68c3d 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/GroupRetrieveParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/GroupRetrieveParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -13,7 +12,6 @@ constructor( private val groupId: String, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun groupId(): String = groupId @@ -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 GroupRetrieveParams && this.groupId == other.groupId && 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( groupId, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "GroupRetrieveParams{groupId=$groupId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "GroupRetrieveParams{groupId=$groupId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -72,14 +66,12 @@ constructor( private var groupId: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(groupRetrieveParams: GroupRetrieveParams) = apply { this.groupId = groupRetrieveParams.groupId additionalQueryParams(groupRetrieveParams.additionalQueryParams) additionalHeaders(groupRetrieveParams.additionalHeaders) - additionalBodyProperties(groupRetrieveParams.additionalBodyProperties) } /** Group id */ @@ -125,26 +117,11 @@ 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(): GroupRetrieveParams = GroupRetrieveParams( checkNotNull(groupId) { "`groupId` is required but was not set" }, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/OrgSecretListParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/OrgSecretListParams.kt index 1589595..98a6952 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/OrgSecretListParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/OrgSecretListParams.kt @@ -31,7 +31,6 @@ constructor( private val startingAfter: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun endingBefore(): Optional = Optional.ofNullable(endingBefore) @@ -68,8 +67,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -84,8 +81,7 @@ constructor( this.orgSecretType == other.orgSecretType && this.startingAfter == other.startingAfter && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -99,12 +95,11 @@ constructor( startingAfter, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "OrgSecretListParams{endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, orgSecretName=$orgSecretName, orgSecretType=$orgSecretType, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "OrgSecretListParams{endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, orgSecretName=$orgSecretName, orgSecretType=$orgSecretType, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -125,7 +120,6 @@ constructor( private var startingAfter: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(orgSecretListParams: OrgSecretListParams) = apply { @@ -138,7 +132,6 @@ constructor( this.startingAfter = orgSecretListParams.startingAfter additionalQueryParams(orgSecretListParams.additionalQueryParams) additionalHeaders(orgSecretListParams.additionalHeaders) - additionalBodyProperties(orgSecretListParams.additionalBodyProperties) } /** @@ -238,20 +231,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(): OrgSecretListParams = OrgSecretListParams( endingBefore, @@ -263,7 +242,6 @@ constructor( startingAfter, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/OrgSecretRetrieveParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/OrgSecretRetrieveParams.kt index 90109d2..067ad63 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/OrgSecretRetrieveParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/OrgSecretRetrieveParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -13,7 +12,6 @@ constructor( private val orgSecretId: String, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun orgSecretId(): String = orgSecretId @@ -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 OrgSecretRetrieveParams && this.orgSecretId == other.orgSecretId && 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( orgSecretId, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "OrgSecretRetrieveParams{orgSecretId=$orgSecretId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "OrgSecretRetrieveParams{orgSecretId=$orgSecretId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -72,14 +66,12 @@ constructor( private var orgSecretId: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(orgSecretRetrieveParams: OrgSecretRetrieveParams) = apply { this.orgSecretId = orgSecretRetrieveParams.orgSecretId additionalQueryParams(orgSecretRetrieveParams.additionalQueryParams) additionalHeaders(orgSecretRetrieveParams.additionalHeaders) - additionalBodyProperties(orgSecretRetrieveParams.additionalBodyProperties) } /** OrgSecret id */ @@ -125,26 +117,11 @@ 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(): OrgSecretRetrieveParams = OrgSecretRetrieveParams( checkNotNull(orgSecretId) { "`orgSecretId` is required but was not set" }, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/OrganizationListParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/OrganizationListParams.kt index 2357ad8..76ac296 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/OrganizationListParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/OrganizationListParams.kt @@ -29,7 +29,6 @@ constructor( private val startingAfter: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun endingBefore(): Optional = Optional.ofNullable(endingBefore) @@ -60,8 +59,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -74,8 +71,7 @@ constructor( this.orgName == other.orgName && this.startingAfter == other.startingAfter && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -87,12 +83,11 @@ constructor( startingAfter, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "OrganizationListParams{endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "OrganizationListParams{endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -111,7 +106,6 @@ constructor( private var startingAfter: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(organizationListParams: OrganizationListParams) = apply { @@ -122,7 +116,6 @@ constructor( this.startingAfter = organizationListParams.startingAfter additionalQueryParams(organizationListParams.additionalQueryParams) additionalHeaders(organizationListParams.additionalHeaders) - additionalBodyProperties(organizationListParams.additionalBodyProperties) } /** @@ -207,20 +200,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(): OrganizationListParams = OrganizationListParams( endingBefore, @@ -230,7 +209,6 @@ constructor( startingAfter, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/OrganizationRetrieveParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/OrganizationRetrieveParams.kt index 651b870..6999669 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/OrganizationRetrieveParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/OrganizationRetrieveParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -13,7 +12,6 @@ constructor( private val organizationId: String, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun organizationId(): String = organizationId @@ -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 OrganizationRetrieveParams && this.organizationId == other.organizationId && 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( organizationId, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "OrganizationRetrieveParams{organizationId=$organizationId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "OrganizationRetrieveParams{organizationId=$organizationId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -72,14 +66,12 @@ constructor( private var organizationId: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(organizationRetrieveParams: OrganizationRetrieveParams) = apply { this.organizationId = organizationRetrieveParams.organizationId additionalQueryParams(organizationRetrieveParams.additionalQueryParams) additionalHeaders(organizationRetrieveParams.additionalHeaders) - additionalBodyProperties(organizationRetrieveParams.additionalBodyProperties) } /** Organization id */ @@ -125,26 +117,11 @@ 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(): OrganizationRetrieveParams = OrganizationRetrieveParams( checkNotNull(organizationId) { "`organizationId` is required but was not set" }, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectListParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectListParams.kt index 24ded19..9cd5e09 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectListParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectListParams.kt @@ -30,7 +30,6 @@ constructor( private val startingAfter: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun endingBefore(): Optional = Optional.ofNullable(endingBefore) @@ -64,8 +63,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -79,8 +76,7 @@ constructor( this.projectName == other.projectName && this.startingAfter == other.startingAfter && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -93,12 +89,11 @@ constructor( startingAfter, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ProjectListParams{endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, projectName=$projectName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ProjectListParams{endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, projectName=$projectName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -118,7 +113,6 @@ constructor( private var startingAfter: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(projectListParams: ProjectListParams) = apply { @@ -130,7 +124,6 @@ constructor( this.startingAfter = projectListParams.startingAfter additionalQueryParams(projectListParams.additionalQueryParams) additionalHeaders(projectListParams.additionalHeaders) - additionalBodyProperties(projectListParams.additionalBodyProperties) } /** @@ -218,20 +211,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( endingBefore, @@ -242,7 +221,6 @@ constructor( startingAfter, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectLogFetchParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectLogFetchParams.kt index 0503588..75f643a 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectLogFetchParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectLogFetchParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -18,7 +17,6 @@ constructor( private val version: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun projectId(): String = projectId @@ -55,8 +53,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -69,8 +65,7 @@ constructor( this.maxXactId == other.maxXactId && this.version == other.version && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -82,12 +77,11 @@ constructor( version, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ProjectLogFetchParams{projectId=$projectId, limit=$limit, maxRootSpanId=$maxRootSpanId, maxXactId=$maxXactId, version=$version, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ProjectLogFetchParams{projectId=$projectId, limit=$limit, maxRootSpanId=$maxRootSpanId, maxXactId=$maxXactId, version=$version, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -106,7 +100,6 @@ constructor( private var version: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(projectLogFetchParams: ProjectLogFetchParams) = apply { @@ -117,7 +110,6 @@ constructor( this.version = projectLogFetchParams.version additionalQueryParams(projectLogFetchParams.additionalQueryParams) additionalHeaders(projectLogFetchParams.additionalHeaders) - additionalBodyProperties(projectLogFetchParams.additionalBodyProperties) } /** Project id */ @@ -216,20 +208,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(): ProjectLogFetchParams = ProjectLogFetchParams( checkNotNull(projectId) { "`projectId` is required but was not set" }, @@ -239,7 +217,6 @@ constructor( version, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectRetrieveParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectRetrieveParams.kt index 93c5c5c..37a0e28 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectRetrieveParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectRetrieveParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -13,7 +12,6 @@ constructor( private val projectId: String, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun projectId(): String = projectId @@ -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 ProjectRetrieveParams && this.projectId == other.projectId && 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( projectId, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ProjectRetrieveParams{projectId=$projectId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ProjectRetrieveParams{projectId=$projectId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -72,14 +66,12 @@ constructor( private var projectId: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(projectRetrieveParams: ProjectRetrieveParams) = apply { this.projectId = projectRetrieveParams.projectId additionalQueryParams(projectRetrieveParams.additionalQueryParams) additionalHeaders(projectRetrieveParams.additionalHeaders) - additionalBodyProperties(projectRetrieveParams.additionalBodyProperties) } /** Project id */ @@ -125,26 +117,11 @@ 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(): ProjectRetrieveParams = ProjectRetrieveParams( checkNotNull(projectId) { "`projectId` is required but was not set" }, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectScoreListParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectScoreListParams.kt index 60e0b6f..2945060 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectScoreListParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectScoreListParams.kt @@ -36,7 +36,6 @@ constructor( private val startingAfter: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun endingBefore(): Optional = Optional.ofNullable(endingBefore) @@ -79,8 +78,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -97,8 +94,7 @@ constructor( this.scoreType == other.scoreType && this.startingAfter == other.startingAfter && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -114,12 +110,11 @@ constructor( startingAfter, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ProjectScoreListParams{endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, projectId=$projectId, projectName=$projectName, projectScoreName=$projectScoreName, scoreType=$scoreType, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ProjectScoreListParams{endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, projectId=$projectId, projectName=$projectName, projectScoreName=$projectScoreName, scoreType=$scoreType, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -142,7 +137,6 @@ constructor( private var startingAfter: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(projectScoreListParams: ProjectScoreListParams) = apply { @@ -157,7 +151,6 @@ constructor( this.startingAfter = projectScoreListParams.startingAfter additionalQueryParams(projectScoreListParams.additionalQueryParams) additionalHeaders(projectScoreListParams.additionalHeaders) - additionalBodyProperties(projectScoreListParams.additionalBodyProperties) } /** @@ -268,20 +261,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(): ProjectScoreListParams = ProjectScoreListParams( endingBefore, @@ -295,7 +274,6 @@ constructor( startingAfter, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectScoreRetrieveParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectScoreRetrieveParams.kt index 7ae207a..cf6919d 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectScoreRetrieveParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectScoreRetrieveParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -13,7 +12,6 @@ constructor( private val projectScoreId: String, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun projectScoreId(): String = projectScoreId @@ -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 ProjectScoreRetrieveParams && this.projectScoreId == other.projectScoreId && 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( projectScoreId, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ProjectScoreRetrieveParams{projectScoreId=$projectScoreId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ProjectScoreRetrieveParams{projectScoreId=$projectScoreId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -72,14 +66,12 @@ constructor( private var projectScoreId: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(projectScoreRetrieveParams: ProjectScoreRetrieveParams) = apply { this.projectScoreId = projectScoreRetrieveParams.projectScoreId additionalQueryParams(projectScoreRetrieveParams.additionalQueryParams) additionalHeaders(projectScoreRetrieveParams.additionalHeaders) - additionalBodyProperties(projectScoreRetrieveParams.additionalBodyProperties) } /** ProjectScore id */ @@ -125,26 +117,11 @@ 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(): ProjectScoreRetrieveParams = ProjectScoreRetrieveParams( checkNotNull(projectScoreId) { "`projectScoreId` is required but was not set" }, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectTagListParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectTagListParams.kt index 880a207..893d676 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectTagListParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectTagListParams.kt @@ -32,7 +32,6 @@ constructor( private val startingAfter: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun endingBefore(): Optional = Optional.ofNullable(endingBefore) @@ -72,8 +71,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -89,8 +86,7 @@ constructor( this.projectTagName == other.projectTagName && this.startingAfter == other.startingAfter && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -105,12 +101,11 @@ constructor( startingAfter, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ProjectTagListParams{endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, projectId=$projectId, projectName=$projectName, projectTagName=$projectTagName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ProjectTagListParams{endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, projectId=$projectId, projectName=$projectName, projectTagName=$projectTagName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -132,7 +127,6 @@ constructor( private var startingAfter: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(projectTagListParams: ProjectTagListParams) = apply { @@ -146,7 +140,6 @@ constructor( this.startingAfter = projectTagListParams.startingAfter additionalQueryParams(projectTagListParams.additionalQueryParams) additionalHeaders(projectTagListParams.additionalHeaders) - additionalBodyProperties(projectTagListParams.additionalBodyProperties) } /** @@ -240,20 +233,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(): ProjectTagListParams = ProjectTagListParams( endingBefore, @@ -266,7 +245,6 @@ constructor( startingAfter, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectTagRetrieveParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectTagRetrieveParams.kt index 89e2905..1fa19f4 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectTagRetrieveParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ProjectTagRetrieveParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -13,7 +12,6 @@ constructor( private val projectTagId: String, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun projectTagId(): String = projectTagId @@ -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 ProjectTagRetrieveParams && this.projectTagId == other.projectTagId && 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( projectTagId, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ProjectTagRetrieveParams{projectTagId=$projectTagId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ProjectTagRetrieveParams{projectTagId=$projectTagId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -72,14 +66,12 @@ constructor( private var projectTagId: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(projectTagRetrieveParams: ProjectTagRetrieveParams) = apply { this.projectTagId = projectTagRetrieveParams.projectTagId additionalQueryParams(projectTagRetrieveParams.additionalQueryParams) additionalHeaders(projectTagRetrieveParams.additionalHeaders) - additionalBodyProperties(projectTagRetrieveParams.additionalBodyProperties) } /** ProjectTag id */ @@ -125,26 +117,11 @@ 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(): ProjectTagRetrieveParams = ProjectTagRetrieveParams( checkNotNull(projectTagId) { "`projectTagId` is required but was not set" }, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/PromptListParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/PromptListParams.kt index 13f9937..9dfce69 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/PromptListParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/PromptListParams.kt @@ -34,7 +34,6 @@ constructor( private val version: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun endingBefore(): Optional = Optional.ofNullable(endingBefore) @@ -80,8 +79,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -99,8 +96,7 @@ constructor( this.startingAfter == other.startingAfter && this.version == other.version && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -117,12 +113,11 @@ constructor( version, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "PromptListParams{endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, projectId=$projectId, projectName=$projectName, promptName=$promptName, slug=$slug, startingAfter=$startingAfter, version=$version, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "PromptListParams{endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, projectId=$projectId, projectName=$projectName, promptName=$promptName, slug=$slug, startingAfter=$startingAfter, version=$version, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -146,7 +141,6 @@ constructor( private var version: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(promptListParams: PromptListParams) = apply { @@ -162,7 +156,6 @@ constructor( this.version = promptListParams.version additionalQueryParams(promptListParams.additionalQueryParams) additionalHeaders(promptListParams.additionalHeaders) - additionalBodyProperties(promptListParams.additionalBodyProperties) } /** @@ -267,20 +260,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(): PromptListParams = PromptListParams( endingBefore, @@ -295,7 +274,6 @@ constructor( version, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/PromptRetrieveParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/PromptRetrieveParams.kt index 8a0f796..5fb7fad 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/PromptRetrieveParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/PromptRetrieveParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -13,7 +12,6 @@ constructor( private val promptId: String, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun promptId(): String = promptId @@ -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 PromptRetrieveParams && this.promptId == other.promptId && 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( promptId, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "PromptRetrieveParams{promptId=$promptId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "PromptRetrieveParams{promptId=$promptId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -72,14 +66,12 @@ constructor( private var promptId: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(promptRetrieveParams: PromptRetrieveParams) = apply { this.promptId = promptRetrieveParams.promptId additionalQueryParams(promptRetrieveParams.additionalQueryParams) additionalHeaders(promptRetrieveParams.additionalHeaders) - additionalBodyProperties(promptRetrieveParams.additionalBodyProperties) } /** Prompt id */ @@ -125,26 +117,11 @@ 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(): PromptRetrieveParams = PromptRetrieveParams( checkNotNull(promptId) { "`promptId` is required but was not set" }, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/RoleListParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/RoleListParams.kt index 99c8bad..33910b5 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/RoleListParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/RoleListParams.kt @@ -30,7 +30,6 @@ constructor( private val startingAfter: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun endingBefore(): Optional = Optional.ofNullable(endingBefore) @@ -64,8 +63,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -79,8 +76,7 @@ constructor( this.roleName == other.roleName && this.startingAfter == other.startingAfter && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -93,12 +89,11 @@ constructor( startingAfter, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "RoleListParams{endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, roleName=$roleName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "RoleListParams{endingBefore=$endingBefore, ids=$ids, limit=$limit, orgName=$orgName, roleName=$roleName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -118,7 +113,6 @@ constructor( private var startingAfter: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(roleListParams: RoleListParams) = apply { @@ -130,7 +124,6 @@ constructor( this.startingAfter = roleListParams.startingAfter additionalQueryParams(roleListParams.additionalQueryParams) additionalHeaders(roleListParams.additionalHeaders) - additionalBodyProperties(roleListParams.additionalBodyProperties) } /** @@ -218,20 +211,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(): RoleListParams = RoleListParams( endingBefore, @@ -242,7 +221,6 @@ constructor( startingAfter, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/RoleRetrieveParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/RoleRetrieveParams.kt index eac995d..9f1fbfe 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/RoleRetrieveParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/RoleRetrieveParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -13,7 +12,6 @@ constructor( private val roleId: String, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun roleId(): String = roleId @@ -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 RoleRetrieveParams && this.roleId == other.roleId && 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( roleId, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "RoleRetrieveParams{roleId=$roleId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "RoleRetrieveParams{roleId=$roleId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -72,14 +66,12 @@ constructor( private var roleId: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(roleRetrieveParams: RoleRetrieveParams) = apply { this.roleId = roleRetrieveParams.roleId additionalQueryParams(roleRetrieveParams.additionalQueryParams) additionalHeaders(roleRetrieveParams.additionalHeaders) - additionalBodyProperties(roleRetrieveParams.additionalBodyProperties) } /** Role id */ @@ -125,26 +117,11 @@ 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(): RoleRetrieveParams = RoleRetrieveParams( checkNotNull(roleId) { "`roleId` is required but was not set" }, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/TopLevelHelloWorldParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/TopLevelHelloWorldParams.kt index ec0e8bd..9575b9f 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/TopLevelHelloWorldParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/TopLevelHelloWorldParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -12,7 +11,6 @@ class TopLevelHelloWorldParams constructor( private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { @JvmSynthetic internal fun getQueryParams(): Map> = additionalQueryParams @@ -23,8 +21,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -32,20 +28,15 @@ constructor( return other is TopLevelHelloWorldParams && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { - return Objects.hash( - additionalQueryParams, - additionalHeaders, - additionalBodyProperties, - ) + return Objects.hash(additionalQueryParams, additionalHeaders) } override fun toString() = - "TopLevelHelloWorldParams{additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "TopLevelHelloWorldParams{additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -59,13 +50,11 @@ constructor( private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(topLevelHelloWorldParams: TopLevelHelloWorldParams) = apply { additionalQueryParams(topLevelHelloWorldParams.additionalQueryParams) additionalHeaders(topLevelHelloWorldParams.additionalHeaders) - additionalBodyProperties(topLevelHelloWorldParams.additionalBodyProperties) } fun additionalQueryParams(additionalQueryParams: Map>) = apply { @@ -108,25 +97,10 @@ 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(): TopLevelHelloWorldParams = TopLevelHelloWorldParams( additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), + additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable() ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/UserListParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/UserListParams.kt index c4c09bc..4883625 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/UserListParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/UserListParams.kt @@ -32,7 +32,6 @@ constructor( private val startingAfter: String?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun email(): Optional = Optional.ofNullable(email) @@ -72,8 +71,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -89,8 +86,7 @@ constructor( this.orgName == other.orgName && this.startingAfter == other.startingAfter && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -105,12 +101,11 @@ constructor( startingAfter, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "UserListParams{email=$email, endingBefore=$endingBefore, familyName=$familyName, givenName=$givenName, ids=$ids, limit=$limit, orgName=$orgName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "UserListParams{email=$email, endingBefore=$endingBefore, familyName=$familyName, givenName=$givenName, ids=$ids, limit=$limit, orgName=$orgName, startingAfter=$startingAfter, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -132,7 +127,6 @@ constructor( private var startingAfter: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(userListParams: UserListParams) = apply { @@ -146,7 +140,6 @@ constructor( this.startingAfter = userListParams.startingAfter additionalQueryParams(userListParams.additionalQueryParams) additionalHeaders(userListParams.additionalHeaders) - additionalBodyProperties(userListParams.additionalBodyProperties) } /** @@ -289,20 +282,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(): UserListParams = UserListParams( email, @@ -315,7 +294,6 @@ constructor( startingAfter, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/UserRetrieveParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/UserRetrieveParams.kt index 2d26c6c..5dfac4e 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/UserRetrieveParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/UserRetrieveParams.kt @@ -2,7 +2,6 @@ package com.braintrustdata.api.models -import com.braintrustdata.api.core.JsonValue import com.braintrustdata.api.core.NoAutoDetect import com.braintrustdata.api.core.toUnmodifiable import com.braintrustdata.api.models.* @@ -13,7 +12,6 @@ constructor( private val userId: String, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun userId(): String = userId @@ -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 UserRetrieveParams && this.userId == other.userId && 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( userId, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "UserRetrieveParams{userId=$userId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "UserRetrieveParams{userId=$userId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -72,14 +66,12 @@ constructor( private var userId: String? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(userRetrieveParams: UserRetrieveParams) = apply { this.userId = userRetrieveParams.userId additionalQueryParams(userRetrieveParams.additionalQueryParams) additionalHeaders(userRetrieveParams.additionalHeaders) - additionalBodyProperties(userRetrieveParams.additionalBodyProperties) } /** User id */ @@ -125,26 +117,11 @@ 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(): UserRetrieveParams = UserRetrieveParams( checkNotNull(userId) { "`userId` is required but was not set" }, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ViewListParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ViewListParams.kt index 8556bb9..9b65e28 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ViewListParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ViewListParams.kt @@ -35,7 +35,6 @@ constructor( private val viewType: ViewType?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun objectId(): String = objectId @@ -75,8 +74,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -92,8 +89,7 @@ constructor( this.viewName == other.viewName && this.viewType == other.viewType && this.additionalQueryParams == other.additionalQueryParams && - this.additionalHeaders == other.additionalHeaders && - this.additionalBodyProperties == other.additionalBodyProperties + this.additionalHeaders == other.additionalHeaders } override fun hashCode(): Int { @@ -108,12 +104,11 @@ constructor( viewType, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ViewListParams{objectId=$objectId, objectType=$objectType, endingBefore=$endingBefore, ids=$ids, limit=$limit, startingAfter=$startingAfter, viewName=$viewName, viewType=$viewType, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ViewListParams{objectId=$objectId, objectType=$objectType, endingBefore=$endingBefore, ids=$ids, limit=$limit, startingAfter=$startingAfter, viewName=$viewName, viewType=$viewType, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -135,7 +130,6 @@ constructor( private var viewType: ViewType? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(viewListParams: ViewListParams) = apply { @@ -149,7 +143,6 @@ constructor( this.viewType = viewListParams.viewType additionalQueryParams(viewListParams.additionalQueryParams) additionalHeaders(viewListParams.additionalHeaders) - additionalBodyProperties(viewListParams.additionalBodyProperties) } /** The id of the object the ACL applies to */ @@ -243,20 +236,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(): ViewListParams = ViewListParams( checkNotNull(objectId) { "`objectId` is required but was not set" }, @@ -269,7 +248,6 @@ constructor( viewType, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ViewRetrieveParams.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ViewRetrieveParams.kt index 698e35c..3a85872 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ViewRetrieveParams.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/models/ViewRetrieveParams.kt @@ -20,7 +20,6 @@ constructor( private val objectType: ObjectType?, private val additionalQueryParams: Map>, private val additionalHeaders: Map>, - private val additionalBodyProperties: Map, ) { fun viewId(): String = viewId @@ -51,8 +50,6 @@ constructor( fun _additionalHeaders(): Map> = additionalHeaders - fun _additionalBodyProperties(): Map = additionalBodyProperties - override fun equals(other: Any?): Boolean { if (this === other) { return true @@ -63,8 +60,7 @@ constructor( this.objectId == other.objectId && this.objectType == other.objectType && 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( objectType, additionalQueryParams, additionalHeaders, - additionalBodyProperties, ) } override fun toString() = - "ViewRetrieveParams{viewId=$viewId, objectId=$objectId, objectType=$objectType, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}" + "ViewRetrieveParams{viewId=$viewId, objectId=$objectId, objectType=$objectType, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}" fun toBuilder() = Builder().from(this) @@ -96,7 +91,6 @@ constructor( private var objectType: ObjectType? = null private var additionalQueryParams: MutableMap> = mutableMapOf() private var additionalHeaders: MutableMap> = mutableMapOf() - private var additionalBodyProperties: MutableMap = mutableMapOf() @JvmSynthetic internal fun from(viewRetrieveParams: ViewRetrieveParams) = apply { @@ -105,7 +99,6 @@ constructor( this.objectType = viewRetrieveParams.objectType additionalQueryParams(viewRetrieveParams.additionalQueryParams) additionalHeaders(viewRetrieveParams.additionalHeaders) - additionalBodyProperties(viewRetrieveParams.additionalBodyProperties) } /** View id */ @@ -157,20 +150,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(): ViewRetrieveParams = ViewRetrieveParams( checkNotNull(viewId) { "`viewId` is required but was not set" }, @@ -178,7 +157,6 @@ constructor( objectType, additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(), - additionalBodyProperties.toUnmodifiable(), ) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/services/Handlers.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/services/Handlers.kt index 253bc27..8ac9e3d 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/services/Handlers.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/services/Handlers.kt @@ -17,6 +17,8 @@ import com.braintrustdata.api.errors.UnexpectedStatusCodeException import com.braintrustdata.api.errors.UnprocessableEntityException import com.fasterxml.jackson.databind.json.JsonMapper import com.fasterxml.jackson.module.kotlin.jacksonTypeRef +import com.google.common.collect.ListMultimap +import java.io.ByteArrayInputStream import java.io.InputStream import java.io.OutputStream import java.util.Optional @@ -87,35 +89,98 @@ internal fun Handler.withErrorHandler(errorHandler: Handler { override fun handle(response: HttpResponse): T { when (val statusCode = response.statusCode()) { - in 200..299 -> return this@withErrorHandler.handle(response) - 400 -> throw BadRequestException(response.headers(), errorHandler.handle(response)) - 401 -> - throw UnauthorizedException(response.headers(), errorHandler.handle(response)) - 403 -> + in 200..299 -> { + return this@withErrorHandler.handle(response) + } + 400 -> { + val buffered = response.buffered() + throw BadRequestException( + buffered.headers(), + StringHandler.handle(buffered), + errorHandler.handle(buffered), + ) + } + 401 -> { + val buffered = response.buffered() + throw UnauthorizedException( + buffered.headers(), + StringHandler.handle(buffered), + errorHandler.handle(buffered), + ) + } + 403 -> { + val buffered = response.buffered() throw PermissionDeniedException( - response.headers(), - errorHandler.handle(response) + buffered.headers(), + StringHandler.handle(buffered), + errorHandler.handle(buffered), ) - 404 -> throw NotFoundException(response.headers(), errorHandler.handle(response)) - 422 -> + } + 404 -> { + val buffered = response.buffered() + throw NotFoundException( + buffered.headers(), + StringHandler.handle(buffered), + errorHandler.handle(buffered), + ) + } + 422 -> { + val buffered = response.buffered() throw UnprocessableEntityException( - response.headers(), - errorHandler.handle(response) + buffered.headers(), + StringHandler.handle(buffered), + errorHandler.handle(buffered), + ) + } + 429 -> { + val buffered = response.buffered() + throw RateLimitException( + buffered.headers(), + StringHandler.handle(buffered), + errorHandler.handle(buffered), ) - 429 -> throw RateLimitException(response.headers(), errorHandler.handle(response)) - in 500..599 -> + } + in 500..599 -> { + val buffered = response.buffered() throw InternalServerException( statusCode, - response.headers(), - errorHandler.handle(response) + buffered.headers(), + StringHandler.handle(buffered), + errorHandler.handle(buffered), ) - else -> + } + else -> { + val buffered = response.buffered() throw UnexpectedStatusCodeException( statusCode, - response.headers(), - StringHandler.handle(response) + buffered.headers(), + StringHandler.handle(buffered), + errorHandler.handle(buffered), ) + } } } } } + +private fun HttpResponse.buffered(): HttpResponse { + val body = body().readBytes() + + return object : HttpResponse { + override fun statusCode(): Int { + return this@buffered.statusCode() + } + + override fun headers(): ListMultimap { + return this@buffered.headers() + } + + override fun body(): InputStream { + return ByteArrayInputStream(body) + } + + override fun close() { + this@buffered.close() + } + } +}