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

Represents a ShipmentRoute.

Package

@google-cloud/optimization

Constructors

(constructor)(properties)

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

Constructs a new ShipmentRoute.

Parameter
NameDescription
properties IShipmentRoute

Properties to set

Properties

breaks

public breaks: google.cloud.optimization.v1.ShipmentRoute.IBreak[];

ShipmentRoute breaks.

delayBeforeVehicleEnd

public delayBeforeVehicleEnd?: (google.cloud.optimization.v1.ShipmentRoute.IDelay|null);

ShipmentRoute delayBeforeVehicleEnd.

endLoads

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

ShipmentRoute endLoads.

hasTrafficInfeasibilities

public hasTrafficInfeasibilities: boolean;

ShipmentRoute hasTrafficInfeasibilities.

metrics

public metrics?: (google.cloud.optimization.v1.IAggregatedMetrics|null);

ShipmentRoute metrics.

routeCosts

public routeCosts: { [k: string]: number };

ShipmentRoute routeCosts.

routePolyline

public routePolyline?: (google.cloud.optimization.v1.ShipmentRoute.IEncodedPolyline|null);

ShipmentRoute routePolyline.

routeTotalCost

public routeTotalCost: number;

ShipmentRoute routeTotalCost.

transitions

public transitions: google.cloud.optimization.v1.ShipmentRoute.ITransition[];

ShipmentRoute transitions.

travelSteps

public travelSteps: google.cloud.optimization.v1.ShipmentRoute.ITravelStep[];

ShipmentRoute travelSteps.

vehicleDetour

public vehicleDetour?: (google.protobuf.IDuration|null);

ShipmentRoute vehicleDetour.

vehicleEndTime

public vehicleEndTime?: (google.protobuf.ITimestamp|null);

ShipmentRoute vehicleEndTime.

vehicleIndex

public vehicleIndex: number;

ShipmentRoute vehicleIndex.

vehicleLabel

public vehicleLabel: string;

ShipmentRoute vehicleLabel.

vehicleStartTime

public vehicleStartTime?: (google.protobuf.ITimestamp|null);

ShipmentRoute vehicleStartTime.

visits

public visits: google.cloud.optimization.v1.ShipmentRoute.IVisit[];

ShipmentRoute visits.

Methods

create(properties)

public static create(properties?: google.cloud.optimization.v1.IShipmentRoute): google.cloud.optimization.v1.ShipmentRoute;

Creates a new ShipmentRoute instance using the specified properties.

Parameter
NameDescription
properties IShipmentRoute

Properties to set

Returns
TypeDescription
ShipmentRoute

ShipmentRoute instance

decode(reader, length)

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

Decodes a ShipmentRoute 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
ShipmentRoute

ShipmentRoute

decodeDelimited(reader)

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

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

Parameter
NameDescription
reader (Reader|Uint8Array)

Reader or buffer to decode from

Returns
TypeDescription
ShipmentRoute

ShipmentRoute

encode(message, writer)

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

Encodes the specified ShipmentRoute message. Does not implicitly messages.

Parameters
NameDescription
message IShipmentRoute

ShipmentRoute 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.IShipmentRoute, writer?: $protobuf.Writer): $protobuf.Writer;

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

Parameters
NameDescription
message IShipmentRoute

ShipmentRoute 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.ShipmentRoute;

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

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

Plain object

Returns
TypeDescription
ShipmentRoute

ShipmentRoute

getTypeUrl(typeUrlPrefix)

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

Gets the default type url for ShipmentRoute

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 ShipmentRoute to JSON.

Returns
TypeDescription
{ [k: string]: any }

JSON object

toObject(message, options)

public static toObject(message: google.cloud.optimization.v1.ShipmentRoute, options?: $protobuf.IConversionOptions): { [k: string]: any };

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

Parameters
NameDescription
message ShipmentRoute

ShipmentRoute

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 ShipmentRoute 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