|
5 | 5 | import com.google.gson.Gson; |
6 | 6 | import com.google.gson.GsonBuilder; |
7 | 7 | import com.google.gson.TypeAdapter; |
| 8 | +import com.google.gson.annotations.SerializedName; |
8 | 9 | import com.mapbox.api.directions.v5.DirectionsAdapterFactory; |
9 | 10 |
|
10 | 11 | import java.util.List; |
@@ -45,6 +46,19 @@ public static Builder builder() { |
45 | 46 | @Nullable |
46 | 47 | public abstract Double duration(); |
47 | 48 |
|
| 49 | + /** |
| 50 | + * The typical travel time for traversing this RouteLeg. There's a delay along the RouteLeg |
| 51 | + * if you subtract this durationTypical() value from the RouteLeg duration() value and |
| 52 | + * the resulting difference is greater than 0. The delay is because of any number |
| 53 | + * of real-world situations (road repair, traffic jam, etc). |
| 54 | + * |
| 55 | + * @return a double number with unit seconds |
| 56 | + * @since 5.5.0 |
| 57 | + */ |
| 58 | + @Nullable |
| 59 | + @SerializedName("duration_typical") |
| 60 | + public abstract Double durationTypical(); |
| 61 | + |
48 | 62 | /** |
49 | 63 | * A short human-readable summary of major roads traversed. Useful to distinguish alternatives. |
50 | 64 | * |
@@ -137,6 +151,18 @@ public abstract static class Builder { |
137 | 151 | */ |
138 | 152 | public abstract Builder duration(@Nullable Double duration); |
139 | 153 |
|
| 154 | + /** |
| 155 | + * The typical travel time for traversing this RouteLeg. There's a delay along the RouteLeg |
| 156 | + * if you subtract this durationTypical() value from the RouteLeg duration() value and |
| 157 | + * the resulting difference is greater than 0. The delay is because of any number |
| 158 | + * of real-world situations (road repair, traffic jam, etc). |
| 159 | + * |
| 160 | + * @param durationTypical a double number with unit seconds |
| 161 | + * @return this builder for chaining options together |
| 162 | + * @since 5.5.0 |
| 163 | + */ |
| 164 | + public abstract Builder durationTypical(@Nullable Double durationTypical); |
| 165 | + |
140 | 166 | /** |
141 | 167 | * A short human-readable summary of major roads traversed. Useful to distinguish alternatives. |
142 | 168 | * |
|
0 commit comments