-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #68 from OneBusAway/release-please--branches--main…
…--changes--next release: 0.1.0-alpha.23
- Loading branch information
Showing
23 changed files
with
923 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
".": "0.1.0-alpha.22" | ||
".": "0.1.0-alpha.23" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
161 changes: 161 additions & 0 deletions
161
onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/StopsForAgencyListParams.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(), | ||
) | ||
} | ||
} |
Oops, something went wrong.