Skip to content

Commit

Permalink
Merge pull request #68 from OneBusAway/release-please--branches--main…
Browse files Browse the repository at this point in the history
…--changes--next

release: 0.1.0-alpha.23
  • Loading branch information
Ahmedhossamdev authored Nov 29, 2024
2 parents 422d8ba + 94e5a7b commit 2f06840
Show file tree
Hide file tree
Showing 23 changed files with 923 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.1.0-alpha.22"
".": "0.1.0-alpha.23"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- x-release-please-start-version -->

[![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)

<!-- x-release-please-end -->

Expand All @@ -27,7 +27,7 @@ The REST API documentation can be found on [developer.onebusaway.org](https://d
<!-- x-release-please-start-version -->

```kotlin
implementation("org.onebusaway:onebusaway-sdk-java:0.1.0-alpha.22")
implementation("org.onebusaway:onebusaway-sdk-java:0.1.0-alpha.23")
```

#### Maven
Expand All @@ -36,7 +36,7 @@ implementation("org.onebusaway:onebusaway-sdk-java:0.1.0-alpha.22")
<dependency>
<groupId>org.onebusaway</groupId>
<artifactId>onebusaway-sdk-java</artifactId>
<version>0.1.0-alpha.22</version>
<version>0.1.0-alpha.23</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}


Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ interface OnebusawaySdkClient {

fun stopsForRoute(): StopsForRouteService

fun stopsForAgency(): StopsForAgencyService

fun stop(): StopService

fun stopIdsForAgency(): StopIdsForAgencyService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ interface OnebusawaySdkClientAsync {

fun stopsForRoute(): StopsForRouteServiceAsync

fun stopsForAgency(): StopsForAgencyServiceAsync

fun stop(): StopServiceAsync

fun stopIdsForAgency(): StopIdsForAgencyServiceAsync
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2175,7 +2175,7 @@ private constructor(

private var validated: Boolean = false

fun code(): String = code.getRequired("code")
fun code(): Optional<String> = Optional.ofNullable(code.getNullable("code"))

fun direction(): Optional<String> = Optional.ofNullable(direction.getNullable("direction"))

Expand All @@ -2190,13 +2190,11 @@ private constructor(

fun name(): String = name.getRequired("name")

fun parent(): Optional<String> = Optional.ofNullable(parent.getNullable("parent"))
fun parent(): String = parent.getRequired("parent")

fun routeIds(): Optional<List<String>> =
Optional.ofNullable(routeIds.getNullable("routeIds"))
fun routeIds(): List<String> = routeIds.getRequired("routeIds")

fun staticRouteIds(): Optional<List<String>> =
Optional.ofNullable(staticRouteIds.getNullable("staticRouteIds"))
fun staticRouteIds(): List<String> = staticRouteIds.getRequired("staticRouteIds")

fun wheelchairBoarding(): Optional<String> =
Optional.ofNullable(wheelchairBoarding.getNullable("wheelchairBoarding"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ private constructor(

private var validated: Boolean = false

fun code(): String = code.getRequired("code")
fun code(): Optional<String> = Optional.ofNullable(code.getNullable("code"))

fun direction(): Optional<String> =
Optional.ofNullable(direction.getNullable("direction"))
Expand All @@ -413,13 +413,11 @@ private constructor(

fun name(): String = name.getRequired("name")

fun parent(): Optional<String> = Optional.ofNullable(parent.getNullable("parent"))
fun parent(): String = parent.getRequired("parent")

fun routeIds(): Optional<List<String>> =
Optional.ofNullable(routeIds.getNullable("routeIds"))
fun routeIds(): List<String> = routeIds.getRequired("routeIds")

fun staticRouteIds(): Optional<List<String>> =
Optional.ofNullable(staticRouteIds.getNullable("staticRouteIds"))
fun staticRouteIds(): List<String> = staticRouteIds.getRequired("staticRouteIds")

fun wheelchairBoarding(): Optional<String> =
Optional.ofNullable(wheelchairBoarding.getNullable("wheelchairBoarding"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ private constructor(

private var validated: Boolean = false

fun code(): String = code.getRequired("code")
fun code(): Optional<String> = Optional.ofNullable(code.getNullable("code"))

fun direction(): Optional<String> =
Optional.ofNullable(direction.getNullable("direction"))
Expand All @@ -308,13 +308,12 @@ private constructor(

fun name(): String = name.getRequired("name")

fun parent(): Optional<String> = Optional.ofNullable(parent.getNullable("parent"))
fun parent(): String = parent.getRequired("parent")

fun routeIds(): Optional<kotlin.collections.List<String>> =
Optional.ofNullable(routeIds.getNullable("routeIds"))
fun routeIds(): kotlin.collections.List<String> = routeIds.getRequired("routeIds")

fun staticRouteIds(): Optional<kotlin.collections.List<String>> =
Optional.ofNullable(staticRouteIds.getNullable("staticRouteIds"))
fun staticRouteIds(): kotlin.collections.List<String> =
staticRouteIds.getRequired("staticRouteIds")

fun wheelchairBoarding(): Optional<String> =
Optional.ofNullable(wheelchairBoarding.getNullable("wheelchairBoarding"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ private constructor(

private var validated: Boolean = false

fun code(): String = code.getRequired("code")
fun code(): Optional<String> = Optional.ofNullable(code.getNullable("code"))

fun direction(): Optional<String> =
Optional.ofNullable(direction.getNullable("direction"))
Expand All @@ -276,13 +276,11 @@ private constructor(

fun name(): String = name.getRequired("name")

fun parent(): Optional<String> = Optional.ofNullable(parent.getNullable("parent"))
fun parent(): String = parent.getRequired("parent")

fun routeIds(): Optional<List<String>> =
Optional.ofNullable(routeIds.getNullable("routeIds"))
fun routeIds(): List<String> = routeIds.getRequired("routeIds")

fun staticRouteIds(): Optional<List<String>> =
Optional.ofNullable(staticRouteIds.getNullable("staticRouteIds"))
fun staticRouteIds(): List<String> = staticRouteIds.getRequired("staticRouteIds")

fun wheelchairBoarding(): Optional<String> =
Optional.ofNullable(wheelchairBoarding.getNullable("wheelchairBoarding"))
Expand Down
Original file line number Diff line number Diff line change
@@ -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<String, List<String>>,
private val additionalQueryParams: Map<String, List<String>>,
) {

fun agencyId(): String = agencyId

@JvmSynthetic internal fun getHeaders(): Map<String, List<String>> = additionalHeaders

@JvmSynthetic internal fun getQueryParams(): Map<String, List<String>> = additionalQueryParams

fun getPathParam(index: Int): String {
return when (index) {
0 -> agencyId
else -> ""
}
}

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

fun _additionalQueryParams(): Map<String, List<String>> = 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<String, String> = ArrayListMultimap.create()
private var additionalQueryParams: ListMultimap<String, String> = 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<String, Iterable<String>>) = apply {
this.additionalHeaders.clear()
putAllAdditionalHeaders(additionalHeaders)
}

fun putAdditionalHeader(name: String, value: String) = apply {
additionalHeaders.put(name, value)
}

fun putAdditionalHeaders(name: String, values: Iterable<String>) = apply {
additionalHeaders.putAll(name, values)
}

fun putAllAdditionalHeaders(additionalHeaders: Map<String, Iterable<String>>) = apply {
additionalHeaders.forEach(::putAdditionalHeaders)
}

fun replaceAdditionalHeaders(name: String, value: String) = apply {
additionalHeaders.replaceValues(name, listOf(value))
}

fun replaceAdditionalHeaders(name: String, values: Iterable<String>) = apply {
additionalHeaders.replaceValues(name, values)
}

fun replaceAllAdditionalHeaders(additionalHeaders: Map<String, Iterable<String>>) = apply {
additionalHeaders.forEach(::replaceAdditionalHeaders)
}

fun removeAdditionalHeaders(name: String) = apply { additionalHeaders.removeAll(name) }

fun removeAllAdditionalHeaders(names: Set<String>) = apply {
names.forEach(::removeAdditionalHeaders)
}

fun additionalQueryParams(additionalQueryParams: Map<String, Iterable<String>>) = apply {
this.additionalQueryParams.clear()
putAllAdditionalQueryParams(additionalQueryParams)
}

fun putAdditionalQueryParam(key: String, value: String) = apply {
additionalQueryParams.put(key, value)
}

fun putAdditionalQueryParams(key: String, values: Iterable<String>) = apply {
additionalQueryParams.putAll(key, values)
}

fun putAllAdditionalQueryParams(additionalQueryParams: Map<String, Iterable<String>>) =
apply {
additionalQueryParams.forEach(::putAdditionalQueryParams)
}

fun replaceAdditionalQueryParams(key: String, value: String) = apply {
additionalQueryParams.replaceValues(key, listOf(value))
}

fun replaceAdditionalQueryParams(key: String, values: Iterable<String>) = apply {
additionalQueryParams.replaceValues(key, values)
}

fun replaceAllAdditionalQueryParams(additionalQueryParams: Map<String, Iterable<String>>) =
apply {
additionalQueryParams.forEach(::replaceAdditionalQueryParams)
}

fun removeAdditionalQueryParams(key: String) = apply {
additionalQueryParams.removeAll(key)
}

fun removeAllAdditionalQueryParams(keys: Set<String>) = 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(),
)
}
}
Loading

0 comments on commit 2f06840

Please sign in to comment.