Skip to content

Commit 2925a10

Browse files
chore: go live (#12)
1 parent ae9ef60 commit 2925a10

File tree

3 files changed

+2
-91
lines changed

3 files changed

+2
-91
lines changed

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

+2-24
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ constructor(
2424
private val name: String,
2525
private val taskType: TaskType,
2626
private val description: String?,
27-
private val gitRepo: GitRepo?,
2827
private val additionalQueryParams: Map<String, List<String>>,
2928
private val additionalHeaders: Map<String, List<String>>,
3029
private val additionalBodyProperties: Map<String, JsonValue>,
@@ -36,15 +35,12 @@ constructor(
3635

3736
fun description(): Optional<String> = Optional.ofNullable(description)
3837

39-
fun gitRepo(): Optional<GitRepo> = Optional.ofNullable(gitRepo)
40-
4138
@JvmSynthetic
4239
internal fun getBody(): ProjectCreateBody {
4340
return ProjectCreateBody(
4441
name,
4542
taskType,
4643
description,
47-
gitRepo,
4844
additionalBodyProperties,
4945
)
5046
}
@@ -60,7 +56,6 @@ constructor(
6056
private val name: String?,
6157
private val taskType: TaskType?,
6258
private val description: String?,
63-
private val gitRepo: GitRepo?,
6459
private val additionalProperties: Map<String, JsonValue>,
6560
) {
6661

@@ -75,8 +70,6 @@ constructor(
7570
/** The project description. */
7671
@JsonProperty("description") fun description(): String? = description
7772

78-
@JsonProperty("gitRepo") fun gitRepo(): GitRepo? = gitRepo
79-
8073
@JsonAnyGetter
8174
@ExcludeMissing
8275
fun _additionalProperties(): Map<String, JsonValue> = additionalProperties
@@ -92,7 +85,6 @@ constructor(
9285
this.name == other.name &&
9386
this.taskType == other.taskType &&
9487
this.description == other.description &&
95-
this.gitRepo == other.gitRepo &&
9688
this.additionalProperties == other.additionalProperties
9789
}
9890

@@ -103,15 +95,14 @@ constructor(
10395
name,
10496
taskType,
10597
description,
106-
gitRepo,
10798
additionalProperties,
10899
)
109100
}
110101
return hashCode
111102
}
112103

113104
override fun toString() =
114-
"ProjectCreateBody{name=$name, taskType=$taskType, description=$description, gitRepo=$gitRepo, additionalProperties=$additionalProperties}"
105+
"ProjectCreateBody{name=$name, taskType=$taskType, description=$description, additionalProperties=$additionalProperties}"
115106

116107
companion object {
117108

@@ -123,15 +114,13 @@ constructor(
123114
private var name: String? = null
124115
private var taskType: TaskType? = null
125116
private var description: String? = null
126-
private var gitRepo: GitRepo? = null
127117
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
128118

129119
@JvmSynthetic
130120
internal fun from(projectCreateBody: ProjectCreateBody) = apply {
131121
this.name = projectCreateBody.name
132122
this.taskType = projectCreateBody.taskType
133123
this.description = projectCreateBody.description
134-
this.gitRepo = projectCreateBody.gitRepo
135124
additionalProperties(projectCreateBody.additionalProperties)
136125
}
137126

@@ -146,9 +135,6 @@ constructor(
146135
@JsonProperty("description")
147136
fun description(description: String) = apply { this.description = description }
148137

149-
@JsonProperty("gitRepo")
150-
fun gitRepo(gitRepo: GitRepo) = apply { this.gitRepo = gitRepo }
151-
152138
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
153139
this.additionalProperties.clear()
154140
this.additionalProperties.putAll(additionalProperties)
@@ -168,7 +154,6 @@ constructor(
168154
checkNotNull(name) { "`name` is required but was not set" },
169155
checkNotNull(taskType) { "`taskType` is required but was not set" },
170156
description,
171-
gitRepo,
172157
additionalProperties.toUnmodifiable(),
173158
)
174159
}
@@ -189,7 +174,6 @@ constructor(
189174
this.name == other.name &&
190175
this.taskType == other.taskType &&
191176
this.description == other.description &&
192-
this.gitRepo == other.gitRepo &&
193177
this.additionalQueryParams == other.additionalQueryParams &&
194178
this.additionalHeaders == other.additionalHeaders &&
195179
this.additionalBodyProperties == other.additionalBodyProperties
@@ -200,15 +184,14 @@ constructor(
200184
name,
201185
taskType,
202186
description,
203-
gitRepo,
204187
additionalQueryParams,
205188
additionalHeaders,
206189
additionalBodyProperties,
207190
)
208191
}
209192

210193
override fun toString() =
211-
"ProjectCreateParams{name=$name, taskType=$taskType, description=$description, gitRepo=$gitRepo, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}"
194+
"ProjectCreateParams{name=$name, taskType=$taskType, description=$description, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}"
212195

213196
fun toBuilder() = Builder().from(this)
214197

@@ -223,7 +206,6 @@ constructor(
223206
private var name: String? = null
224207
private var taskType: TaskType? = null
225208
private var description: String? = null
226-
private var gitRepo: GitRepo? = null
227209
private var additionalQueryParams: MutableMap<String, MutableList<String>> = mutableMapOf()
228210
private var additionalHeaders: MutableMap<String, MutableList<String>> = mutableMapOf()
229211
private var additionalBodyProperties: MutableMap<String, JsonValue> = mutableMapOf()
@@ -233,7 +215,6 @@ constructor(
233215
this.name = projectCreateParams.name
234216
this.taskType = projectCreateParams.taskType
235217
this.description = projectCreateParams.description
236-
this.gitRepo = projectCreateParams.gitRepo
237218
additionalQueryParams(projectCreateParams.additionalQueryParams)
238219
additionalHeaders(projectCreateParams.additionalHeaders)
239220
additionalBodyProperties(projectCreateParams.additionalBodyProperties)
@@ -248,8 +229,6 @@ constructor(
248229
/** The project description. */
249230
fun description(description: String) = apply { this.description = description }
250231

251-
fun gitRepo(gitRepo: GitRepo) = apply { this.gitRepo = gitRepo }
252-
253232
fun additionalQueryParams(additionalQueryParams: Map<String, List<String>>) = apply {
254233
this.additionalQueryParams.clear()
255234
putAllQueryParams(additionalQueryParams)
@@ -309,7 +288,6 @@ constructor(
309288
checkNotNull(name) { "`name` is required but was not set" },
310289
checkNotNull(taskType) { "`taskType` is required but was not set" },
311290
description,
312-
gitRepo,
313291
additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
314292
additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
315293
additionalBodyProperties.toUnmodifiable(),

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

-50
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
package com.openlayer.api.models
44

55
import com.openlayer.api.models.*
6-
import java.time.OffsetDateTime
76
import org.assertj.core.api.Assertions.assertThat
87
import org.junit.jupiter.api.Test
98

@@ -15,22 +14,6 @@ class ProjectCreateParamsTest {
1514
.name("My Project")
1615
.taskType(ProjectCreateParams.TaskType.LLM_BASE)
1716
.description("My project description.")
18-
.gitRepo(
19-
ProjectCreateParams.GitRepo.builder()
20-
.id("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
21-
.dateConnected(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
22-
.dateUpdated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
23-
.gitAccountId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
24-
.gitId(123L)
25-
.name("string")
26-
.private_(true)
27-
.projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
28-
.slug("string")
29-
.url("string")
30-
.branch("string")
31-
.rootDir("string")
32-
.build()
33-
)
3417
.build()
3518
}
3619

@@ -41,45 +24,12 @@ class ProjectCreateParamsTest {
4124
.name("My Project")
4225
.taskType(ProjectCreateParams.TaskType.LLM_BASE)
4326
.description("My project description.")
44-
.gitRepo(
45-
ProjectCreateParams.GitRepo.builder()
46-
.id("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
47-
.dateConnected(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
48-
.dateUpdated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
49-
.gitAccountId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
50-
.gitId(123L)
51-
.name("string")
52-
.private_(true)
53-
.projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
54-
.slug("string")
55-
.url("string")
56-
.branch("string")
57-
.rootDir("string")
58-
.build()
59-
)
6027
.build()
6128
val body = params.getBody()
6229
assertThat(body).isNotNull
6330
assertThat(body.name()).isEqualTo("My Project")
6431
assertThat(body.taskType()).isEqualTo(ProjectCreateParams.TaskType.LLM_BASE)
6532
assertThat(body.description()).isEqualTo("My project description.")
66-
assertThat(body.gitRepo())
67-
.isEqualTo(
68-
ProjectCreateParams.GitRepo.builder()
69-
.id("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
70-
.dateConnected(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
71-
.dateUpdated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
72-
.gitAccountId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
73-
.gitId(123L)
74-
.name("string")
75-
.private_(true)
76-
.projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
77-
.slug("string")
78-
.url("string")
79-
.branch("string")
80-
.rootDir("string")
81-
.build()
82-
)
8333
}
8434

8535
@Test

openlayer-java-core/src/test/kotlin/com/openlayer/api/services/blocking/ProjectServiceTest.kt

-17
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ package com.openlayer.api.services.blocking
55
import com.openlayer.api.TestServerExtension
66
import com.openlayer.api.client.okhttp.OpenlayerOkHttpClient
77
import com.openlayer.api.models.*
8-
import java.time.OffsetDateTime
98
import org.junit.jupiter.api.Test
109
import org.junit.jupiter.api.extension.ExtendWith
1110

@@ -26,22 +25,6 @@ class ProjectServiceTest {
2625
.name("My Project")
2726
.taskType(ProjectCreateParams.TaskType.LLM_BASE)
2827
.description("My project description.")
29-
.gitRepo(
30-
ProjectCreateParams.GitRepo.builder()
31-
.id("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
32-
.dateConnected(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
33-
.dateUpdated(OffsetDateTime.parse("2019-12-27T18:11:19.117Z"))
34-
.gitAccountId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
35-
.gitId(123L)
36-
.name("string")
37-
.private_(true)
38-
.projectId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
39-
.slug("string")
40-
.url("string")
41-
.branch("string")
42-
.rootDir("string")
43-
.build()
44-
)
4528
.build()
4629
)
4730
println(projectCreateResponse)

0 commit comments

Comments
 (0)