diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index aa84875..1c0bb88 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "0.1.0-alpha.22"
+ ".": "0.1.0-alpha.23"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index 0ebc21b..d4b713b 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,2 +1,2 @@
-configured_endpoints: 28
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-d04668d97c66a80708cb1896ce9638dc2b55670ed447b67d9833f6a5349cc210.yml
+configured_endpoints: 29
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-6f08502508c8ad25235971add3124a1cde4f1c3ec705d5df455d750e0adcb90b.yml
diff --git a/CHANGELOG.md b/CHANGELOG.md
index afe6780..6abeafe 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,14 @@
# Changelog
+## 0.1.0-alpha.23 (2024-11-29)
+
+Full Changelog: [v0.1.0-alpha.22...v0.1.0-alpha.23](https://github.com/OneBusAway/java-sdk/compare/v0.1.0-alpha.22...v0.1.0-alpha.23)
+
+### Features
+
+* **api:** api update ([#65](https://github.com/OneBusAway/java-sdk/issues/65)) ([e1cdfe0](https://github.com/OneBusAway/java-sdk/commit/e1cdfe0c4376e95396eea0752e59364e9a271c39))
+* **api:** api update ([#67](https://github.com/OneBusAway/java-sdk/issues/67)) ([96c38d4](https://github.com/OneBusAway/java-sdk/commit/96c38d45b4f5bf26e086a11fe79306325e19b2a7))
+
## 0.1.0-alpha.22 (2024-11-05)
Full Changelog: [v0.1.0-alpha.21...v0.1.0-alpha.22](https://github.com/OneBusAway/java-sdk/compare/v0.1.0-alpha.21...v0.1.0-alpha.22)
diff --git a/README.md b/README.md
index 28b063c..7dd1dc3 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
-[![Maven Central](https://img.shields.io/maven-central/v/org.onebusaway/onebusaway-sdk-java)](https://central.sonatype.com/artifact/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.22)
+[![Maven Central](https://img.shields.io/maven-central/v/org.onebusaway/onebusaway-sdk-java)](https://central.sonatype.com/artifact/org.onebusaway/onebusaway-sdk-java/0.1.0-alpha.23)
@@ -27,7 +27,7 @@ The REST API documentation can be foundĀ on [developer.onebusaway.org](https://d
```kotlin
-implementation("org.onebusaway:onebusaway-sdk-java:0.1.0-alpha.22")
+implementation("org.onebusaway:onebusaway-sdk-java:0.1.0-alpha.23")
```
#### Maven
@@ -36,7 +36,7 @@ implementation("org.onebusaway:onebusaway-sdk-java:0.1.0-alpha.22")
org.onebusaway
onebusaway-sdk-java
- 0.1.0-alpha.22
+ 0.1.0-alpha.23
```
diff --git a/build.gradle.kts b/build.gradle.kts
index 657e25c..8c8ea48 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -4,7 +4,7 @@ plugins {
allprojects {
group = "org.onebusaway"
- version = "0.1.0-alpha.22" // x-release-please-version
+ version = "0.1.0-alpha.23" // x-release-please-version
}
diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/client/OnebusawaySdkClient.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/client/OnebusawaySdkClient.kt
index 1c53a82..44afaea 100644
--- a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/client/OnebusawaySdkClient.kt
+++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/client/OnebusawaySdkClient.kt
@@ -23,6 +23,8 @@ interface OnebusawaySdkClient {
fun stopsForRoute(): StopsForRouteService
+ fun stopsForAgency(): StopsForAgencyService
+
fun stop(): StopService
fun stopIdsForAgency(): StopIdsForAgencyService
diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/client/OnebusawaySdkClientAsync.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/client/OnebusawaySdkClientAsync.kt
index d257b1c..0029e0f 100644
--- a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/client/OnebusawaySdkClientAsync.kt
+++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/client/OnebusawaySdkClientAsync.kt
@@ -23,6 +23,8 @@ interface OnebusawaySdkClientAsync {
fun stopsForRoute(): StopsForRouteServiceAsync
+ fun stopsForAgency(): StopsForAgencyServiceAsync
+
fun stop(): StopServiceAsync
fun stopIdsForAgency(): StopIdsForAgencyServiceAsync
diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/client/OnebusawaySdkClientAsyncImpl.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/client/OnebusawaySdkClientAsyncImpl.kt
index f118214..f930dc9 100644
--- a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/client/OnebusawaySdkClientAsyncImpl.kt
+++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/client/OnebusawaySdkClientAsyncImpl.kt
@@ -51,6 +51,10 @@ constructor(
StopsForRouteServiceAsyncImpl(clientOptionsWithUserAgent)
}
+ private val stopsForAgency: StopsForAgencyServiceAsync by lazy {
+ StopsForAgencyServiceAsyncImpl(clientOptionsWithUserAgent)
+ }
+
private val stop: StopServiceAsync by lazy { StopServiceAsyncImpl(clientOptionsWithUserAgent) }
private val stopIdsForAgency: StopIdsForAgencyServiceAsync by lazy {
@@ -143,6 +147,8 @@ constructor(
override fun stopsForRoute(): StopsForRouteServiceAsync = stopsForRoute
+ override fun stopsForAgency(): StopsForAgencyServiceAsync = stopsForAgency
+
override fun stop(): StopServiceAsync = stop
override fun stopIdsForAgency(): StopIdsForAgencyServiceAsync = stopIdsForAgency
diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/client/OnebusawaySdkClientImpl.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/client/OnebusawaySdkClientImpl.kt
index 15a01b3..1183849 100644
--- a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/client/OnebusawaySdkClientImpl.kt
+++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/client/OnebusawaySdkClientImpl.kt
@@ -49,6 +49,10 @@ constructor(
StopsForRouteServiceImpl(clientOptionsWithUserAgent)
}
+ private val stopsForAgency: StopsForAgencyService by lazy {
+ StopsForAgencyServiceImpl(clientOptionsWithUserAgent)
+ }
+
private val stop: StopService by lazy { StopServiceImpl(clientOptionsWithUserAgent) }
private val stopIdsForAgency: StopIdsForAgencyService by lazy {
@@ -135,6 +139,8 @@ constructor(
override fun stopsForRoute(): StopsForRouteService = stopsForRoute
+ override fun stopsForAgency(): StopsForAgencyService = stopsForAgency
+
override fun stop(): StopService = stop
override fun stopIdsForAgency(): StopIdsForAgencyService = stopIdsForAgency
diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/References.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/References.kt
index 4047213..698d6d7 100644
--- a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/References.kt
+++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/References.kt
@@ -2175,7 +2175,7 @@ private constructor(
private var validated: Boolean = false
- fun code(): String = code.getRequired("code")
+ fun code(): Optional = Optional.ofNullable(code.getNullable("code"))
fun direction(): Optional = Optional.ofNullable(direction.getNullable("direction"))
@@ -2190,13 +2190,11 @@ private constructor(
fun name(): String = name.getRequired("name")
- fun parent(): Optional = Optional.ofNullable(parent.getNullable("parent"))
+ fun parent(): String = parent.getRequired("parent")
- fun routeIds(): Optional> =
- Optional.ofNullable(routeIds.getNullable("routeIds"))
+ fun routeIds(): List = routeIds.getRequired("routeIds")
- fun staticRouteIds(): Optional> =
- Optional.ofNullable(staticRouteIds.getNullable("staticRouteIds"))
+ fun staticRouteIds(): List = staticRouteIds.getRequired("staticRouteIds")
fun wheelchairBoarding(): Optional =
Optional.ofNullable(wheelchairBoarding.getNullable("wheelchairBoarding"))
diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/ScheduleForRouteRetrieveResponse.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/ScheduleForRouteRetrieveResponse.kt
index 202b4a3..37a37a4 100644
--- a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/ScheduleForRouteRetrieveResponse.kt
+++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/ScheduleForRouteRetrieveResponse.kt
@@ -397,7 +397,7 @@ private constructor(
private var validated: Boolean = false
- fun code(): String = code.getRequired("code")
+ fun code(): Optional = Optional.ofNullable(code.getNullable("code"))
fun direction(): Optional =
Optional.ofNullable(direction.getNullable("direction"))
@@ -413,13 +413,11 @@ private constructor(
fun name(): String = name.getRequired("name")
- fun parent(): Optional = Optional.ofNullable(parent.getNullable("parent"))
+ fun parent(): String = parent.getRequired("parent")
- fun routeIds(): Optional> =
- Optional.ofNullable(routeIds.getNullable("routeIds"))
+ fun routeIds(): List = routeIds.getRequired("routeIds")
- fun staticRouteIds(): Optional> =
- Optional.ofNullable(staticRouteIds.getNullable("staticRouteIds"))
+ fun staticRouteIds(): List = staticRouteIds.getRequired("staticRouteIds")
fun wheelchairBoarding(): Optional =
Optional.ofNullable(wheelchairBoarding.getNullable("wheelchairBoarding"))
diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/SearchForStopListResponse.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/SearchForStopListResponse.kt
index 833e3f5..e5437d0 100644
--- a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/SearchForStopListResponse.kt
+++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/SearchForStopListResponse.kt
@@ -292,7 +292,7 @@ private constructor(
private var validated: Boolean = false
- fun code(): String = code.getRequired("code")
+ fun code(): Optional = Optional.ofNullable(code.getNullable("code"))
fun direction(): Optional =
Optional.ofNullable(direction.getNullable("direction"))
@@ -308,13 +308,12 @@ private constructor(
fun name(): String = name.getRequired("name")
- fun parent(): Optional = Optional.ofNullable(parent.getNullable("parent"))
+ fun parent(): String = parent.getRequired("parent")
- fun routeIds(): Optional> =
- Optional.ofNullable(routeIds.getNullable("routeIds"))
+ fun routeIds(): kotlin.collections.List = routeIds.getRequired("routeIds")
- fun staticRouteIds(): Optional> =
- Optional.ofNullable(staticRouteIds.getNullable("staticRouteIds"))
+ fun staticRouteIds(): kotlin.collections.List =
+ staticRouteIds.getRequired("staticRouteIds")
fun wheelchairBoarding(): Optional =
Optional.ofNullable(wheelchairBoarding.getNullable("wheelchairBoarding"))
diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/StopRetrieveResponse.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/StopRetrieveResponse.kt
index 4867608..c94ac1e 100644
--- a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/StopRetrieveResponse.kt
+++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/StopRetrieveResponse.kt
@@ -260,7 +260,7 @@ private constructor(
private var validated: Boolean = false
- fun code(): String = code.getRequired("code")
+ fun code(): Optional = Optional.ofNullable(code.getNullable("code"))
fun direction(): Optional =
Optional.ofNullable(direction.getNullable("direction"))
@@ -276,13 +276,11 @@ private constructor(
fun name(): String = name.getRequired("name")
- fun parent(): Optional = Optional.ofNullable(parent.getNullable("parent"))
+ fun parent(): String = parent.getRequired("parent")
- fun routeIds(): Optional> =
- Optional.ofNullable(routeIds.getNullable("routeIds"))
+ fun routeIds(): List = routeIds.getRequired("routeIds")
- fun staticRouteIds(): Optional> =
- Optional.ofNullable(staticRouteIds.getNullable("staticRouteIds"))
+ fun staticRouteIds(): List = staticRouteIds.getRequired("staticRouteIds")
fun wheelchairBoarding(): Optional =
Optional.ofNullable(wheelchairBoarding.getNullable("wheelchairBoarding"))
diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/StopsForAgencyListParams.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/StopsForAgencyListParams.kt
new file mode 100644
index 0000000..5c4c365
--- /dev/null
+++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/StopsForAgencyListParams.kt
@@ -0,0 +1,161 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package org.onebusaway.models
+
+import com.google.common.collect.ArrayListMultimap
+import com.google.common.collect.ListMultimap
+import java.util.Objects
+import org.onebusaway.core.NoAutoDetect
+import org.onebusaway.core.toImmutable
+import org.onebusaway.models.*
+
+class StopsForAgencyListParams
+constructor(
+ private val agencyId: String,
+ private val additionalHeaders: Map>,
+ private val additionalQueryParams: Map>,
+) {
+
+ fun agencyId(): String = agencyId
+
+ @JvmSynthetic internal fun getHeaders(): Map> = additionalHeaders
+
+ @JvmSynthetic internal fun getQueryParams(): Map> = additionalQueryParams
+
+ fun getPathParam(index: Int): String {
+ return when (index) {
+ 0 -> agencyId
+ else -> ""
+ }
+ }
+
+ fun _additionalHeaders(): Map> = additionalHeaders
+
+ fun _additionalQueryParams(): Map> = additionalQueryParams
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is StopsForAgencyListParams && this.agencyId == other.agencyId && this.additionalHeaders == other.additionalHeaders && this.additionalQueryParams == other.additionalQueryParams /* spotless:on */
+ }
+
+ override fun hashCode(): Int {
+ return /* spotless:off */ Objects.hash(agencyId, additionalHeaders, additionalQueryParams) /* spotless:on */
+ }
+
+ override fun toString() =
+ "StopsForAgencyListParams{agencyId=$agencyId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ @JvmStatic fun builder() = Builder()
+ }
+
+ @NoAutoDetect
+ class Builder {
+
+ private var agencyId: String? = null
+ private var additionalHeaders: ListMultimap = ArrayListMultimap.create()
+ private var additionalQueryParams: ListMultimap = ArrayListMultimap.create()
+
+ @JvmSynthetic
+ internal fun from(stopsForAgencyListParams: StopsForAgencyListParams) = apply {
+ this.agencyId = stopsForAgencyListParams.agencyId
+ additionalHeaders(stopsForAgencyListParams.additionalHeaders)
+ additionalQueryParams(stopsForAgencyListParams.additionalQueryParams)
+ }
+
+ fun agencyId(agencyId: String) = apply { this.agencyId = agencyId }
+
+ fun additionalHeaders(additionalHeaders: Map>) = apply {
+ this.additionalHeaders.clear()
+ putAllAdditionalHeaders(additionalHeaders)
+ }
+
+ fun putAdditionalHeader(name: String, value: String) = apply {
+ additionalHeaders.put(name, value)
+ }
+
+ fun putAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.putAll(name, values)
+ }
+
+ fun putAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ additionalHeaders.forEach(::putAdditionalHeaders)
+ }
+
+ fun replaceAdditionalHeaders(name: String, value: String) = apply {
+ additionalHeaders.replaceValues(name, listOf(value))
+ }
+
+ fun replaceAdditionalHeaders(name: String, values: Iterable) = apply {
+ additionalHeaders.replaceValues(name, values)
+ }
+
+ fun replaceAllAdditionalHeaders(additionalHeaders: Map>) = apply {
+ additionalHeaders.forEach(::replaceAdditionalHeaders)
+ }
+
+ fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.removeAll(name) }
+
+ fun removeAllAdditionalHeaders(names: Set) = apply {
+ names.forEach(::removeAdditionalHeaders)
+ }
+
+ fun additionalQueryParams(additionalQueryParams: Map>) = apply {
+ this.additionalQueryParams.clear()
+ putAllAdditionalQueryParams(additionalQueryParams)
+ }
+
+ fun putAdditionalQueryParam(key: String, value: String) = apply {
+ additionalQueryParams.put(key, value)
+ }
+
+ fun putAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.putAll(key, values)
+ }
+
+ fun putAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ additionalQueryParams.forEach(::putAdditionalQueryParams)
+ }
+
+ fun replaceAdditionalQueryParams(key: String, value: String) = apply {
+ additionalQueryParams.replaceValues(key, listOf(value))
+ }
+
+ fun replaceAdditionalQueryParams(key: String, values: Iterable) = apply {
+ additionalQueryParams.replaceValues(key, values)
+ }
+
+ fun replaceAllAdditionalQueryParams(additionalQueryParams: Map>) =
+ apply {
+ additionalQueryParams.forEach(::replaceAdditionalQueryParams)
+ }
+
+ fun removeAdditionalQueryParams(key: String) = apply {
+ additionalQueryParams.removeAll(key)
+ }
+
+ fun removeAllAdditionalQueryParams(keys: Set) = apply {
+ keys.forEach(::removeAdditionalQueryParams)
+ }
+
+ fun build(): StopsForAgencyListParams =
+ StopsForAgencyListParams(
+ checkNotNull(agencyId) { "`agencyId` is required but was not set" },
+ additionalHeaders
+ .asMap()
+ .mapValues { it.value.toList().toImmutable() }
+ .toImmutable(),
+ additionalQueryParams
+ .asMap()
+ .mapValues { it.value.toList().toImmutable() }
+ .toImmutable(),
+ )
+ }
+}
diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/StopsForAgencyListResponse.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/StopsForAgencyListResponse.kt
new file mode 100644
index 0000000..56a8389
--- /dev/null
+++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/StopsForAgencyListResponse.kt
@@ -0,0 +1,480 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package org.onebusaway.models
+
+import com.fasterxml.jackson.annotation.JsonAnyGetter
+import com.fasterxml.jackson.annotation.JsonAnySetter
+import com.fasterxml.jackson.annotation.JsonProperty
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize
+import java.util.Objects
+import java.util.Optional
+import org.onebusaway.core.ExcludeMissing
+import org.onebusaway.core.JsonField
+import org.onebusaway.core.JsonMissing
+import org.onebusaway.core.JsonValue
+import org.onebusaway.core.NoAutoDetect
+import org.onebusaway.core.toImmutable
+
+@JsonDeserialize(builder = StopsForAgencyListResponse.Builder::class)
+@NoAutoDetect
+class StopsForAgencyListResponse
+private constructor(
+ private val code: JsonField,
+ private val currentTime: JsonField,
+ private val text: JsonField,
+ private val version: JsonField,
+ private val limitExceeded: JsonField,
+ private val outOfRange: JsonField,
+ private val list: JsonField>,
+ private val references: JsonField,
+ private val additionalProperties: Map,
+) {
+
+ private var validated: Boolean = false
+
+ fun code(): Long = code.getRequired("code")
+
+ fun currentTime(): Long = currentTime.getRequired("currentTime")
+
+ fun text(): String = text.getRequired("text")
+
+ fun version(): Long = version.getRequired("version")
+
+ fun limitExceeded(): Boolean = limitExceeded.getRequired("limitExceeded")
+
+ fun outOfRange(): Optional = Optional.ofNullable(outOfRange.getNullable("outOfRange"))
+
+ fun list(): kotlin.collections.List = list.getRequired("list")
+
+ fun references(): References = references.getRequired("references")
+
+ fun toResponseWrapper(): ResponseWrapper =
+ ResponseWrapper.builder()
+ .code(code)
+ .currentTime(currentTime)
+ .text(text)
+ .version(version)
+ .build()
+
+ @JsonProperty("code") @ExcludeMissing fun _code() = code
+
+ @JsonProperty("currentTime") @ExcludeMissing fun _currentTime() = currentTime
+
+ @JsonProperty("text") @ExcludeMissing fun _text() = text
+
+ @JsonProperty("version") @ExcludeMissing fun _version() = version
+
+ @JsonProperty("limitExceeded") @ExcludeMissing fun _limitExceeded() = limitExceeded
+
+ @JsonProperty("outOfRange") @ExcludeMissing fun _outOfRange() = outOfRange
+
+ @JsonProperty("list") @ExcludeMissing fun _list() = list
+
+ @JsonProperty("references") @ExcludeMissing fun _references() = references
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map = additionalProperties
+
+ fun validate(): StopsForAgencyListResponse = apply {
+ if (!validated) {
+ code()
+ currentTime()
+ text()
+ version()
+ limitExceeded()
+ outOfRange()
+ list().forEach { it.validate() }
+ references().validate()
+ validated = true
+ }
+ }
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ @JvmStatic fun builder() = Builder()
+ }
+
+ class Builder {
+
+ private var code: JsonField = JsonMissing.of()
+ private var currentTime: JsonField = JsonMissing.of()
+ private var text: JsonField = JsonMissing.of()
+ private var version: JsonField = JsonMissing.of()
+ private var limitExceeded: JsonField = JsonMissing.of()
+ private var outOfRange: JsonField = JsonMissing.of()
+ private var list: JsonField> = JsonMissing.of()
+ private var references: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(stopsForAgencyListResponse: StopsForAgencyListResponse) = apply {
+ this.code = stopsForAgencyListResponse.code
+ this.currentTime = stopsForAgencyListResponse.currentTime
+ this.text = stopsForAgencyListResponse.text
+ this.version = stopsForAgencyListResponse.version
+ this.limitExceeded = stopsForAgencyListResponse.limitExceeded
+ this.outOfRange = stopsForAgencyListResponse.outOfRange
+ this.list = stopsForAgencyListResponse.list
+ this.references = stopsForAgencyListResponse.references
+ additionalProperties(stopsForAgencyListResponse.additionalProperties)
+ }
+
+ fun code(code: Long) = code(JsonField.of(code))
+
+ @JsonProperty("code")
+ @ExcludeMissing
+ fun code(code: JsonField) = apply { this.code = code }
+
+ fun currentTime(currentTime: Long) = currentTime(JsonField.of(currentTime))
+
+ @JsonProperty("currentTime")
+ @ExcludeMissing
+ fun currentTime(currentTime: JsonField) = apply { this.currentTime = currentTime }
+
+ fun text(text: String) = text(JsonField.of(text))
+
+ @JsonProperty("text")
+ @ExcludeMissing
+ fun text(text: JsonField) = apply { this.text = text }
+
+ fun version(version: Long) = version(JsonField.of(version))
+
+ @JsonProperty("version")
+ @ExcludeMissing
+ fun version(version: JsonField) = apply { this.version = version }
+
+ fun limitExceeded(limitExceeded: Boolean) = limitExceeded(JsonField.of(limitExceeded))
+
+ @JsonProperty("limitExceeded")
+ @ExcludeMissing
+ fun limitExceeded(limitExceeded: JsonField) = apply {
+ this.limitExceeded = limitExceeded
+ }
+
+ fun outOfRange(outOfRange: Boolean) = outOfRange(JsonField.of(outOfRange))
+
+ @JsonProperty("outOfRange")
+ @ExcludeMissing
+ fun outOfRange(outOfRange: JsonField) = apply { this.outOfRange = outOfRange }
+
+ fun list(list: kotlin.collections.List) = list(JsonField.of(list))
+
+ @JsonProperty("list")
+ @ExcludeMissing
+ fun list(list: JsonField>) = apply { this.list = list }
+
+ fun references(references: References) = references(JsonField.of(references))
+
+ @JsonProperty("references")
+ @ExcludeMissing
+ fun references(references: JsonField) = apply { this.references = references }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ @JsonAnySetter
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ this.additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun build(): StopsForAgencyListResponse =
+ StopsForAgencyListResponse(
+ code,
+ currentTime,
+ text,
+ version,
+ limitExceeded,
+ outOfRange,
+ list.map { it.toImmutable() },
+ references,
+ additionalProperties.toImmutable(),
+ )
+ }
+
+ @JsonDeserialize(builder = List.Builder::class)
+ @NoAutoDetect
+ class List
+ private constructor(
+ private val code: JsonField,
+ private val direction: JsonField,
+ private val id: JsonField,
+ private val lat: JsonField,
+ private val locationType: JsonField,
+ private val lon: JsonField,
+ private val name: JsonField,
+ private val parent: JsonField,
+ private val routeIds: JsonField>,
+ private val staticRouteIds: JsonField>,
+ private val wheelchairBoarding: JsonField,
+ private val additionalProperties: Map,
+ ) {
+
+ private var validated: Boolean = false
+
+ fun code(): Optional = Optional.ofNullable(code.getNullable("code"))
+
+ fun direction(): Optional = Optional.ofNullable(direction.getNullable("direction"))
+
+ fun id(): String = id.getRequired("id")
+
+ fun lat(): Double = lat.getRequired("lat")
+
+ fun locationType(): Optional =
+ Optional.ofNullable(locationType.getNullable("locationType"))
+
+ fun lon(): Double = lon.getRequired("lon")
+
+ fun name(): String = name.getRequired("name")
+
+ fun parent(): String = parent.getRequired("parent")
+
+ fun routeIds(): kotlin.collections.List = routeIds.getRequired("routeIds")
+
+ fun staticRouteIds(): kotlin.collections.List =
+ staticRouteIds.getRequired("staticRouteIds")
+
+ fun wheelchairBoarding(): Optional =
+ Optional.ofNullable(wheelchairBoarding.getNullable("wheelchairBoarding"))
+
+ @JsonProperty("code") @ExcludeMissing fun _code() = code
+
+ @JsonProperty("direction") @ExcludeMissing fun _direction() = direction
+
+ @JsonProperty("id") @ExcludeMissing fun _id() = id
+
+ @JsonProperty("lat") @ExcludeMissing fun _lat() = lat
+
+ @JsonProperty("locationType") @ExcludeMissing fun _locationType() = locationType
+
+ @JsonProperty("lon") @ExcludeMissing fun _lon() = lon
+
+ @JsonProperty("name") @ExcludeMissing fun _name() = name
+
+ @JsonProperty("parent") @ExcludeMissing fun _parent() = parent
+
+ @JsonProperty("routeIds") @ExcludeMissing fun _routeIds() = routeIds
+
+ @JsonProperty("staticRouteIds") @ExcludeMissing fun _staticRouteIds() = staticRouteIds
+
+ @JsonProperty("wheelchairBoarding")
+ @ExcludeMissing
+ fun _wheelchairBoarding() = wheelchairBoarding
+
+ @JsonAnyGetter
+ @ExcludeMissing
+ fun _additionalProperties(): Map = additionalProperties
+
+ fun validate(): List = apply {
+ if (!validated) {
+ code()
+ direction()
+ id()
+ lat()
+ locationType()
+ lon()
+ name()
+ parent()
+ routeIds()
+ staticRouteIds()
+ wheelchairBoarding()
+ validated = true
+ }
+ }
+
+ fun toBuilder() = Builder().from(this)
+
+ companion object {
+
+ @JvmStatic fun builder() = Builder()
+ }
+
+ class Builder {
+
+ private var code: JsonField = JsonMissing.of()
+ private var direction: JsonField = JsonMissing.of()
+ private var id: JsonField = JsonMissing.of()
+ private var lat: JsonField = JsonMissing.of()
+ private var locationType: JsonField = JsonMissing.of()
+ private var lon: JsonField = JsonMissing.of()
+ private var name: JsonField = JsonMissing.of()
+ private var parent: JsonField = JsonMissing.of()
+ private var routeIds: JsonField> = JsonMissing.of()
+ private var staticRouteIds: JsonField> =
+ JsonMissing.of()
+ private var wheelchairBoarding: JsonField = JsonMissing.of()
+ private var additionalProperties: MutableMap = mutableMapOf()
+
+ @JvmSynthetic
+ internal fun from(list: List) = apply {
+ this.code = list.code
+ this.direction = list.direction
+ this.id = list.id
+ this.lat = list.lat
+ this.locationType = list.locationType
+ this.lon = list.lon
+ this.name = list.name
+ this.parent = list.parent
+ this.routeIds = list.routeIds
+ this.staticRouteIds = list.staticRouteIds
+ this.wheelchairBoarding = list.wheelchairBoarding
+ additionalProperties(list.additionalProperties)
+ }
+
+ fun code(code: String) = code(JsonField.of(code))
+
+ @JsonProperty("code")
+ @ExcludeMissing
+ fun code(code: JsonField) = apply { this.code = code }
+
+ fun direction(direction: String) = direction(JsonField.of(direction))
+
+ @JsonProperty("direction")
+ @ExcludeMissing
+ fun direction(direction: JsonField) = apply { this.direction = direction }
+
+ fun id(id: String) = id(JsonField.of(id))
+
+ @JsonProperty("id")
+ @ExcludeMissing
+ fun id(id: JsonField) = apply { this.id = id }
+
+ fun lat(lat: Double) = lat(JsonField.of(lat))
+
+ @JsonProperty("lat")
+ @ExcludeMissing
+ fun lat(lat: JsonField) = apply { this.lat = lat }
+
+ fun locationType(locationType: Long) = locationType(JsonField.of(locationType))
+
+ @JsonProperty("locationType")
+ @ExcludeMissing
+ fun locationType(locationType: JsonField) = apply {
+ this.locationType = locationType
+ }
+
+ fun lon(lon: Double) = lon(JsonField.of(lon))
+
+ @JsonProperty("lon")
+ @ExcludeMissing
+ fun lon(lon: JsonField) = apply { this.lon = lon }
+
+ fun name(name: String) = name(JsonField.of(name))
+
+ @JsonProperty("name")
+ @ExcludeMissing
+ fun name(name: JsonField) = apply { this.name = name }
+
+ fun parent(parent: String) = parent(JsonField.of(parent))
+
+ @JsonProperty("parent")
+ @ExcludeMissing
+ fun parent(parent: JsonField) = apply { this.parent = parent }
+
+ fun routeIds(routeIds: kotlin.collections.List) =
+ routeIds(JsonField.of(routeIds))
+
+ @JsonProperty("routeIds")
+ @ExcludeMissing
+ fun routeIds(routeIds: JsonField>) = apply {
+ this.routeIds = routeIds
+ }
+
+ fun staticRouteIds(staticRouteIds: kotlin.collections.List) =
+ staticRouteIds(JsonField.of(staticRouteIds))
+
+ @JsonProperty("staticRouteIds")
+ @ExcludeMissing
+ fun staticRouteIds(staticRouteIds: JsonField>) = apply {
+ this.staticRouteIds = staticRouteIds
+ }
+
+ fun wheelchairBoarding(wheelchairBoarding: String) =
+ wheelchairBoarding(JsonField.of(wheelchairBoarding))
+
+ @JsonProperty("wheelchairBoarding")
+ @ExcludeMissing
+ fun wheelchairBoarding(wheelchairBoarding: JsonField) = apply {
+ this.wheelchairBoarding = wheelchairBoarding
+ }
+
+ fun additionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.clear()
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ @JsonAnySetter
+ fun putAdditionalProperty(key: String, value: JsonValue) = apply {
+ this.additionalProperties.put(key, value)
+ }
+
+ fun putAllAdditionalProperties(additionalProperties: Map) = apply {
+ this.additionalProperties.putAll(additionalProperties)
+ }
+
+ fun build(): List =
+ List(
+ code,
+ direction,
+ id,
+ lat,
+ locationType,
+ lon,
+ name,
+ parent,
+ routeIds.map { it.toImmutable() },
+ staticRouteIds.map { it.toImmutable() },
+ wheelchairBoarding,
+ additionalProperties.toImmutable(),
+ )
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is List && this.code == other.code && this.direction == other.direction && this.id == other.id && this.lat == other.lat && this.locationType == other.locationType && this.lon == other.lon && this.name == other.name && this.parent == other.parent && this.routeIds == other.routeIds && this.staticRouteIds == other.staticRouteIds && this.wheelchairBoarding == other.wheelchairBoarding && this.additionalProperties == other.additionalProperties /* spotless:on */
+ }
+
+ private var hashCode: Int = 0
+
+ override fun hashCode(): Int {
+ if (hashCode == 0) {
+ hashCode = /* spotless:off */ Objects.hash(code, direction, id, lat, locationType, lon, name, parent, routeIds, staticRouteIds, wheelchairBoarding, additionalProperties) /* spotless:on */
+ }
+ return hashCode
+ }
+
+ override fun toString() =
+ "List{code=$code, direction=$direction, id=$id, lat=$lat, locationType=$locationType, lon=$lon, name=$name, parent=$parent, routeIds=$routeIds, staticRouteIds=$staticRouteIds, wheelchairBoarding=$wheelchairBoarding, additionalProperties=$additionalProperties}"
+ }
+
+ override fun equals(other: Any?): Boolean {
+ if (this === other) {
+ return true
+ }
+
+ return /* spotless:off */ other is StopsForAgencyListResponse && this.code == other.code && this.currentTime == other.currentTime && this.text == other.text && this.version == other.version && this.limitExceeded == other.limitExceeded && this.outOfRange == other.outOfRange && this.list == other.list && this.references == other.references && this.additionalProperties == other.additionalProperties /* spotless:on */
+ }
+
+ private var hashCode: Int = 0
+
+ override fun hashCode(): Int {
+ if (hashCode == 0) {
+ hashCode = /* spotless:off */ Objects.hash(code, currentTime, text, version, limitExceeded, outOfRange, list, references, additionalProperties) /* spotless:on */
+ }
+ return hashCode
+ }
+
+ override fun toString() =
+ "StopsForAgencyListResponse{code=$code, currentTime=$currentTime, text=$text, version=$version, limitExceeded=$limitExceeded, outOfRange=$outOfRange, list=$list, references=$references, additionalProperties=$additionalProperties}"
+}
diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/StopsForLocationListResponse.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/StopsForLocationListResponse.kt
index 4a273af..9a7970a 100644
--- a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/StopsForLocationListResponse.kt
+++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/StopsForLocationListResponse.kt
@@ -158,6 +158,7 @@ private constructor(
class Data
private constructor(
private val limitExceeded: JsonField,
+ private val outOfRange: JsonField,
private val list: JsonField>,
private val references: JsonField,
private val additionalProperties: Map,
@@ -167,12 +168,17 @@ private constructor(
fun limitExceeded(): Boolean = limitExceeded.getRequired("limitExceeded")
+ fun outOfRange(): Optional =
+ Optional.ofNullable(outOfRange.getNullable("outOfRange"))
+
fun list(): kotlin.collections.List = list.getRequired("list")
fun references(): References = references.getRequired("references")
@JsonProperty("limitExceeded") @ExcludeMissing fun _limitExceeded() = limitExceeded
+ @JsonProperty("outOfRange") @ExcludeMissing fun _outOfRange() = outOfRange
+
@JsonProperty("list") @ExcludeMissing fun _list() = list
@JsonProperty("references") @ExcludeMissing fun _references() = references
@@ -184,6 +190,7 @@ private constructor(
fun validate(): Data = apply {
if (!validated) {
limitExceeded()
+ outOfRange()
list().forEach { it.validate() }
references().validate()
validated = true
@@ -200,6 +207,7 @@ private constructor(
class Builder {
private var limitExceeded: JsonField = JsonMissing.of()
+ private var outOfRange: JsonField = JsonMissing.of()
private var list: JsonField> = JsonMissing.of()
private var references: JsonField = JsonMissing.of()
private var additionalProperties: MutableMap = mutableMapOf()
@@ -207,6 +215,7 @@ private constructor(
@JvmSynthetic
internal fun from(data: Data) = apply {
this.limitExceeded = data.limitExceeded
+ this.outOfRange = data.outOfRange
this.list = data.list
this.references = data.references
additionalProperties(data.additionalProperties)
@@ -220,6 +229,12 @@ private constructor(
this.limitExceeded = limitExceeded
}
+ fun outOfRange(outOfRange: Boolean) = outOfRange(JsonField.of(outOfRange))
+
+ @JsonProperty("outOfRange")
+ @ExcludeMissing
+ fun outOfRange(outOfRange: JsonField) = apply { this.outOfRange = outOfRange }
+
fun list(list: kotlin.collections.List) = list(JsonField.of(list))
@JsonProperty("list")
@@ -251,6 +266,7 @@ private constructor(
fun build(): Data =
Data(
limitExceeded,
+ outOfRange,
list.map { it.toImmutable() },
references,
additionalProperties.toImmutable(),
@@ -523,20 +539,20 @@ private constructor(
return true
}
- return /* spotless:off */ other is Data && this.limitExceeded == other.limitExceeded && this.list == other.list && this.references == other.references && this.additionalProperties == other.additionalProperties /* spotless:on */
+ return /* spotless:off */ other is Data && this.limitExceeded == other.limitExceeded && this.outOfRange == other.outOfRange && this.list == other.list && this.references == other.references && this.additionalProperties == other.additionalProperties /* spotless:on */
}
private var hashCode: Int = 0
override fun hashCode(): Int {
if (hashCode == 0) {
- hashCode = /* spotless:off */ Objects.hash(limitExceeded, list, references, additionalProperties) /* spotless:on */
+ hashCode = /* spotless:off */ Objects.hash(limitExceeded, outOfRange, list, references, additionalProperties) /* spotless:on */
}
return hashCode
}
override fun toString() =
- "Data{limitExceeded=$limitExceeded, list=$list, references=$references, additionalProperties=$additionalProperties}"
+ "Data{limitExceeded=$limitExceeded, outOfRange=$outOfRange, list=$list, references=$references, additionalProperties=$additionalProperties}"
}
override fun equals(other: Any?): Boolean {
diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/services/async/StopsForAgencyServiceAsync.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/services/async/StopsForAgencyServiceAsync.kt
new file mode 100644
index 0000000..a8aa840
--- /dev/null
+++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/services/async/StopsForAgencyServiceAsync.kt
@@ -0,0 +1,20 @@
+// File generated from our OpenAPI spec by Stainless.
+
+@file:Suppress("OVERLOADS_INTERFACE") // See https://youtrack.jetbrains.com/issue/KT-36102
+
+package org.onebusaway.services.async
+
+import java.util.concurrent.CompletableFuture
+import org.onebusaway.core.RequestOptions
+import org.onebusaway.models.StopsForAgencyListParams
+import org.onebusaway.models.StopsForAgencyListResponse
+
+interface StopsForAgencyServiceAsync {
+
+ /** Get stops for a specific agency */
+ @JvmOverloads
+ fun list(
+ params: StopsForAgencyListParams,
+ requestOptions: RequestOptions = RequestOptions.none()
+ ): CompletableFuture
+}
diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/services/async/StopsForAgencyServiceAsyncImpl.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/services/async/StopsForAgencyServiceAsyncImpl.kt
new file mode 100644
index 0000000..e77c0d7
--- /dev/null
+++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/services/async/StopsForAgencyServiceAsyncImpl.kt
@@ -0,0 +1,59 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package org.onebusaway.services.async
+
+import java.util.concurrent.CompletableFuture
+import org.onebusaway.core.ClientOptions
+import org.onebusaway.core.RequestOptions
+import org.onebusaway.core.handlers.errorHandler
+import org.onebusaway.core.handlers.jsonHandler
+import org.onebusaway.core.handlers.withErrorHandler
+import org.onebusaway.core.http.HttpMethod
+import org.onebusaway.core.http.HttpRequest
+import org.onebusaway.core.http.HttpResponse.Handler
+import org.onebusaway.errors.OnebusawaySdkError
+import org.onebusaway.models.StopsForAgencyListParams
+import org.onebusaway.models.StopsForAgencyListResponse
+
+class StopsForAgencyServiceAsyncImpl
+constructor(
+ private val clientOptions: ClientOptions,
+) : StopsForAgencyServiceAsync {
+
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+
+ private val listHandler: Handler =
+ jsonHandler(clientOptions.jsonMapper)
+ .withErrorHandler(errorHandler)
+
+ /** Get stops for a specific agency */
+ override fun list(
+ params: StopsForAgencyListParams,
+ requestOptions: RequestOptions
+ ): CompletableFuture {
+ val request =
+ HttpRequest.builder()
+ .method(HttpMethod.GET)
+ .addPathSegments(
+ "api",
+ "where",
+ "stops-for-agency",
+ "${params.getPathParam(0)}.json"
+ )
+ .putAllQueryParams(clientOptions.queryParams.asMap())
+ .replaceAllQueryParams(params.getQueryParams())
+ .putAllHeaders(clientOptions.headers.asMap())
+ .replaceAllHeaders(params.getHeaders())
+ .build()
+ return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
+ ->
+ response
+ .use { listHandler.handle(it) }
+ .apply {
+ if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
+ validate()
+ }
+ }
+ }
+ }
+}
diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/services/blocking/StopsForAgencyService.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/services/blocking/StopsForAgencyService.kt
new file mode 100644
index 0000000..48ccc54
--- /dev/null
+++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/services/blocking/StopsForAgencyService.kt
@@ -0,0 +1,19 @@
+// File generated from our OpenAPI spec by Stainless.
+
+@file:Suppress("OVERLOADS_INTERFACE") // See https://youtrack.jetbrains.com/issue/KT-36102
+
+package org.onebusaway.services.blocking
+
+import org.onebusaway.core.RequestOptions
+import org.onebusaway.models.StopsForAgencyListParams
+import org.onebusaway.models.StopsForAgencyListResponse
+
+interface StopsForAgencyService {
+
+ /** Get stops for a specific agency */
+ @JvmOverloads
+ fun list(
+ params: StopsForAgencyListParams,
+ requestOptions: RequestOptions = RequestOptions.none()
+ ): StopsForAgencyListResponse
+}
diff --git a/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/services/blocking/StopsForAgencyServiceImpl.kt b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/services/blocking/StopsForAgencyServiceImpl.kt
new file mode 100644
index 0000000..6b64894
--- /dev/null
+++ b/onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/services/blocking/StopsForAgencyServiceImpl.kt
@@ -0,0 +1,57 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package org.onebusaway.services.blocking
+
+import org.onebusaway.core.ClientOptions
+import org.onebusaway.core.RequestOptions
+import org.onebusaway.core.handlers.errorHandler
+import org.onebusaway.core.handlers.jsonHandler
+import org.onebusaway.core.handlers.withErrorHandler
+import org.onebusaway.core.http.HttpMethod
+import org.onebusaway.core.http.HttpRequest
+import org.onebusaway.core.http.HttpResponse.Handler
+import org.onebusaway.errors.OnebusawaySdkError
+import org.onebusaway.models.StopsForAgencyListParams
+import org.onebusaway.models.StopsForAgencyListResponse
+
+class StopsForAgencyServiceImpl
+constructor(
+ private val clientOptions: ClientOptions,
+) : StopsForAgencyService {
+
+ private val errorHandler: Handler = errorHandler(clientOptions.jsonMapper)
+
+ private val listHandler: Handler =
+ jsonHandler(clientOptions.jsonMapper)
+ .withErrorHandler(errorHandler)
+
+ /** Get stops for a specific agency */
+ override fun list(
+ params: StopsForAgencyListParams,
+ requestOptions: RequestOptions
+ ): StopsForAgencyListResponse {
+ val request =
+ HttpRequest.builder()
+ .method(HttpMethod.GET)
+ .addPathSegments(
+ "api",
+ "where",
+ "stops-for-agency",
+ "${params.getPathParam(0)}.json"
+ )
+ .putAllQueryParams(clientOptions.queryParams.asMap())
+ .replaceAllQueryParams(params.getQueryParams())
+ .putAllHeaders(clientOptions.headers.asMap())
+ .replaceAllHeaders(params.getHeaders())
+ .build()
+ return clientOptions.httpClient.execute(request, requestOptions).let { response ->
+ response
+ .use { listHandler.handle(it) }
+ .apply {
+ if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
+ validate()
+ }
+ }
+ }
+ }
+}
diff --git a/onebusaway-sdk-java-core/src/test/kotlin/org/onebusaway/models/ReferencesTest.kt b/onebusaway-sdk-java-core/src/test/kotlin/org/onebusaway/models/ReferencesTest.kt
index 3f3b282..85bbd9b 100644
--- a/onebusaway-sdk-java-core/src/test/kotlin/org/onebusaway/models/ReferencesTest.kt
+++ b/onebusaway-sdk-java-core/src/test/kotlin/org/onebusaway/models/ReferencesTest.kt
@@ -127,15 +127,15 @@ class ReferencesTest {
listOf(
References.Stop.builder()
.id("id")
- .code("code")
.lat(42.23)
.lon(42.23)
.name("name")
- .direction("direction")
- .locationType(123L)
.parent("parent")
.routeIds(listOf("string"))
.staticRouteIds(listOf("string"))
+ .code("code")
+ .direction("direction")
+ .locationType(123L)
.wheelchairBoarding("wheelchairBoarding")
.build()
)
@@ -271,15 +271,15 @@ class ReferencesTest {
.containsExactly(
References.Stop.builder()
.id("id")
- .code("code")
.lat(42.23)
.lon(42.23)
.name("name")
- .direction("direction")
- .locationType(123L)
.parent("parent")
.routeIds(listOf("string"))
.staticRouteIds(listOf("string"))
+ .code("code")
+ .direction("direction")
+ .locationType(123L)
.wheelchairBoarding("wheelchairBoarding")
.build()
)
diff --git a/onebusaway-sdk-java-core/src/test/kotlin/org/onebusaway/models/StopsForAgencyListParamsTest.kt b/onebusaway-sdk-java-core/src/test/kotlin/org/onebusaway/models/StopsForAgencyListParamsTest.kt
new file mode 100644
index 0000000..4559d12
--- /dev/null
+++ b/onebusaway-sdk-java-core/src/test/kotlin/org/onebusaway/models/StopsForAgencyListParamsTest.kt
@@ -0,0 +1,25 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package org.onebusaway.models
+
+import org.assertj.core.api.Assertions.assertThat
+import org.junit.jupiter.api.Test
+import org.onebusaway.models.*
+
+class StopsForAgencyListParamsTest {
+
+ @Test
+ fun createStopsForAgencyListParams() {
+ StopsForAgencyListParams.builder().agencyId("agencyID").build()
+ }
+
+ @Test
+ fun getPathParam() {
+ val params = StopsForAgencyListParams.builder().agencyId("agencyID").build()
+ assertThat(params).isNotNull
+ // path param "agencyId"
+ assertThat(params.getPathParam(0)).isEqualTo("agencyID")
+ // out-of-bound path param
+ assertThat(params.getPathParam(1)).isEqualTo("")
+ }
+}
diff --git a/onebusaway-sdk-java-core/src/test/kotlin/org/onebusaway/services/blocking/StopsForAgencyServiceTest.kt b/onebusaway-sdk-java-core/src/test/kotlin/org/onebusaway/services/blocking/StopsForAgencyServiceTest.kt
new file mode 100644
index 0000000..7cba930
--- /dev/null
+++ b/onebusaway-sdk-java-core/src/test/kotlin/org/onebusaway/services/blocking/StopsForAgencyServiceTest.kt
@@ -0,0 +1,28 @@
+// File generated from our OpenAPI spec by Stainless.
+
+package org.onebusaway.services.blocking
+
+import org.junit.jupiter.api.Test
+import org.junit.jupiter.api.extension.ExtendWith
+import org.onebusaway.TestServerExtension
+import org.onebusaway.client.okhttp.OnebusawaySdkOkHttpClient
+import org.onebusaway.models.*
+
+@ExtendWith(TestServerExtension::class)
+class StopsForAgencyServiceTest {
+
+ @Test
+ fun callList() {
+ val client =
+ OnebusawaySdkOkHttpClient.builder()
+ .baseUrl(TestServerExtension.BASE_URL)
+ .apiKey("My API Key")
+ .build()
+ val stopsForAgencyService = client.stopsForAgency()
+ val stopsForAgencyListResponse =
+ stopsForAgencyService.list(
+ StopsForAgencyListParams.builder().agencyId("agencyID").build()
+ )
+ println(stopsForAgencyListResponse)
+ }
+}