Skip to content
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 .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
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-6f08502508c8ad25235971add3124a1cde4f1c3ec705d5df455d750e0adcb90b.yml
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,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 @@ -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
Expand Up @@ -158,6 +158,7 @@ private constructor(
class Data
private constructor(
private val limitExceeded: JsonField<Boolean>,
private val outOfRange: JsonField<Boolean>,
private val list: JsonField<List<List>>,
private val references: JsonField<References>,
private val additionalProperties: Map<String, JsonValue>,
Expand All @@ -167,12 +168,17 @@ private constructor(

fun limitExceeded(): Boolean = limitExceeded.getRequired("limitExceeded")

fun outOfRange(): Optional<Boolean> =
Optional.ofNullable(outOfRange.getNullable("outOfRange"))

fun list(): List<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
Expand All @@ -184,6 +190,7 @@ private constructor(
fun validate(): Data = apply {
if (!validated) {
limitExceeded()
outOfRange()
list().forEach { it.validate() }
references().validate()
validated = true
Expand All @@ -200,13 +207,15 @@ private constructor(
class Builder {

private var limitExceeded: JsonField<Boolean> = JsonMissing.of()
private var outOfRange: JsonField<Boolean> = JsonMissing.of()
private var list: JsonField<List<List>> = JsonMissing.of()
private var references: JsonField<References> = JsonMissing.of()
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()

@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)
Expand All @@ -220,6 +229,12 @@ private constructor(
this.limitExceeded = limitExceeded
}

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

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

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

@JsonProperty("list")
Expand Down Expand Up @@ -251,6 +266,7 @@ private constructor(
fun build(): Data =
Data(
limitExceeded,
outOfRange,
list.map { it.toImmutable() },
references,
additionalProperties.toImmutable(),
Expand Down Expand Up @@ -517,20 +533,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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
)
Expand Down Expand Up @@ -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()
)
Expand Down