Skip to content

Commit

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

release: 0.1.0-alpha.31
  • Loading branch information
Ahmedhossamdev authored Nov 30, 2024
2 parents 4259e33 + 4f7e5a0 commit 913592f
Show file tree
Hide file tree
Showing 23 changed files with 915 additions and 32 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.30"
".": "0.1.0-alpha.31"
}
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.31 (2024-11-30)

Full Changelog: [v0.1.0-alpha.30...v0.1.0-alpha.31](https://github.com/OneBusAway/kotlin-sdk/compare/v0.1.0-alpha.30...v0.1.0-alpha.31)

### Features

* **api:** api update ([#86](https://github.com/OneBusAway/kotlin-sdk/issues/86)) ([ac580dc](https://github.com/OneBusAway/kotlin-sdk/commit/ac580dc65a2a8d434fbeb2fad79cfce978e047cd))
* **api:** api update ([#88](https://github.com/OneBusAway/kotlin-sdk/issues/88)) ([6d86e0c](https://github.com/OneBusAway/kotlin-sdk/commit/6d86e0c11aee2ae119509463ff5310b49a847809))

## 0.1.0-alpha.30 (2024-11-28)

Full Changelog: [v0.1.0-alpha.29...v0.1.0-alpha.30](https://github.com/OneBusAway/kotlin-sdk/compare/v0.1.0-alpha.29...v0.1.0-alpha.30)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,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-kotlin:0.1.0-alpha.30")
implementation("org.onebusaway:onebusaway-sdk-kotlin:0.1.0-alpha.31")
```

#### Maven
Expand All @@ -30,7 +30,7 @@ implementation("org.onebusaway:onebusaway-sdk-kotlin:0.1.0-alpha.30")
<dependency>
<groupId>org.onebusaway</groupId>
<artifactId>onebusaway-sdk-kotlin</artifactId>
<version>0.1.0-alpha.30</version>
<version>0.1.0-alpha.31</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.30" // x-release-please-version
version = "0.1.0-alpha.31" // x-release-please-version
}

nexusPublishing {
Expand Down
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 @@ -2110,7 +2110,7 @@ private constructor(

private var validated: Boolean = false

fun code(): String = code.getRequired("code")
fun code(): String? = code.getNullable("code")

fun direction(): String? = direction.getNullable("direction")

Expand All @@ -2124,11 +2124,11 @@ private constructor(

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

fun parent(): String? = parent.getNullable("parent")
fun parent(): String = parent.getRequired("parent")

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

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

fun wheelchairBoarding(): String? = wheelchairBoarding.getNullable("wheelchairBoarding")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ private constructor(

private var validated: Boolean = false

fun code(): String = code.getRequired("code")
fun code(): String? = code.getNullable("code")

fun direction(): String? = direction.getNullable("direction")

Expand All @@ -407,11 +407,11 @@ private constructor(

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

fun parent(): String? = parent.getNullable("parent")
fun parent(): String = parent.getRequired("parent")

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

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

fun wheelchairBoarding(): String? =
wheelchairBoarding.getNullable("wheelchairBoarding")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ private constructor(

private var validated: Boolean = false

fun code(): String = code.getRequired("code")
fun code(): String? = code.getNullable("code")

fun direction(): String? = direction.getNullable("direction")

Expand All @@ -303,12 +303,12 @@ private constructor(

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

fun parent(): String? = parent.getNullable("parent")
fun parent(): String = parent.getRequired("parent")

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

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

fun wheelchairBoarding(): String? = wheelchairBoarding.getNullable("wheelchairBoarding")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ private constructor(

private var validated: Boolean = false

fun code(): String = code.getRequired("code")
fun code(): String? = code.getNullable("code")

fun direction(): String? = direction.getNullable("direction")

Expand All @@ -271,11 +271,11 @@ private constructor(

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

fun parent(): String? = parent.getNullable("parent")
fun parent(): String = parent.getRequired("parent")

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

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

fun wheelchairBoarding(): String? = wheelchairBoarding.getNullable("wheelchairBoarding")

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
// File generated from our OpenAPI spec by Stainless.

package org.onebusaway.models

import java.util.Objects
import org.onebusaway.core.NoAutoDetect
import org.onebusaway.core.http.Headers
import org.onebusaway.core.http.QueryParams
import org.onebusaway.models.*

class StopsForAgencyListParams
constructor(
private val agencyId: String,
private val additionalHeaders: Headers,
private val additionalQueryParams: QueryParams,
) {

fun agencyId(): String = agencyId

fun _additionalHeaders(): Headers = additionalHeaders

fun _additionalQueryParams(): QueryParams = additionalQueryParams

internal fun getHeaders(): Headers = additionalHeaders

internal fun getQueryParams(): QueryParams = additionalQueryParams

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

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

companion object {

fun builder() = Builder()
}

@NoAutoDetect
class Builder {

private var agencyId: String? = null
private var additionalHeaders: Headers.Builder = Headers.builder()
private var additionalQueryParams: QueryParams.Builder = QueryParams.builder()

internal fun from(stopsForAgencyListParams: StopsForAgencyListParams) = apply {
agencyId = stopsForAgencyListParams.agencyId
additionalHeaders = stopsForAgencyListParams.additionalHeaders.toBuilder()
additionalQueryParams = stopsForAgencyListParams.additionalQueryParams.toBuilder()
}

fun agencyId(agencyId: String) = apply { this.agencyId = agencyId }

fun additionalHeaders(additionalHeaders: Headers) = apply {
this.additionalHeaders.clear()
putAllAdditionalHeaders(additionalHeaders)
}

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.put(name, values)
}

fun putAllAdditionalHeaders(additionalHeaders: Headers) = apply {
this.additionalHeaders.putAll(additionalHeaders)
}

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

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

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

fun replaceAllAdditionalHeaders(additionalHeaders: Headers) = apply {
this.additionalHeaders.replaceAll(additionalHeaders)
}

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

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

fun removeAllAdditionalHeaders(names: Set<String>) = apply {
additionalHeaders.removeAll(names)
}

fun additionalQueryParams(additionalQueryParams: QueryParams) = apply {
this.additionalQueryParams.clear()
putAllAdditionalQueryParams(additionalQueryParams)
}

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.put(key, values)
}

fun putAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
this.additionalQueryParams.putAll(additionalQueryParams)
}

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

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

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

fun replaceAllAdditionalQueryParams(additionalQueryParams: QueryParams) = apply {
this.additionalQueryParams.replaceAll(additionalQueryParams)
}

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

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

fun removeAllAdditionalQueryParams(keys: Set<String>) = apply {
additionalQueryParams.removeAll(keys)
}

fun build(): StopsForAgencyListParams =
StopsForAgencyListParams(
checkNotNull(agencyId) { "`agencyId` is required but was not set" },
additionalHeaders.build(),
additionalQueryParams.build(),
)
}

override fun equals(other: Any?): Boolean {
if (this === other) {
return true
}

return /* spotless:off */ other is StopsForAgencyListParams && agencyId == other.agencyId && additionalHeaders == other.additionalHeaders && additionalQueryParams == other.additionalQueryParams /* spotless:on */
}

override fun hashCode(): Int = /* spotless:off */ Objects.hash(agencyId, additionalHeaders, additionalQueryParams) /* spotless:on */

override fun toString() =
"StopsForAgencyListParams{agencyId=$agencyId, additionalHeaders=$additionalHeaders, additionalQueryParams=$additionalQueryParams}"
}
Loading

0 comments on commit 913592f

Please sign in to comment.