Vehicle

google.cloud.optimization.v1. Vehicle

Represents a Vehicle.

Constructor

new Vehicle(propertiesopt)

Constructs a new Vehicle.

Parameters:
Name Type Attributes Description
properties google.cloud.optimization.v1.IVehicle <optional>

Properties to set

Implements:
  • IVehicle

Classes

DurationLimit
LoadLimit

Members

_travelDurationMultiple

Vehicle _travelDurationMultiple.

breakRule

Vehicle breakRule.

breakRuleIndices

Vehicle breakRuleIndices.

capacities

Vehicle capacities.

costPerHour

Vehicle costPerHour.

costPerKilometer

Vehicle costPerKilometer.

costPerTraveledHour

Vehicle costPerTraveledHour.

endLoadIntervals

Vehicle endLoadIntervals.

endLocation

Vehicle endLocation.

endTags

Vehicle endTags.

endTimeWindows

Vehicle endTimeWindows.

endWaypoint

Vehicle endWaypoint.

extraVisitDurationForVisitType

Vehicle extraVisitDurationForVisitType.

fixedCost

Vehicle fixedCost.

ignore

Vehicle ignore.

label

Vehicle label.

loadLimits

Vehicle loadLimits.

routeDistanceLimit

Vehicle routeDistanceLimit.

routeDurationLimit

Vehicle routeDurationLimit.

routeModifiers

Vehicle routeModifiers.

startLoadIntervals

Vehicle startLoadIntervals.

startLocation

Vehicle startLocation.

startTags

Vehicle startTags.

startTimeWindows

Vehicle startTimeWindows.

startWaypoint

Vehicle startWaypoint.

travelDurationLimit

Vehicle travelDurationLimit.

travelDurationMultiple

Vehicle travelDurationMultiple.

travelMode

Vehicle travelMode.

unloadingPolicy

Vehicle unloadingPolicy.

usedIfRouteIsEmpty

Vehicle usedIfRouteIsEmpty.

TravelMode

TravelMode enum.

Properties:
Name Type Description
TRAVEL_MODE_UNSPECIFIED number

TRAVEL_MODE_UNSPECIFIED value

DRIVING number

DRIVING value

WALKING number

WALKING value

UnloadingPolicy

UnloadingPolicy enum.

Properties:
Name Type Description
UNLOADING_POLICY_UNSPECIFIED number

UNLOADING_POLICY_UNSPECIFIED value

LAST_IN_FIRST_OUT number

LAST_IN_FIRST_OUT value

FIRST_IN_FIRST_OUT number

FIRST_IN_FIRST_OUT value

Methods

toJSON() → {Object.<string, *>}

Converts this Vehicle to JSON.

Returns:
Type Description
Object.<string, *>

JSON object

(static) create(propertiesopt) → {google.cloud.optimization.v1.Vehicle}

Creates a new Vehicle instance using the specified properties.

Parameters:
Name Type Attributes Description
properties google.cloud.optimization.v1.IVehicle <optional>

Properties to set

Returns:
Type Description
google.cloud.optimization.v1.Vehicle

Vehicle instance

(static) decode(reader, lengthopt) → {google.cloud.optimization.v1.Vehicle}

Decodes a Vehicle message from the specified reader or buffer.

Parameters:
Name Type Attributes Description
reader $protobuf.Reader | Uint8Array

Reader or buffer to decode from

length number <optional>

Message length if known beforehand

Returns:
Type Description
google.cloud.optimization.v1.Vehicle

Vehicle

Throws:
  • If the payload is not a reader or valid buffer

    Type
    Error
  • If required fields are missing

    Type
    $protobuf.util.ProtocolError

(static) decodeDelimited(reader) → {google.cloud.optimization.v1.Vehicle}

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

Parameters:
Name Type Description
reader $protobuf.Reader | Uint8Array

Reader or buffer to decode from

Returns:
Type Description
google.cloud.optimization.v1.Vehicle

Vehicle

Throws:
  • If the payload is not a reader or valid buffer

    Type
    Error
  • If required fields are missing

    Type
    $protobuf.util.ProtocolError

(static) encode(message, writeropt) → {$protobuf.Writer}

Encodes the specified Vehicle message. Does not implicitly verify messages.

Parameters:
Name Type Attributes Description
message google.cloud.optimization.v1.IVehicle

Vehicle message or plain object to encode

writer $protobuf.Writer <optional>

Writer to encode to

Returns:
Type Description
$protobuf.Writer

Writer

(static) encodeDelimited(message, writeropt) → {$protobuf.Writer}

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

Parameters:
Name Type Attributes Description
message google.cloud.optimization.v1.IVehicle

Vehicle message or plain object to encode

writer $protobuf.Writer <optional>

Writer to encode to

Returns:
Type Description
$protobuf.Writer

Writer

(static) fromObject(object) → {google.cloud.optimization.v1.Vehicle}

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

Parameters:
Name Type Description
object Object.<string, *>

Plain object

Returns:
Type Description
google.cloud.optimization.v1.Vehicle

Vehicle

(static) getTypeUrl(typeUrlPrefixopt) → {string}

Gets the default type url for Vehicle

Parameters:
Name Type Attributes Description
typeUrlPrefix string <optional>

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

Returns:
Type Description
string

The default type url

(static) toObject(message, optionsopt) → {Object.<string, *>}

Creates a plain object from a Vehicle message. Also converts values to other types if specified.

Parameters:
Name Type Attributes Description
message google.cloud.optimization.v1.Vehicle

Vehicle

options $protobuf.IConversionOptions <optional>

Conversion options

Returns:
Type Description
Object.<string, *>

Plain object

(static) verify(message) → {string|null}

Verifies a Vehicle message.

Parameters:
Name Type Description
message Object.<string, *>

Plain object to verify

Returns:
Type Description
string | null

null if valid, otherwise the reason why it is not