类 DirectionsError.Builder

java.lang.Object
ai.nextbillion.kits.directions.models.DirectionsError.Builder
封闭类:
DirectionsError

public abstract static class DirectionsError.Builder extends Object
This builder can be used to set the values describing the DirectionsError.
  • 构造器详细资料

    • Builder

      public Builder()
  • 方法详细资料

    • code

      public abstract DirectionsError.Builder code(String 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

      public abstract DirectionsError.Builder message(String 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

      public abstract DirectionsError build()
      Build a new DirectionsError object.
      返回:
      a new DirectionsError using the provided values in this builder