Skip to content

Commit fbaadd8

Browse files
feat(api): api update
1 parent ee33acf commit fbaadd8

8 files changed

Lines changed: 86 additions & 37 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 29
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-0c305d11543f8fc11bd55586c4dc4a724b10de1898cab0fe11364b4db6455752.yml
3-
openapi_spec_hash: 6d10c2ac411cd65f30d200f298577b32
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/open-transit%2Fopen-transit-30baad9d29b0909d180aae300750a0cd8425b52d7a60ba365b6aa4e5f8da6fab.yml
3+
openapi_spec_hash: 218466af34966d9b08728f107cb3b3b0
44
config_hash: 3871f5d21bb38ddd334ec04721dea64d

onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/arrivalanddeparture/ArrivalAndDepartureListResponse.kt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2636,7 +2636,7 @@ private constructor(
26362636
fun frequency(): Optional<String> = frequency.getOptional("frequency")
26372637

26382638
/**
2639-
* Last known location of the transit vehicle.
2639+
* Last known location of the transit vehicle (optional).
26402640
*
26412641
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected
26422642
* type (e.g. if the server responded with an unexpected value).
@@ -3379,9 +3379,16 @@ private constructor(
33793379
this.frequency = frequency
33803380
}
33813381

3382-
/** Last known location of the transit vehicle. */
3383-
fun lastKnownLocation(lastKnownLocation: LastKnownLocation) =
3384-
lastKnownLocation(JsonField.of(lastKnownLocation))
3382+
/** Last known location of the transit vehicle (optional). */
3383+
fun lastKnownLocation(lastKnownLocation: LastKnownLocation?) =
3384+
lastKnownLocation(JsonField.ofNullable(lastKnownLocation))
3385+
3386+
/**
3387+
* Alias for calling [Builder.lastKnownLocation] with
3388+
* `lastKnownLocation.orElse(null)`.
3389+
*/
3390+
fun lastKnownLocation(lastKnownLocation: Optional<LastKnownLocation>) =
3391+
lastKnownLocation(lastKnownLocation.getOrNull())
33853392

33863393
/**
33873394
* Sets [Builder.lastKnownLocation] to an arbitrary JSON value.
@@ -3702,7 +3709,7 @@ private constructor(
37023709
(situationIds.asKnown().getOrNull()?.size ?: 0) +
37033710
(if (vehicleId.asKnown().isPresent) 1 else 0)
37043711

3705-
/** Last known location of the transit vehicle. */
3712+
/** Last known location of the transit vehicle (optional). */
37063713
class LastKnownLocation
37073714
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
37083715
private constructor(

onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/arrivalanddeparture/ArrivalAndDepartureRetrieveResponse.kt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2437,7 +2437,7 @@ private constructor(
24372437
fun frequency(): Optional<String> = frequency.getOptional("frequency")
24382438

24392439
/**
2440-
* Last known location of the transit vehicle.
2440+
* Last known location of the transit vehicle (optional).
24412441
*
24422442
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected
24432443
* type (e.g. if the server responded with an unexpected value).
@@ -3164,9 +3164,16 @@ private constructor(
31643164
this.frequency = frequency
31653165
}
31663166

3167-
/** Last known location of the transit vehicle. */
3168-
fun lastKnownLocation(lastKnownLocation: LastKnownLocation) =
3169-
lastKnownLocation(JsonField.of(lastKnownLocation))
3167+
/** Last known location of the transit vehicle (optional). */
3168+
fun lastKnownLocation(lastKnownLocation: LastKnownLocation?) =
3169+
lastKnownLocation(JsonField.ofNullable(lastKnownLocation))
3170+
3171+
/**
3172+
* Alias for calling [Builder.lastKnownLocation] with
3173+
* `lastKnownLocation.orElse(null)`.
3174+
*/
3175+
fun lastKnownLocation(lastKnownLocation: Optional<LastKnownLocation>) =
3176+
lastKnownLocation(lastKnownLocation.getOrNull())
31703177

31713178
/**
31723179
* Sets [Builder.lastKnownLocation] to an arbitrary JSON value.
@@ -3475,7 +3482,7 @@ private constructor(
34753482
(situationIds.asKnown().getOrNull()?.size ?: 0) +
34763483
(if (vehicleId.asKnown().isPresent) 1 else 0)
34773484

3478-
/** Last known location of the transit vehicle. */
3485+
/** Last known location of the transit vehicle (optional). */
34793486
class LastKnownLocation
34803487
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
34813488
private constructor(

onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/tripdetails/TripDetailRetrieveResponse.kt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,7 +1862,7 @@ private constructor(
18621862
fun frequency(): Optional<String> = frequency.getOptional("frequency")
18631863

18641864
/**
1865-
* Last known location of the transit vehicle.
1865+
* Last known location of the transit vehicle (optional).
18661866
*
18671867
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected
18681868
* type (e.g. if the server responded with an unexpected value).
@@ -2589,9 +2589,16 @@ private constructor(
25892589
this.frequency = frequency
25902590
}
25912591

2592-
/** Last known location of the transit vehicle. */
2593-
fun lastKnownLocation(lastKnownLocation: LastKnownLocation) =
2594-
lastKnownLocation(JsonField.of(lastKnownLocation))
2592+
/** Last known location of the transit vehicle (optional). */
2593+
fun lastKnownLocation(lastKnownLocation: LastKnownLocation?) =
2594+
lastKnownLocation(JsonField.ofNullable(lastKnownLocation))
2595+
2596+
/**
2597+
* Alias for calling [Builder.lastKnownLocation] with
2598+
* `lastKnownLocation.orElse(null)`.
2599+
*/
2600+
fun lastKnownLocation(lastKnownLocation: Optional<LastKnownLocation>) =
2601+
lastKnownLocation(lastKnownLocation.getOrNull())
25952602

25962603
/**
25972604
* Sets [Builder.lastKnownLocation] to an arbitrary JSON value.
@@ -2900,7 +2907,7 @@ private constructor(
29002907
(situationIds.asKnown().getOrNull()?.size ?: 0) +
29012908
(if (vehicleId.asKnown().isPresent) 1 else 0)
29022909

2903-
/** Last known location of the transit vehicle. */
2910+
/** Last known location of the transit vehicle (optional). */
29042911
class LastKnownLocation
29052912
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
29062913
private constructor(

onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/tripforvehicle/TripForVehicleRetrieveResponse.kt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1864,7 +1864,7 @@ private constructor(
18641864
fun frequency(): Optional<String> = frequency.getOptional("frequency")
18651865

18661866
/**
1867-
* Last known location of the transit vehicle.
1867+
* Last known location of the transit vehicle (optional).
18681868
*
18691869
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected
18701870
* type (e.g. if the server responded with an unexpected value).
@@ -2591,9 +2591,16 @@ private constructor(
25912591
this.frequency = frequency
25922592
}
25932593

2594-
/** Last known location of the transit vehicle. */
2595-
fun lastKnownLocation(lastKnownLocation: LastKnownLocation) =
2596-
lastKnownLocation(JsonField.of(lastKnownLocation))
2594+
/** Last known location of the transit vehicle (optional). */
2595+
fun lastKnownLocation(lastKnownLocation: LastKnownLocation?) =
2596+
lastKnownLocation(JsonField.ofNullable(lastKnownLocation))
2597+
2598+
/**
2599+
* Alias for calling [Builder.lastKnownLocation] with
2600+
* `lastKnownLocation.orElse(null)`.
2601+
*/
2602+
fun lastKnownLocation(lastKnownLocation: Optional<LastKnownLocation>) =
2603+
lastKnownLocation(lastKnownLocation.getOrNull())
25972604

25982605
/**
25992606
* Sets [Builder.lastKnownLocation] to an arbitrary JSON value.
@@ -2902,7 +2909,7 @@ private constructor(
29022909
(situationIds.asKnown().getOrNull()?.size ?: 0) +
29032910
(if (vehicleId.asKnown().isPresent) 1 else 0)
29042911

2905-
/** Last known location of the transit vehicle. */
2912+
/** Last known location of the transit vehicle (optional). */
29062913
class LastKnownLocation
29072914
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
29082915
private constructor(

onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/tripsforlocation/TripsForLocationListResponse.kt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1970,7 +1970,7 @@ private constructor(
19701970
fun frequency(): Optional<String> = frequency.getOptional("frequency")
19711971

19721972
/**
1973-
* Last known location of the transit vehicle.
1973+
* Last known location of the transit vehicle (optional).
19741974
*
19751975
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected
19761976
* type (e.g. if the server responded with an unexpected value).
@@ -2697,9 +2697,16 @@ private constructor(
26972697
this.frequency = frequency
26982698
}
26992699

2700-
/** Last known location of the transit vehicle. */
2701-
fun lastKnownLocation(lastKnownLocation: LastKnownLocation) =
2702-
lastKnownLocation(JsonField.of(lastKnownLocation))
2700+
/** Last known location of the transit vehicle (optional). */
2701+
fun lastKnownLocation(lastKnownLocation: LastKnownLocation?) =
2702+
lastKnownLocation(JsonField.ofNullable(lastKnownLocation))
2703+
2704+
/**
2705+
* Alias for calling [Builder.lastKnownLocation] with
2706+
* `lastKnownLocation.orElse(null)`.
2707+
*/
2708+
fun lastKnownLocation(lastKnownLocation: Optional<LastKnownLocation>) =
2709+
lastKnownLocation(lastKnownLocation.getOrNull())
27032710

27042711
/**
27052712
* Sets [Builder.lastKnownLocation] to an arbitrary JSON value.
@@ -3009,7 +3016,7 @@ private constructor(
30093016
(situationIds.asKnown().getOrNull()?.size ?: 0) +
30103017
(if (vehicleId.asKnown().isPresent) 1 else 0)
30113018

3012-
/** Last known location of the transit vehicle. */
3019+
/** Last known location of the transit vehicle (optional). */
30133020
class LastKnownLocation
30143021
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
30153022
private constructor(

onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/tripsforroute/TripsForRouteListResponse.kt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1929,7 +1929,7 @@ private constructor(
19291929
fun frequency(): Optional<String> = frequency.getOptional("frequency")
19301930

19311931
/**
1932-
* Last known location of the transit vehicle.
1932+
* Last known location of the transit vehicle (optional).
19331933
*
19341934
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected
19351935
* type (e.g. if the server responded with an unexpected value).
@@ -2656,9 +2656,16 @@ private constructor(
26562656
this.frequency = frequency
26572657
}
26582658

2659-
/** Last known location of the transit vehicle. */
2660-
fun lastKnownLocation(lastKnownLocation: LastKnownLocation) =
2661-
lastKnownLocation(JsonField.of(lastKnownLocation))
2659+
/** Last known location of the transit vehicle (optional). */
2660+
fun lastKnownLocation(lastKnownLocation: LastKnownLocation?) =
2661+
lastKnownLocation(JsonField.ofNullable(lastKnownLocation))
2662+
2663+
/**
2664+
* Alias for calling [Builder.lastKnownLocation] with
2665+
* `lastKnownLocation.orElse(null)`.
2666+
*/
2667+
fun lastKnownLocation(lastKnownLocation: Optional<LastKnownLocation>) =
2668+
lastKnownLocation(lastKnownLocation.getOrNull())
26622669

26632670
/**
26642671
* Sets [Builder.lastKnownLocation] to an arbitrary JSON value.
@@ -2968,7 +2975,7 @@ private constructor(
29682975
(situationIds.asKnown().getOrNull()?.size ?: 0) +
29692976
(if (vehicleId.asKnown().isPresent) 1 else 0)
29702977

2971-
/** Last known location of the transit vehicle. */
2978+
/** Last known location of the transit vehicle (optional). */
29722979
class LastKnownLocation
29732980
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
29742981
private constructor(

onebusaway-sdk-java-core/src/main/kotlin/org/onebusaway/models/vehiclesforagency/VehiclesForAgencyListResponse.kt

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1559,7 +1559,7 @@ private constructor(
15591559
fun frequency(): Optional<String> = frequency.getOptional("frequency")
15601560

15611561
/**
1562-
* Last known location of the transit vehicle.
1562+
* Last known location of the transit vehicle (optional).
15631563
*
15641564
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected
15651565
* type (e.g. if the server responded with an unexpected value).
@@ -2286,9 +2286,16 @@ private constructor(
22862286
this.frequency = frequency
22872287
}
22882288

2289-
/** Last known location of the transit vehicle. */
2290-
fun lastKnownLocation(lastKnownLocation: LastKnownLocation) =
2291-
lastKnownLocation(JsonField.of(lastKnownLocation))
2289+
/** Last known location of the transit vehicle (optional). */
2290+
fun lastKnownLocation(lastKnownLocation: LastKnownLocation?) =
2291+
lastKnownLocation(JsonField.ofNullable(lastKnownLocation))
2292+
2293+
/**
2294+
* Alias for calling [Builder.lastKnownLocation] with
2295+
* `lastKnownLocation.orElse(null)`.
2296+
*/
2297+
fun lastKnownLocation(lastKnownLocation: Optional<LastKnownLocation>) =
2298+
lastKnownLocation(lastKnownLocation.getOrNull())
22922299

22932300
/**
22942301
* Sets [Builder.lastKnownLocation] to an arbitrary JSON value.
@@ -2598,7 +2605,7 @@ private constructor(
25982605
(situationIds.asKnown().getOrNull()?.size ?: 0) +
25992606
(if (vehicleId.asKnown().isPresent) 1 else 0)
26002607

2601-
/** Last known location of the transit vehicle. */
2608+
/** Last known location of the transit vehicle (optional). */
26022609
class LastKnownLocation
26032610
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
26042611
private constructor(

0 commit comments

Comments
 (0)