Skip to content

Commit b5a2343

Browse files
feat(api): manual updates (#527)
1 parent 1ab19a3 commit b5a2343

File tree

9 files changed

+537
-190
lines changed

9 files changed

+537
-190
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 45
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-972e563922dedeeb94dca9a3ca8bac536488fcee56b55fcf09e6af044d3740e3.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/finch%2Ffinch-14d375aab89e6b212fe459805a42d6ea7d7da8eae2037ae710a187d06911be1d.yml
33
openapi_spec_hash: 08b86ecbec3323717d48e4aaee48ed54
4-
config_hash: b839955f81dcf0a060366274f202b185
4+
config_hash: 2bca9e6b32f742acb077cf8822ec9e23

finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyPage.kt

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ private constructor(
2929

3030
fun response(): Response = response
3131

32-
fun items(): List<IndividualUnenrollManyResponse> = response().items()
32+
fun items(): List<UnenrolledIndividual> = response().items()
3333

3434
override fun equals(other: Any?): Boolean {
3535
if (this === other) {
@@ -69,21 +69,19 @@ private constructor(
6969
}
7070

7171
class Response(
72-
private val items: JsonField<List<IndividualUnenrollManyResponse>>,
72+
private val items: JsonField<List<UnenrolledIndividual>>,
7373
private val additionalProperties: MutableMap<String, JsonValue>,
7474
) {
7575

7676
@JsonCreator
7777
private constructor(
78-
@JsonProperty("items")
79-
items: JsonField<List<IndividualUnenrollManyResponse>> = JsonMissing.of()
78+
@JsonProperty("items") items: JsonField<List<UnenrolledIndividual>> = JsonMissing.of()
8079
) : this(items, mutableMapOf())
8180

82-
fun items(): List<IndividualUnenrollManyResponse> = items.getNullable("items") ?: listOf()
81+
fun items(): List<UnenrolledIndividual> = items.getNullable("items") ?: listOf()
8382

8483
@JsonProperty("items")
85-
fun _items(): Optional<JsonField<List<IndividualUnenrollManyResponse>>> =
86-
Optional.ofNullable(items)
84+
fun _items(): Optional<JsonField<List<UnenrolledIndividual>>> = Optional.ofNullable(items)
8785

8886
@JsonAnySetter
8987
private fun putAdditionalProperty(key: String, value: JsonValue) {
@@ -140,7 +138,7 @@ private constructor(
140138

141139
class Builder {
142140

143-
private var items: JsonField<List<IndividualUnenrollManyResponse>> = JsonMissing.of()
141+
private var items: JsonField<List<UnenrolledIndividual>> = JsonMissing.of()
144142
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
145143

146144
@JvmSynthetic
@@ -149,11 +147,9 @@ private constructor(
149147
this.additionalProperties.putAll(page.additionalProperties)
150148
}
151149

152-
fun items(items: List<IndividualUnenrollManyResponse>) = items(JsonField.of(items))
150+
fun items(items: List<UnenrolledIndividual>) = items(JsonField.of(items))
153151

154-
fun items(items: JsonField<List<IndividualUnenrollManyResponse>>) = apply {
155-
this.items = items
156-
}
152+
fun items(items: JsonField<List<UnenrolledIndividual>>) = apply { this.items = items }
157153

158154
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
159155
this.additionalProperties.put(key, value)
@@ -169,9 +165,9 @@ private constructor(
169165
}
170166

171167
class AutoPager(private val firstPage: HrisBenefitIndividualUnenrollManyPage) :
172-
Iterable<IndividualUnenrollManyResponse> {
168+
Iterable<UnenrolledIndividual> {
173169

174-
override fun iterator(): Iterator<IndividualUnenrollManyResponse> = iterator {
170+
override fun iterator(): Iterator<UnenrolledIndividual> = iterator {
175171
var page = firstPage
176172
var index = 0
177173
while (true) {
@@ -183,7 +179,7 @@ private constructor(
183179
}
184180
}
185181

186-
fun stream(): Stream<IndividualUnenrollManyResponse> {
182+
fun stream(): Stream<UnenrolledIndividual> {
187183
return StreamSupport.stream(spliterator(), false)
188184
}
189185
}

finch-java-core/src/main/kotlin/com/tryfinch/api/models/HrisBenefitIndividualUnenrollManyPageAsync.kt

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ private constructor(
2929

3030
fun response(): Response = response
3131

32-
fun items(): List<IndividualUnenrollManyResponse> = response().items()
32+
fun items(): List<UnenrolledIndividual> = response().items()
3333

3434
override fun equals(other: Any?): Boolean {
3535
if (this === other) {
@@ -71,21 +71,19 @@ private constructor(
7171
}
7272

7373
class Response(
74-
private val items: JsonField<List<IndividualUnenrollManyResponse>>,
74+
private val items: JsonField<List<UnenrolledIndividual>>,
7575
private val additionalProperties: MutableMap<String, JsonValue>,
7676
) {
7777

7878
@JsonCreator
7979
private constructor(
80-
@JsonProperty("items")
81-
items: JsonField<List<IndividualUnenrollManyResponse>> = JsonMissing.of()
80+
@JsonProperty("items") items: JsonField<List<UnenrolledIndividual>> = JsonMissing.of()
8281
) : this(items, mutableMapOf())
8382

84-
fun items(): List<IndividualUnenrollManyResponse> = items.getNullable("items") ?: listOf()
83+
fun items(): List<UnenrolledIndividual> = items.getNullable("items") ?: listOf()
8584

8685
@JsonProperty("items")
87-
fun _items(): Optional<JsonField<List<IndividualUnenrollManyResponse>>> =
88-
Optional.ofNullable(items)
86+
fun _items(): Optional<JsonField<List<UnenrolledIndividual>>> = Optional.ofNullable(items)
8987

9088
@JsonAnySetter
9189
private fun putAdditionalProperty(key: String, value: JsonValue) {
@@ -142,7 +140,7 @@ private constructor(
142140

143141
class Builder {
144142

145-
private var items: JsonField<List<IndividualUnenrollManyResponse>> = JsonMissing.of()
143+
private var items: JsonField<List<UnenrolledIndividual>> = JsonMissing.of()
146144
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()
147145

148146
@JvmSynthetic
@@ -151,11 +149,9 @@ private constructor(
151149
this.additionalProperties.putAll(page.additionalProperties)
152150
}
153151

154-
fun items(items: List<IndividualUnenrollManyResponse>) = items(JsonField.of(items))
152+
fun items(items: List<UnenrolledIndividual>) = items(JsonField.of(items))
155153

156-
fun items(items: JsonField<List<IndividualUnenrollManyResponse>>) = apply {
157-
this.items = items
158-
}
154+
fun items(items: JsonField<List<UnenrolledIndividual>>) = apply { this.items = items }
159155

160156
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
161157
this.additionalProperties.put(key, value)
@@ -173,11 +169,11 @@ private constructor(
173169
class AutoPager(private val firstPage: HrisBenefitIndividualUnenrollManyPageAsync) {
174170

175171
fun forEach(
176-
action: Predicate<IndividualUnenrollManyResponse>,
172+
action: Predicate<UnenrolledIndividual>,
177173
executor: Executor,
178174
): CompletableFuture<Void> {
179175
fun CompletableFuture<Optional<HrisBenefitIndividualUnenrollManyPageAsync>>.forEach(
180-
action: (IndividualUnenrollManyResponse) -> Boolean,
176+
action: (UnenrolledIndividual) -> Boolean,
181177
executor: Executor,
182178
): CompletableFuture<Void> =
183179
thenComposeAsync(
@@ -193,8 +189,8 @@ private constructor(
193189
.forEach(action::test, executor)
194190
}
195191

196-
fun toList(executor: Executor): CompletableFuture<List<IndividualUnenrollManyResponse>> {
197-
val values = mutableListOf<IndividualUnenrollManyResponse>()
192+
fun toList(executor: Executor): CompletableFuture<List<UnenrolledIndividual>> {
193+
val values = mutableListOf<UnenrolledIndividual>()
198194
return forEach(values::add, executor).thenApply { values }
199195
}
200196
}

finch-java-core/src/main/kotlin/com/tryfinch/api/models/IndividualUnenrollManyResponse.kt

Lines changed: 0 additions & 120 deletions
This file was deleted.

0 commit comments

Comments
 (0)