Skip to content

Commit db4b1fb

Browse files
feat(api): add missing endpoints
1 parent 4f0a782 commit db4b1fb

44 files changed

Lines changed: 10884 additions & 2 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
configured_endpoints: 19
1+
configured_endpoints: 24
22
openapi_spec_hash: 68055a774f3305fb11efa5b5b5881446
3-
config_hash: 00442fdab71911b02ab1e10f9ec05b79
3+
config_hash: f0743196c68fb84cbd06a95f134702b3

openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClient.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import com.openlayer.api.services.blocking.InferencePipelineService
88
import com.openlayer.api.services.blocking.ProjectService
99
import com.openlayer.api.services.blocking.StorageService
1010
import com.openlayer.api.services.blocking.TestService
11+
import com.openlayer.api.services.blocking.WorkspaceService
1112
import java.util.function.Consumer
1213

1314
/**
@@ -48,6 +49,8 @@ interface OpenlayerClient {
4849

4950
fun projects(): ProjectService
5051

52+
fun workspaces(): WorkspaceService
53+
5154
fun commits(): CommitService
5255

5356
fun inferencePipelines(): InferencePipelineService
@@ -81,6 +84,8 @@ interface OpenlayerClient {
8184

8285
fun projects(): ProjectService.WithRawResponse
8386

87+
fun workspaces(): WorkspaceService.WithRawResponse
88+
8489
fun commits(): CommitService.WithRawResponse
8590

8691
fun inferencePipelines(): InferencePipelineService.WithRawResponse

openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsync.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import com.openlayer.api.services.async.InferencePipelineServiceAsync
88
import com.openlayer.api.services.async.ProjectServiceAsync
99
import com.openlayer.api.services.async.StorageServiceAsync
1010
import com.openlayer.api.services.async.TestServiceAsync
11+
import com.openlayer.api.services.async.WorkspaceServiceAsync
1112
import java.util.function.Consumer
1213

1314
/**
@@ -48,6 +49,8 @@ interface OpenlayerClientAsync {
4849

4950
fun projects(): ProjectServiceAsync
5051

52+
fun workspaces(): WorkspaceServiceAsync
53+
5154
fun commits(): CommitServiceAsync
5255

5356
fun inferencePipelines(): InferencePipelineServiceAsync
@@ -85,6 +88,8 @@ interface OpenlayerClientAsync {
8588

8689
fun projects(): ProjectServiceAsync.WithRawResponse
8790

91+
fun workspaces(): WorkspaceServiceAsync.WithRawResponse
92+
8893
fun commits(): CommitServiceAsync.WithRawResponse
8994

9095
fun inferencePipelines(): InferencePipelineServiceAsync.WithRawResponse

openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientAsyncImpl.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import com.openlayer.api.services.async.StorageServiceAsync
1414
import com.openlayer.api.services.async.StorageServiceAsyncImpl
1515
import com.openlayer.api.services.async.TestServiceAsync
1616
import com.openlayer.api.services.async.TestServiceAsyncImpl
17+
import com.openlayer.api.services.async.WorkspaceServiceAsync
18+
import com.openlayer.api.services.async.WorkspaceServiceAsyncImpl
1719
import java.util.function.Consumer
1820

1921
class OpenlayerClientAsyncImpl(private val clientOptions: ClientOptions) : OpenlayerClientAsync {
@@ -37,6 +39,10 @@ class OpenlayerClientAsyncImpl(private val clientOptions: ClientOptions) : Openl
3739
ProjectServiceAsyncImpl(clientOptionsWithUserAgent)
3840
}
3941

42+
private val workspaces: WorkspaceServiceAsync by lazy {
43+
WorkspaceServiceAsyncImpl(clientOptionsWithUserAgent)
44+
}
45+
4046
private val commits: CommitServiceAsync by lazy {
4147
CommitServiceAsyncImpl(clientOptionsWithUserAgent)
4248
}
@@ -60,6 +66,8 @@ class OpenlayerClientAsyncImpl(private val clientOptions: ClientOptions) : Openl
6066

6167
override fun projects(): ProjectServiceAsync = projects
6268

69+
override fun workspaces(): WorkspaceServiceAsync = workspaces
70+
6371
override fun commits(): CommitServiceAsync = commits
6472

6573
override fun inferencePipelines(): InferencePipelineServiceAsync = inferencePipelines
@@ -77,6 +85,10 @@ class OpenlayerClientAsyncImpl(private val clientOptions: ClientOptions) : Openl
7785
ProjectServiceAsyncImpl.WithRawResponseImpl(clientOptions)
7886
}
7987

88+
private val workspaces: WorkspaceServiceAsync.WithRawResponse by lazy {
89+
WorkspaceServiceAsyncImpl.WithRawResponseImpl(clientOptions)
90+
}
91+
8092
private val commits: CommitServiceAsync.WithRawResponse by lazy {
8193
CommitServiceAsyncImpl.WithRawResponseImpl(clientOptions)
8294
}
@@ -102,6 +114,8 @@ class OpenlayerClientAsyncImpl(private val clientOptions: ClientOptions) : Openl
102114

103115
override fun projects(): ProjectServiceAsync.WithRawResponse = projects
104116

117+
override fun workspaces(): WorkspaceServiceAsync.WithRawResponse = workspaces
118+
105119
override fun commits(): CommitServiceAsync.WithRawResponse = commits
106120

107121
override fun inferencePipelines(): InferencePipelineServiceAsync.WithRawResponse =

openlayer-java-core/src/main/kotlin/com/openlayer/api/client/OpenlayerClientImpl.kt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ import com.openlayer.api.services.blocking.StorageService
1414
import com.openlayer.api.services.blocking.StorageServiceImpl
1515
import com.openlayer.api.services.blocking.TestService
1616
import com.openlayer.api.services.blocking.TestServiceImpl
17+
import com.openlayer.api.services.blocking.WorkspaceService
18+
import com.openlayer.api.services.blocking.WorkspaceServiceImpl
1719
import java.util.function.Consumer
1820

1921
class OpenlayerClientImpl(private val clientOptions: ClientOptions) : OpenlayerClient {
@@ -35,6 +37,10 @@ class OpenlayerClientImpl(private val clientOptions: ClientOptions) : OpenlayerC
3537

3638
private val projects: ProjectService by lazy { ProjectServiceImpl(clientOptionsWithUserAgent) }
3739

40+
private val workspaces: WorkspaceService by lazy {
41+
WorkspaceServiceImpl(clientOptionsWithUserAgent)
42+
}
43+
3844
private val commits: CommitService by lazy { CommitServiceImpl(clientOptionsWithUserAgent) }
3945

4046
private val inferencePipelines: InferencePipelineService by lazy {
@@ -54,6 +60,8 @@ class OpenlayerClientImpl(private val clientOptions: ClientOptions) : OpenlayerC
5460

5561
override fun projects(): ProjectService = projects
5662

63+
override fun workspaces(): WorkspaceService = workspaces
64+
5765
override fun commits(): CommitService = commits
5866

5967
override fun inferencePipelines(): InferencePipelineService = inferencePipelines
@@ -71,6 +79,10 @@ class OpenlayerClientImpl(private val clientOptions: ClientOptions) : OpenlayerC
7179
ProjectServiceImpl.WithRawResponseImpl(clientOptions)
7280
}
7381

82+
private val workspaces: WorkspaceService.WithRawResponse by lazy {
83+
WorkspaceServiceImpl.WithRawResponseImpl(clientOptions)
84+
}
85+
7486
private val commits: CommitService.WithRawResponse by lazy {
7587
CommitServiceImpl.WithRawResponseImpl(clientOptions)
7688
}
@@ -96,6 +108,8 @@ class OpenlayerClientImpl(private val clientOptions: ClientOptions) : OpenlayerC
96108

97109
override fun projects(): ProjectService.WithRawResponse = projects
98110

111+
override fun workspaces(): WorkspaceService.WithRawResponse = workspaces
112+
99113
override fun commits(): CommitService.WithRawResponse = commits
100114

101115
override fun inferencePipelines(): InferencePipelineService.WithRawResponse =
Lines changed: 194 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
// File generated from our OpenAPI spec by Stainless.
2+
3+
package com.openlayer.api.models.workspaces
4+
5+
import com.openlayer.api.core.Params
6+
import com.openlayer.api.core.http.Headers
7+
import com.openlayer.api.core.http.QueryParams
8+
import java.util.Objects
9+
import java.util.Optional
10+
import kotlin.jvm.optionals.getOrNull
11+
12+
/** Retrieve a workspace by its ID. */
13+
class WorkspaceRetrieveParams
14+
private constructor(
15+
private val workspaceId: String?,
16+
private val additionalHeaders: Headers,
17+
private val additionalQueryParams: QueryParams,
18+
) : Params {
19+
20+
fun workspaceId(): Optional<String> = Optional.ofNullable(workspaceId)
21+
22+
/** Additional headers to send with the request. */
23+
fun _additionalHeaders(): Headers = additionalHeaders
24+
25+
/** Additional query param to send with the request. */
26+
fun _additionalQueryParams(): QueryParams = additionalQueryParams
27+
28+
fun toBuilder() = Builder().from(this)
29+
30+
companion object {
31+
32+
@JvmStatic fun none(): WorkspaceRetrieveParams = builder().build()
33+
34+
/** Returns a mutable builder for constructing an instance of [WorkspaceRetrieveParams]. */
35+
@JvmStatic fun builder() = Builder()
36+
}
37+
38+
/** A builder for [WorkspaceRetrieveParams]. */
39+
class Builder internal constructor() {
40+
41+
private var workspaceId: String? = null
42+
private var additionalHeaders: Headers.Builder = Headers.builder()
43+
private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()
44+
45+
@JvmSynthetic
46+
internal fun from(workspaceRetrieveParams: WorkspaceRetrieveParams) = apply {
47+
workspaceId = workspaceRetrieveParams.workspaceId
48+
additionalHeaders = workspaceRetrieveParams.additionalHeaders.toBuilder()
49+
additionalQueryParams = workspaceRetrieveParams.additionalQueryParams.toBuilder()
50+
}
51+
52+
fun workspaceId(workspaceId: String?) = apply { this.workspaceId = workspaceId }
53+
54+
/** Alias for calling [Builder.workspaceId] with `workspaceId.orElse(null)`. */
55+
fun workspaceId(workspaceId: Optional<String>) = workspaceId(workspaceId.getOrNull())
56+
57+
fun additionalHeaders(additionalHeaders: Headers) = apply {
58+
this.additionalHeaders.clear()
59+
putAllAdditionalHeaders(additionalHeaders)
60+
}
61+
62+
fun additionalHeaders(additionalHeaders: Map<String, Iterable<String>>) = apply {
63+
this.additionalHeaders.clear()
64+
putAllAdditionalHeaders(additionalHeaders)
65+
}
66+
67+
fun putAdditionalHeader(name: String, value: String) = apply {
68+
additionalHeaders.put(name, value)
69+
}
70+
71+
fun putAdditionalHeaders(name: String, values: Iterable<String>) = apply {
72+
additionalHeaders.put(name, values)
73+
}
74+
75+
fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
76+
this.additionalHeaders.putAll(additionalHeaders)
77+
}
78+
79+
fun putAllAdditionalHeaders(additionalHeaders: Map<String, Iterable<String>>) = apply {
80+
this.additionalHeaders.putAll(additionalHeaders)
81+
}
82+
83+
fun replaceAdditionalHeaders(name: String, value: String) = apply {
84+
additionalHeaders.replace(name, value)
85+
}
86+
87+
fun replaceAdditionalHeaders(name: String, values: Iterable<String>) = apply {
88+
additionalHeaders.replace(name, values)
89+
}
90+
91+
fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
92+
this.additionalHeaders.replaceAll(additionalHeaders)
93+
}
94+
95+
fun replaceAllAdditionalHeaders(additionalHeaders: Map<String, Iterable<String>>) = apply {
96+
this.additionalHeaders.replaceAll(additionalHeaders)
97+
}
98+
99+
fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.remove(name) }
100+
101+
fun removeAllAdditionalHeaders(names: Set<String>) = apply {
102+
additionalHeaders.removeAll(names)
103+
}
104+
105+
fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
106+
this.additionalQueryParams.clear()
107+
putAllAdditionalQueryParams(additionalQueryParams)
108+
}
109+
110+
fun additionalQueryParams(additionalQueryParams: Map<String, Iterable<String>>) = apply {
111+
this.additionalQueryParams.clear()
112+
putAllAdditionalQueryParams(additionalQueryParams)
113+
}
114+
115+
fun putAdditionalQueryParam(key: String, value: String) = apply {
116+
additionalQueryParams.put(key, value)
117+
}
118+
119+
fun putAdditionalQueryParams(key: String, values: Iterable<String>) = apply {
120+
additionalQueryParams.put(key, values)
121+
}
122+
123+
fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
124+
this.additionalQueryParams.putAll(additionalQueryParams)
125+
}
126+
127+
fun putAllAdditionalQueryParams(additionalQueryParams: Map<String, Iterable<String>>) =
128+
apply {
129+
this.additionalQueryParams.putAll(additionalQueryParams)
130+
}
131+
132+
fun replaceAdditionalQueryParams(key: String, value: String) = apply {
133+
additionalQueryParams.replace(key, value)
134+
}
135+
136+
fun replaceAdditionalQueryParams(key: String, values: Iterable<String>) = apply {
137+
additionalQueryParams.replace(key, values)
138+
}
139+
140+
fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
141+
this.additionalQueryParams.replaceAll(additionalQueryParams)
142+
}
143+
144+
fun replaceAllAdditionalQueryParams(additionalQueryParams: Map<String, Iterable<String>>) =
145+
apply {
146+
this.additionalQueryParams.replaceAll(additionalQueryParams)
147+
}
148+
149+
fun removeAdditionalQueryParams(key: String) = apply { additionalQueryParams.remove(key) }
150+
151+
fun removeAllAdditionalQueryParams(keys: Set<String>) = apply {
152+
additionalQueryParams.removeAll(keys)
153+
}
154+
155+
/**
156+
* Returns an immutable instance of [WorkspaceRetrieveParams].
157+
*
158+
* Further updates to this [Builder] will not mutate the returned instance.
159+
*/
160+
fun build(): WorkspaceRetrieveParams =
161+
WorkspaceRetrieveParams(
162+
workspaceId,
163+
additionalHeaders.build(),
164+
additionalQueryParams.build(),
165+
)
166+
}
167+
168+
fun _pathParam(index: Int): String =
169+
when (index) {
170+
0 -> workspaceId ?: ""
171+
else -> ""
172+
}
173+
174+
override fun _headers(): Headers = additionalHeaders
175+
176+
override fun _queryParams(): QueryParams = additionalQueryParams
177+
178+
override fun equals(other: Any?): Boolean {
179+
if (this === other) {
180+
return true
181+
}
182+
183+
return other is WorkspaceRetrieveParams &&
184+
workspaceId == other.workspaceId &&
185+
additionalHeaders == other.additionalHeaders &&
186+
additionalQueryParams == other.additionalQueryParams
187+
}
188+
189+
override fun hashCode(): Int =
190+
Objects.hash(workspaceId, additionalHeaders, additionalQueryParams)
191+
192+
override fun toString() =
193+
"WorkspaceRetrieveParams{workspaceId=$workspaceId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
194+
}

0 commit comments

Comments
 (0)