public abstract class Incident extends DirectionsJsonObject
Incident.IncidentType) that might be on the way.| Modifier and Type | Class and Description |
|---|---|
static class |
Incident.Builder
This builder can be used to set the values describing the
Incident. |
static interface |
Incident.ImpactType
Impact type.
|
static interface |
Incident.IncidentType
Incident type.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
IMPACT_CRITICAL
Incident.ImpactType critical. |
static java.lang.String |
IMPACT_LOW
Incident.ImpactType low. |
static java.lang.String |
IMPACT_MAJOR
Incident.ImpactType major. |
static java.lang.String |
IMPACT_MINOR
Incident.ImpactType minor. |
static java.lang.String |
IMPACT_UNKNOWN
Incident.ImpactType unknown. |
static java.lang.String |
INCIDENT_ACCIDENT
Incident.IncidentType accident. |
static java.lang.String |
INCIDENT_CONGESTION
Incident.IncidentType congestion. |
static java.lang.String |
INCIDENT_CONSTRUCTION
Incident.IncidentType construction. |
static java.lang.String |
INCIDENT_DISABLED_VEHICLE
Incident.IncidentType disabled vehicle. |
static java.lang.String |
INCIDENT_LANE_RESTRICTION
Incident.IncidentType lane restriction. |
static java.lang.String |
INCIDENT_MASS_TRANSIT
Incident.IncidentType mass transit. |
static java.lang.String |
INCIDENT_MISCELLANEOUS
Incident.IncidentType miscellaneous. |
static java.lang.String |
INCIDENT_OTHER_NEWS
Incident.IncidentType other news. |
static java.lang.String |
INCIDENT_PLANNED_EVENT
Incident.IncidentType planned event. |
static java.lang.String |
INCIDENT_ROAD_CLOSURE
Incident.IncidentType road closure. |
static java.lang.String |
INCIDENT_ROAD_HAZARD
Incident.IncidentType road hazard. |
static java.lang.String |
INCIDENT_WEATHER
Incident.IncidentType weather. |
| Constructor and Description |
|---|
Incident() |
| Modifier and Type | Method and Description |
|---|---|
abstract java.util.List<java.lang.String> |
affectedRoadNames()
List of roads names affected by the incident.
|
abstract java.util.List<java.lang.Integer> |
alertcCodes()
AlertC codes.
|
static Incident.Builder |
builder()
Create a new instance of this class by using the
Incident.Builder class. |
abstract java.lang.Boolean |
closed()
True if road is closed and no possibility to pass through there.
|
abstract Congestion |
congestion()
Quantitative descriptor of congestion.
|
abstract java.lang.String |
countryCodeAlpha2()
Two letter country code where the incident is located.
|
abstract java.lang.String |
countryCodeAlpha3()
Three letter country code where the incident is located.
|
abstract java.lang.String |
creationTime()
Time the incident was created/updated in ISO8601 format.
|
abstract java.lang.String |
description()
Human-readable description of the incident suitable for displaying to the users.
|
abstract java.lang.String |
endTime()
End time of the incident in ISO8601 format.
|
static Incident |
fromJson(java.lang.String json)
Create a new instance of this class by passing in a formatted valid JSON String.
|
abstract java.lang.Integer |
geometryIndexEnd()
Incident's leg-wise geometry index end point.
|
abstract java.lang.Integer |
geometryIndexStart()
Incident's leg-wise geometry index start point.
|
abstract java.lang.String |
id()
Unique identifier for incident.
|
abstract java.lang.String |
impact()
Severity level of incident.
|
abstract java.util.List<java.lang.String> |
lanesBlocked()
A list of lanes that are blocked by the incident.
|
abstract java.lang.String |
longDescription()
Human-readable long description of the incident suitable for displaying to the users.
|
abstract java.lang.Integer |
numLanesBlocked()
The number of items in the
lanesBlocked() list. |
abstract java.lang.String |
startTime()
Start time of the incident in ISO8601 format.
|
abstract java.lang.String |
subType()
Sub-type of the incident.
|
abstract java.lang.String |
subTypeDescription()
Sub-type-specific description.
|
abstract Incident.Builder |
toBuilder()
Convert the current
Incident to its builder holding the currently assigned
values. |
abstract TrafficCodes |
trafficCodes()
Traffic codes.
|
abstract java.lang.String |
type()
One of incident types.
|
static com.google.gson.TypeAdapter<Incident> |
typeAdapter(com.google.gson.Gson gson)
Gson type adapter for parsing Gson to this class.
|
getUnrecognizedJsonProperties, getUnrecognizedPropertiesNames, getUnrecognizedProperty, toJsonpublic static final java.lang.String INCIDENT_ACCIDENT
Incident.IncidentType accident.public static final java.lang.String INCIDENT_CONGESTION
Incident.IncidentType congestion.public static final java.lang.String INCIDENT_CONSTRUCTION
Incident.IncidentType construction.public static final java.lang.String INCIDENT_DISABLED_VEHICLE
Incident.IncidentType disabled vehicle. ?public static final java.lang.String INCIDENT_LANE_RESTRICTION
Incident.IncidentType lane restriction.public static final java.lang.String INCIDENT_MASS_TRANSIT
Incident.IncidentType mass transit.public static final java.lang.String INCIDENT_MISCELLANEOUS
Incident.IncidentType miscellaneous.public static final java.lang.String INCIDENT_OTHER_NEWS
Incident.IncidentType other news.public static final java.lang.String INCIDENT_PLANNED_EVENT
Incident.IncidentType planned event.public static final java.lang.String INCIDENT_ROAD_CLOSURE
Incident.IncidentType road closure.public static final java.lang.String INCIDENT_ROAD_HAZARD
Incident.IncidentType road hazard.public static final java.lang.String INCIDENT_WEATHER
Incident.IncidentType weather.public static final java.lang.String IMPACT_UNKNOWN
Incident.ImpactType unknown.public static final java.lang.String IMPACT_CRITICAL
Incident.ImpactType critical.public static final java.lang.String IMPACT_MAJOR
Incident.ImpactType major.public static final java.lang.String IMPACT_MINOR
Incident.ImpactType minor.public static final java.lang.String IMPACT_LOW
Incident.ImpactType low.@NonNull public abstract java.lang.String id()
@Nullable public abstract java.lang.String type()
Incident.IncidentType@Nullable public abstract java.lang.Boolean closed()
@Nullable public abstract Congestion congestion()
@Nullable public abstract java.lang.String description()
@Nullable @SerializedName(value="long_description") public abstract java.lang.String longDescription()
@Nullable public abstract java.lang.String impact()
Incident.ImpactType@Nullable @SerializedName(value="sub_type") public abstract java.lang.String subType()
@Nullable @SerializedName(value="sub_type_description") public abstract java.lang.String subTypeDescription()
@Nullable @SerializedName(value="alertc_codes") public abstract java.util.List<java.lang.Integer> alertcCodes()
@Nullable @SerializedName(value="traffic_codes") public abstract TrafficCodes trafficCodes()
TrafficCodes.@Nullable @SerializedName(value="geometry_index_start") public abstract java.lang.Integer geometryIndexStart()
@Nullable @SerializedName(value="geometry_index_end") public abstract java.lang.Integer geometryIndexEnd()
@Nullable @SerializedName(value="creation_time") public abstract java.lang.String creationTime()
startTime()/endTime(), incident can be created/updated before the incident.@Nullable @SerializedName(value="start_time") public abstract java.lang.String startTime()
@Nullable @SerializedName(value="end_time") public abstract java.lang.String endTime()
@Nullable @SerializedName(value="iso_3166_1_alpha2") public abstract java.lang.String countryCodeAlpha2()
@Nullable @SerializedName(value="iso_3166_1_alpha3") public abstract java.lang.String countryCodeAlpha3()
@Nullable @SerializedName(value="lanes_blocked") public abstract java.util.List<java.lang.String> lanesBlocked()
@Nullable @SerializedName(value="num_lanes_blocked") public abstract java.lang.Integer numLanesBlocked()
lanesBlocked() list.@Nullable @SerializedName(value="affected_road_names") public abstract java.util.List<java.lang.String> affectedRoadNames()
public static Incident.Builder builder()
Incident.Builder class.Incident.Builder for creating a new instancepublic abstract Incident.Builder toBuilder()
Incident to its builder holding the currently assigned
values. This allows you to modify a single property and then rebuild the object resulting in
an updated and modified Incident.Incident.Builder with the same values set to match the ones defined in this
Incidentpublic static com.google.gson.TypeAdapter<Incident> typeAdapter(com.google.gson.Gson gson)
gson - the built Gson objectpublic static Incident fromJson(java.lang.String json)
json - a formatted valid JSON string defining an Incident