Class RouteModifiers (1.33.0)

public final class RouteModifiers extends GeneratedMessageV3 implements RouteModifiersOrBuilder

Encapsulates a set of optional conditions to satisfy when calculating vehicle routes. This is similar to RouteModifiers in the Google Maps Platform API; see: https://developers.google.com/maps/documentation/routes/reference/rest/v2/RouteModifiers.

Protobuf type google.cloud.optimization.v1.RouteModifiers

Static Fields

AVOID_FERRIES_FIELD_NUMBER

public static final int AVOID_FERRIES_FIELD_NUMBER
Field Value
TypeDescription
int

AVOID_HIGHWAYS_FIELD_NUMBER

public static final int AVOID_HIGHWAYS_FIELD_NUMBER
Field Value
TypeDescription
int

AVOID_INDOOR_FIELD_NUMBER

public static final int AVOID_INDOOR_FIELD_NUMBER
Field Value
TypeDescription
int

AVOID_TOLLS_FIELD_NUMBER

public static final int AVOID_TOLLS_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static RouteModifiers getDefaultInstance()
Returns
TypeDescription
RouteModifiers

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static RouteModifiers.Builder newBuilder()
Returns
TypeDescription
RouteModifiers.Builder

newBuilder(RouteModifiers prototype)

public static RouteModifiers.Builder newBuilder(RouteModifiers prototype)
Parameter
NameDescription
prototypeRouteModifiers
Returns
TypeDescription
RouteModifiers.Builder

parseDelimitedFrom(InputStream input)

public static RouteModifiers parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
RouteModifiers
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static RouteModifiers parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RouteModifiers
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static RouteModifiers parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
RouteModifiers
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static RouteModifiers parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RouteModifiers
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static RouteModifiers parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
RouteModifiers
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static RouteModifiers parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RouteModifiers
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static RouteModifiers parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
RouteModifiers
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static RouteModifiers parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RouteModifiers
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static RouteModifiers parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
RouteModifiers
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static RouteModifiers parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RouteModifiers
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static RouteModifiers parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
RouteModifiers
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static RouteModifiers parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
RouteModifiers
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<RouteModifiers> parser()
Returns
TypeDescription
Parser<RouteModifiers>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getAvoidFerries()

public boolean getAvoidFerries()

Specifies whether to avoid ferries where reasonable. Preference will be given to routes not containing travel by ferries. Applies only to motorized travel modes.

bool avoid_ferries = 4;

Returns
TypeDescription
boolean

The avoidFerries.

getAvoidHighways()

public boolean getAvoidHighways()

Specifies whether to avoid highways where reasonable. Preference will be given to routes not containing highways. Applies only to motorized travel modes.

bool avoid_highways = 3;

Returns
TypeDescription
boolean

The avoidHighways.

getAvoidIndoor()

public boolean getAvoidIndoor()

Optional. Specifies whether to avoid navigating indoors where reasonable. Preference will be given to routes not containing indoor navigation. Applies only to the WALKING travel mode.

bool avoid_indoor = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

The avoidIndoor.

getAvoidTolls()

public boolean getAvoidTolls()

Specifies whether to avoid toll roads where reasonable. Preference will be given to routes not containing toll roads. Applies only to motorized travel modes.

bool avoid_tolls = 2;

Returns
TypeDescription
boolean

The avoidTolls.

getDefaultInstanceForType()

public RouteModifiers getDefaultInstanceForType()
Returns
TypeDescription
RouteModifiers

getParserForType()

public Parser<RouteModifiers> getParserForType()
Returns
TypeDescription
Parser<RouteModifiers>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public RouteModifiers.Builder newBuilderForType()
Returns
TypeDescription
RouteModifiers.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected RouteModifiers.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
RouteModifiers.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public RouteModifiers.Builder toBuilder()
Returns
TypeDescription
RouteModifiers.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException