Represents a Vehicle.
Package
@googlemaps/routeoptimizationConstructors
(constructor)(properties)
constructor(properties?: google.maps.routeoptimization.v1.IVehicle);
Constructs a new Vehicle.
Parameter | |
---|---|
Name | Description |
properties |
IVehicle
Properties to set |
Properties
_travelDurationMultiple
public _travelDurationMultiple?: "travelDurationMultiple";
Vehicle _travelDurationMultiple.
breakRule
public breakRule?: (google.maps.routeoptimization.v1.IBreakRule|null);
Vehicle breakRule.
costPerHour
public costPerHour: number;
Vehicle costPerHour.
costPerKilometer
public costPerKilometer: number;
Vehicle costPerKilometer.
costPerTraveledHour
public costPerTraveledHour: number;
Vehicle costPerTraveledHour.
displayName
public displayName: string;
Vehicle displayName.
endLocation
public endLocation?: (google.type.ILatLng|null);
Vehicle endLocation.
endTags
public endTags: string[];
Vehicle endTags.
endTimeWindows
public endTimeWindows: google.maps.routeoptimization.v1.ITimeWindow[];
Vehicle endTimeWindows.
endWaypoint
public endWaypoint?: (google.maps.routeoptimization.v1.IWaypoint|null);
Vehicle endWaypoint.
extraVisitDurationForVisitType
public extraVisitDurationForVisitType: { [k: string]: google.protobuf.IDuration };
Vehicle extraVisitDurationForVisitType.
fixedCost
public fixedCost: number;
Vehicle fixedCost.
ignore
public ignore: boolean;
Vehicle ignore.
label
public label: string;
Vehicle label.
loadLimits
public loadLimits: { [k: string]: google.maps.routeoptimization.v1.Vehicle.ILoadLimit };
Vehicle loadLimits.
routeDistanceLimit
public routeDistanceLimit?: (google.maps.routeoptimization.v1.IDistanceLimit|null);
Vehicle routeDistanceLimit.
routeDurationLimit
public routeDurationLimit?: (google.maps.routeoptimization.v1.Vehicle.IDurationLimit|null);
Vehicle routeDurationLimit.
startLocation
public startLocation?: (google.type.ILatLng|null);
Vehicle startLocation.
startTags
public startTags: string[];
Vehicle startTags.
startTimeWindows
public startTimeWindows: google.maps.routeoptimization.v1.ITimeWindow[];
Vehicle startTimeWindows.
startWaypoint
public startWaypoint?: (google.maps.routeoptimization.v1.IWaypoint|null);
Vehicle startWaypoint.
travelDurationLimit
public travelDurationLimit?: (google.maps.routeoptimization.v1.Vehicle.IDurationLimit|null);
Vehicle travelDurationLimit.
travelDurationMultiple
public travelDurationMultiple?: (number|null);
Vehicle travelDurationMultiple.
travelMode
public travelMode: (google.maps.routeoptimization.v1.Vehicle.TravelMode|keyof typeof google.maps.routeoptimization.v1.Vehicle.TravelMode);
Vehicle travelMode.
unloadingPolicy
public unloadingPolicy: (google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy|keyof typeof google.maps.routeoptimization.v1.Vehicle.UnloadingPolicy);
Vehicle unloadingPolicy.
usedIfRouteIsEmpty
public usedIfRouteIsEmpty: boolean;
Vehicle usedIfRouteIsEmpty.
Methods
create(properties)
public static create(properties?: google.maps.routeoptimization.v1.IVehicle): google.maps.routeoptimization.v1.Vehicle;
Creates a new Vehicle instance using the specified properties.
Parameter | |
---|---|
Name | Description |
properties |
IVehicle
Properties to set |
Returns | |
---|---|
Type | Description |
Vehicle |
Vehicle instance |
decode(reader, length)
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.maps.routeoptimization.v1.Vehicle;
Decodes a Vehicle message from the specified reader or buffer.
Parameters | |
---|---|
Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
length |
number
Message length if known beforehand |
Returns | |
---|---|
Type | Description |
Vehicle |
Vehicle |
decodeDelimited(reader)
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.maps.routeoptimization.v1.Vehicle;
Decodes a Vehicle message from the specified reader or buffer, length delimited.
Parameter | |
---|---|
Name | Description |
reader |
(Reader|Uint8Array)
Reader or buffer to decode from |
Returns | |
---|---|
Type | Description |
Vehicle |
Vehicle |
encode(message, writer)
public static encode(message: google.maps.routeoptimization.v1.IVehicle, writer?: $protobuf.Writer): $protobuf.Writer;
Encodes the specified Vehicle message. Does not implicitly messages.
Parameters | |
---|---|
Name | Description |
message |
IVehicle
Vehicle message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
Returns | |
---|---|
Type | Description |
$protobuf.Writer |
Writer |
encodeDelimited(message, writer)
public static encodeDelimited(message: google.maps.routeoptimization.v1.IVehicle, writer?: $protobuf.Writer): $protobuf.Writer;
Encodes the specified Vehicle message, length delimited. Does not implicitly messages.
Parameters | |
---|---|
Name | Description |
message |
IVehicle
Vehicle message or plain object to encode |
writer |
$protobuf.Writer
Writer to encode to |
Returns | |
---|---|
Type | Description |
$protobuf.Writer |
Writer |
fromObject(object)
public static fromObject(object: { [k: string]: any }): google.maps.routeoptimization.v1.Vehicle;
Creates a Vehicle message from a plain object. Also converts values to their respective internal types.
Parameter | |
---|---|
Name | Description |
object |
{ [k: string]: any }
Plain object |
Returns | |
---|---|
Type | Description |
Vehicle |
Vehicle |
getTypeUrl(typeUrlPrefix)
public static getTypeUrl(typeUrlPrefix?: string): string;
Gets the default type url for Vehicle
Parameter | |
---|---|
Name | Description |
typeUrlPrefix |
string
your custom typeUrlPrefix(default "type.googleapis.com") |
Returns | |
---|---|
Type | Description |
string |
The default type url |
toJSON()
public toJSON(): { [k: string]: any };
Converts this Vehicle to JSON.
Returns | |
---|---|
Type | Description |
{ [k: string]: any } |
JSON object |
toObject(message, options)
public static toObject(message: google.maps.routeoptimization.v1.Vehicle, options?: $protobuf.IConversionOptions): { [k: string]: any };
Creates a plain object from a Vehicle message. Also converts values to other types if specified.
Parameters | |
---|---|
Name | Description |
message |
Vehicle
Vehicle |
options |
$protobuf.IConversionOptions
Conversion options |
Returns | |
---|---|
Type | Description |
{ [k: string]: any } |
Plain object |
verify(message)
public static verify(message: { [k: string]: any }): (string|null);
Verifies a Vehicle message.
Parameter | |
---|---|
Name | Description |
message |
{ [k: string]: any }
Plain object to verify |
Returns | |
---|---|
Type | Description |
(string|null) |
|