Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 0.1.0-alpha.49 #195

Merged
merged 2 commits into from
Dec 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.48"
".": "0.1.0-alpha.49"
}
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## 0.1.0-alpha.49 (2024-12-27)

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

### ⚠ BREAKING CHANGES

* **client:** switch query params objects to use `QueryParams` ([#141](https://github.com/OneBusAway/kotlin-sdk/issues/141))

### Refactors

* **client:** switch query params objects to use `QueryParams` ([#141](https://github.com/OneBusAway/kotlin-sdk/issues/141)) ([5e5b4ab](https://github.com/OneBusAway/kotlin-sdk/commit/5e5b4ab24462e4e0a7fad1eaf1cc2205f913fe5a))

## 0.1.0-alpha.48 (2024-12-27)

Full Changelog: [v0.1.0-alpha.47...v0.1.0-alpha.48](https://github.com/OneBusAway/kotlin-sdk/compare/v0.1.0-alpha.47...v0.1.0-alpha.48)
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.48")
implementation("org.onebusaway:onebusaway-sdk-kotlin:0.1.0-alpha.49")
```

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

nexusPublishing {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ internal fun <T> List<T>.toImmutable(): List<T> =
if (isEmpty()) Collections.emptyList() else Collections.unmodifiableList(toList())

internal fun <K, V> Map<K, V>.toImmutable(): Map<K, V> =
if (isEmpty()) immutableEmptyMap() else Collections.unmodifiableMap(toMap())

internal fun <K, V> immutableEmptyMap(): Map<K, V> = Collections.emptyMap()
if (isEmpty()) Collections.emptyMap() else Collections.unmodifiableMap(toMap())

internal fun <K : Comparable<K>, V> SortedMap<K, V>.toImmutable(): SortedMap<K, V> =
if (isEmpty()) Collections.emptySortedMap()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,18 @@ package org.onebusaway.errors

import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonAnySetter
import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import java.util.Objects
import org.onebusaway.core.ExcludeMissing
import org.onebusaway.core.JsonValue
import org.onebusaway.core.NoAutoDetect
import org.onebusaway.core.immutableEmptyMap
import org.onebusaway.core.toImmutable

@JsonDeserialize(builder = OnebusawaySdkError.Builder::class)
@NoAutoDetect
class OnebusawaySdkError
@JsonCreator
private constructor(
@JsonAnyGetter
@ExcludeMissing
@JsonAnySetter
val additionalProperties: Map<String, JsonValue> = immutableEmptyMap(),
@JsonAnyGetter @ExcludeMissing val additionalProperties: Map<String, JsonValue>,
) {

fun toBuilder() = Builder().from(this)
Expand All @@ -42,6 +38,7 @@ private constructor(
putAllAdditionalProperties(additionalProperties)
}

@JsonAnySetter
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
additionalProperties.put(key, value)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,26 @@ package org.onebusaway.models

import com.fasterxml.jackson.annotation.JsonAnyGetter
import com.fasterxml.jackson.annotation.JsonAnySetter
import com.fasterxml.jackson.annotation.JsonCreator
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.databind.annotation.JsonDeserialize
import java.util.Objects
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.immutableEmptyMap
import org.onebusaway.core.toImmutable

@JsonDeserialize(builder = AgenciesWithCoverageListResponse.Builder::class)
@NoAutoDetect
class AgenciesWithCoverageListResponse
@JsonCreator
private constructor(
@JsonProperty("code") @ExcludeMissing private val code: JsonField<Long> = JsonMissing.of(),
@JsonProperty("currentTime")
@ExcludeMissing
private val currentTime: JsonField<Long> = JsonMissing.of(),
@JsonProperty("text") @ExcludeMissing private val text: JsonField<String> = JsonMissing.of(),
@JsonProperty("version")
@ExcludeMissing
private val version: JsonField<Long> = JsonMissing.of(),
@JsonProperty("data") @ExcludeMissing private val data: JsonField<Data> = JsonMissing.of(),
@JsonAnySetter private val additionalProperties: Map<String, JsonValue> = immutableEmptyMap(),
private val code: JsonField<Long>,
private val currentTime: JsonField<Long>,
private val text: JsonField<String>,
private val version: JsonField<Long>,
private val data: JsonField<Data>,
private val additionalProperties: Map<String, JsonValue>,
) {

fun code(): Long = code.getRequired("code")
Expand Down Expand Up @@ -105,29 +100,40 @@ private constructor(

fun code(code: Long) = code(JsonField.of(code))

@JsonProperty("code")
@ExcludeMissing
fun code(code: JsonField<Long>) = apply { this.code = code }

fun currentTime(currentTime: Long) = currentTime(JsonField.of(currentTime))

@JsonProperty("currentTime")
@ExcludeMissing
fun currentTime(currentTime: JsonField<Long>) = apply { this.currentTime = currentTime }

fun text(text: String) = text(JsonField.of(text))

@JsonProperty("text")
@ExcludeMissing
fun text(text: JsonField<String>) = apply { this.text = text }

fun version(version: Long) = version(JsonField.of(version))

@JsonProperty("version")
@ExcludeMissing
fun version(version: JsonField<Long>) = apply { this.version = version }

fun data(data: Data) = data(JsonField.of(data))

@JsonProperty("data")
@ExcludeMissing
fun data(data: JsonField<Data>) = apply { this.data = data }

fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
}

@JsonAnySetter
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
additionalProperties.put(key, value)
}
Expand All @@ -153,21 +159,14 @@ private constructor(
)
}

@JsonDeserialize(builder = Data.Builder::class)
@NoAutoDetect
class Data
@JsonCreator
private constructor(
@JsonProperty("limitExceeded")
@ExcludeMissing
private val limitExceeded: JsonField<Boolean> = JsonMissing.of(),
@JsonProperty("list")
@ExcludeMissing
private val list: JsonField<kotlin.collections.List<List>> = JsonMissing.of(),
@JsonProperty("references")
@ExcludeMissing
private val references: JsonField<References> = JsonMissing.of(),
@JsonAnySetter
private val additionalProperties: Map<String, JsonValue> = immutableEmptyMap(),
private val limitExceeded: JsonField<Boolean>,
private val list: JsonField<kotlin.collections.List<List>>,
private val references: JsonField<References>,
private val additionalProperties: Map<String, JsonValue>,
) {

fun limitExceeded(): Boolean = limitExceeded.getRequired("limitExceeded")
Expand Down Expand Up @@ -220,16 +219,22 @@ private constructor(

fun limitExceeded(limitExceeded: Boolean) = limitExceeded(JsonField.of(limitExceeded))

@JsonProperty("limitExceeded")
@ExcludeMissing
fun limitExceeded(limitExceeded: JsonField<Boolean>) = apply {
this.limitExceeded = limitExceeded
}

fun list(list: kotlin.collections.List<List>) = list(JsonField.of(list))

@JsonProperty("list")
@ExcludeMissing
fun list(list: JsonField<kotlin.collections.List<List>>) = apply { this.list = list }

fun references(references: References) = references(JsonField.of(references))

@JsonProperty("references")
@ExcludeMissing
fun references(references: JsonField<References>) = apply {
this.references = references
}
Expand All @@ -239,6 +244,7 @@ private constructor(
putAllAdditionalProperties(additionalProperties)
}

@JsonAnySetter
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
additionalProperties.put(key, value)
}
Expand All @@ -262,27 +268,16 @@ private constructor(
)
}

@JsonDeserialize(builder = List.Builder::class)
@NoAutoDetect
class List
@JsonCreator
private constructor(
@JsonProperty("agencyId")
@ExcludeMissing
private val agencyId: JsonField<String> = JsonMissing.of(),
@JsonProperty("lat")
@ExcludeMissing
private val lat: JsonField<Double> = JsonMissing.of(),
@JsonProperty("latSpan")
@ExcludeMissing
private val latSpan: JsonField<Double> = JsonMissing.of(),
@JsonProperty("lon")
@ExcludeMissing
private val lon: JsonField<Double> = JsonMissing.of(),
@JsonProperty("lonSpan")
@ExcludeMissing
private val lonSpan: JsonField<Double> = JsonMissing.of(),
@JsonAnySetter
private val additionalProperties: Map<String, JsonValue> = immutableEmptyMap(),
private val agencyId: JsonField<String>,
private val lat: JsonField<Double>,
private val latSpan: JsonField<Double>,
private val lon: JsonField<Double>,
private val lonSpan: JsonField<Double>,
private val additionalProperties: Map<String, JsonValue>,
) {

fun agencyId(): String = agencyId.getRequired("agencyId")
Expand Down Expand Up @@ -349,29 +344,40 @@ private constructor(

fun agencyId(agencyId: String) = agencyId(JsonField.of(agencyId))

@JsonProperty("agencyId")
@ExcludeMissing
fun agencyId(agencyId: JsonField<String>) = apply { this.agencyId = agencyId }

fun lat(lat: Double) = lat(JsonField.of(lat))

@JsonProperty("lat")
@ExcludeMissing
fun lat(lat: JsonField<Double>) = apply { this.lat = lat }

fun latSpan(latSpan: Double) = latSpan(JsonField.of(latSpan))

@JsonProperty("latSpan")
@ExcludeMissing
fun latSpan(latSpan: JsonField<Double>) = apply { this.latSpan = latSpan }

fun lon(lon: Double) = lon(JsonField.of(lon))

@JsonProperty("lon")
@ExcludeMissing
fun lon(lon: JsonField<Double>) = apply { this.lon = lon }

fun lonSpan(lonSpan: Double) = lonSpan(JsonField.of(lonSpan))

@JsonProperty("lonSpan")
@ExcludeMissing
fun lonSpan(lonSpan: JsonField<Double>) = apply { this.lonSpan = lonSpan }

fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
}

@JsonAnySetter
fun putAdditionalProperty(key: String, value: JsonValue) = apply {
additionalProperties.put(key, value)
}
Expand Down
Loading
Loading