类 DirectionsResponse.Builder
java.lang.Object
ai.nextbillion.kits.directions.models.DirectionsResponse.Builder
- 封闭类:
- DirectionsResponse
This builder can be used to set the values describing the
DirectionsResponse.-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明build()Build a newDirectionsResponseobject.abstract DirectionsResponse.BuilderString indicating the state of the response.abstract DirectionsResponse.Buildercountry_code(String countryCode) A string telling you of the local country codeabstract DirectionsResponse.BuilderOptionally shows up in a directions response if an error or something unexpected occurred.abstract DirectionsResponse.Builderroutes(List<DirectionsRoute> routes) List containing all the different route options.abstract DirectionsResponse.BuilderA universally unique identifier (UUID) for identifying and executing a similar specific route in the future.abstract DirectionsResponse.Builderwaypoints(List<DirectionsWaypoint> waypoints) List ofDirectionsWaypointobjects.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
code
String indicating the state of the response. This is a separate code than the HTTP status code. On normal valid responses, the value will be Ok. For a full list of possible responses, seeDirectionsResponse.code().- 参数:
code- a string with one of the given values described in the list above- 返回:
- this builder for chaining options together
-
message
Optionally shows up in a directions response if an error or something unexpected occurred.- 参数:
message- a string containing the message API Directions response with if an error occurred- 返回:
- this builder for chaining options together
-
waypoints
List ofDirectionsWaypointobjects. Eachwaypointis an input coordinate snapped to the road and path network. Thewaypointappear in the list in the order of the input coordinates.- 参数:
waypoints- list ofDirectionsWaypointobjects ordered from start of route till the end- 返回:
- this builder for chaining options together
-
routes
List containing all the different route options. It's ordered by descending recommendation rank. In other words, object 0 in the List is the highest recommended route. if you don't setAlternatives to true (default is false) in your builder this should always be a List of size 1. At most this will return 2DirectionsRouteobjects.- 参数:
routes- list ofDirectionsRouteobjects- 返回:
- this builder for chaining options together
-
country_code
A string telling you of the local country code- 参数:
countryCode-- 返回:
- this builder for chaining options together
-
uuid
A universally unique identifier (UUID) for identifying and executing a similar specific route in the future.- 参数:
uuid- a String representing the UUID given by the directions request- 返回:
- this builder for chaining options together
-
build
Build a newDirectionsResponseobject.- 返回:
- a new
DirectionsResponseusing the provided values in this builder
-