Class RouteModifiers.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<RouteModifiers.Builder>
com.google.maps.routing.v2.RouteModifiers.Builder
All Implemented Interfaces:
RouteModifiersOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
RouteModifiers

public static final class RouteModifiers.Builder extends com.google.protobuf.GeneratedMessage.Builder<RouteModifiers.Builder> implements RouteModifiersOrBuilder
 Encapsulates a set of optional conditions to satisfy when calculating the
 routes.
 
Protobuf type google.maps.routing.v2.RouteModifiers
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<RouteModifiers.Builder>
    • clear

      public RouteModifiers.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<RouteModifiers.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<RouteModifiers.Builder>
    • getDefaultInstanceForType

      public RouteModifiers getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public RouteModifiers build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public RouteModifiers buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public RouteModifiers.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<RouteModifiers.Builder>
    • mergeFrom

      public RouteModifiers.Builder mergeFrom(RouteModifiers other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<RouteModifiers.Builder>
    • mergeFrom

      public RouteModifiers.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<RouteModifiers.Builder>
      Throws:
      IOException
    • getAvoidTolls

      public boolean getAvoidTolls()
       When set to true, avoids toll roads where reasonable, giving preference to
       routes not containing toll roads. Applies only to the `DRIVE` and
       `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      bool avoid_tolls = 1;
      Specified by:
      getAvoidTolls in interface RouteModifiersOrBuilder
      Returns:
      The avoidTolls.
    • setAvoidTolls

      public RouteModifiers.Builder setAvoidTolls(boolean value)
       When set to true, avoids toll roads where reasonable, giving preference to
       routes not containing toll roads. Applies only to the `DRIVE` and
       `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      bool avoid_tolls = 1;
      Parameters:
      value - The avoidTolls to set.
      Returns:
      This builder for chaining.
    • clearAvoidTolls

      public RouteModifiers.Builder clearAvoidTolls()
       When set to true, avoids toll roads where reasonable, giving preference to
       routes not containing toll roads. Applies only to the `DRIVE` and
       `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      bool avoid_tolls = 1;
      Returns:
      This builder for chaining.
    • getAvoidHighways

      public boolean getAvoidHighways()
       When set to true, avoids highways where reasonable, giving preference to
       routes not containing highways. Applies only to the `DRIVE` and
       `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      bool avoid_highways = 2;
      Specified by:
      getAvoidHighways in interface RouteModifiersOrBuilder
      Returns:
      The avoidHighways.
    • setAvoidHighways

      public RouteModifiers.Builder setAvoidHighways(boolean value)
       When set to true, avoids highways where reasonable, giving preference to
       routes not containing highways. Applies only to the `DRIVE` and
       `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      bool avoid_highways = 2;
      Parameters:
      value - The avoidHighways to set.
      Returns:
      This builder for chaining.
    • clearAvoidHighways

      public RouteModifiers.Builder clearAvoidHighways()
       When set to true, avoids highways where reasonable, giving preference to
       routes not containing highways. Applies only to the `DRIVE` and
       `TWO_WHEELER` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      bool avoid_highways = 2;
      Returns:
      This builder for chaining.
    • getAvoidFerries

      public boolean getAvoidFerries()
       When set to true, avoids ferries where reasonable, giving preference to
       routes not containing ferries. Applies only to the `DRIVE` and`TWO_WHEELER`
       [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      bool avoid_ferries = 3;
      Specified by:
      getAvoidFerries in interface RouteModifiersOrBuilder
      Returns:
      The avoidFerries.
    • setAvoidFerries

      public RouteModifiers.Builder setAvoidFerries(boolean value)
       When set to true, avoids ferries where reasonable, giving preference to
       routes not containing ferries. Applies only to the `DRIVE` and`TWO_WHEELER`
       [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      bool avoid_ferries = 3;
      Parameters:
      value - The avoidFerries to set.
      Returns:
      This builder for chaining.
    • clearAvoidFerries

      public RouteModifiers.Builder clearAvoidFerries()
       When set to true, avoids ferries where reasonable, giving preference to
       routes not containing ferries. Applies only to the `DRIVE` and`TWO_WHEELER`
       [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      bool avoid_ferries = 3;
      Returns:
      This builder for chaining.
    • getAvoidIndoor

      public boolean getAvoidIndoor()
       When set to true, avoids navigating indoors where reasonable, giving
       preference to routes not containing indoor navigation. Applies only to the
       `WALK` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      bool avoid_indoor = 4;
      Specified by:
      getAvoidIndoor in interface RouteModifiersOrBuilder
      Returns:
      The avoidIndoor.
    • setAvoidIndoor

      public RouteModifiers.Builder setAvoidIndoor(boolean value)
       When set to true, avoids navigating indoors where reasonable, giving
       preference to routes not containing indoor navigation. Applies only to the
       `WALK` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      bool avoid_indoor = 4;
      Parameters:
      value - The avoidIndoor to set.
      Returns:
      This builder for chaining.
    • clearAvoidIndoor

      public RouteModifiers.Builder clearAvoidIndoor()
       When set to true, avoids navigating indoors where reasonable, giving
       preference to routes not containing indoor navigation. Applies only to the
       `WALK` [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      bool avoid_indoor = 4;
      Returns:
      This builder for chaining.
    • hasVehicleInfo

      public boolean hasVehicleInfo()
       Specifies the vehicle information.
       
      .google.maps.routing.v2.VehicleInfo vehicle_info = 5;
      Specified by:
      hasVehicleInfo in interface RouteModifiersOrBuilder
      Returns:
      Whether the vehicleInfo field is set.
    • getVehicleInfo

      public VehicleInfo getVehicleInfo()
       Specifies the vehicle information.
       
      .google.maps.routing.v2.VehicleInfo vehicle_info = 5;
      Specified by:
      getVehicleInfo in interface RouteModifiersOrBuilder
      Returns:
      The vehicleInfo.
    • setVehicleInfo

      public RouteModifiers.Builder setVehicleInfo(VehicleInfo value)
       Specifies the vehicle information.
       
      .google.maps.routing.v2.VehicleInfo vehicle_info = 5;
    • setVehicleInfo

      public RouteModifiers.Builder setVehicleInfo(VehicleInfo.Builder builderForValue)
       Specifies the vehicle information.
       
      .google.maps.routing.v2.VehicleInfo vehicle_info = 5;
    • mergeVehicleInfo

      public RouteModifiers.Builder mergeVehicleInfo(VehicleInfo value)
       Specifies the vehicle information.
       
      .google.maps.routing.v2.VehicleInfo vehicle_info = 5;
    • clearVehicleInfo

      public RouteModifiers.Builder clearVehicleInfo()
       Specifies the vehicle information.
       
      .google.maps.routing.v2.VehicleInfo vehicle_info = 5;
    • getVehicleInfoBuilder

      public VehicleInfo.Builder getVehicleInfoBuilder()
       Specifies the vehicle information.
       
      .google.maps.routing.v2.VehicleInfo vehicle_info = 5;
    • getVehicleInfoOrBuilder

      public VehicleInfoOrBuilder getVehicleInfoOrBuilder()
       Specifies the vehicle information.
       
      .google.maps.routing.v2.VehicleInfo vehicle_info = 5;
      Specified by:
      getVehicleInfoOrBuilder in interface RouteModifiersOrBuilder
    • getTollPassesList

      public List<TollPass> getTollPassesList()
       Encapsulates information about toll passes.
       If toll passes are provided, the API tries to return the pass price. If
       toll passes are not provided, the API treats the toll pass as unknown and
       tries to return the cash price.
       Applies only to the `DRIVE` and `TWO_WHEELER`
       [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      repeated .google.maps.routing.v2.TollPass toll_passes = 6;
      Specified by:
      getTollPassesList in interface RouteModifiersOrBuilder
      Returns:
      A list containing the tollPasses.
    • getTollPassesCount

      public int getTollPassesCount()
       Encapsulates information about toll passes.
       If toll passes are provided, the API tries to return the pass price. If
       toll passes are not provided, the API treats the toll pass as unknown and
       tries to return the cash price.
       Applies only to the `DRIVE` and `TWO_WHEELER`
       [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      repeated .google.maps.routing.v2.TollPass toll_passes = 6;
      Specified by:
      getTollPassesCount in interface RouteModifiersOrBuilder
      Returns:
      The count of tollPasses.
    • getTollPasses

      public TollPass getTollPasses(int index)
       Encapsulates information about toll passes.
       If toll passes are provided, the API tries to return the pass price. If
       toll passes are not provided, the API treats the toll pass as unknown and
       tries to return the cash price.
       Applies only to the `DRIVE` and `TWO_WHEELER`
       [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      repeated .google.maps.routing.v2.TollPass toll_passes = 6;
      Specified by:
      getTollPasses in interface RouteModifiersOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The tollPasses at the given index.
    • setTollPasses

      public RouteModifiers.Builder setTollPasses(int index, TollPass value)
       Encapsulates information about toll passes.
       If toll passes are provided, the API tries to return the pass price. If
       toll passes are not provided, the API treats the toll pass as unknown and
       tries to return the cash price.
       Applies only to the `DRIVE` and `TWO_WHEELER`
       [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      repeated .google.maps.routing.v2.TollPass toll_passes = 6;
      Parameters:
      index - The index to set the value at.
      value - The tollPasses to set.
      Returns:
      This builder for chaining.
    • addTollPasses

      public RouteModifiers.Builder addTollPasses(TollPass value)
       Encapsulates information about toll passes.
       If toll passes are provided, the API tries to return the pass price. If
       toll passes are not provided, the API treats the toll pass as unknown and
       tries to return the cash price.
       Applies only to the `DRIVE` and `TWO_WHEELER`
       [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      repeated .google.maps.routing.v2.TollPass toll_passes = 6;
      Parameters:
      value - The tollPasses to add.
      Returns:
      This builder for chaining.
    • addAllTollPasses

      public RouteModifiers.Builder addAllTollPasses(Iterable<? extends TollPass> values)
       Encapsulates information about toll passes.
       If toll passes are provided, the API tries to return the pass price. If
       toll passes are not provided, the API treats the toll pass as unknown and
       tries to return the cash price.
       Applies only to the `DRIVE` and `TWO_WHEELER`
       [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      repeated .google.maps.routing.v2.TollPass toll_passes = 6;
      Parameters:
      values - The tollPasses to add.
      Returns:
      This builder for chaining.
    • clearTollPasses

      public RouteModifiers.Builder clearTollPasses()
       Encapsulates information about toll passes.
       If toll passes are provided, the API tries to return the pass price. If
       toll passes are not provided, the API treats the toll pass as unknown and
       tries to return the cash price.
       Applies only to the `DRIVE` and `TWO_WHEELER`
       [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      repeated .google.maps.routing.v2.TollPass toll_passes = 6;
      Returns:
      This builder for chaining.
    • getTollPassesValueList

      public List<Integer> getTollPassesValueList()
       Encapsulates information about toll passes.
       If toll passes are provided, the API tries to return the pass price. If
       toll passes are not provided, the API treats the toll pass as unknown and
       tries to return the cash price.
       Applies only to the `DRIVE` and `TWO_WHEELER`
       [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      repeated .google.maps.routing.v2.TollPass toll_passes = 6;
      Specified by:
      getTollPassesValueList in interface RouteModifiersOrBuilder
      Returns:
      A list containing the enum numeric values on the wire for tollPasses.
    • getTollPassesValue

      public int getTollPassesValue(int index)
       Encapsulates information about toll passes.
       If toll passes are provided, the API tries to return the pass price. If
       toll passes are not provided, the API treats the toll pass as unknown and
       tries to return the cash price.
       Applies only to the `DRIVE` and `TWO_WHEELER`
       [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      repeated .google.maps.routing.v2.TollPass toll_passes = 6;
      Specified by:
      getTollPassesValue in interface RouteModifiersOrBuilder
      Parameters:
      index - The index of the value to return.
      Returns:
      The enum numeric value on the wire of tollPasses at the given index.
    • setTollPassesValue

      public RouteModifiers.Builder setTollPassesValue(int index, int value)
       Encapsulates information about toll passes.
       If toll passes are provided, the API tries to return the pass price. If
       toll passes are not provided, the API treats the toll pass as unknown and
       tries to return the cash price.
       Applies only to the `DRIVE` and `TWO_WHEELER`
       [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      repeated .google.maps.routing.v2.TollPass toll_passes = 6;
      Parameters:
      index - The index to set the value at.
      value - The enum numeric value on the wire for tollPasses to set.
      Returns:
      This builder for chaining.
    • addTollPassesValue

      public RouteModifiers.Builder addTollPassesValue(int value)
       Encapsulates information about toll passes.
       If toll passes are provided, the API tries to return the pass price. If
       toll passes are not provided, the API treats the toll pass as unknown and
       tries to return the cash price.
       Applies only to the `DRIVE` and `TWO_WHEELER`
       [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      repeated .google.maps.routing.v2.TollPass toll_passes = 6;
      Parameters:
      value - The enum numeric value on the wire for tollPasses to add.
      Returns:
      This builder for chaining.
    • addAllTollPassesValue

      public RouteModifiers.Builder addAllTollPassesValue(Iterable<Integer> values)
       Encapsulates information about toll passes.
       If toll passes are provided, the API tries to return the pass price. If
       toll passes are not provided, the API treats the toll pass as unknown and
       tries to return the cash price.
       Applies only to the `DRIVE` and `TWO_WHEELER`
       [`RouteTravelMode`][google.maps.routing.v2.RouteTravelMode].
       
      repeated .google.maps.routing.v2.TollPass toll_passes = 6;
      Parameters:
      values - The enum numeric values on the wire for tollPasses to add.
      Returns:
      This builder for chaining.