Skip to content

Commit 04aa38e

Browse files
docs: deduplicate and refine comments (#283)
1 parent 41c7cbf commit 04aa38e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+15883
-1039
lines changed

onebusaway-sdk-kotlin-core/src/main/kotlin/org/onebusaway/models/AgenciesWithCoverageListResponse.kt

Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import org.onebusaway.core.checkKnown
1616
import org.onebusaway.core.checkRequired
1717
import org.onebusaway.core.immutableEmptyMap
1818
import org.onebusaway.core.toImmutable
19+
import org.onebusaway.errors.OnebusawaySdkInvalidDataException
1920

2021
@NoAutoDetect
2122
class AgenciesWithCoverageListResponse
@@ -33,24 +34,69 @@ private constructor(
3334
@JsonAnySetter private val additionalProperties: Map<String, JsonValue> = immutableEmptyMap(),
3435
) {
3536

37+
/**
38+
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected type or is
39+
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
40+
*/
3641
fun code(): Long = code.getRequired("code")
3742

43+
/**
44+
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected type or is
45+
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
46+
*/
3847
fun currentTime(): Long = currentTime.getRequired("currentTime")
3948

49+
/**
50+
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected type or is
51+
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
52+
*/
4053
fun text(): String = text.getRequired("text")
4154

55+
/**
56+
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected type or is
57+
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
58+
*/
4259
fun version(): Long = version.getRequired("version")
4360

61+
/**
62+
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected type or is
63+
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
64+
*/
4465
fun data(): Data = data.getRequired("data")
4566

67+
/**
68+
* Returns the raw JSON value of [code].
69+
*
70+
* Unlike [code], this method doesn't throw if the JSON field has an unexpected type.
71+
*/
4672
@JsonProperty("code") @ExcludeMissing fun _code(): JsonField<Long> = code
4773

74+
/**
75+
* Returns the raw JSON value of [currentTime].
76+
*
77+
* Unlike [currentTime], this method doesn't throw if the JSON field has an unexpected type.
78+
*/
4879
@JsonProperty("currentTime") @ExcludeMissing fun _currentTime(): JsonField<Long> = currentTime
4980

81+
/**
82+
* Returns the raw JSON value of [text].
83+
*
84+
* Unlike [text], this method doesn't throw if the JSON field has an unexpected type.
85+
*/
5086
@JsonProperty("text") @ExcludeMissing fun _text(): JsonField<String> = text
5187

88+
/**
89+
* Returns the raw JSON value of [version].
90+
*
91+
* Unlike [version], this method doesn't throw if the JSON field has an unexpected type.
92+
*/
5293
@JsonProperty("version") @ExcludeMissing fun _version(): JsonField<Long> = version
5394

95+
/**
96+
* Returns the raw JSON value of [data].
97+
*
98+
* Unlike [data], this method doesn't throw if the JSON field has an unexpected type.
99+
*/
54100
@JsonProperty("data") @ExcludeMissing fun _data(): JsonField<Data> = data
55101

56102
@JsonAnyGetter
@@ -123,22 +169,53 @@ private constructor(
123169

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

172+
/**
173+
* Sets [Builder.code] to an arbitrary JSON value.
174+
*
175+
* You should usually call [Builder.code] with a well-typed [Long] value instead. This
176+
* method is primarily for setting the field to an undocumented or not yet supported value.
177+
*/
126178
fun code(code: JsonField<Long>) = apply { this.code = code }
127179

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

182+
/**
183+
* Sets [Builder.currentTime] to an arbitrary JSON value.
184+
*
185+
* You should usually call [Builder.currentTime] with a well-typed [Long] value instead.
186+
* This method is primarily for setting the field to an undocumented or not yet supported
187+
* value.
188+
*/
130189
fun currentTime(currentTime: JsonField<Long>) = apply { this.currentTime = currentTime }
131190

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

193+
/**
194+
* Sets [Builder.text] to an arbitrary JSON value.
195+
*
196+
* You should usually call [Builder.text] with a well-typed [String] value instead. This
197+
* method is primarily for setting the field to an undocumented or not yet supported value.
198+
*/
134199
fun text(text: JsonField<String>) = apply { this.text = text }
135200

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

203+
/**
204+
* Sets [Builder.version] to an arbitrary JSON value.
205+
*
206+
* You should usually call [Builder.version] with a well-typed [Long] value instead. This
207+
* method is primarily for setting the field to an undocumented or not yet supported value.
208+
*/
138209
fun version(version: JsonField<Long>) = apply { this.version = version }
139210

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

213+
/**
214+
* Sets [Builder.data] to an arbitrary JSON value.
215+
*
216+
* You should usually call [Builder.data] with a well-typed [Data] value instead. This
217+
* method is primarily for setting the field to an undocumented or not yet supported value.
218+
*/
142219
fun data(data: JsonField<Data>) = apply { this.data = data }
143220

144221
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
@@ -188,20 +265,48 @@ private constructor(
188265
private val additionalProperties: Map<String, JsonValue> = immutableEmptyMap(),
189266
) {
190267

268+
/**
269+
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected type or is
270+
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
271+
*/
191272
fun limitExceeded(): Boolean = limitExceeded.getRequired("limitExceeded")
192273

274+
/**
275+
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected type or is
276+
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
277+
*/
193278
fun list(): kotlin.collections.List<List> = list.getRequired("list")
194279

280+
/**
281+
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected type or is
282+
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
283+
*/
195284
fun references(): References = references.getRequired("references")
196285

286+
/**
287+
* Returns the raw JSON value of [limitExceeded].
288+
*
289+
* Unlike [limitExceeded], this method doesn't throw if the JSON field has an unexpected
290+
* type.
291+
*/
197292
@JsonProperty("limitExceeded")
198293
@ExcludeMissing
199294
fun _limitExceeded(): JsonField<Boolean> = limitExceeded
200295

296+
/**
297+
* Returns the raw JSON value of [list].
298+
*
299+
* Unlike [list], this method doesn't throw if the JSON field has an unexpected type.
300+
*/
201301
@JsonProperty("list")
202302
@ExcludeMissing
203303
fun _list(): JsonField<kotlin.collections.List<List>> = list
204304

305+
/**
306+
* Returns the raw JSON value of [references].
307+
*
308+
* Unlike [references], this method doesn't throw if the JSON field has an unexpected type.
309+
*/
205310
@JsonProperty("references")
206311
@ExcludeMissing
207312
fun _references(): JsonField<References> = references
@@ -257,16 +362,35 @@ private constructor(
257362

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

365+
/**
366+
* Sets [Builder.limitExceeded] to an arbitrary JSON value.
367+
*
368+
* You should usually call [Builder.limitExceeded] with a well-typed [Boolean] value
369+
* instead. This method is primarily for setting the field to an undocumented or not yet
370+
* supported value.
371+
*/
260372
fun limitExceeded(limitExceeded: JsonField<Boolean>) = apply {
261373
this.limitExceeded = limitExceeded
262374
}
263375

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

378+
/**
379+
* Sets [Builder.list] to an arbitrary JSON value.
380+
*
381+
* You should usually call [Builder.list] with a well-typed `List<List>` value instead.
382+
* This method is primarily for setting the field to an undocumented or not yet
383+
* supported value.
384+
*/
266385
fun list(list: JsonField<kotlin.collections.List<List>>) = apply {
267386
this.list = list.map { it.toMutableList() }
268387
}
269388

389+
/**
390+
* Adds a single [List] to [Builder.list].
391+
*
392+
* @throws IllegalStateException if the field was previously set to a non-list.
393+
*/
270394
fun addList(list: List) = apply {
271395
this.list =
272396
(this.list ?: JsonField.of(mutableListOf())).also {
@@ -276,6 +400,13 @@ private constructor(
276400

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

403+
/**
404+
* Sets [Builder.references] to an arbitrary JSON value.
405+
*
406+
* You should usually call [Builder.references] with a well-typed [References] value
407+
* instead. This method is primarily for setting the field to an undocumented or not yet
408+
* supported value.
409+
*/
279410
fun references(references: JsonField<References>) = apply {
280411
this.references = references
281412
}
@@ -331,24 +462,75 @@ private constructor(
331462
private val additionalProperties: Map<String, JsonValue> = immutableEmptyMap(),
332463
) {
333464

465+
/**
466+
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected type or
467+
* is unexpectedly missing or null (e.g. if the server responded with an unexpected
468+
* value).
469+
*/
334470
fun agencyId(): String = agencyId.getRequired("agencyId")
335471

472+
/**
473+
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected type or
474+
* is unexpectedly missing or null (e.g. if the server responded with an unexpected
475+
* value).
476+
*/
336477
fun lat(): Double = lat.getRequired("lat")
337478

479+
/**
480+
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected type or
481+
* is unexpectedly missing or null (e.g. if the server responded with an unexpected
482+
* value).
483+
*/
338484
fun latSpan(): Double = latSpan.getRequired("latSpan")
339485

486+
/**
487+
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected type or
488+
* is unexpectedly missing or null (e.g. if the server responded with an unexpected
489+
* value).
490+
*/
340491
fun lon(): Double = lon.getRequired("lon")
341492

493+
/**
494+
* @throws OnebusawaySdkInvalidDataException if the JSON field has an unexpected type or
495+
* is unexpectedly missing or null (e.g. if the server responded with an unexpected
496+
* value).
497+
*/
342498
fun lonSpan(): Double = lonSpan.getRequired("lonSpan")
343499

500+
/**
501+
* Returns the raw JSON value of [agencyId].
502+
*
503+
* Unlike [agencyId], this method doesn't throw if the JSON field has an unexpected
504+
* type.
505+
*/
344506
@JsonProperty("agencyId") @ExcludeMissing fun _agencyId(): JsonField<String> = agencyId
345507

508+
/**
509+
* Returns the raw JSON value of [lat].
510+
*
511+
* Unlike [lat], this method doesn't throw if the JSON field has an unexpected type.
512+
*/
346513
@JsonProperty("lat") @ExcludeMissing fun _lat(): JsonField<Double> = lat
347514

515+
/**
516+
* Returns the raw JSON value of [latSpan].
517+
*
518+
* Unlike [latSpan], this method doesn't throw if the JSON field has an unexpected type.
519+
*/
348520
@JsonProperty("latSpan") @ExcludeMissing fun _latSpan(): JsonField<Double> = latSpan
349521

522+
/**
523+
* Returns the raw JSON value of [lon].
524+
*
525+
* Unlike [lon], this method doesn't throw if the JSON field has an unexpected type.
526+
*/
350527
@JsonProperty("lon") @ExcludeMissing fun _lon(): JsonField<Double> = lon
351528

529+
/**
530+
* Returns the raw JSON value of [lonSpan].
531+
*
532+
* Unlike [lonSpan], this method doesn't throw if the JSON field has an unexpected type.
533+
*/
352534
@JsonProperty("lonSpan") @ExcludeMissing fun _lonSpan(): JsonField<Double> = lonSpan
353535

354536
@JsonAnyGetter
@@ -410,22 +592,57 @@ private constructor(
410592

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

595+
/**
596+
* Sets [Builder.agencyId] to an arbitrary JSON value.
597+
*
598+
* You should usually call [Builder.agencyId] with a well-typed [String] value
599+
* instead. This method is primarily for setting the field to an undocumented or not
600+
* yet supported value.
601+
*/
413602
fun agencyId(agencyId: JsonField<String>) = apply { this.agencyId = agencyId }
414603

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

606+
/**
607+
* Sets [Builder.lat] to an arbitrary JSON value.
608+
*
609+
* You should usually call [Builder.lat] with a well-typed [Double] value instead.
610+
* This method is primarily for setting the field to an undocumented or not yet
611+
* supported value.
612+
*/
417613
fun lat(lat: JsonField<Double>) = apply { this.lat = lat }
418614

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

617+
/**
618+
* Sets [Builder.latSpan] to an arbitrary JSON value.
619+
*
620+
* You should usually call [Builder.latSpan] with a well-typed [Double] value
621+
* instead. This method is primarily for setting the field to an undocumented or not
622+
* yet supported value.
623+
*/
421624
fun latSpan(latSpan: JsonField<Double>) = apply { this.latSpan = latSpan }
422625

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

628+
/**
629+
* Sets [Builder.lon] to an arbitrary JSON value.
630+
*
631+
* You should usually call [Builder.lon] with a well-typed [Double] value instead.
632+
* This method is primarily for setting the field to an undocumented or not yet
633+
* supported value.
634+
*/
425635
fun lon(lon: JsonField<Double>) = apply { this.lon = lon }
426636

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

639+
/**
640+
* Sets [Builder.lonSpan] to an arbitrary JSON value.
641+
*
642+
* You should usually call [Builder.lonSpan] with a well-typed [Double] value
643+
* instead. This method is primarily for setting the field to an undocumented or not
644+
* yet supported value.
645+
*/
429646
fun lonSpan(lonSpan: JsonField<Double>) = apply { this.lonSpan = lonSpan }
430647

431648
fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {

0 commit comments

Comments
 (0)