From 5c63ec1c1cf6a92d13620104e9cc95c0f9b29738 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 1 Nov 2024 22:54:07 +0000 Subject: [PATCH] chore: rebuild project due to codegen change --- .../client/okhttp/BraintrustOkHttpClient.kt | 18 ++++++++++++++++++ .../okhttp/BraintrustOkHttpClientAsync.kt | 18 ++++++++++++++++++ .../braintrustdata/api/core/ClientOptions.kt | 8 ++++---- 3 files changed, 40 insertions(+), 4 deletions(-) diff --git a/braintrust-java-client-okhttp/src/main/kotlin/com/braintrustdata/api/client/okhttp/BraintrustOkHttpClient.kt b/braintrust-java-client-okhttp/src/main/kotlin/com/braintrustdata/api/client/okhttp/BraintrustOkHttpClient.kt index 83affecc..baa76a5f 100755 --- a/braintrust-java-client-okhttp/src/main/kotlin/com/braintrustdata/api/client/okhttp/BraintrustOkHttpClient.kt +++ b/braintrust-java-client-okhttp/src/main/kotlin/com/braintrustdata/api/client/okhttp/BraintrustOkHttpClient.kt @@ -52,6 +52,24 @@ class BraintrustOkHttpClient private constructor() { fun removeHeader(name: String) = apply { clientOptions.removeHeader(name) } + fun queryParams(queryParams: Map>) = apply { + clientOptions.queryParams(queryParams) + } + + fun putQueryParam(key: String, value: String) = apply { + clientOptions.putQueryParam(key, value) + } + + fun putQueryParams(key: String, values: Iterable) = apply { + clientOptions.putQueryParams(key, values) + } + + fun putAllQueryParams(queryParams: Map>) = apply { + clientOptions.putAllQueryParams(queryParams) + } + + fun removeQueryParam(key: String) = apply { clientOptions.removeQueryParam(key) } + fun timeout(timeout: Duration) = apply { this.timeout = timeout } fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) } diff --git a/braintrust-java-client-okhttp/src/main/kotlin/com/braintrustdata/api/client/okhttp/BraintrustOkHttpClientAsync.kt b/braintrust-java-client-okhttp/src/main/kotlin/com/braintrustdata/api/client/okhttp/BraintrustOkHttpClientAsync.kt index 08d1b49f..4aa21373 100755 --- a/braintrust-java-client-okhttp/src/main/kotlin/com/braintrustdata/api/client/okhttp/BraintrustOkHttpClientAsync.kt +++ b/braintrust-java-client-okhttp/src/main/kotlin/com/braintrustdata/api/client/okhttp/BraintrustOkHttpClientAsync.kt @@ -52,6 +52,24 @@ class BraintrustOkHttpClientAsync private constructor() { fun removeHeader(name: String) = apply { clientOptions.removeHeader(name) } + fun queryParams(queryParams: Map>) = apply { + clientOptions.queryParams(queryParams) + } + + fun putQueryParam(key: String, value: String) = apply { + clientOptions.putQueryParam(key, value) + } + + fun putQueryParams(key: String, values: Iterable) = apply { + clientOptions.putQueryParams(key, values) + } + + fun putAllQueryParams(queryParams: Map>) = apply { + clientOptions.putAllQueryParams(queryParams) + } + + fun removeQueryParam(key: String) = apply { clientOptions.removeQueryParam(key) } + fun timeout(timeout: Duration) = apply { this.timeout = timeout } fun maxRetries(maxRetries: Int) = apply { clientOptions.maxRetries(maxRetries) } diff --git a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/core/ClientOptions.kt b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/core/ClientOptions.kt index 3a266f69..993bdf93 100755 --- a/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/core/ClientOptions.kt +++ b/braintrust-java-core/src/main/kotlin/com/braintrustdata/api/core/ClientOptions.kt @@ -90,17 +90,17 @@ private constructor( putAllQueryParams(queryParams) } - fun putQueryParam(name: String, value: String) = apply { queryParams.put(name, value) } + fun putQueryParam(key: String, value: String) = apply { queryParams.put(key, value) } - fun putQueryParams(name: String, values: Iterable) = apply { - queryParams.putAll(name, values) + fun putQueryParams(key: String, values: Iterable) = apply { + queryParams.putAll(key, values) } fun putAllQueryParams(queryParams: Map>) = apply { queryParams.forEach(::putQueryParams) } - fun removeQueryParam(name: String) = apply { queryParams.removeAll(name) } + fun removeQueryParam(key: String) = apply { queryParams.removeAll(key) } fun responseValidation(responseValidation: Boolean) = apply { this.responseValidation = responseValidation