Class 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.GeneratedMessageV3.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 Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public RouteModifiers.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>
      • setField

        public RouteModifiers.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                               Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>
      • clearField

        public RouteModifiers.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>
      • clearOneof

        public RouteModifiers.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>
      • setRepeatedField

        public RouteModifiers.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       int index,
                                                       Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>
      • addRepeatedField

        public RouteModifiers.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                       Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.
      • setVehicleInfo

        public RouteModifiers.Builder setVehicleInfo​(VehicleInfo value)
         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;
      • 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.
      • setUnknownFields

        public final RouteModifiers.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>
      • mergeUnknownFields

        public final RouteModifiers.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RouteModifiers.Builder>