Incident

@Serializable
data class Incident(val id: String, val type: Incident.Type? = null, val closed: Boolean? = null, val congestion: Congestion? = null, val description: String? = null, val longDescription: String? = null, val impact: Incident.Impact? = null, val subType: String? = null, val subTypeDescription: String? = null, val alertcCodes: List<Int>? = null, val geometryIndexStart: Int? = null, val geometryIndexEnd: Int? = null, val creationTime: String? = null, val startTime: String? = null, val endTime: String? = null)

Reproduces one of road incidents type (Type) that might be on the way.

Constructors

Link copied to clipboard
constructor(id: String, type: Incident.Type? = null, closed: Boolean? = null, congestion: Congestion? = null, description: String? = null, longDescription: String? = null, impact: Incident.Impact? = null, subType: String? = null, subTypeDescription: String? = null, alertcCodes: List<Int>? = null, geometryIndexStart: Int? = null, geometryIndexEnd: Int? = null, creationTime: String? = null, startTime: String? = null, endTime: String? = null)

Types

Link copied to clipboard
class Builder(id: String)

Builder class for creating Incident instances.

Link copied to clipboard
@Serializable
enum Impact : Enum<Incident.Impact>
Link copied to clipboard
@Serializable
enum Type : Enum<Incident.Type>

Properties

Link copied to clipboard
@SerialName(value = "alertc_codes")
val alertcCodes: List<Int>? = null

AlertC codes.

Link copied to clipboard
val closed: Boolean? = null

True if road is closed and no possibility to pass through there. False otherwise.

Link copied to clipboard
val congestion: Congestion? = null

Quantitative descriptor of congestion.

Link copied to clipboard
@SerialName(value = "creation_time")
val creationTime: String? = null

Time the incident was created/updated in ISO8601 format. Not the same .startTime/.endTime, incident can be created/updated before the incident.

Link copied to clipboard
val description: String? = null

Human-readable description of the incident suitable for displaying to the users.

Link copied to clipboard
@SerialName(value = "end_time")
val endTime: String? = null

End time of the incident in ISO8601 format.

Link copied to clipboard
@SerialName(value = "geometry_index_end")
val geometryIndexEnd: Int? = null

Incident's geometry index end point.

Link copied to clipboard
@SerialName(value = "geometry_index_start")
val geometryIndexStart: Int? = null

Incident's geometry index start point.

Link copied to clipboard
val id: String

Unique identifier for incident. It might be the only one non-null filed which meant that incident started on previous leg and one has an incident with the same id.

Link copied to clipboard
val impact: Incident.Impact? = null

Severity level of incident.

Link copied to clipboard
@SerialName(value = "long_description")
val longDescription: String? = null

Human-readable long description of the incident suitable for displaying to the users.

Link copied to clipboard
@SerialName(value = "start_time")
val startTime: String? = null

Start time of the incident in ISO8601 format.

Link copied to clipboard
@SerialName(value = "sub_type")
val subType: String? = null

Sub-type of the incident.

Link copied to clipboard
@SerialName(value = "sub_type_description")
val subTypeDescription: String? = null

Sub-type-specific description.

Link copied to clipboard
val type: Incident.Type? = null

One of incident types.

Functions

Link copied to clipboard

Creates a builder initialized with the current values of the Incident instance.