类 Incident

所有已实现的接口:
Serializable

public abstract class Incident extends DirectionsJsonObject
Reproduces one of road incidents type (Incident.IncidentType) that might be on the way.
另请参阅:
  • 字段详细资料

  • 构造器详细资料

    • Incident

      public Incident()
  • 方法详细资料

    • id

      @NonNull public abstract String id()
      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.
    • type

      @Nullable public abstract String type()
      One of incident types.
      另请参阅:
    • closed

      @Nullable public abstract Boolean closed()
      True if road is closed and no possibility to pass through there. False otherwise.
    • congestion

      @Nullable public abstract Congestion congestion()
      Quantitative descriptor of congestion.
    • description

      @Nullable public abstract String description()
      Human-readable description of the incident suitable for displaying to the users.
    • longDescription

      @Nullable @SerializedName("long_description") public abstract String longDescription()
      Human-readable long description of the incident suitable for displaying to the users.
    • impact

      @Nullable public abstract String impact()
      Severity level of incident.
      另请参阅:
    • subType

      @Nullable @SerializedName("sub_type") public abstract String subType()
      Sub-type of the incident.
    • subTypeDescription

      @Nullable @SerializedName("sub_type_description") public abstract String subTypeDescription()
      Sub-type-specific description.
    • alertcCodes

      @Nullable @SerializedName("alertc_codes") public abstract List<Integer> alertcCodes()
      AlertC codes.
      另请参阅:
    • geometryIndexStart

      @Nullable @SerializedName("geometry_index_start") public abstract Integer geometryIndexStart()
      Incident's geometry index start point.
    • geometryIndexEnd

      @Nullable @SerializedName("geometry_index_end") public abstract Integer geometryIndexEnd()
      Incident's geometry index end point.
    • creationTime

      @Nullable @SerializedName("creation_time") public abstract String creationTime()
      Time the incident was created/updated in ISO8601 format. Not the same startTime()/endTime(), incident can be created/updated before the incident.
    • startTime

      @Nullable @SerializedName("start_time") public abstract String startTime()
      Start time of the incident in ISO8601 format.
    • endTime

      @Nullable @SerializedName("end_time") public abstract String endTime()
      End time of the incident in ISO8601 format.
    • builder

      public static Incident.Builder builder()
      Create a new instance of this class by using the Incident.Builder class.
      返回:
      this classes Incident.Builder for creating a new instance
    • toBuilder

      public abstract Incident.Builder toBuilder()
      Convert the current 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.
      返回:
      a Incident.Builder with the same values set to match the ones defined in this Incident
    • typeAdapter

      public static com.google.gson.TypeAdapter<Incident> typeAdapter(com.google.gson.Gson gson)
      Gson type adapter for parsing Gson to this class.
      参数:
      gson - the built Gson object
      返回:
      the type adapter for this class
    • fromJson

      public static Incident fromJson(String json)
      Create a new instance of this class by passing in a formatted valid JSON String.
      参数:
      json - a formatted valid JSON string defining an Incident
      返回:
      a new instance of this class defined by the values passed in the method