Skip to content

Commit a6a01fc

Browse files
committed
revert addition of amenities to rest stop
1 parent 5794da6 commit a6a01fc

4 files changed

Lines changed: 0 additions & 214 deletions

File tree

services-directions-models/src/main/java/com/mapbox/api/directions/v5/models/Amenities.java

Lines changed: 0 additions & 118 deletions
This file was deleted.

services-directions-models/src/main/java/com/mapbox/api/directions/v5/models/RestStop.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.mapbox.api.directions.v5.models;
22

3-
import androidx.annotation.NonNull;
43
import androidx.annotation.Nullable;
54

65
import com.google.auto.value.AutoValue;
@@ -10,8 +9,6 @@
109
import com.mapbox.api.directions.v5.DirectionsAdapterFactory;
1110
import com.mapbox.api.directions.v5.DirectionsCriteria;
1211

13-
import java.util.List;
14-
1512
/**
1613
* An object containing information about passing rest stops along the route.
1714
* Only available on the {@link DirectionsCriteria#PROFILE_DRIVING} profile.
@@ -33,12 +30,6 @@ public abstract class RestStop extends DirectionsJsonObject {
3330
@Nullable
3431
public abstract String name();
3532

36-
/**
37-
* The list of amenities at the rest stop if available.
38-
*/
39-
@Nullable
40-
public abstract List<Amenities> amenities();
41-
4233
/**
4334
* Create a new instance of this class by using the {@link Builder} class.
4435
*
@@ -93,31 +84,20 @@ public abstract static class Builder extends DirectionsJsonObject.Builder<Builde
9384
*
9485
* @param type rest stop type
9586
*/
96-
@NonNull
9787
public abstract Builder type(@Nullable String type);
9888

9989
/**
10090
* The name of the rest stop. Optionally included if data is available.
10191
*
10292
* @param name rest stop name
10393
*/
104-
@NonNull
10594
public abstract Builder name(@Nullable String name);
10695

107-
/**
108-
* The list of amenities at the rest stop if available.
109-
*
110-
* @param amenities list of amenities
111-
*/
112-
@NonNull
113-
public abstract Builder amenities(@Nullable List<Amenities> amenities);
114-
11596
/**
11697
* Build a new {@link RestStop} object.
11798
*
11899
* @return a new {@link RestStop} using the provided values in this builder
119100
*/
120-
@NonNull
121101
public abstract RestStop build();
122102
}
123103
}

services-directions-models/src/test/java/com/mapbox/api/directions/v5/models/AmenitiesTest.java

Lines changed: 0 additions & 72 deletions
This file was deleted.

services-directions-models/src/test/java/com/mapbox/api/directions/v5/models/RestStopTest.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ public void sanity() throws Exception {
1717
RestStop restStop = RestStop.builder()
1818
.name("ABCD")
1919
.type("service_area")
20-
.amenities(Collections.<Amenities>emptyList())
2120
.build();
2221
assertNotNull(restStop);
2322
}
@@ -28,7 +27,6 @@ public void serializableObject() throws Exception {
2827
.builder()
2928
.name("ABCD")
3029
.type("service_area")
31-
.amenities(Collections.<Amenities>emptyList())
3230
.build();
3331

3432
RestStop actual = deserialize(
@@ -45,7 +43,6 @@ public void toFromJson() {
4543
.builder()
4644
.name("ABCD")
4745
.type("service_area")
48-
.amenities(Collections.<Amenities>emptyList())
4946
.build();
5047

5148
RestStop actual = RestStop.fromJson(expected.toJson());
@@ -61,7 +58,6 @@ public void fromJson_correctlyBuildsFromJson() throws Exception {
6158
RestStop restStop = response.routes().get(0).legs().get(0).steps().get(1).intersections().get(0).restStop();
6259

6360
assertNotNull(restStop);
64-
assertNotNull(restStop.amenities());
6561
assertEquals("SA", restStop.name());
6662
assertEquals("service_area", restStop.type());
6763
}

0 commit comments

Comments
 (0)