|
1 | 1 | package com.mapbox.api.directions.v5.models; |
2 | 2 |
|
3 | 3 | import androidx.annotation.Nullable; |
| 4 | + |
4 | 5 | import com.google.auto.value.AutoValue; |
5 | 6 | import com.google.gson.Gson; |
6 | 7 | import com.google.gson.GsonBuilder; |
7 | 8 | import com.google.gson.TypeAdapter; |
| 9 | +import com.google.gson.annotations.SerializedName; |
8 | 10 | import com.mapbox.api.directions.v5.DirectionsAdapterFactory; |
9 | 11 |
|
10 | 12 | import java.util.List; |
@@ -39,6 +41,35 @@ public static Builder builder() { |
39 | 41 | @Nullable |
40 | 42 | public abstract Boolean valid(); |
41 | 43 |
|
| 44 | + /** |
| 45 | + * Indicates whether this lane is a preferred lane (true) or not (false). |
| 46 | + * A preferred lane is a lane that is recommended if there are multiple lanes available. |
| 47 | + * For example, if guidance indicates that the driver must turn left at an intersection |
| 48 | + * and there are multiple left turn lanes, the left turn lane that will better prepare |
| 49 | + * the driver for the next maneuver will be marked as active. |
| 50 | + * Only available on the mapbox/driving profile. |
| 51 | + * |
| 52 | + * @return Indicates whether this lane is a preferred lane (true) or not (false). |
| 53 | + */ |
| 54 | + @Nullable |
| 55 | + public abstract Boolean active(); |
| 56 | + |
| 57 | + /** |
| 58 | + * When either valid or active is set to true, this property shows which of the lane indications |
| 59 | + * is applicable to the current route, when there is more than one. For example, if a lane allows |
| 60 | + * you to go left or straight but your current route is guiding you to the left, |
| 61 | + * then this value will be set to left. |
| 62 | + * See indications for possible values. |
| 63 | + * When both active and valid are false, this property will not be included in the response. |
| 64 | + * Only available on the mapbox/driving profile. |
| 65 | + * |
| 66 | + * @return Array of which of the lane indications is applicable to the current route, |
| 67 | + * when there is more than one |
| 68 | + */ |
| 69 | + @Nullable |
| 70 | + @SerializedName("valid_indication") |
| 71 | + public abstract List<String> validIndications(); |
| 72 | + |
42 | 73 | /** |
43 | 74 | * Array that can be made up of multiple signs such as {@code left}, {@code right}, etc. |
44 | 75 | * |
@@ -106,6 +137,25 @@ public abstract static class Builder { |
106 | 137 | */ |
107 | 138 | public abstract Builder valid(@Nullable Boolean valid); |
108 | 139 |
|
| 140 | + /** |
| 141 | + * Indicates whether this lane is a preferred lane (true) or not (false). |
| 142 | + * |
| 143 | + * @param active Boolean value that indicates whether this lane is a preferred lane (true) |
| 144 | + * or not (false). |
| 145 | + * @return this builder for chaining options together |
| 146 | + */ |
| 147 | + public abstract Builder active(@Nullable Boolean active); |
| 148 | + |
| 149 | + /** |
| 150 | + * Shows which of the lane indications is applicable to the current route, |
| 151 | + * when there is more than one. |
| 152 | + * |
| 153 | + * @param validIndications list of lane indications that are applicable to the current route, |
| 154 | + * when there is more than one. |
| 155 | + * @return this builder for chaining options together |
| 156 | + */ |
| 157 | + public abstract Builder validIndications(@Nullable List<String> validIndications); |
| 158 | + |
109 | 159 | /** |
110 | 160 | * list that can be made up of multiple signs such as {@code left}, {@code right}, etc. |
111 | 161 | * |
|
0 commit comments