@@ -279,6 +279,13 @@ public abstract class Incident extends DirectionsJsonObject {
279279 @ SerializedName ("num_lanes_blocked" )
280280 public abstract Integer numLanesBlocked ();
281281
282+ /**
283+ * List of roads names affected by the incident.
284+ */
285+ @ Nullable
286+ @ SerializedName ("affected_road_names" )
287+ public abstract List <String > affectedRoadNames ();
288+
282289 /**
283290 * Create a new instance of this class by using the {@link Incident.Builder} class.
284291 *
@@ -332,6 +339,7 @@ public abstract static class Builder extends DirectionsJsonObject.Builder<Builde
332339 *
333340 * @param id String
334341 */
342+ @ NonNull
335343 public abstract Builder id (@ NonNull String id );
336344
337345 /**
@@ -340,6 +348,7 @@ public abstract static class Builder extends DirectionsJsonObject.Builder<Builde
340348 * @param type incident type
341349 * @see IncidentType
342350 */
351+ @ NonNull
343352 public abstract Builder type (@ Nullable @ IncidentType String type );
344353
345354 /**
@@ -348,27 +357,31 @@ public abstract static class Builder extends DirectionsJsonObject.Builder<Builde
348357 *
349358 * @param closed is way closed
350359 */
360+ @ NonNull
351361 public abstract Builder closed (@ Nullable Boolean closed );
352362
353363 /**
354364 * Quantitative descriptor of congestion.
355365 *
356366 * @param congestion congestion
357367 */
368+ @ NonNull
358369 public abstract Builder congestion (@ Nullable Congestion congestion );
359370
360371 /**
361372 * Human-readable description of the incident suitable for displaying to the users.
362373 *
363374 * @param description incident description
364375 */
376+ @ NonNull
365377 public abstract Builder description (@ Nullable String description );
366378
367379 /**
368380 * Human-readable long description of the incident suitable for displaying to the users.
369381 *
370382 * @param longDescription incident long description
371383 */
384+ @ NonNull
372385 public abstract Builder longDescription (@ Nullable String longDescription );
373386
374387 /**
@@ -377,20 +390,23 @@ public abstract static class Builder extends DirectionsJsonObject.Builder<Builde
377390 * @param impact impact type
378391 * @see ImpactType
379392 */
393+ @ NonNull
380394 public abstract Builder impact (@ Nullable @ ImpactType String impact );
381395
382396 /**
383397 * Sub-type of the incident.
384398 *
385399 * @param subType syp-type
386400 */
401+ @ NonNull
387402 public abstract Builder subType (@ Nullable String subType );
388403
389404 /**
390405 * Sub-type-specific description.
391406 *
392407 * @param subTypeDescription sub-type description
393408 */
409+ @ NonNull
394410 public abstract Builder subTypeDescription (@ Nullable String subTypeDescription );
395411
396412 /**
@@ -399,41 +415,47 @@ public abstract static class Builder extends DirectionsJsonObject.Builder<Builde
399415 * @param alertcCodes list of alert codes
400416 * @see <a href="https://www.iso.org/standard/59231.html">AlertC</a>
401417 */
418+ @ NonNull
402419 public abstract Builder alertcCodes (@ Nullable List <Integer > alertcCodes );
403420
404421 /**
405422 * Incident's geometry index start point.
406423 *
407424 * @param geometryIndexStart start index
408425 */
426+ @ NonNull
409427 public abstract Builder geometryIndexStart (@ Nullable Integer geometryIndexStart );
410428
411429 /**
412430 * Incident's geometry index end point.
413431 *
414432 * @param geometryIndexEnd end index
415433 */
434+ @ NonNull
416435 public abstract Builder geometryIndexEnd (@ Nullable Integer geometryIndexEnd );
417436
418437 /**
419438 * Time the incident was created/updated in ISO8601 format.
420439 *
421440 * @param creationTime ISO8601 format
422441 */
442+ @ NonNull
423443 public abstract Builder creationTime (@ Nullable String creationTime );
424444
425445 /**
426446 * Start time in ISO8601 format.
427447 *
428448 * @param startTime ISO8601 format
429449 */
450+ @ NonNull
430451 public abstract Builder startTime (@ Nullable String startTime );
431452
432453 /**
433454 * End time in ISO8601 format.
434455 *
435456 * @param endTime ISO8601 format
436457 */
458+ @ NonNull
437459 public abstract Builder endTime (@ Nullable String endTime );
438460
439461 /**
@@ -442,6 +464,7 @@ public abstract static class Builder extends DirectionsJsonObject.Builder<Builde
442464 *
443465 * @param countryCodeAlpha2 2 letter country code
444466 */
467+ @ NonNull
445468 public abstract Builder countryCodeAlpha2 (@ Nullable String countryCodeAlpha2 );
446469
447470 /**
@@ -450,27 +473,38 @@ public abstract static class Builder extends DirectionsJsonObject.Builder<Builde
450473 *
451474 * @param countryCodeAlpha3 3 letter country code
452475 */
476+ @ NonNull
453477 public abstract Builder countryCodeAlpha3 (@ Nullable String countryCodeAlpha3 );
454478
455479 /**
456480 * A list of lanes that are blocked by the incident.
457481 *
458482 * @param lanesBlocked lanes blocked
459483 */
484+ @ NonNull
460485 public abstract Builder lanesBlocked (@ Nullable List <String > lanesBlocked );
461486
462487 /**
463488 * The number of items in the {@link Incident#lanesBlocked()} list.
464489 *
465490 * @param numLanesBlocked number lanes blocked
466491 */
492+ @ NonNull
467493 public abstract Builder numLanesBlocked (@ Nullable Integer numLanesBlocked );
468494
495+ /**
496+ * Sets list of roads names affected by the incident.
497+ * @param affectedRoadNames list of roads names affected by the incident.
498+ */
499+ @ NonNull
500+ public abstract Builder affectedRoadNames (@ Nullable List <String > affectedRoadNames );
501+
469502 /**
470503 * Build a new instance of {@link Incident}.
471504 *
472505 * @return a new instance of {@link Incident}.
473506 */
507+ @ NonNull
474508 public abstract Incident build ();
475509 }
476510}
0 commit comments