Skip to content

Commit 0e25831

Browse files
feat(api): OpenAPI spec update via Stainless API (#36)
1 parent b7d040a commit 0e25831

16 files changed

+27
-1184
lines changed

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

+2-24
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ constructor(
2323
private val type: Type?,
2424
private val additionalQueryParams: Map<String, List<String>>,
2525
private val additionalHeaders: Map<String, List<String>>,
26-
private val additionalBodyProperties: Map<String, JsonValue>,
2726
) {
2827

2928
fun projectVersionId(): String = projectVersionId
@@ -63,8 +62,6 @@ constructor(
6362

6463
fun _additionalHeaders(): Map<String, List<String>> = additionalHeaders
6564

66-
fun _additionalBodyProperties(): Map<String, JsonValue> = additionalBodyProperties
67-
6865
override fun equals(other: Any?): Boolean {
6966
if (this === other) {
7067
return true
@@ -78,8 +75,7 @@ constructor(
7875
this.status == other.status &&
7976
this.type == other.type &&
8077
this.additionalQueryParams == other.additionalQueryParams &&
81-
this.additionalHeaders == other.additionalHeaders &&
82-
this.additionalBodyProperties == other.additionalBodyProperties
78+
this.additionalHeaders == other.additionalHeaders
8379
}
8480

8581
override fun hashCode(): Int {
@@ -92,12 +88,11 @@ constructor(
9288
type,
9389
additionalQueryParams,
9490
additionalHeaders,
95-
additionalBodyProperties,
9691
)
9792
}
9893

9994
override fun toString() =
100-
"CommitTestResultListParams{projectVersionId=$projectVersionId, includeArchived=$includeArchived, page=$page, perPage=$perPage, status=$status, type=$type, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders, additionalBodyProperties=$additionalBodyProperties}"
95+
"CommitTestResultListParams{projectVersionId=$projectVersionId, includeArchived=$includeArchived, page=$page, perPage=$perPage, status=$status, type=$type, additionalQueryParams=$additionalQueryParams, additionalHeaders=$additionalHeaders}"
10196

10297
fun toBuilder() = Builder().from(this)
10398

@@ -117,7 +112,6 @@ constructor(
117112
private var type: Type? = null
118113
private var additionalQueryParams: MutableMap<String, MutableList<String>> = mutableMapOf()
119114
private var additionalHeaders: MutableMap<String, MutableList<String>> = mutableMapOf()
120-
private var additionalBodyProperties: MutableMap<String, JsonValue> = mutableMapOf()
121115

122116
@JvmSynthetic
123117
internal fun from(commitTestResultListParams: CommitTestResultListParams) = apply {
@@ -129,7 +123,6 @@ constructor(
129123
this.type = commitTestResultListParams.type
130124
additionalQueryParams(commitTestResultListParams.additionalQueryParams)
131125
additionalHeaders(commitTestResultListParams.additionalHeaders)
132-
additionalBodyProperties(commitTestResultListParams.additionalBodyProperties)
133126
}
134127

135128
fun projectVersionId(projectVersionId: String) = apply {
@@ -199,20 +192,6 @@ constructor(
199192

200193
fun removeHeader(name: String) = apply { this.additionalHeaders.put(name, mutableListOf()) }
201194

202-
fun additionalBodyProperties(additionalBodyProperties: Map<String, JsonValue>) = apply {
203-
this.additionalBodyProperties.clear()
204-
this.additionalBodyProperties.putAll(additionalBodyProperties)
205-
}
206-
207-
fun putAdditionalBodyProperty(key: String, value: JsonValue) = apply {
208-
this.additionalBodyProperties.put(key, value)
209-
}
210-
211-
fun putAllAdditionalBodyProperties(additionalBodyProperties: Map<String, JsonValue>) =
212-
apply {
213-
this.additionalBodyProperties.putAll(additionalBodyProperties)
214-
}
215-
216195
fun build(): CommitTestResultListParams =
217196
CommitTestResultListParams(
218197
checkNotNull(projectVersionId) { "`projectVersionId` is required but was not set" },
@@ -223,7 +202,6 @@ constructor(
223202
type,
224203
additionalQueryParams.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
225204
additionalHeaders.mapValues { it.value.toUnmodifiable() }.toUnmodifiable(),
226-
additionalBodyProperties.toUnmodifiable(),
227205
)
228206
}
229207

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

+3-188
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ import java.util.Optional
3232
@NoAutoDetect
3333
class CommitTestResultListResponse
3434
private constructor(
35-
private val _meta: JsonField<_Meta>,
3635
private val items: JsonField<List<Item>>,
3736
private val additionalProperties: Map<String, JsonValue>,
3837
) {
@@ -41,12 +40,8 @@ private constructor(
4140

4241
private var hashCode: Int = 0
4342

44-
fun _meta(): _Meta = _meta.getRequired("_meta")
45-
4643
fun items(): List<Item> = items.getRequired("items")
4744

48-
@JsonProperty("_meta") @ExcludeMissing fun __meta() = _meta
49-
5045
@JsonProperty("items") @ExcludeMissing fun _items() = items
5146

5247
@JsonAnyGetter
@@ -55,7 +50,6 @@ private constructor(
5550

5651
fun validate(): CommitTestResultListResponse = apply {
5752
if (!validated) {
58-
_meta().validate()
5953
items().forEach { it.validate() }
6054
validated = true
6155
}
@@ -69,25 +63,19 @@ private constructor(
6963
}
7064

7165
return other is CommitTestResultListResponse &&
72-
this._meta == other._meta &&
7366
this.items == other.items &&
7467
this.additionalProperties == other.additionalProperties
7568
}
7669

7770
override fun hashCode(): Int {
7871
if (hashCode == 0) {
79-
hashCode =
80-
Objects.hash(
81-
_meta,
82-
items,
83-
additionalProperties,
84-
)
72+
hashCode = Objects.hash(items, additionalProperties)
8573
}
8674
return hashCode
8775
}
8876

8977
override fun toString() =
90-
"CommitTestResultListResponse{_meta=$_meta, items=$items, additionalProperties=$additionalProperties}"
78+
"CommitTestResultListResponse{items=$items, additionalProperties=$additionalProperties}"
9179

9280
companion object {
9381

@@ -96,23 +84,15 @@ private constructor(
9684

9785
class Builder {
9886

99-
private var _meta: JsonField<_Meta> = JsonMissing.of()
10087
private var items: JsonField<List<Item>> = JsonMissing.of()
10188
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
10289

10390
@JvmSynthetic
10491
internal fun from(commitTestResultListResponse: CommitTestResultListResponse) = apply {
105-
this._meta = commitTestResultListResponse._meta
10692
this.items = commitTestResultListResponse.items
10793
additionalProperties(commitTestResultListResponse.additionalProperties)
10894
}
10995

110-
fun _meta(_meta: _Meta) = _meta(JsonField.of(_meta))
111-
112-
@JsonProperty("_meta")
113-
@ExcludeMissing
114-
fun _meta(_meta: JsonField<_Meta>) = apply { this._meta = _meta }
115-
11696
fun items(items: List<Item>) = items(JsonField.of(items))
11797

11898
@JsonProperty("items")
@@ -135,176 +115,11 @@ private constructor(
135115

136116
fun build(): CommitTestResultListResponse =
137117
CommitTestResultListResponse(
138-
_meta,
139118
items.map { it.toUnmodifiable() },
140-
additionalProperties.toUnmodifiable(),
119+
additionalProperties.toUnmodifiable()
141120
)
142121
}
143122

144-
@JsonDeserialize(builder = _Meta.Builder::class)
145-
@NoAutoDetect
146-
class _Meta
147-
private constructor(
148-
private val page: JsonField<Long>,
149-
private val perPage: JsonField<Long>,
150-
private val totalItems: JsonField<Long>,
151-
private val totalPages: JsonField<Long>,
152-
private val additionalProperties: Map<String, JsonValue>,
153-
) {
154-
155-
private var validated: Boolean = false
156-
157-
private var hashCode: Int = 0
158-
159-
/** The current page. */
160-
fun page(): Long = page.getRequired("page")
161-
162-
/** The number of items per page. */
163-
fun perPage(): Long = perPage.getRequired("perPage")
164-
165-
/** The total number of items. */
166-
fun totalItems(): Long = totalItems.getRequired("totalItems")
167-
168-
/** The total number of pages. */
169-
fun totalPages(): Long = totalPages.getRequired("totalPages")
170-
171-
/** The current page. */
172-
@JsonProperty("page") @ExcludeMissing fun _page() = page
173-
174-
/** The number of items per page. */
175-
@JsonProperty("perPage") @ExcludeMissing fun _perPage() = perPage
176-
177-
/** The total number of items. */
178-
@JsonProperty("totalItems") @ExcludeMissing fun _totalItems() = totalItems
179-
180-
/** The total number of pages. */
181-
@JsonProperty("totalPages") @ExcludeMissing fun _totalPages() = totalPages
182-
183-
@JsonAnyGetter
184-
@ExcludeMissing
185-
fun _additionalProperties(): Map<String, JsonValue> = additionalProperties
186-
187-
fun validate(): _Meta = apply {
188-
if (!validated) {
189-
page()
190-
perPage()
191-
totalItems()
192-
totalPages()
193-
validated = true
194-
}
195-
}
196-
197-
fun toBuilder() = Builder().from(this)
198-
199-
override fun equals(other: Any?): Boolean {
200-
if (this === other) {
201-
return true
202-
}
203-
204-
return other is _Meta &&
205-
this.page == other.page &&
206-
this.perPage == other.perPage &&
207-
this.totalItems == other.totalItems &&
208-
this.totalPages == other.totalPages &&
209-
this.additionalProperties == other.additionalProperties
210-
}
211-
212-
override fun hashCode(): Int {
213-
if (hashCode == 0) {
214-
hashCode =
215-
Objects.hash(
216-
page,
217-
perPage,
218-
totalItems,
219-
totalPages,
220-
additionalProperties,
221-
)
222-
}
223-
return hashCode
224-
}
225-
226-
override fun toString() =
227-
"_Meta{page=$page, perPage=$perPage, totalItems=$totalItems, totalPages=$totalPages, additionalProperties=$additionalProperties}"
228-
229-
companion object {
230-
231-
@JvmStatic fun builder() = Builder()
232-
}
233-
234-
class Builder {
235-
236-
private var page: JsonField<Long> = JsonMissing.of()
237-
private var perPage: JsonField<Long> = JsonMissing.of()
238-
private var totalItems: JsonField<Long> = JsonMissing.of()
239-
private var totalPages: JsonField<Long> = JsonMissing.of()
240-
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
241-
242-
@JvmSynthetic
243-
internal fun from(_meta: _Meta) = apply {
244-
this.page = _meta.page
245-
this.perPage = _meta.perPage
246-
this.totalItems = _meta.totalItems
247-
this.totalPages = _meta.totalPages
248-
additionalProperties(_meta.additionalProperties)
249-
}
250-
251-
/** The current page. */
252-
fun page(page: Long) = page(JsonField.of(page))
253-
254-
/** The current page. */
255-
@JsonProperty("page")
256-
@ExcludeMissing
257-
fun page(page: JsonField<Long>) = apply { this.page = page }
258-
259-
/** The number of items per page. */
260-
fun perPage(perPage: Long) = perPage(JsonField.of(perPage))
261-
262-
/** The number of items per page. */
263-
@JsonProperty("perPage")
264-
@ExcludeMissing
265-
fun perPage(perPage: JsonField<Long>) = apply { this.perPage = perPage }
266-
267-
/** The total number of items. */
268-
fun totalItems(totalItems: Long) = totalItems(JsonField.of(totalItems))
269-
270-
/** The total number of items. */
271-
@JsonProperty("totalItems")
272-
@ExcludeMissing
273-
fun totalItems(totalItems: JsonField<Long>) = apply { this.totalItems = totalItems }
274-
275-
/** The total number of pages. */
276-
fun totalPages(totalPages: Long) = totalPages(JsonField.of(totalPages))
277-
278-
/** The total number of pages. */
279-
@JsonProperty("totalPages")
280-
@ExcludeMissing
281-
fun totalPages(totalPages: JsonField<Long>) = apply { this.totalPages = totalPages }
282-
283-
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
284-
this.additionalProperties.clear()
285-
this.additionalProperties.putAll(additionalProperties)
286-
}
287-
288-
@JsonAnySetter
289-
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
290-
this.additionalProperties.put(key, value)
291-
}
292-
293-
fun putAllAdditionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
294-
this.additionalProperties.putAll(additionalProperties)
295-
}
296-
297-
fun build(): _Meta =
298-
_Meta(
299-
page,
300-
perPage,
301-
totalItems,
302-
totalPages,
303-
additionalProperties.toUnmodifiable(),
304-
)
305-
}
306-
}
307-
308123
@JsonDeserialize(builder = Item.Builder::class)
309124
@NoAutoDetect
310125
class Item

0 commit comments

Comments
 (0)