Skip to content

Commit 024a4ae

Browse files
feat(api): update via SDK Studio (#15)
1 parent fafcb50 commit 024a4ae

File tree

10 files changed

+100
-100
lines changed

10 files changed

+100
-100
lines changed

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRowStreamParams.kt openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRowUpdateParams.kt

+25-25
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import com.openlayer.api.models.*
1414
import java.util.Objects
1515
import java.util.Optional
1616

17-
class InferencePipelineRowStreamParams
17+
class InferencePipelineRowUpdateParams
1818
constructor(
1919
private val inferencePipelineId: String,
2020
private val inferenceId: String,
@@ -34,8 +34,8 @@ constructor(
3434
fun config(): Optional<Config> = Optional.ofNullable(config)
3535

3636
@JvmSynthetic
37-
internal fun getBody(): InferencePipelineRowStreamBody {
38-
return InferencePipelineRowStreamBody(
37+
internal fun getBody(): InferencePipelineRowUpdateBody {
38+
return InferencePipelineRowUpdateBody(
3939
row,
4040
config,
4141
additionalBodyProperties,
@@ -59,9 +59,9 @@ constructor(
5959
}
6060
}
6161

62-
@JsonDeserialize(builder = InferencePipelineRowStreamBody.Builder::class)
62+
@JsonDeserialize(builder = InferencePipelineRowUpdateBody.Builder::class)
6363
@NoAutoDetect
64-
class InferencePipelineRowStreamBody
64+
class InferencePipelineRowUpdateBody
6565
internal constructor(
6666
private val row: JsonValue?,
6767
private val config: Config?,
@@ -85,7 +85,7 @@ constructor(
8585
return true
8686
}
8787

88-
return other is InferencePipelineRowStreamBody &&
88+
return other is InferencePipelineRowUpdateBody &&
8989
this.row == other.row &&
9090
this.config == other.config &&
9191
this.additionalProperties == other.additionalProperties
@@ -104,7 +104,7 @@ constructor(
104104
}
105105

106106
override fun toString() =
107-
"InferencePipelineRowStreamBody{row=$row, config=$config, additionalProperties=$additionalProperties}"
107+
"InferencePipelineRowUpdateBody{row=$row, config=$config, additionalProperties=$additionalProperties}"
108108

109109
companion object {
110110

@@ -118,11 +118,11 @@ constructor(
118118
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
119119

120120
@JvmSynthetic
121-
internal fun from(inferencePipelineRowStreamBody: InferencePipelineRowStreamBody) =
121+
internal fun from(inferencePipelineRowUpdateBody: InferencePipelineRowUpdateBody) =
122122
apply {
123-
this.row = inferencePipelineRowStreamBody.row
124-
this.config = inferencePipelineRowStreamBody.config
125-
additionalProperties(inferencePipelineRowStreamBody.additionalProperties)
123+
this.row = inferencePipelineRowUpdateBody.row
124+
this.config = inferencePipelineRowUpdateBody.config
125+
additionalProperties(inferencePipelineRowUpdateBody.additionalProperties)
126126
}
127127

128128
@JsonProperty("row") fun row(row: JsonValue) = apply { this.row = row }
@@ -143,8 +143,8 @@ constructor(
143143
this.additionalProperties.putAll(additionalProperties)
144144
}
145145

146-
fun build(): InferencePipelineRowStreamBody =
147-
InferencePipelineRowStreamBody(
146+
fun build(): InferencePipelineRowUpdateBody =
147+
InferencePipelineRowUpdateBody(
148148
checkNotNull(row) { "`row` is required but was not set" },
149149
config,
150150
additionalProperties.toUnmodifiable(),
@@ -163,7 +163,7 @@ constructor(
163163
return true
164164
}
165165

166-
return other is InferencePipelineRowStreamParams &&
166+
return other is InferencePipelineRowUpdateParams &&
167167
this.inferencePipelineId == other.inferencePipelineId &&
168168
this.row == other.row &&
169169
this.config == other.config &&
@@ -186,7 +186,7 @@ constructor(
186186
}
187187

188188
override fun toString() =
189-
"InferencePipelineRowStreamParams{inferencePipelineId=$inferencePipelineId, row=$row, config=$config, inferenceId=$inferenceId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}"
189+
"InferencePipelineRowUpdateParams{inferencePipelineId=$inferencePipelineId, row=$row, config=$config, inferenceId=$inferenceId, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}"
190190

191191
fun toBuilder() = Builder().from(this)
192192

@@ -207,15 +207,15 @@ constructor(
207207
private var additionalBodyProperties: MutableMap<String, JsonValue> = mutableMapOf()
208208

209209
@JvmSynthetic
210-
internal fun from(inferencePipelineRowStreamParams: InferencePipelineRowStreamParams) =
210+
internal fun from(inferencePipelineRowUpdateParams: InferencePipelineRowUpdateParams) =
211211
apply {
212-
this.inferencePipelineId = inferencePipelineRowStreamParams.inferencePipelineId
213-
this.inferenceId = inferencePipelineRowStreamParams.inferenceId
214-
this.row = inferencePipelineRowStreamParams.row
215-
this.config = inferencePipelineRowStreamParams.config
216-
additionalQueryParams(inferencePipelineRowStreamParams.additionalQueryParams)
217-
additionalHeaders(inferencePipelineRowStreamParams.additionalHeaders)
218-
additionalBodyProperties(inferencePipelineRowStreamParams.additionalBodyProperties)
212+
this.inferencePipelineId = inferencePipelineRowUpdateParams.inferencePipelineId
213+
this.inferenceId = inferencePipelineRowUpdateParams.inferenceId
214+
this.row = inferencePipelineRowUpdateParams.row
215+
this.config = inferencePipelineRowUpdateParams.config
216+
additionalQueryParams(inferencePipelineRowUpdateParams.additionalQueryParams)
217+
additionalHeaders(inferencePipelineRowUpdateParams.additionalHeaders)
218+
additionalBodyProperties(inferencePipelineRowUpdateParams.additionalBodyProperties)
219219
}
220220

221221
fun inferencePipelineId(inferencePipelineId: String) = apply {
@@ -283,8 +283,8 @@ constructor(
283283
this.additionalBodyProperties.putAll(additionalBodyProperties)
284284
}
285285

286-
fun build(): InferencePipelineRowStreamParams =
287-
InferencePipelineRowStreamParams(
286+
fun build(): InferencePipelineRowUpdateParams =
287+
InferencePipelineRowUpdateParams(
288288
checkNotNull(inferencePipelineId) {
289289
"`inferencePipelineId` is required but was not set"
290290
},

openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRowStreamResponse.kt openlayer-java-core/src/main/kotlin/com/openlayer/api/models/InferencePipelineRowUpdateResponse.kt

+10-10
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ import com.openlayer.api.core.toUnmodifiable
1717
import com.openlayer.api.errors.OpenlayerInvalidDataException
1818
import java.util.Objects
1919

20-
@JsonDeserialize(builder = InferencePipelineRowStreamResponse.Builder::class)
20+
@JsonDeserialize(builder = InferencePipelineRowUpdateResponse.Builder::class)
2121
@NoAutoDetect
22-
class InferencePipelineRowStreamResponse
22+
class InferencePipelineRowUpdateResponse
2323
private constructor(
2424
private val success: JsonField<Success>,
2525
private val additionalProperties: Map<String, JsonValue>,
@@ -37,7 +37,7 @@ private constructor(
3737
@ExcludeMissing
3838
fun _additionalProperties(): Map<String, JsonValue> = additionalProperties
3939

40-
fun validate(): InferencePipelineRowStreamResponse = apply {
40+
fun validate(): InferencePipelineRowUpdateResponse = apply {
4141
if (!validated) {
4242
success()
4343
validated = true
@@ -51,7 +51,7 @@ private constructor(
5151
return true
5252
}
5353

54-
return other is InferencePipelineRowStreamResponse &&
54+
return other is InferencePipelineRowUpdateResponse &&
5555
this.success == other.success &&
5656
this.additionalProperties == other.additionalProperties
5757
}
@@ -64,7 +64,7 @@ private constructor(
6464
}
6565

6666
override fun toString() =
67-
"InferencePipelineRowStreamResponse{success=$success, additionalProperties=$additionalProperties}"
67+
"InferencePipelineRowUpdateResponse{success=$success, additionalProperties=$additionalProperties}"
6868

6969
companion object {
7070

@@ -77,10 +77,10 @@ private constructor(
7777
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
7878

7979
@JvmSynthetic
80-
internal fun from(inferencePipelineRowStreamResponse: InferencePipelineRowStreamResponse) =
80+
internal fun from(inferencePipelineRowUpdateResponse: InferencePipelineRowUpdateResponse) =
8181
apply {
82-
this.success = inferencePipelineRowStreamResponse.success
83-
additionalProperties(inferencePipelineRowStreamResponse.additionalProperties)
82+
this.success = inferencePipelineRowUpdateResponse.success
83+
additionalProperties(inferencePipelineRowUpdateResponse.additionalProperties)
8484
}
8585

8686
fun success(success: Success) = success(JsonField.of(success))
@@ -103,8 +103,8 @@ private constructor(
103103
this.additionalProperties.putAll(additionalProperties)
104104
}
105105

106-
fun build(): InferencePipelineRowStreamResponse =
107-
InferencePipelineRowStreamResponse(success, additionalProperties.toUnmodifiable())
106+
fun build(): InferencePipelineRowUpdateResponse =
107+
InferencePipelineRowUpdateResponse(success, additionalProperties.toUnmodifiable())
108108
}
109109

110110
class Success

openlayer-java-core/src/main/kotlin/com/openlayer/api/services/async/inferencePipelines/RowServiceAsync.kt

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
package com.openlayer.api.services.async.inferencePipelines
66

77
import com.openlayer.api.core.RequestOptions
8-
import com.openlayer.api.models.InferencePipelineRowStreamParams
9-
import com.openlayer.api.models.InferencePipelineRowStreamResponse
8+
import com.openlayer.api.models.InferencePipelineRowUpdateParams
9+
import com.openlayer.api.models.InferencePipelineRowUpdateResponse
1010
import java.util.concurrent.CompletableFuture
1111

1212
interface RowServiceAsync {
1313

1414
/** Update an inference data point in an inference pipeline. */
1515
@JvmOverloads
16-
fun stream(
17-
params: InferencePipelineRowStreamParams,
16+
fun update(
17+
params: InferencePipelineRowUpdateParams,
1818
requestOptions: RequestOptions = RequestOptions.none()
19-
): CompletableFuture<InferencePipelineRowStreamResponse>
19+
): CompletableFuture<InferencePipelineRowUpdateResponse>
2020
}

openlayer-java-core/src/main/kotlin/com/openlayer/api/services/async/inferencePipelines/RowServiceAsyncImpl.kt

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import com.openlayer.api.core.http.HttpMethod
88
import com.openlayer.api.core.http.HttpRequest
99
import com.openlayer.api.core.http.HttpResponse.Handler
1010
import com.openlayer.api.errors.OpenlayerError
11-
import com.openlayer.api.models.InferencePipelineRowStreamParams
12-
import com.openlayer.api.models.InferencePipelineRowStreamResponse
11+
import com.openlayer.api.models.InferencePipelineRowUpdateParams
12+
import com.openlayer.api.models.InferencePipelineRowUpdateResponse
1313
import com.openlayer.api.services.errorHandler
1414
import com.openlayer.api.services.json
1515
import com.openlayer.api.services.jsonHandler
@@ -23,15 +23,15 @@ constructor(
2323

2424
private val errorHandler: Handler<OpenlayerError> = errorHandler(clientOptions.jsonMapper)
2525

26-
private val streamHandler: Handler<InferencePipelineRowStreamResponse> =
27-
jsonHandler<InferencePipelineRowStreamResponse>(clientOptions.jsonMapper)
26+
private val updateHandler: Handler<InferencePipelineRowUpdateResponse> =
27+
jsonHandler<InferencePipelineRowUpdateResponse>(clientOptions.jsonMapper)
2828
.withErrorHandler(errorHandler)
2929

3030
/** Update an inference data point in an inference pipeline. */
31-
override fun stream(
32-
params: InferencePipelineRowStreamParams,
31+
override fun update(
32+
params: InferencePipelineRowUpdateParams,
3333
requestOptions: RequestOptions
34-
): CompletableFuture<InferencePipelineRowStreamResponse> {
34+
): CompletableFuture<InferencePipelineRowUpdateResponse> {
3535
val request =
3636
HttpRequest.builder()
3737
.method(HttpMethod.PUT)
@@ -45,7 +45,7 @@ constructor(
4545
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
4646
->
4747
response
48-
.use { streamHandler.handle(it) }
48+
.use { updateHandler.handle(it) }
4949
.apply {
5050
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
5151
validate()

openlayer-java-core/src/main/kotlin/com/openlayer/api/services/blocking/inferencePipelines/RowService.kt

+5-5
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@
55
package com.openlayer.api.services.blocking.inferencePipelines
66

77
import com.openlayer.api.core.RequestOptions
8-
import com.openlayer.api.models.InferencePipelineRowStreamParams
9-
import com.openlayer.api.models.InferencePipelineRowStreamResponse
8+
import com.openlayer.api.models.InferencePipelineRowUpdateParams
9+
import com.openlayer.api.models.InferencePipelineRowUpdateResponse
1010

1111
interface RowService {
1212

1313
/** Update an inference data point in an inference pipeline. */
1414
@JvmOverloads
15-
fun stream(
16-
params: InferencePipelineRowStreamParams,
15+
fun update(
16+
params: InferencePipelineRowUpdateParams,
1717
requestOptions: RequestOptions = RequestOptions.none()
18-
): InferencePipelineRowStreamResponse
18+
): InferencePipelineRowUpdateResponse
1919
}

openlayer-java-core/src/main/kotlin/com/openlayer/api/services/blocking/inferencePipelines/RowServiceImpl.kt

+8-8
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import com.openlayer.api.core.http.HttpMethod
88
import com.openlayer.api.core.http.HttpRequest
99
import com.openlayer.api.core.http.HttpResponse.Handler
1010
import com.openlayer.api.errors.OpenlayerError
11-
import com.openlayer.api.models.InferencePipelineRowStreamParams
12-
import com.openlayer.api.models.InferencePipelineRowStreamResponse
11+
import com.openlayer.api.models.InferencePipelineRowUpdateParams
12+
import com.openlayer.api.models.InferencePipelineRowUpdateResponse
1313
import com.openlayer.api.services.errorHandler
1414
import com.openlayer.api.services.json
1515
import com.openlayer.api.services.jsonHandler
@@ -22,15 +22,15 @@ constructor(
2222

2323
private val errorHandler: Handler<OpenlayerError> = errorHandler(clientOptions.jsonMapper)
2424

25-
private val streamHandler: Handler<InferencePipelineRowStreamResponse> =
26-
jsonHandler<InferencePipelineRowStreamResponse>(clientOptions.jsonMapper)
25+
private val updateHandler: Handler<InferencePipelineRowUpdateResponse> =
26+
jsonHandler<InferencePipelineRowUpdateResponse>(clientOptions.jsonMapper)
2727
.withErrorHandler(errorHandler)
2828

2929
/** Update an inference data point in an inference pipeline. */
30-
override fun stream(
31-
params: InferencePipelineRowStreamParams,
30+
override fun update(
31+
params: InferencePipelineRowUpdateParams,
3232
requestOptions: RequestOptions
33-
): InferencePipelineRowStreamResponse {
33+
): InferencePipelineRowUpdateResponse {
3434
val request =
3535
HttpRequest.builder()
3636
.method(HttpMethod.PUT)
@@ -43,7 +43,7 @@ constructor(
4343
.build()
4444
return clientOptions.httpClient.execute(request, requestOptions).let { response ->
4545
response
46-
.use { streamHandler.handle(it) }
46+
.use { updateHandler.handle(it) }
4747
.apply {
4848
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
4949
validate()

openlayer-java-core/src/test/kotlin/com/openlayer/api/models/InferencePipelineRowStreamResponseTest.kt

-20
This file was deleted.

0 commit comments

Comments
 (0)