From 915ca6d678d29c1facde435d887bd277e7511aac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 03:30:15 +0000 Subject: [PATCH] docs: add `build` method comments --- .../okhttp/OnebusawaySdkOkHttpClient.kt | 5 + .../okhttp/OnebusawaySdkOkHttpClientAsync.kt | 5 + .../org/onebusaway/core/ClientOptions.kt | 13 ++ .../kotlin/org/onebusaway/core/Timeout.kt | 5 + .../onebusaway/errors/OnebusawaySdkError.kt | 5 + .../models/AgenciesWithCoverageListParams.kt | 5 + .../AgenciesWithCoverageListResponse.kt | 46 ++++++ .../onebusaway/models/AgencyRetrieveParams.kt | 12 ++ .../models/AgencyRetrieveResponse.kt | 45 ++++++ .../models/ArrivalAndDepartureListParams.kt | 12 ++ .../models/ArrivalAndDepartureListResponse.kt | 107 +++++++++++++ .../ArrivalAndDepartureRetrieveParams.kt | 14 ++ .../ArrivalAndDepartureRetrieveResponse.kt | 93 +++++++++++ .../onebusaway/models/BlockRetrieveParams.kt | 12 ++ .../models/BlockRetrieveResponse.kt | 101 ++++++++++++ .../onebusaway/models/ConfigRetrieveParams.kt | 5 + .../models/ConfigRetrieveResponse.kt | 39 +++++ .../models/CurrentTimeRetrieveParams.kt | 5 + .../models/CurrentTimeRetrieveResponse.kt | 34 ++++ .../org/onebusaway/models/References.kt | 149 ++++++++++++++++++ .../ReportProblemWithStopRetrieveParams.kt | 12 ++ .../ReportProblemWithTripRetrieveParams.kt | 12 ++ .../org/onebusaway/models/ResponseWrapper.kt | 15 ++ .../models/RouteIdsForAgencyListParams.kt | 12 ++ .../models/RouteIdsForAgencyListResponse.kt | 30 ++++ .../onebusaway/models/RouteRetrieveParams.kt | 12 ++ .../models/RouteRetrieveResponse.kt | 43 +++++ .../models/RoutesForAgencyListParams.kt | 12 ++ .../models/RoutesForAgencyListResponse.kt | 44 ++++++ .../models/RoutesForLocationListParams.kt | 13 ++ .../models/RoutesForLocationListResponse.kt | 45 ++++++ .../models/ScheduleForRouteRetrieveParams.kt | 12 ++ .../ScheduleForRouteRetrieveResponse.kt | 123 +++++++++++++++ .../models/ScheduleForStopRetrieveParams.kt | 12 ++ .../models/ScheduleForStopRetrieveResponse.kt | 105 ++++++++++++ .../models/SearchForRouteListParams.kt | 12 ++ .../models/SearchForRouteListResponse.kt | 44 ++++++ .../models/SearchForStopListParams.kt | 12 ++ .../models/SearchForStopListResponse.kt | 48 ++++++ .../onebusaway/models/ShapeRetrieveParams.kt | 12 ++ .../models/ShapeRetrieveResponse.kt | 42 +++++ .../models/StopIdsForAgencyListParams.kt | 12 ++ .../models/StopIdsForAgencyListResponse.kt | 30 ++++ .../onebusaway/models/StopRetrieveParams.kt | 12 ++ .../onebusaway/models/StopRetrieveResponse.kt | 47 ++++++ .../models/StopsForAgencyListParams.kt | 12 ++ .../models/StopsForAgencyListResponse.kt | 36 +++++ .../models/StopsForLocationListParams.kt | 13 ++ .../models/StopsForLocationListResponse.kt | 48 ++++++ .../models/StopsForRouteListParams.kt | 12 ++ .../models/StopsForRouteListResponse.kt | 54 +++++++ .../models/TripDetailRetrieveParams.kt | 12 ++ .../models/TripDetailRetrieveResponse.kt | 98 ++++++++++++ .../models/TripForVehicleRetrieveParams.kt | 12 ++ .../models/TripForVehicleRetrieveResponse.kt | 98 ++++++++++++ .../onebusaway/models/TripRetrieveParams.kt | 12 ++ .../onebusaway/models/TripRetrieveResponse.kt | 43 +++++ .../models/TripsForLocationListParams.kt | 15 ++ .../models/TripsForLocationListResponse.kt | 101 ++++++++++++ .../models/TripsForRouteListParams.kt | 12 ++ .../models/TripsForRouteListResponse.kt | 101 ++++++++++++ .../models/VehiclesForAgencyListParams.kt | 12 ++ .../models/VehiclesForAgencyListResponse.kt | 89 +++++++++++ 63 files changed, 2265 insertions(+) diff --git a/onebusaway-sdk-kotlin-client-okhttp/src/main/kotlin/org/onebusaway/client/okhttp/OnebusawaySdkOkHttpClient.kt b/onebusaway-sdk-kotlin-client-okhttp/src/main/kotlin/org/onebusaway/client/okhttp/OnebusawaySdkOkHttpClient.kt index c9796e0d..68158709 100644 --- a/onebusaway-sdk-kotlin-client-okhttp/src/main/kotlin/org/onebusaway/client/okhttp/OnebusawaySdkOkHttpClient.kt +++ b/onebusaway-sdk-kotlin-client-okhttp/src/main/kotlin/org/onebusaway/client/okhttp/OnebusawaySdkOkHttpClient.kt @@ -148,6 +148,11 @@ class OnebusawaySdkOkHttpClient private constructor() { fun fromEnv() = apply { clientOptions.fromEnv() } + /** + * Returns an immutable instance of [OnebusawaySdkClient]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): OnebusawaySdkClient = OnebusawaySdkClientImpl( clientOptions diff --git a/onebusaway-sdk-kotlin-client-okhttp/src/main/kotlin/org/onebusaway/client/okhttp/OnebusawaySdkOkHttpClientAsync.kt b/onebusaway-sdk-kotlin-client-okhttp/src/main/kotlin/org/onebusaway/client/okhttp/OnebusawaySdkOkHttpClientAsync.kt index 8845bf5e..d7c54229 100644 --- a/onebusaway-sdk-kotlin-client-okhttp/src/main/kotlin/org/onebusaway/client/okhttp/OnebusawaySdkOkHttpClientAsync.kt +++ b/onebusaway-sdk-kotlin-client-okhttp/src/main/kotlin/org/onebusaway/client/okhttp/OnebusawaySdkOkHttpClientAsync.kt @@ -149,6 +149,11 @@ class OnebusawaySdkOkHttpClientAsync private constructor() { fun fromEnv() = apply { clientOptions.fromEnv() } + /** + * Returns an immutable instance of [OnebusawaySdkClientAsync]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): OnebusawaySdkClientAsync = OnebusawaySdkClientAsyncImpl( clientOptions diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/core/ClientOptions.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/core/ClientOptions.kt index 02bc8190..c19c8dbf 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/core/ClientOptions.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/core/ClientOptions.kt @@ -172,6 +172,19 @@ private constructor( fun fromEnv() = apply { System.getenv("ONEBUSAWAY_API_KEY")?.let { apiKey(it) } } + /** + * Returns an immutable instance of [ClientOptions]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .httpClient() + * .apiKey() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ClientOptions { val httpClient = checkRequired("httpClient", httpClient) val apiKey = checkRequired("apiKey", apiKey) diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/core/Timeout.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/core/Timeout.kt index 7d51d25d..f209c5dc 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/core/Timeout.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/core/Timeout.kt @@ -117,6 +117,11 @@ private constructor( */ fun request(request: Duration?) = apply { this.request = request } + /** + * Returns an immutable instance of [Timeout]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Timeout = Timeout(connect, read, write, request) } diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/errors/OnebusawaySdkError.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/errors/OnebusawaySdkError.kt index f3ddee88..394ad2d3 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/errors/OnebusawaySdkError.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/errors/OnebusawaySdkError.kt @@ -58,6 +58,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [OnebusawaySdkError]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): OnebusawaySdkError = OnebusawaySdkError(additionalProperties.toImmutable()) } diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgenciesWithCoverageListParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgenciesWithCoverageListParams.kt index c2cc2068..2739a1ef 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgenciesWithCoverageListParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgenciesWithCoverageListParams.kt @@ -149,6 +149,11 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [AgenciesWithCoverageListParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): AgenciesWithCoverageListParams = AgenciesWithCoverageListParams(additionalHeaders.build(), additionalQueryParams.build()) } diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgenciesWithCoverageListResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgenciesWithCoverageListResponse.kt index bc47bc29..86190fb3 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgenciesWithCoverageListResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgenciesWithCoverageListResponse.kt @@ -237,6 +237,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [AgenciesWithCoverageListResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): AgenciesWithCoverageListResponse = AgenciesWithCoverageListResponse( checkRequired("code", code), @@ -428,6 +444,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .limitExceeded() + * .list() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("limitExceeded", limitExceeded), @@ -665,6 +695,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [List]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .agencyId() + * .lat() + * .latSpan() + * .lon() + * .lonSpan() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): List = List( checkRequired("agencyId", agencyId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgencyRetrieveParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgencyRetrieveParams.kt index db2d1473..0fb063b0 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgencyRetrieveParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgencyRetrieveParams.kt @@ -163,6 +163,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [AgencyRetrieveParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .agencyId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): AgencyRetrieveParams = AgencyRetrieveParams( checkRequired("agencyId", agencyId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgencyRetrieveResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgencyRetrieveResponse.kt index 2b61cbcd..b2226369 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgencyRetrieveResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgencyRetrieveResponse.kt @@ -233,6 +233,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [AgencyRetrieveResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): AgencyRetrieveResponse = AgencyRetrieveResponse( checkRequired("code", code), @@ -410,6 +426,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .entry() + * .limitExceeded() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("entry", entry), @@ -806,6 +836,21 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Entry]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .name() + * .timezone() + * .url() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Entry = Entry( checkRequired("id", id), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ArrivalAndDepartureListParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ArrivalAndDepartureListParams.kt index ec86f46c..936ee8e1 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ArrivalAndDepartureListParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ArrivalAndDepartureListParams.kt @@ -216,6 +216,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [ArrivalAndDepartureListParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .stopId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ArrivalAndDepartureListParams = ArrivalAndDepartureListParams( checkRequired("stopId", stopId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ArrivalAndDepartureListResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ArrivalAndDepartureListResponse.kt index 3dba91c8..9438723f 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ArrivalAndDepartureListResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ArrivalAndDepartureListResponse.kt @@ -237,6 +237,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [ArrivalAndDepartureListResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ArrivalAndDepartureListResponse = ArrivalAndDepartureListResponse( checkRequired("code", code), @@ -378,6 +394,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .entry() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("entry", entry), @@ -509,6 +538,18 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Entry]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .arrivalsAndDepartures() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Entry = Entry( checkRequired("arrivalsAndDepartures", arrivalsAndDepartures).map { @@ -1978,6 +2019,33 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [ArrivalsAndDeparture]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .arrivalEnabled() + * .blockTripSequence() + * .departureEnabled() + * .numberOfStopsAway() + * .predictedArrivalTime() + * .predictedDepartureTime() + * .routeId() + * .scheduledArrivalTime() + * .scheduledDepartureTime() + * .serviceDate() + * .stopId() + * .stopSequence() + * .totalStopsInTrip() + * .tripHeadsign() + * .tripId() + * .vehicleId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ArrivalsAndDeparture = ArrivalsAndDeparture( checkRequired("arrivalEnabled", arrivalEnabled), @@ -3234,6 +3302,33 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [TripStatus]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .activeTripId() + * .blockTripSequence() + * .closestStop() + * .distanceAlongTrip() + * .lastKnownDistanceAlongTrip() + * .lastLocationUpdateTime() + * .lastUpdateTime() + * .occupancyCapacity() + * .occupancyCount() + * .occupancyStatus() + * .phase() + * .predicted() + * .scheduleDeviation() + * .serviceDate() + * .status() + * .totalDistanceAlongTrip() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): TripStatus = TripStatus( checkRequired("activeTripId", activeTripId), @@ -3408,6 +3503,12 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [LastKnownLocation]. + * + * Further updates to this [Builder] will not mutate the returned + * instance. + */ fun build(): LastKnownLocation = LastKnownLocation(lat, lon, additionalProperties.toImmutable()) } @@ -3566,6 +3667,12 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Position]. + * + * Further updates to this [Builder] will not mutate the returned + * instance. + */ fun build(): Position = Position(lat, lon, additionalProperties.toImmutable()) } diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ArrivalAndDepartureRetrieveParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ArrivalAndDepartureRetrieveParams.kt index 5372f02e..fff084b2 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ArrivalAndDepartureRetrieveParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ArrivalAndDepartureRetrieveParams.kt @@ -226,6 +226,20 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [ArrivalAndDepartureRetrieveParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .stopId() + * .serviceDate() + * .tripId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ArrivalAndDepartureRetrieveParams = ArrivalAndDepartureRetrieveParams( checkRequired("stopId", stopId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ArrivalAndDepartureRetrieveResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ArrivalAndDepartureRetrieveResponse.kt index 0d0793b8..30ff20bb 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ArrivalAndDepartureRetrieveResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ArrivalAndDepartureRetrieveResponse.kt @@ -238,6 +238,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [ArrivalAndDepartureRetrieveResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ArrivalAndDepartureRetrieveResponse = ArrivalAndDepartureRetrieveResponse( checkRequired("code", code), @@ -379,6 +395,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .entry() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("entry", entry), @@ -1828,6 +1857,33 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Entry]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .arrivalEnabled() + * .blockTripSequence() + * .departureEnabled() + * .numberOfStopsAway() + * .predictedArrivalTime() + * .predictedDepartureTime() + * .routeId() + * .scheduledArrivalTime() + * .scheduledDepartureTime() + * .serviceDate() + * .stopId() + * .stopSequence() + * .totalStopsInTrip() + * .tripHeadsign() + * .tripId() + * .vehicleId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Entry = Entry( checkRequired("arrivalEnabled", arrivalEnabled), @@ -3052,6 +3108,33 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [TripStatus]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .activeTripId() + * .blockTripSequence() + * .closestStop() + * .distanceAlongTrip() + * .lastKnownDistanceAlongTrip() + * .lastLocationUpdateTime() + * .lastUpdateTime() + * .occupancyCapacity() + * .occupancyCount() + * .occupancyStatus() + * .phase() + * .predicted() + * .scheduleDeviation() + * .serviceDate() + * .status() + * .totalDistanceAlongTrip() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): TripStatus = TripStatus( checkRequired("activeTripId", activeTripId), @@ -3220,6 +3303,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [LastKnownLocation]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): LastKnownLocation = LastKnownLocation(lat, lon, additionalProperties.toImmutable()) } @@ -3373,6 +3461,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Position]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Position = Position(lat, lon, additionalProperties.toImmutable()) } diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/BlockRetrieveParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/BlockRetrieveParams.kt index 9b7002b9..07acf098 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/BlockRetrieveParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/BlockRetrieveParams.kt @@ -163,6 +163,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [BlockRetrieveParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .blockId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): BlockRetrieveParams = BlockRetrieveParams( checkRequired("blockId", blockId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/BlockRetrieveResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/BlockRetrieveResponse.kt index 4a429de7..0466a876 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/BlockRetrieveResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/BlockRetrieveResponse.kt @@ -234,6 +234,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [BlockRetrieveResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): BlockRetrieveResponse = BlockRetrieveResponse( checkRequired("code", code), @@ -375,6 +391,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .entry() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("entry", entry), @@ -532,6 +561,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Entry]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .configurations() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Entry = Entry( checkRequired("id", id), @@ -755,6 +797,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Configuration]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .activeServiceIds() + * .trips() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Configuration = Configuration( checkRequired("activeServiceIds", activeServiceIds).map { @@ -999,6 +1054,21 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Trip]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .accumulatedSlackTime() + * .blockStopTimes() + * .distanceAlongBlock() + * .tripId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Trip = Trip( checkRequired("accumulatedSlackTime", accumulatedSlackTime), @@ -1236,6 +1306,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [BlockStopTime]. + * + * Further updates to this [Builder] will not mutate the returned + * instance. + * + * The following fields are required: + * ```kotlin + * .accumulatedSlackTime() + * .blockSequence() + * .distanceAlongBlock() + * .stopTime() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): BlockStopTime = BlockStopTime( checkRequired("accumulatedSlackTime", accumulatedSlackTime), @@ -1506,6 +1592,21 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [StopTime]. + * + * Further updates to this [Builder] will not mutate the returned + * instance. + * + * The following fields are required: + * ```kotlin + * .arrivalTime() + * .departureTime() + * .stopId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): StopTime = StopTime( checkRequired("arrivalTime", arrivalTime), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ConfigRetrieveParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ConfigRetrieveParams.kt index 5a1a69ce..4bf8b37a 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ConfigRetrieveParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ConfigRetrieveParams.kt @@ -143,6 +143,11 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [ConfigRetrieveParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): ConfigRetrieveParams = ConfigRetrieveParams(additionalHeaders.build(), additionalQueryParams.build()) } diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ConfigRetrieveResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ConfigRetrieveResponse.kt index b22e4379..2dbfb3e3 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ConfigRetrieveResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ConfigRetrieveResponse.kt @@ -233,6 +233,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [ConfigRetrieveResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ConfigRetrieveResponse = ConfigRetrieveResponse( checkRequired("code", code), @@ -374,6 +390,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .entry() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("entry", entry), @@ -611,6 +640,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Entry]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Entry = Entry( id, @@ -1411,6 +1445,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [GitProperties]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): GitProperties = GitProperties( gitBranch, diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/CurrentTimeRetrieveParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/CurrentTimeRetrieveParams.kt index e0667acb..7a99ec94 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/CurrentTimeRetrieveParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/CurrentTimeRetrieveParams.kt @@ -145,6 +145,11 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [CurrentTimeRetrieveParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): CurrentTimeRetrieveParams = CurrentTimeRetrieveParams(additionalHeaders.build(), additionalQueryParams.build()) } diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/CurrentTimeRetrieveResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/CurrentTimeRetrieveResponse.kt index a836427a..c788c186 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/CurrentTimeRetrieveResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/CurrentTimeRetrieveResponse.kt @@ -233,6 +233,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [CurrentTimeRetrieveResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): CurrentTimeRetrieveResponse = CurrentTimeRetrieveResponse( checkRequired("code", code), @@ -374,6 +390,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .entry() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("entry", entry), @@ -508,6 +537,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Entry]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Entry = Entry(readableTime, time, additionalProperties.toImmutable()) } diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/References.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/References.kt index 2020384b..7b8e5257 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/References.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/References.kt @@ -352,6 +352,23 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [References]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .agencies() + * .routes() + * .situations() + * .stops() + * .stopTimes() + * .trips() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): References = References( checkRequired("agencies", agencies).map { it.toImmutable() }, @@ -736,6 +753,21 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Agency]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .name() + * .timezone() + * .url() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Agency = Agency( checkRequired("id", id), @@ -1141,6 +1173,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Route]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .agencyId() + * .type() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Route = Route( checkRequired("id", id), @@ -1698,6 +1744,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Situation]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .creationTime() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Situation = Situation( checkRequired("id", id), @@ -1841,6 +1900,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [ActiveWindow]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): ActiveWindow = ActiveWindow(from, to, additionalProperties.toImmutable()) } @@ -2134,6 +2198,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [AllAffect]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): AllAffect = AllAffect( agencyId, @@ -2298,6 +2367,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Consequence]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Consequence = Consequence(condition, conditionDetails, additionalProperties.toImmutable()) } @@ -2451,6 +2525,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [ConditionDetails]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): ConditionDetails = ConditionDetails( diversionPath, @@ -2630,6 +2709,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [DiversionPath]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): DiversionPath = DiversionPath( length, @@ -2820,6 +2904,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Description]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Description = Description(lang, value, additionalProperties.toImmutable()) } @@ -2977,6 +3066,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [PublicationWindow]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .from() + * .to() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): PublicationWindow = PublicationWindow( checkRequired("from", from), @@ -3250,6 +3352,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Summary]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Summary = Summary(lang, value, additionalProperties.toImmutable()) } @@ -3398,6 +3505,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Url]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Url = Url(lang, value, additionalProperties.toImmutable()) } @@ -3877,6 +3989,24 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Stop]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .lat() + * .lon() + * .name() + * .parent() + * .routeIds() + * .staticRouteIds() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Stop = Stop( checkRequired("id", id), @@ -4174,6 +4304,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [StopTime]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): StopTime = StopTime( arrivalTime, @@ -4621,6 +4756,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Trip]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .routeId() + * .serviceId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Trip = Trip( checkRequired("id", id), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ReportProblemWithStopRetrieveParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ReportProblemWithStopRetrieveParams.kt index 3046884a..8a173c91 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ReportProblemWithStopRetrieveParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ReportProblemWithStopRetrieveParams.kt @@ -251,6 +251,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [ReportProblemWithStopRetrieveParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .stopId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ReportProblemWithStopRetrieveParams = ReportProblemWithStopRetrieveParams( checkRequired("stopId", stopId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ReportProblemWithTripRetrieveParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ReportProblemWithTripRetrieveParams.kt index dd6e0853..7613ddc9 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ReportProblemWithTripRetrieveParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ReportProblemWithTripRetrieveParams.kt @@ -317,6 +317,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [ReportProblemWithTripRetrieveParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .tripId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ReportProblemWithTripRetrieveParams = ReportProblemWithTripRetrieveParams( checkRequired("tripId", tripId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ResponseWrapper.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ResponseWrapper.kt index dd33e24b..2901c904 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ResponseWrapper.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ResponseWrapper.kt @@ -197,6 +197,21 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [ResponseWrapper]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ResponseWrapper = ResponseWrapper( checkRequired("code", code), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RouteIdsForAgencyListParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RouteIdsForAgencyListParams.kt index f18e5972..33e1fdbc 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RouteIdsForAgencyListParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RouteIdsForAgencyListParams.kt @@ -163,6 +163,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [RouteIdsForAgencyListParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .agencyId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): RouteIdsForAgencyListParams = RouteIdsForAgencyListParams( checkRequired("agencyId", agencyId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RouteIdsForAgencyListResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RouteIdsForAgencyListResponse.kt index 9898cece..c8355044 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RouteIdsForAgencyListResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RouteIdsForAgencyListResponse.kt @@ -235,6 +235,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [RouteIdsForAgencyListResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): RouteIdsForAgencyListResponse = RouteIdsForAgencyListResponse( checkRequired("code", code), @@ -426,6 +442,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .limitExceeded() + * .list() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("limitExceeded", limitExceeded), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RouteRetrieveParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RouteRetrieveParams.kt index d8ab219d..2e445a68 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RouteRetrieveParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RouteRetrieveParams.kt @@ -163,6 +163,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [RouteRetrieveParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .routeId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): RouteRetrieveParams = RouteRetrieveParams( checkRequired("routeId", routeId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RouteRetrieveResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RouteRetrieveResponse.kt index d27b62ae..315d4cf2 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RouteRetrieveResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RouteRetrieveResponse.kt @@ -233,6 +233,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [RouteRetrieveResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): RouteRetrieveResponse = RouteRetrieveResponse( checkRequired("code", code), @@ -374,6 +390,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .entry() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("entry", entry), @@ -774,6 +803,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Entry]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .agencyId() + * .type() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Entry = Entry( checkRequired("id", id), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RoutesForAgencyListParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RoutesForAgencyListParams.kt index 38d936bc..0e5575b1 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RoutesForAgencyListParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RoutesForAgencyListParams.kt @@ -163,6 +163,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [RoutesForAgencyListParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .agencyId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): RoutesForAgencyListParams = RoutesForAgencyListParams( checkRequired("agencyId", agencyId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RoutesForAgencyListResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RoutesForAgencyListResponse.kt index 41ce7e57..789d0fae 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RoutesForAgencyListResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RoutesForAgencyListResponse.kt @@ -234,6 +234,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [RoutesForAgencyListResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): RoutesForAgencyListResponse = RoutesForAgencyListResponse( checkRequired("code", code), @@ -425,6 +441,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .limitExceeded() + * .list() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("limitExceeded", limitExceeded), @@ -826,6 +856,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [List]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .agencyId() + * .type() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): List = List( checkRequired("id", id), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RoutesForLocationListParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RoutesForLocationListParams.kt index 5fd2a30e..5a14c10b 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RoutesForLocationListParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RoutesForLocationListParams.kt @@ -223,6 +223,19 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [RoutesForLocationListParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .lat() + * .lon() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): RoutesForLocationListParams = RoutesForLocationListParams( checkRequired("lat", lat), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RoutesForLocationListResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RoutesForLocationListResponse.kt index 12666a2f..02d924f9 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RoutesForLocationListResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/RoutesForLocationListResponse.kt @@ -235,6 +235,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [RoutesForLocationListResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): RoutesForLocationListResponse = RoutesForLocationListResponse( checkRequired("code", code), @@ -459,6 +475,21 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .limitExceeded() + * .list() + * .outOfRange() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("limitExceeded", limitExceeded), @@ -861,6 +892,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [List]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .agencyId() + * .type() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): List = List( checkRequired("id", id), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ScheduleForRouteRetrieveParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ScheduleForRouteRetrieveParams.kt index 52194624..8a8f6513 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ScheduleForRouteRetrieveParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ScheduleForRouteRetrieveParams.kt @@ -185,6 +185,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [ScheduleForRouteRetrieveParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .routeId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ScheduleForRouteRetrieveParams = ScheduleForRouteRetrieveParams( checkRequired("routeId", routeId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ScheduleForRouteRetrieveResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ScheduleForRouteRetrieveResponse.kt index c1f0449d..c5e30ff2 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ScheduleForRouteRetrieveResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ScheduleForRouteRetrieveResponse.kt @@ -237,6 +237,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [ScheduleForRouteRetrieveResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ScheduleForRouteRetrieveResponse = ScheduleForRouteRetrieveResponse( checkRequired("code", code), @@ -343,6 +359,18 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .entry() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data(checkRequired("entry", entry), additionalProperties.toImmutable()) } @@ -676,6 +704,23 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Entry]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .routeId() + * .scheduleDate() + * .serviceIds() + * .stops() + * .stopTripGroupings() + * .trips() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Entry = Entry( checkRequired("routeId", routeId), @@ -1156,6 +1201,24 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Stop]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .lat() + * .lon() + * .name() + * .parent() + * .routeIds() + * .staticRouteIds() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Stop = Stop( checkRequired("id", id), @@ -1498,6 +1561,21 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [StopTripGrouping]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .directionId() + * .stopIds() + * .tripHeadsigns() + * .tripIds() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): StopTripGrouping = StopTripGrouping( checkRequired("directionId", directionId), @@ -1665,6 +1743,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [TripsWithStopTime]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .stopTimes() + * .tripId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): TripsWithStopTime = TripsWithStopTime( checkRequired("stopTimes", stopTimes).map { it.toImmutable() }, @@ -2038,6 +2129,24 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [StopTime]. + * + * Further updates to this [Builder] will not mutate the returned + * instance. + * + * The following fields are required: + * ```kotlin + * .arrivalEnabled() + * .arrivalTime() + * .departureEnabled() + * .departureTime() + * .stopId() + * .tripId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): StopTime = StopTime( checkRequired("arrivalEnabled", arrivalEnabled), @@ -2548,6 +2657,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Trip]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .routeId() + * .serviceId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Trip = Trip( checkRequired("id", id), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ScheduleForStopRetrieveParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ScheduleForStopRetrieveParams.kt index 2f72427b..4e376630 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ScheduleForStopRetrieveParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ScheduleForStopRetrieveParams.kt @@ -185,6 +185,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [ScheduleForStopRetrieveParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .stopId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ScheduleForStopRetrieveParams = ScheduleForStopRetrieveParams( checkRequired("stopId", stopId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ScheduleForStopRetrieveResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ScheduleForStopRetrieveResponse.kt index 87daab7d..b97acfbb 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ScheduleForStopRetrieveResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ScheduleForStopRetrieveResponse.kt @@ -237,6 +237,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [ScheduleForStopRetrieveResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ScheduleForStopRetrieveResponse = ScheduleForStopRetrieveResponse( checkRequired("code", code), @@ -378,6 +394,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .entry() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("entry", entry), @@ -569,6 +598,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Entry]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .date() + * .stopId() + * .stopRouteSchedules() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Entry = Entry( checkRequired("date", date), @@ -746,6 +789,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [StopRouteSchedule]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .routeId() + * .stopRouteDirectionSchedules() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): StopRouteSchedule = StopRouteSchedule( checkRequired("routeId", routeId), @@ -986,6 +1042,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [StopRouteDirectionSchedule]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .scheduleStopTimes() + * .tripHeadsign() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): StopRouteDirectionSchedule = StopRouteDirectionSchedule( checkRequired("scheduleStopTimes", scheduleStopTimes).map { @@ -1330,6 +1399,24 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [ScheduleStopTime]. + * + * Further updates to this [Builder] will not mutate the returned + * instance. + * + * The following fields are required: + * ```kotlin + * .arrivalEnabled() + * .arrivalTime() + * .departureEnabled() + * .departureTime() + * .serviceId() + * .tripId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ScheduleStopTime = ScheduleStopTime( checkRequired("arrivalEnabled", arrivalEnabled), @@ -1649,6 +1736,24 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [ScheduleFrequency]. + * + * Further updates to this [Builder] will not mutate the returned + * instance. + * + * The following fields are required: + * ```kotlin + * .endTime() + * .headway() + * .serviceDate() + * .serviceId() + * .startTime() + * .tripId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ScheduleFrequency = ScheduleFrequency( checkRequired("endTime", endTime), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/SearchForRouteListParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/SearchForRouteListParams.kt index 49fa9a21..f54bce22 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/SearchForRouteListParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/SearchForRouteListParams.kt @@ -180,6 +180,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [SearchForRouteListParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .input() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): SearchForRouteListParams = SearchForRouteListParams( checkRequired("input", input), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/SearchForRouteListResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/SearchForRouteListResponse.kt index 0f117f15..00a5cb2b 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/SearchForRouteListResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/SearchForRouteListResponse.kt @@ -233,6 +233,21 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [SearchForRouteListResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): SearchForRouteListResponse = SearchForRouteListResponse( checkRequired("code", code), @@ -457,6 +472,21 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .limitExceeded() + * .list() + * .outOfRange() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("limitExceeded", limitExceeded), @@ -859,6 +889,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [List]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .agencyId() + * .type() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): List = List( checkRequired("id", id), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/SearchForStopListParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/SearchForStopListParams.kt index 3324ece4..8e2488ce 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/SearchForStopListParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/SearchForStopListParams.kt @@ -180,6 +180,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [SearchForStopListParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .input() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): SearchForStopListParams = SearchForStopListParams( checkRequired("input", input), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/SearchForStopListResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/SearchForStopListResponse.kt index e500da38..3a06da66 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/SearchForStopListResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/SearchForStopListResponse.kt @@ -233,6 +233,21 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [SearchForStopListResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): SearchForStopListResponse = SearchForStopListResponse( checkRequired("code", code), @@ -457,6 +472,21 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .limitExceeded() + * .list() + * .outOfRange() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("limitExceeded", limitExceeded), @@ -927,6 +957,24 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [List]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .lat() + * .lon() + * .name() + * .parent() + * .routeIds() + * .staticRouteIds() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): List = List( checkRequired("id", id), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ShapeRetrieveParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ShapeRetrieveParams.kt index 2458d22a..cf212d99 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ShapeRetrieveParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ShapeRetrieveParams.kt @@ -163,6 +163,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [ShapeRetrieveParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .shapeId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ShapeRetrieveParams = ShapeRetrieveParams( checkRequired("shapeId", shapeId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ShapeRetrieveResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ShapeRetrieveResponse.kt index 7282b950..e3ad644e 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ShapeRetrieveResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/ShapeRetrieveResponse.kt @@ -233,6 +233,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [ShapeRetrieveResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): ShapeRetrieveResponse = ShapeRetrieveResponse( checkRequired("code", code), @@ -374,6 +390,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .entry() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("entry", entry), @@ -546,6 +575,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Entry]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .length() + * .points() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Entry = Entry( checkRequired("length", length), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopIdsForAgencyListParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopIdsForAgencyListParams.kt index da472321..8e209bfc 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopIdsForAgencyListParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopIdsForAgencyListParams.kt @@ -163,6 +163,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [StopIdsForAgencyListParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .agencyId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): StopIdsForAgencyListParams = StopIdsForAgencyListParams( checkRequired("agencyId", agencyId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopIdsForAgencyListResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopIdsForAgencyListResponse.kt index fc1b7668..e0aa437e 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopIdsForAgencyListResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopIdsForAgencyListResponse.kt @@ -234,6 +234,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [StopIdsForAgencyListResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): StopIdsForAgencyListResponse = StopIdsForAgencyListResponse( checkRequired("code", code), @@ -425,6 +441,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .limitExceeded() + * .list() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("limitExceeded", limitExceeded), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopRetrieveParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopRetrieveParams.kt index 1306958b..9593b514 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopRetrieveParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopRetrieveParams.kt @@ -163,6 +163,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [StopRetrieveParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .stopId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): StopRetrieveParams = StopRetrieveParams( checkRequired("stopId", stopId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopRetrieveResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopRetrieveResponse.kt index 53a392f3..17fc6c69 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopRetrieveResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopRetrieveResponse.kt @@ -234,6 +234,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [StopRetrieveResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): StopRetrieveResponse = StopRetrieveResponse( checkRequired("code", code), @@ -375,6 +391,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .entry() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("entry", entry), @@ -843,6 +872,24 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Entry]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .lat() + * .lon() + * .name() + * .parent() + * .routeIds() + * .staticRouteIds() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Entry = Entry( checkRequired("id", id), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForAgencyListParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForAgencyListParams.kt index 8b833f5e..85ce63f6 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForAgencyListParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForAgencyListParams.kt @@ -163,6 +163,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [StopsForAgencyListParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .agencyId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): StopsForAgencyListParams = StopsForAgencyListParams( checkRequired("agencyId", agencyId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForAgencyListResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForAgencyListResponse.kt index 6c466e45..c85d6cc7 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForAgencyListResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForAgencyListResponse.kt @@ -348,6 +348,24 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [StopsForAgencyListResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .limitExceeded() + * .list() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): StopsForAgencyListResponse = StopsForAgencyListResponse( checkRequired("code", code), @@ -802,6 +820,24 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [List]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .lat() + * .lon() + * .name() + * .parent() + * .routeIds() + * .staticRouteIds() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): List = List( checkRequired("id", id), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForLocationListParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForLocationListParams.kt index 02d2dd91..dee28dd9 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForLocationListParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForLocationListParams.kt @@ -231,6 +231,19 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [StopsForLocationListParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .lat() + * .lon() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): StopsForLocationListParams = StopsForLocationListParams( checkRequired("lat", lat), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForLocationListResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForLocationListResponse.kt index 392ee33e..6d9adb1d 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForLocationListResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForLocationListResponse.kt @@ -234,6 +234,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [StopsForLocationListResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): StopsForLocationListResponse = StopsForLocationListResponse( checkRequired("code", code), @@ -457,6 +473,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .limitExceeded() + * .list() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("limitExceeded", limitExceeded), @@ -927,6 +957,24 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [List]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .lat() + * .lon() + * .name() + * .parent() + * .routeIds() + * .staticRouteIds() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): List = List( checkRequired("id", id), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForRouteListParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForRouteListParams.kt index 9fe6947d..8c1de29c 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForRouteListParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForRouteListParams.kt @@ -197,6 +197,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [StopsForRouteListParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .routeId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): StopsForRouteListParams = StopsForRouteListParams( checkRequired("routeId", routeId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForRouteListResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForRouteListResponse.kt index bd9b7102..c8bdee85 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForRouteListResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/StopsForRouteListResponse.kt @@ -234,6 +234,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [StopsForRouteListResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): StopsForRouteListResponse = StopsForRouteListResponse( checkRequired("code", code), @@ -375,6 +391,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .entry() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("entry", entry), @@ -615,6 +644,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Entry]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Entry = Entry( (polylines ?: JsonMissing.of()).map { it.toImmutable() }, @@ -779,6 +813,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Polyline]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Polyline = Polyline(length, levels, points, additionalProperties.toImmutable()) } @@ -1017,6 +1056,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [StopGrouping]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): StopGrouping = StopGrouping( id, @@ -1199,6 +1243,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Name]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Name = Name( name, @@ -1385,6 +1434,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Polyline]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Polyline = Polyline(length, levels, points, additionalProperties.toImmutable()) } diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripDetailRetrieveParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripDetailRetrieveParams.kt index 497bf323..9c7fdc5d 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripDetailRetrieveParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripDetailRetrieveParams.kt @@ -263,6 +263,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [TripDetailRetrieveParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .tripId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): TripDetailRetrieveParams = TripDetailRetrieveParams( checkRequired("tripId", tripId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripDetailRetrieveResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripDetailRetrieveResponse.kt index 5f79662c..27efa387 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripDetailRetrieveResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripDetailRetrieveResponse.kt @@ -234,6 +234,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [TripDetailRetrieveResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): TripDetailRetrieveResponse = TripDetailRetrieveResponse( checkRequired("code", code), @@ -375,6 +391,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .entry() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("entry", entry), @@ -661,6 +690,18 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Entry]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .tripId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Entry = Entry( checkRequired("tripId", tripId), @@ -934,6 +975,21 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Schedule]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .nextTripId() + * .previousTripId() + * .stopTimes() + * .timeZone() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Schedule = Schedule( checkRequired("nextTripId", nextTripId), @@ -1221,6 +1277,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [StopTime]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): StopTime = StopTime( arrivalTime, @@ -2452,6 +2513,33 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Status]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .activeTripId() + * .blockTripSequence() + * .closestStop() + * .distanceAlongTrip() + * .lastKnownDistanceAlongTrip() + * .lastLocationUpdateTime() + * .lastUpdateTime() + * .occupancyCapacity() + * .occupancyCount() + * .occupancyStatus() + * .phase() + * .predicted() + * .scheduleDeviation() + * .serviceDate() + * .status() + * .totalDistanceAlongTrip() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Status = Status( checkRequired("activeTripId", activeTripId), @@ -2620,6 +2708,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [LastKnownLocation]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): LastKnownLocation = LastKnownLocation(lat, lon, additionalProperties.toImmutable()) } @@ -2773,6 +2866,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Position]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Position = Position(lat, lon, additionalProperties.toImmutable()) } diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripForVehicleRetrieveParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripForVehicleRetrieveParams.kt index 8cc1e0de..51fa73e8 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripForVehicleRetrieveParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripForVehicleRetrieveParams.kt @@ -255,6 +255,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [TripForVehicleRetrieveParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .vehicleId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): TripForVehicleRetrieveParams = TripForVehicleRetrieveParams( checkRequired("vehicleId", vehicleId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripForVehicleRetrieveResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripForVehicleRetrieveResponse.kt index b974230a..1f0cadfb 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripForVehicleRetrieveResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripForVehicleRetrieveResponse.kt @@ -236,6 +236,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [TripForVehicleRetrieveResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): TripForVehicleRetrieveResponse = TripForVehicleRetrieveResponse( checkRequired("code", code), @@ -377,6 +393,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .entry() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("entry", entry), @@ -663,6 +692,18 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Entry]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .tripId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Entry = Entry( checkRequired("tripId", tripId), @@ -936,6 +977,21 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Schedule]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .nextTripId() + * .previousTripId() + * .stopTimes() + * .timeZone() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Schedule = Schedule( checkRequired("nextTripId", nextTripId), @@ -1223,6 +1279,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [StopTime]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): StopTime = StopTime( arrivalTime, @@ -2454,6 +2515,33 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Status]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .activeTripId() + * .blockTripSequence() + * .closestStop() + * .distanceAlongTrip() + * .lastKnownDistanceAlongTrip() + * .lastLocationUpdateTime() + * .lastUpdateTime() + * .occupancyCapacity() + * .occupancyCount() + * .occupancyStatus() + * .phase() + * .predicted() + * .scheduleDeviation() + * .serviceDate() + * .status() + * .totalDistanceAlongTrip() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Status = Status( checkRequired("activeTripId", activeTripId), @@ -2622,6 +2710,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [LastKnownLocation]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): LastKnownLocation = LastKnownLocation(lat, lon, additionalProperties.toImmutable()) } @@ -2775,6 +2868,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Position]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Position = Position(lat, lon, additionalProperties.toImmutable()) } diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripRetrieveParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripRetrieveParams.kt index c5d2a520..0ad81b22 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripRetrieveParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripRetrieveParams.kt @@ -163,6 +163,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [TripRetrieveParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .tripId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): TripRetrieveParams = TripRetrieveParams( checkRequired("tripId", tripId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripRetrieveResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripRetrieveResponse.kt index 5312498c..17207d74 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripRetrieveResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripRetrieveResponse.kt @@ -233,6 +233,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [TripRetrieveResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): TripRetrieveResponse = TripRetrieveResponse( checkRequired("code", code), @@ -374,6 +390,19 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .entry() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("entry", entry), @@ -816,6 +845,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Entry]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .id() + * .routeId() + * .serviceId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Entry = Entry( checkRequired("id", id), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripsForLocationListParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripsForLocationListParams.kt index b121288b..97a7e0c7 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripsForLocationListParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripsForLocationListParams.kt @@ -251,6 +251,21 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [TripsForLocationListParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .lat() + * .latSpan() + * .lon() + * .lonSpan() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): TripsForLocationListParams = TripsForLocationListParams( checkRequired("lat", lat), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripsForLocationListResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripsForLocationListResponse.kt index fffccddb..c7e68c5c 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripsForLocationListResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripsForLocationListResponse.kt @@ -234,6 +234,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [TripsForLocationListResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): TripsForLocationListResponse = TripsForLocationListResponse( checkRequired("code", code), @@ -463,6 +479,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .limitExceeded() + * .list() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("limitExceeded", limitExceeded), @@ -755,6 +785,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [List]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .schedule() + * .status() + * .tripId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): List = List( checkRequired("schedule", schedule), @@ -1028,6 +1072,21 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Schedule]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .nextTripId() + * .previousTripId() + * .stopTimes() + * .timeZone() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Schedule = Schedule( checkRequired("nextTripId", nextTripId), @@ -1315,6 +1374,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [StopTime]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): StopTime = StopTime( arrivalTime, @@ -2546,6 +2610,33 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Status]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .activeTripId() + * .blockTripSequence() + * .closestStop() + * .distanceAlongTrip() + * .lastKnownDistanceAlongTrip() + * .lastLocationUpdateTime() + * .lastUpdateTime() + * .occupancyCapacity() + * .occupancyCount() + * .occupancyStatus() + * .phase() + * .predicted() + * .scheduleDeviation() + * .serviceDate() + * .status() + * .totalDistanceAlongTrip() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Status = Status( checkRequired("activeTripId", activeTripId), @@ -2714,6 +2805,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [LastKnownLocation]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): LastKnownLocation = LastKnownLocation(lat, lon, additionalProperties.toImmutable()) } @@ -2867,6 +2963,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Position]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Position = Position(lat, lon, additionalProperties.toImmutable()) } diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripsForRouteListParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripsForRouteListParams.kt index f0aa75a3..c7118e8b 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripsForRouteListParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripsForRouteListParams.kt @@ -226,6 +226,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [TripsForRouteListParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .routeId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): TripsForRouteListParams = TripsForRouteListParams( checkRequired("routeId", routeId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripsForRouteListResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripsForRouteListResponse.kt index 50c568c0..3471b963 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripsForRouteListResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/TripsForRouteListResponse.kt @@ -234,6 +234,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [TripsForRouteListResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): TripsForRouteListResponse = TripsForRouteListResponse( checkRequired("code", code), @@ -425,6 +441,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .limitExceeded() + * .list() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("limitExceeded", limitExceeded), @@ -716,6 +746,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [List]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .schedule() + * .status() + * .tripId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): List = List( checkRequired("schedule", schedule), @@ -989,6 +1033,21 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Schedule]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .nextTripId() + * .previousTripId() + * .stopTimes() + * .timeZone() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Schedule = Schedule( checkRequired("nextTripId", nextTripId), @@ -1276,6 +1335,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [StopTime]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): StopTime = StopTime( arrivalTime, @@ -2507,6 +2571,33 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Status]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .activeTripId() + * .blockTripSequence() + * .closestStop() + * .distanceAlongTrip() + * .lastKnownDistanceAlongTrip() + * .lastLocationUpdateTime() + * .lastUpdateTime() + * .occupancyCapacity() + * .occupancyCount() + * .occupancyStatus() + * .phase() + * .predicted() + * .scheduleDeviation() + * .serviceDate() + * .status() + * .totalDistanceAlongTrip() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Status = Status( checkRequired("activeTripId", activeTripId), @@ -2675,6 +2766,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [LastKnownLocation]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): LastKnownLocation = LastKnownLocation(lat, lon, additionalProperties.toImmutable()) } @@ -2828,6 +2924,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Position]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Position = Position(lat, lon, additionalProperties.toImmutable()) } diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/VehiclesForAgencyListParams.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/VehiclesForAgencyListParams.kt index c2eba597..66eb82cc 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/VehiclesForAgencyListParams.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/VehiclesForAgencyListParams.kt @@ -177,6 +177,18 @@ private constructor( additionalQueryParams.removeAll(keys) } + /** + * Returns an immutable instance of [VehiclesForAgencyListParams]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .agencyId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): VehiclesForAgencyListParams = VehiclesForAgencyListParams( checkRequired("agencyId", agencyId), diff --git a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/VehiclesForAgencyListResponse.kt b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/VehiclesForAgencyListResponse.kt index f8c28a98..9bb66a5d 100644 --- a/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/VehiclesForAgencyListResponse.kt +++ b/onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/VehiclesForAgencyListResponse.kt @@ -235,6 +235,22 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [VehiclesForAgencyListResponse]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .code() + * .currentTime() + * .text() + * .version() + * .data() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): VehiclesForAgencyListResponse = VehiclesForAgencyListResponse( checkRequired("code", code), @@ -426,6 +442,20 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Data]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .limitExceeded() + * .list() + * .references() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): Data = Data( checkRequired("limitExceeded", limitExceeded), @@ -886,6 +916,23 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [List]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .lastLocationUpdateTime() + * .lastUpdateTime() + * .location() + * .tripId() + * .tripStatus() + * .vehicleId() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): List = List( checkRequired("lastLocationUpdateTime", lastLocationUpdateTime), @@ -1024,6 +1071,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Location]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Location = Location(lat, lon, additionalProperties.toImmutable()) } @@ -2228,6 +2280,33 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [TripStatus]. + * + * Further updates to this [Builder] will not mutate the returned instance. + * + * The following fields are required: + * ```kotlin + * .activeTripId() + * .blockTripSequence() + * .closestStop() + * .distanceAlongTrip() + * .lastKnownDistanceAlongTrip() + * .lastLocationUpdateTime() + * .lastUpdateTime() + * .occupancyCapacity() + * .occupancyCount() + * .occupancyStatus() + * .phase() + * .predicted() + * .scheduleDeviation() + * .serviceDate() + * .status() + * .totalDistanceAlongTrip() + * ``` + * + * @throws IllegalStateException if any required field is unset. + */ fun build(): TripStatus = TripStatus( checkRequired("activeTripId", activeTripId), @@ -2396,6 +2475,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [LastKnownLocation]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): LastKnownLocation = LastKnownLocation(lat, lon, additionalProperties.toImmutable()) } @@ -2549,6 +2633,11 @@ private constructor( keys.forEach(::removeAdditionalProperty) } + /** + * Returns an immutable instance of [Position]. + * + * Further updates to this [Builder] will not mutate the returned instance. + */ fun build(): Position = Position(lat, lon, additionalProperties.toImmutable()) }