类 DirectionsError.Builder
java.lang.Object
ai.nextbillion.kits.directions.models.DirectionsError.Builder
- 封闭类:
- DirectionsError
This builder can be used to set the values describing the
DirectionsError.-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明abstract DirectionsErrorbuild()Build a newDirectionsErrorobject.abstract DirectionsError.BuilderString indicating the state of the response.abstract DirectionsError.BuilderProvides a short message with the explanation of the invalid input.
-
构造器详细资料
-
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. The possible responses are listed below:- Ok:200 Normal success case
- NoRoute: 200 There was no route found for the given coordinates. Check for impossible routes (e.g. routes over oceans without ferry connections).
- NoSegment: 200 No road segment could be matched for coordinates. Check for coordinates too far away from a road.
- ProfileNotFound: 404 Use a valid profile as described above
- InvalidInput: 422
- 参数:
code- a string with one of the given values described in the list above- 返回:
- this builder for chaining options together
-
message
Provides a short message with the explanation of the invalid input.- 参数:
message- a string containing the message API Directions response- 返回:
- this builder for chaining options together
-
build
Build a newDirectionsErrorobject.- 返回:
- a new
DirectionsErrorusing the provided values in this builder
-