Class protos.google.cloud.optimization.v1.Vehicle (3.2.0)

Represents a Vehicle.

Package

@google-cloud/optimization

Constructors

(constructor)(properties)

constructor(properties?: google.cloud.optimization.v1.IVehicle);

Constructs a new Vehicle.

Parameter
NameDescription
properties IVehicle

Properties to set

Properties

_travelDurationMultiple

public _travelDurationMultiple?: "travelDurationMultiple";

Vehicle _travelDurationMultiple.

breakRule

public breakRule?: (google.cloud.optimization.v1.IBreakRule|null);

Vehicle breakRule.

breakRuleIndices

public breakRuleIndices: number[];

Vehicle breakRuleIndices.

capacities

public capacities: google.cloud.optimization.v1.ICapacityQuantity[];

Vehicle capacities.

costPerHour

public costPerHour: number;

Vehicle costPerHour.

costPerKilometer

public costPerKilometer: number;

Vehicle costPerKilometer.

costPerTraveledHour

public costPerTraveledHour: number;

Vehicle costPerTraveledHour.

endLoadIntervals

public endLoadIntervals: google.cloud.optimization.v1.ICapacityQuantityInterval[];

Vehicle endLoadIntervals.

endLocation

public endLocation?: (google.type.ILatLng|null);

Vehicle endLocation.

endTags

public endTags: string[];

Vehicle endTags.

endTimeWindows

public endTimeWindows: google.cloud.optimization.v1.ITimeWindow[];

Vehicle endTimeWindows.

endWaypoint

public endWaypoint?: (google.cloud.optimization.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.cloud.optimization.v1.Vehicle.ILoadLimit };

Vehicle loadLimits.

routeDistanceLimit

public routeDistanceLimit?: (google.cloud.optimization.v1.IDistanceLimit|null);

Vehicle routeDistanceLimit.

routeDurationLimit

public routeDurationLimit?: (google.cloud.optimization.v1.Vehicle.IDurationLimit|null);

Vehicle routeDurationLimit.

routeModifiers

public routeModifiers?: (google.cloud.optimization.v1.IRouteModifiers|null);

Vehicle routeModifiers.

startLoadIntervals

public startLoadIntervals: google.cloud.optimization.v1.ICapacityQuantityInterval[];

Vehicle startLoadIntervals.

startLocation

public startLocation?: (google.type.ILatLng|null);

Vehicle startLocation.

startTags

public startTags: string[];

Vehicle startTags.

startTimeWindows

public startTimeWindows: google.cloud.optimization.v1.ITimeWindow[];

Vehicle startTimeWindows.

startWaypoint

public startWaypoint?: (google.cloud.optimization.v1.IWaypoint|null);

Vehicle startWaypoint.

travelDurationLimit

public travelDurationLimit?: (google.cloud.optimization.v1.Vehicle.IDurationLimit|null);

Vehicle travelDurationLimit.

travelDurationMultiple

public travelDurationMultiple?: (number|null);

Vehicle travelDurationMultiple.

travelMode

public travelMode: (google.cloud.optimization.v1.Vehicle.TravelMode|keyof typeof google.cloud.optimization.v1.Vehicle.TravelMode);

Vehicle travelMode.

unloadingPolicy

public unloadingPolicy: (google.cloud.optimization.v1.Vehicle.UnloadingPolicy|keyof typeof google.cloud.optimization.v1.Vehicle.UnloadingPolicy);

Vehicle unloadingPolicy.

usedIfRouteIsEmpty

public usedIfRouteIsEmpty: boolean;

Vehicle usedIfRouteIsEmpty.

Methods

create(properties)

public static create(properties?: google.cloud.optimization.v1.IVehicle): google.cloud.optimization.v1.Vehicle;

Creates a new Vehicle instance using the specified properties.

Parameter
NameDescription
properties IVehicle

Properties to set

Returns
TypeDescription
Vehicle

Vehicle instance

decode(reader, length)

public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.optimization.v1.Vehicle;

Decodes a Vehicle message from the specified reader or buffer.

Parameters
NameDescription
reader (Reader|Uint8Array)

Reader or buffer to decode from

length number

Message length if known beforehand

Returns
TypeDescription
Vehicle

Vehicle

decodeDelimited(reader)

public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.optimization.v1.Vehicle;

Decodes a Vehicle message from the specified reader or buffer, length delimited.

Parameter
NameDescription
reader (Reader|Uint8Array)

Reader or buffer to decode from

Returns
TypeDescription
Vehicle

Vehicle

encode(message, writer)

public static encode(message: google.cloud.optimization.v1.IVehicle, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified Vehicle message. Does not implicitly messages.

Parameters
NameDescription
message IVehicle

Vehicle message or plain object to encode

writer $protobuf.Writer

Writer to encode to

Returns
TypeDescription
$protobuf.Writer

Writer

encodeDelimited(message, writer)

public static encodeDelimited(message: google.cloud.optimization.v1.IVehicle, writer?: $protobuf.Writer): $protobuf.Writer;

Encodes the specified Vehicle message, length delimited. Does not implicitly messages.

Parameters
NameDescription
message IVehicle

Vehicle message or plain object to encode

writer $protobuf.Writer

Writer to encode to

Returns
TypeDescription
$protobuf.Writer

Writer

fromObject(object)

public static fromObject(object: { [k: string]: any }): google.cloud.optimization.v1.Vehicle;

Creates a Vehicle message from a plain object. Also converts values to their respective internal types.

Parameter
NameDescription
object { [k: string]: any }

Plain object

Returns
TypeDescription
Vehicle

Vehicle

getTypeUrl(typeUrlPrefix)

public static getTypeUrl(typeUrlPrefix?: string): string;

Gets the default type url for Vehicle

Parameter
NameDescription
typeUrlPrefix string

your custom typeUrlPrefix(default "type.googleapis.com")

Returns
TypeDescription
string

The default type url

toJSON()

public toJSON(): { [k: string]: any };

Converts this Vehicle to JSON.

Returns
TypeDescription
{ [k: string]: any }

JSON object

toObject(message, options)

public static toObject(message: google.cloud.optimization.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
NameDescription
message Vehicle

Vehicle

options $protobuf.IConversionOptions

Conversion options

Returns
TypeDescription
{ [k: string]: any }

Plain object

verify(message)

public static verify(message: { [k: string]: any }): (string|null);

Verifies a Vehicle message.

Parameter
NameDescription
message { [k: string]: any }

Plain object to verify

Returns
TypeDescription
(string|null)

null if valid, otherwise the reason why it is not