@googlemaps/routeoptimization 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +2 -2
- package/build/protos/google/maps/routeoptimization/v1/route_optimization_service.proto +84 -236
- package/build/protos/protos.d.ts +136 -0
- package/build/protos/protos.js +362 -0
- package/build/protos/protos.json +49 -0
- package/build/src/v1/route_optimization_client.d.ts +16 -4
- package/build/src/v1/route_optimization_client.js.map +1 -1
- package/package.json +2 -2
package/build/protos/protos.js
CHANGED
|
@@ -6167,6 +6167,279 @@
|
|
|
6167
6167
|
return ShipmentTypeRequirement;
|
|
6168
6168
|
})();
|
|
6169
6169
|
|
|
6170
|
+
v1.RouteModifiers = (function() {
|
|
6171
|
+
|
|
6172
|
+
/**
|
|
6173
|
+
* Properties of a RouteModifiers.
|
|
6174
|
+
* @memberof google.maps.routeoptimization.v1
|
|
6175
|
+
* @interface IRouteModifiers
|
|
6176
|
+
* @property {boolean|null} [avoidTolls] RouteModifiers avoidTolls
|
|
6177
|
+
* @property {boolean|null} [avoidHighways] RouteModifiers avoidHighways
|
|
6178
|
+
* @property {boolean|null} [avoidFerries] RouteModifiers avoidFerries
|
|
6179
|
+
* @property {boolean|null} [avoidIndoor] RouteModifiers avoidIndoor
|
|
6180
|
+
*/
|
|
6181
|
+
|
|
6182
|
+
/**
|
|
6183
|
+
* Constructs a new RouteModifiers.
|
|
6184
|
+
* @memberof google.maps.routeoptimization.v1
|
|
6185
|
+
* @classdesc Represents a RouteModifiers.
|
|
6186
|
+
* @implements IRouteModifiers
|
|
6187
|
+
* @constructor
|
|
6188
|
+
* @param {google.maps.routeoptimization.v1.IRouteModifiers=} [properties] Properties to set
|
|
6189
|
+
*/
|
|
6190
|
+
function RouteModifiers(properties) {
|
|
6191
|
+
if (properties)
|
|
6192
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
6193
|
+
if (properties[keys[i]] != null)
|
|
6194
|
+
this[keys[i]] = properties[keys[i]];
|
|
6195
|
+
}
|
|
6196
|
+
|
|
6197
|
+
/**
|
|
6198
|
+
* RouteModifiers avoidTolls.
|
|
6199
|
+
* @member {boolean} avoidTolls
|
|
6200
|
+
* @memberof google.maps.routeoptimization.v1.RouteModifiers
|
|
6201
|
+
* @instance
|
|
6202
|
+
*/
|
|
6203
|
+
RouteModifiers.prototype.avoidTolls = false;
|
|
6204
|
+
|
|
6205
|
+
/**
|
|
6206
|
+
* RouteModifiers avoidHighways.
|
|
6207
|
+
* @member {boolean} avoidHighways
|
|
6208
|
+
* @memberof google.maps.routeoptimization.v1.RouteModifiers
|
|
6209
|
+
* @instance
|
|
6210
|
+
*/
|
|
6211
|
+
RouteModifiers.prototype.avoidHighways = false;
|
|
6212
|
+
|
|
6213
|
+
/**
|
|
6214
|
+
* RouteModifiers avoidFerries.
|
|
6215
|
+
* @member {boolean} avoidFerries
|
|
6216
|
+
* @memberof google.maps.routeoptimization.v1.RouteModifiers
|
|
6217
|
+
* @instance
|
|
6218
|
+
*/
|
|
6219
|
+
RouteModifiers.prototype.avoidFerries = false;
|
|
6220
|
+
|
|
6221
|
+
/**
|
|
6222
|
+
* RouteModifiers avoidIndoor.
|
|
6223
|
+
* @member {boolean} avoidIndoor
|
|
6224
|
+
* @memberof google.maps.routeoptimization.v1.RouteModifiers
|
|
6225
|
+
* @instance
|
|
6226
|
+
*/
|
|
6227
|
+
RouteModifiers.prototype.avoidIndoor = false;
|
|
6228
|
+
|
|
6229
|
+
/**
|
|
6230
|
+
* Creates a new RouteModifiers instance using the specified properties.
|
|
6231
|
+
* @function create
|
|
6232
|
+
* @memberof google.maps.routeoptimization.v1.RouteModifiers
|
|
6233
|
+
* @static
|
|
6234
|
+
* @param {google.maps.routeoptimization.v1.IRouteModifiers=} [properties] Properties to set
|
|
6235
|
+
* @returns {google.maps.routeoptimization.v1.RouteModifiers} RouteModifiers instance
|
|
6236
|
+
*/
|
|
6237
|
+
RouteModifiers.create = function create(properties) {
|
|
6238
|
+
return new RouteModifiers(properties);
|
|
6239
|
+
};
|
|
6240
|
+
|
|
6241
|
+
/**
|
|
6242
|
+
* Encodes the specified RouteModifiers message. Does not implicitly {@link google.maps.routeoptimization.v1.RouteModifiers.verify|verify} messages.
|
|
6243
|
+
* @function encode
|
|
6244
|
+
* @memberof google.maps.routeoptimization.v1.RouteModifiers
|
|
6245
|
+
* @static
|
|
6246
|
+
* @param {google.maps.routeoptimization.v1.IRouteModifiers} message RouteModifiers message or plain object to encode
|
|
6247
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
6248
|
+
* @returns {$protobuf.Writer} Writer
|
|
6249
|
+
*/
|
|
6250
|
+
RouteModifiers.encode = function encode(message, writer) {
|
|
6251
|
+
if (!writer)
|
|
6252
|
+
writer = $Writer.create();
|
|
6253
|
+
if (message.avoidTolls != null && Object.hasOwnProperty.call(message, "avoidTolls"))
|
|
6254
|
+
writer.uint32(/* id 2, wireType 0 =*/16).bool(message.avoidTolls);
|
|
6255
|
+
if (message.avoidHighways != null && Object.hasOwnProperty.call(message, "avoidHighways"))
|
|
6256
|
+
writer.uint32(/* id 3, wireType 0 =*/24).bool(message.avoidHighways);
|
|
6257
|
+
if (message.avoidFerries != null && Object.hasOwnProperty.call(message, "avoidFerries"))
|
|
6258
|
+
writer.uint32(/* id 4, wireType 0 =*/32).bool(message.avoidFerries);
|
|
6259
|
+
if (message.avoidIndoor != null && Object.hasOwnProperty.call(message, "avoidIndoor"))
|
|
6260
|
+
writer.uint32(/* id 5, wireType 0 =*/40).bool(message.avoidIndoor);
|
|
6261
|
+
return writer;
|
|
6262
|
+
};
|
|
6263
|
+
|
|
6264
|
+
/**
|
|
6265
|
+
* Encodes the specified RouteModifiers message, length delimited. Does not implicitly {@link google.maps.routeoptimization.v1.RouteModifiers.verify|verify} messages.
|
|
6266
|
+
* @function encodeDelimited
|
|
6267
|
+
* @memberof google.maps.routeoptimization.v1.RouteModifiers
|
|
6268
|
+
* @static
|
|
6269
|
+
* @param {google.maps.routeoptimization.v1.IRouteModifiers} message RouteModifiers message or plain object to encode
|
|
6270
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
6271
|
+
* @returns {$protobuf.Writer} Writer
|
|
6272
|
+
*/
|
|
6273
|
+
RouteModifiers.encodeDelimited = function encodeDelimited(message, writer) {
|
|
6274
|
+
return this.encode(message, writer).ldelim();
|
|
6275
|
+
};
|
|
6276
|
+
|
|
6277
|
+
/**
|
|
6278
|
+
* Decodes a RouteModifiers message from the specified reader or buffer.
|
|
6279
|
+
* @function decode
|
|
6280
|
+
* @memberof google.maps.routeoptimization.v1.RouteModifiers
|
|
6281
|
+
* @static
|
|
6282
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
6283
|
+
* @param {number} [length] Message length if known beforehand
|
|
6284
|
+
* @returns {google.maps.routeoptimization.v1.RouteModifiers} RouteModifiers
|
|
6285
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
6286
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
6287
|
+
*/
|
|
6288
|
+
RouteModifiers.decode = function decode(reader, length) {
|
|
6289
|
+
if (!(reader instanceof $Reader))
|
|
6290
|
+
reader = $Reader.create(reader);
|
|
6291
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.routeoptimization.v1.RouteModifiers();
|
|
6292
|
+
while (reader.pos < end) {
|
|
6293
|
+
var tag = reader.uint32();
|
|
6294
|
+
switch (tag >>> 3) {
|
|
6295
|
+
case 2: {
|
|
6296
|
+
message.avoidTolls = reader.bool();
|
|
6297
|
+
break;
|
|
6298
|
+
}
|
|
6299
|
+
case 3: {
|
|
6300
|
+
message.avoidHighways = reader.bool();
|
|
6301
|
+
break;
|
|
6302
|
+
}
|
|
6303
|
+
case 4: {
|
|
6304
|
+
message.avoidFerries = reader.bool();
|
|
6305
|
+
break;
|
|
6306
|
+
}
|
|
6307
|
+
case 5: {
|
|
6308
|
+
message.avoidIndoor = reader.bool();
|
|
6309
|
+
break;
|
|
6310
|
+
}
|
|
6311
|
+
default:
|
|
6312
|
+
reader.skipType(tag & 7);
|
|
6313
|
+
break;
|
|
6314
|
+
}
|
|
6315
|
+
}
|
|
6316
|
+
return message;
|
|
6317
|
+
};
|
|
6318
|
+
|
|
6319
|
+
/**
|
|
6320
|
+
* Decodes a RouteModifiers message from the specified reader or buffer, length delimited.
|
|
6321
|
+
* @function decodeDelimited
|
|
6322
|
+
* @memberof google.maps.routeoptimization.v1.RouteModifiers
|
|
6323
|
+
* @static
|
|
6324
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
6325
|
+
* @returns {google.maps.routeoptimization.v1.RouteModifiers} RouteModifiers
|
|
6326
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
6327
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
6328
|
+
*/
|
|
6329
|
+
RouteModifiers.decodeDelimited = function decodeDelimited(reader) {
|
|
6330
|
+
if (!(reader instanceof $Reader))
|
|
6331
|
+
reader = new $Reader(reader);
|
|
6332
|
+
return this.decode(reader, reader.uint32());
|
|
6333
|
+
};
|
|
6334
|
+
|
|
6335
|
+
/**
|
|
6336
|
+
* Verifies a RouteModifiers message.
|
|
6337
|
+
* @function verify
|
|
6338
|
+
* @memberof google.maps.routeoptimization.v1.RouteModifiers
|
|
6339
|
+
* @static
|
|
6340
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
6341
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
6342
|
+
*/
|
|
6343
|
+
RouteModifiers.verify = function verify(message) {
|
|
6344
|
+
if (typeof message !== "object" || message === null)
|
|
6345
|
+
return "object expected";
|
|
6346
|
+
if (message.avoidTolls != null && message.hasOwnProperty("avoidTolls"))
|
|
6347
|
+
if (typeof message.avoidTolls !== "boolean")
|
|
6348
|
+
return "avoidTolls: boolean expected";
|
|
6349
|
+
if (message.avoidHighways != null && message.hasOwnProperty("avoidHighways"))
|
|
6350
|
+
if (typeof message.avoidHighways !== "boolean")
|
|
6351
|
+
return "avoidHighways: boolean expected";
|
|
6352
|
+
if (message.avoidFerries != null && message.hasOwnProperty("avoidFerries"))
|
|
6353
|
+
if (typeof message.avoidFerries !== "boolean")
|
|
6354
|
+
return "avoidFerries: boolean expected";
|
|
6355
|
+
if (message.avoidIndoor != null && message.hasOwnProperty("avoidIndoor"))
|
|
6356
|
+
if (typeof message.avoidIndoor !== "boolean")
|
|
6357
|
+
return "avoidIndoor: boolean expected";
|
|
6358
|
+
return null;
|
|
6359
|
+
};
|
|
6360
|
+
|
|
6361
|
+
/**
|
|
6362
|
+
* Creates a RouteModifiers message from a plain object. Also converts values to their respective internal types.
|
|
6363
|
+
* @function fromObject
|
|
6364
|
+
* @memberof google.maps.routeoptimization.v1.RouteModifiers
|
|
6365
|
+
* @static
|
|
6366
|
+
* @param {Object.<string,*>} object Plain object
|
|
6367
|
+
* @returns {google.maps.routeoptimization.v1.RouteModifiers} RouteModifiers
|
|
6368
|
+
*/
|
|
6369
|
+
RouteModifiers.fromObject = function fromObject(object) {
|
|
6370
|
+
if (object instanceof $root.google.maps.routeoptimization.v1.RouteModifiers)
|
|
6371
|
+
return object;
|
|
6372
|
+
var message = new $root.google.maps.routeoptimization.v1.RouteModifiers();
|
|
6373
|
+
if (object.avoidTolls != null)
|
|
6374
|
+
message.avoidTolls = Boolean(object.avoidTolls);
|
|
6375
|
+
if (object.avoidHighways != null)
|
|
6376
|
+
message.avoidHighways = Boolean(object.avoidHighways);
|
|
6377
|
+
if (object.avoidFerries != null)
|
|
6378
|
+
message.avoidFerries = Boolean(object.avoidFerries);
|
|
6379
|
+
if (object.avoidIndoor != null)
|
|
6380
|
+
message.avoidIndoor = Boolean(object.avoidIndoor);
|
|
6381
|
+
return message;
|
|
6382
|
+
};
|
|
6383
|
+
|
|
6384
|
+
/**
|
|
6385
|
+
* Creates a plain object from a RouteModifiers message. Also converts values to other types if specified.
|
|
6386
|
+
* @function toObject
|
|
6387
|
+
* @memberof google.maps.routeoptimization.v1.RouteModifiers
|
|
6388
|
+
* @static
|
|
6389
|
+
* @param {google.maps.routeoptimization.v1.RouteModifiers} message RouteModifiers
|
|
6390
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
6391
|
+
* @returns {Object.<string,*>} Plain object
|
|
6392
|
+
*/
|
|
6393
|
+
RouteModifiers.toObject = function toObject(message, options) {
|
|
6394
|
+
if (!options)
|
|
6395
|
+
options = {};
|
|
6396
|
+
var object = {};
|
|
6397
|
+
if (options.defaults) {
|
|
6398
|
+
object.avoidTolls = false;
|
|
6399
|
+
object.avoidHighways = false;
|
|
6400
|
+
object.avoidFerries = false;
|
|
6401
|
+
object.avoidIndoor = false;
|
|
6402
|
+
}
|
|
6403
|
+
if (message.avoidTolls != null && message.hasOwnProperty("avoidTolls"))
|
|
6404
|
+
object.avoidTolls = message.avoidTolls;
|
|
6405
|
+
if (message.avoidHighways != null && message.hasOwnProperty("avoidHighways"))
|
|
6406
|
+
object.avoidHighways = message.avoidHighways;
|
|
6407
|
+
if (message.avoidFerries != null && message.hasOwnProperty("avoidFerries"))
|
|
6408
|
+
object.avoidFerries = message.avoidFerries;
|
|
6409
|
+
if (message.avoidIndoor != null && message.hasOwnProperty("avoidIndoor"))
|
|
6410
|
+
object.avoidIndoor = message.avoidIndoor;
|
|
6411
|
+
return object;
|
|
6412
|
+
};
|
|
6413
|
+
|
|
6414
|
+
/**
|
|
6415
|
+
* Converts this RouteModifiers to JSON.
|
|
6416
|
+
* @function toJSON
|
|
6417
|
+
* @memberof google.maps.routeoptimization.v1.RouteModifiers
|
|
6418
|
+
* @instance
|
|
6419
|
+
* @returns {Object.<string,*>} JSON object
|
|
6420
|
+
*/
|
|
6421
|
+
RouteModifiers.prototype.toJSON = function toJSON() {
|
|
6422
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
6423
|
+
};
|
|
6424
|
+
|
|
6425
|
+
/**
|
|
6426
|
+
* Gets the default type url for RouteModifiers
|
|
6427
|
+
* @function getTypeUrl
|
|
6428
|
+
* @memberof google.maps.routeoptimization.v1.RouteModifiers
|
|
6429
|
+
* @static
|
|
6430
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
6431
|
+
* @returns {string} The default type url
|
|
6432
|
+
*/
|
|
6433
|
+
RouteModifiers.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
6434
|
+
if (typeUrlPrefix === undefined) {
|
|
6435
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
6436
|
+
}
|
|
6437
|
+
return typeUrlPrefix + "/google.maps.routeoptimization.v1.RouteModifiers";
|
|
6438
|
+
};
|
|
6439
|
+
|
|
6440
|
+
return RouteModifiers;
|
|
6441
|
+
})();
|
|
6442
|
+
|
|
6170
6443
|
v1.Vehicle = (function() {
|
|
6171
6444
|
|
|
6172
6445
|
/**
|
|
@@ -6175,6 +6448,7 @@
|
|
|
6175
6448
|
* @interface IVehicle
|
|
6176
6449
|
* @property {string|null} [displayName] Vehicle displayName
|
|
6177
6450
|
* @property {google.maps.routeoptimization.v1.Vehicle.TravelMode|null} [travelMode] Vehicle travelMode
|
|
6451
|
+
* @property {google.maps.routeoptimization.v1.IRouteModifiers|null} [routeModifiers] Vehicle routeModifiers
|
|
6178
6452
|
* @property {google.type.ILatLng|null} [startLocation] Vehicle startLocation
|
|
6179
6453
|
* @property {google.maps.routeoptimization.v1.IWaypoint|null} [startWaypoint] Vehicle startWaypoint
|
|
6180
6454
|
* @property {google.type.ILatLng|null} [endLocation] Vehicle endLocation
|
|
@@ -6237,6 +6511,14 @@
|
|
|
6237
6511
|
*/
|
|
6238
6512
|
Vehicle.prototype.travelMode = 0;
|
|
6239
6513
|
|
|
6514
|
+
/**
|
|
6515
|
+
* Vehicle routeModifiers.
|
|
6516
|
+
* @member {google.maps.routeoptimization.v1.IRouteModifiers|null|undefined} routeModifiers
|
|
6517
|
+
* @memberof google.maps.routeoptimization.v1.Vehicle
|
|
6518
|
+
* @instance
|
|
6519
|
+
*/
|
|
6520
|
+
Vehicle.prototype.routeModifiers = null;
|
|
6521
|
+
|
|
6240
6522
|
/**
|
|
6241
6523
|
* Vehicle startLocation.
|
|
6242
6524
|
* @member {google.type.ILatLng|null|undefined} startLocation
|
|
@@ -6461,6 +6743,8 @@
|
|
|
6461
6743
|
writer = $Writer.create();
|
|
6462
6744
|
if (message.travelMode != null && Object.hasOwnProperty.call(message, "travelMode"))
|
|
6463
6745
|
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.travelMode);
|
|
6746
|
+
if (message.routeModifiers != null && Object.hasOwnProperty.call(message, "routeModifiers"))
|
|
6747
|
+
$root.google.maps.routeoptimization.v1.RouteModifiers.encode(message.routeModifiers, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
6464
6748
|
if (message.startLocation != null && Object.hasOwnProperty.call(message, "startLocation"))
|
|
6465
6749
|
$root.google.type.LatLng.encode(message.startLocation, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
6466
6750
|
if (message.startWaypoint != null && Object.hasOwnProperty.call(message, "startWaypoint"))
|
|
@@ -6561,6 +6845,10 @@
|
|
|
6561
6845
|
message.travelMode = reader.int32();
|
|
6562
6846
|
break;
|
|
6563
6847
|
}
|
|
6848
|
+
case 2: {
|
|
6849
|
+
message.routeModifiers = $root.google.maps.routeoptimization.v1.RouteModifiers.decode(reader, reader.uint32());
|
|
6850
|
+
break;
|
|
6851
|
+
}
|
|
6564
6852
|
case 3: {
|
|
6565
6853
|
message.startLocation = $root.google.type.LatLng.decode(reader, reader.uint32());
|
|
6566
6854
|
break;
|
|
@@ -6747,6 +7035,11 @@
|
|
|
6747
7035
|
case 2:
|
|
6748
7036
|
break;
|
|
6749
7037
|
}
|
|
7038
|
+
if (message.routeModifiers != null && message.hasOwnProperty("routeModifiers")) {
|
|
7039
|
+
var error = $root.google.maps.routeoptimization.v1.RouteModifiers.verify(message.routeModifiers);
|
|
7040
|
+
if (error)
|
|
7041
|
+
return "routeModifiers." + error;
|
|
7042
|
+
}
|
|
6750
7043
|
if (message.startLocation != null && message.hasOwnProperty("startLocation")) {
|
|
6751
7044
|
var error = $root.google.type.LatLng.verify(message.startLocation);
|
|
6752
7045
|
if (error)
|
|
@@ -6911,6 +7204,11 @@
|
|
|
6911
7204
|
message.travelMode = 2;
|
|
6912
7205
|
break;
|
|
6913
7206
|
}
|
|
7207
|
+
if (object.routeModifiers != null) {
|
|
7208
|
+
if (typeof object.routeModifiers !== "object")
|
|
7209
|
+
throw TypeError(".google.maps.routeoptimization.v1.Vehicle.routeModifiers: object expected");
|
|
7210
|
+
message.routeModifiers = $root.google.maps.routeoptimization.v1.RouteModifiers.fromObject(object.routeModifiers);
|
|
7211
|
+
}
|
|
6914
7212
|
if (object.startLocation != null) {
|
|
6915
7213
|
if (typeof object.startLocation !== "object")
|
|
6916
7214
|
throw TypeError(".google.maps.routeoptimization.v1.Vehicle.startLocation: object expected");
|
|
@@ -7069,6 +7367,7 @@
|
|
|
7069
7367
|
}
|
|
7070
7368
|
if (options.defaults) {
|
|
7071
7369
|
object.travelMode = options.enums === String ? "TRAVEL_MODE_UNSPECIFIED" : 0;
|
|
7370
|
+
object.routeModifiers = null;
|
|
7072
7371
|
object.startLocation = null;
|
|
7073
7372
|
object.startWaypoint = null;
|
|
7074
7373
|
object.endLocation = null;
|
|
@@ -7089,6 +7388,8 @@
|
|
|
7089
7388
|
}
|
|
7090
7389
|
if (message.travelMode != null && message.hasOwnProperty("travelMode"))
|
|
7091
7390
|
object.travelMode = options.enums === String ? $root.google.maps.routeoptimization.v1.Vehicle.TravelMode[message.travelMode] === undefined ? message.travelMode : $root.google.maps.routeoptimization.v1.Vehicle.TravelMode[message.travelMode] : message.travelMode;
|
|
7391
|
+
if (message.routeModifiers != null && message.hasOwnProperty("routeModifiers"))
|
|
7392
|
+
object.routeModifiers = $root.google.maps.routeoptimization.v1.RouteModifiers.toObject(message.routeModifiers, options);
|
|
7092
7393
|
if (message.startLocation != null && message.hasOwnProperty("startLocation"))
|
|
7093
7394
|
object.startLocation = $root.google.type.LatLng.toObject(message.startLocation, options);
|
|
7094
7395
|
if (message.startWaypoint != null && message.hasOwnProperty("startWaypoint"))
|
|
@@ -8567,6 +8868,7 @@
|
|
|
8567
8868
|
* @interface IDistanceLimit
|
|
8568
8869
|
* @property {number|Long|null} [maxMeters] DistanceLimit maxMeters
|
|
8569
8870
|
* @property {number|Long|null} [softMaxMeters] DistanceLimit softMaxMeters
|
|
8871
|
+
* @property {number|null} [costPerKilometerBelowSoftMax] DistanceLimit costPerKilometerBelowSoftMax
|
|
8570
8872
|
* @property {number|null} [costPerKilometerAboveSoftMax] DistanceLimit costPerKilometerAboveSoftMax
|
|
8571
8873
|
*/
|
|
8572
8874
|
|
|
@@ -8601,6 +8903,14 @@
|
|
|
8601
8903
|
*/
|
|
8602
8904
|
DistanceLimit.prototype.softMaxMeters = null;
|
|
8603
8905
|
|
|
8906
|
+
/**
|
|
8907
|
+
* DistanceLimit costPerKilometerBelowSoftMax.
|
|
8908
|
+
* @member {number|null|undefined} costPerKilometerBelowSoftMax
|
|
8909
|
+
* @memberof google.maps.routeoptimization.v1.DistanceLimit
|
|
8910
|
+
* @instance
|
|
8911
|
+
*/
|
|
8912
|
+
DistanceLimit.prototype.costPerKilometerBelowSoftMax = null;
|
|
8913
|
+
|
|
8604
8914
|
/**
|
|
8605
8915
|
* DistanceLimit costPerKilometerAboveSoftMax.
|
|
8606
8916
|
* @member {number|null|undefined} costPerKilometerAboveSoftMax
|
|
@@ -8634,6 +8944,17 @@
|
|
|
8634
8944
|
set: $util.oneOfSetter($oneOfFields)
|
|
8635
8945
|
});
|
|
8636
8946
|
|
|
8947
|
+
/**
|
|
8948
|
+
* DistanceLimit _costPerKilometerBelowSoftMax.
|
|
8949
|
+
* @member {"costPerKilometerBelowSoftMax"|undefined} _costPerKilometerBelowSoftMax
|
|
8950
|
+
* @memberof google.maps.routeoptimization.v1.DistanceLimit
|
|
8951
|
+
* @instance
|
|
8952
|
+
*/
|
|
8953
|
+
Object.defineProperty(DistanceLimit.prototype, "_costPerKilometerBelowSoftMax", {
|
|
8954
|
+
get: $util.oneOfGetter($oneOfFields = ["costPerKilometerBelowSoftMax"]),
|
|
8955
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
8956
|
+
});
|
|
8957
|
+
|
|
8637
8958
|
/**
|
|
8638
8959
|
* DistanceLimit _costPerKilometerAboveSoftMax.
|
|
8639
8960
|
* @member {"costPerKilometerAboveSoftMax"|undefined} _costPerKilometerAboveSoftMax
|
|
@@ -8675,6 +8996,8 @@
|
|
|
8675
8996
|
writer.uint32(/* id 2, wireType 0 =*/16).int64(message.softMaxMeters);
|
|
8676
8997
|
if (message.costPerKilometerAboveSoftMax != null && Object.hasOwnProperty.call(message, "costPerKilometerAboveSoftMax"))
|
|
8677
8998
|
writer.uint32(/* id 3, wireType 1 =*/25).double(message.costPerKilometerAboveSoftMax);
|
|
8999
|
+
if (message.costPerKilometerBelowSoftMax != null && Object.hasOwnProperty.call(message, "costPerKilometerBelowSoftMax"))
|
|
9000
|
+
writer.uint32(/* id 4, wireType 1 =*/33).double(message.costPerKilometerBelowSoftMax);
|
|
8678
9001
|
return writer;
|
|
8679
9002
|
};
|
|
8680
9003
|
|
|
@@ -8717,6 +9040,10 @@
|
|
|
8717
9040
|
message.softMaxMeters = reader.int64();
|
|
8718
9041
|
break;
|
|
8719
9042
|
}
|
|
9043
|
+
case 4: {
|
|
9044
|
+
message.costPerKilometerBelowSoftMax = reader.double();
|
|
9045
|
+
break;
|
|
9046
|
+
}
|
|
8720
9047
|
case 3: {
|
|
8721
9048
|
message.costPerKilometerAboveSoftMax = reader.double();
|
|
8722
9049
|
break;
|
|
@@ -8767,6 +9094,11 @@
|
|
|
8767
9094
|
if (!$util.isInteger(message.softMaxMeters) && !(message.softMaxMeters && $util.isInteger(message.softMaxMeters.low) && $util.isInteger(message.softMaxMeters.high)))
|
|
8768
9095
|
return "softMaxMeters: integer|Long expected";
|
|
8769
9096
|
}
|
|
9097
|
+
if (message.costPerKilometerBelowSoftMax != null && message.hasOwnProperty("costPerKilometerBelowSoftMax")) {
|
|
9098
|
+
properties._costPerKilometerBelowSoftMax = 1;
|
|
9099
|
+
if (typeof message.costPerKilometerBelowSoftMax !== "number")
|
|
9100
|
+
return "costPerKilometerBelowSoftMax: number expected";
|
|
9101
|
+
}
|
|
8770
9102
|
if (message.costPerKilometerAboveSoftMax != null && message.hasOwnProperty("costPerKilometerAboveSoftMax")) {
|
|
8771
9103
|
properties._costPerKilometerAboveSoftMax = 1;
|
|
8772
9104
|
if (typeof message.costPerKilometerAboveSoftMax !== "number")
|
|
@@ -8805,6 +9137,8 @@
|
|
|
8805
9137
|
message.softMaxMeters = object.softMaxMeters;
|
|
8806
9138
|
else if (typeof object.softMaxMeters === "object")
|
|
8807
9139
|
message.softMaxMeters = new $util.LongBits(object.softMaxMeters.low >>> 0, object.softMaxMeters.high >>> 0).toNumber();
|
|
9140
|
+
if (object.costPerKilometerBelowSoftMax != null)
|
|
9141
|
+
message.costPerKilometerBelowSoftMax = Number(object.costPerKilometerBelowSoftMax);
|
|
8808
9142
|
if (object.costPerKilometerAboveSoftMax != null)
|
|
8809
9143
|
message.costPerKilometerAboveSoftMax = Number(object.costPerKilometerAboveSoftMax);
|
|
8810
9144
|
return message;
|
|
@@ -8844,6 +9178,11 @@
|
|
|
8844
9178
|
if (options.oneofs)
|
|
8845
9179
|
object._costPerKilometerAboveSoftMax = "costPerKilometerAboveSoftMax";
|
|
8846
9180
|
}
|
|
9181
|
+
if (message.costPerKilometerBelowSoftMax != null && message.hasOwnProperty("costPerKilometerBelowSoftMax")) {
|
|
9182
|
+
object.costPerKilometerBelowSoftMax = options.json && !isFinite(message.costPerKilometerBelowSoftMax) ? String(message.costPerKilometerBelowSoftMax) : message.costPerKilometerBelowSoftMax;
|
|
9183
|
+
if (options.oneofs)
|
|
9184
|
+
object._costPerKilometerBelowSoftMax = "costPerKilometerBelowSoftMax";
|
|
9185
|
+
}
|
|
8847
9186
|
return object;
|
|
8848
9187
|
};
|
|
8849
9188
|
|
|
@@ -11560,6 +11899,7 @@
|
|
|
11560
11899
|
* @property {google.protobuf.IDuration|null} [totalDuration] Transition totalDuration
|
|
11561
11900
|
* @property {google.protobuf.ITimestamp|null} [startTime] Transition startTime
|
|
11562
11901
|
* @property {google.maps.routeoptimization.v1.ShipmentRoute.IEncodedPolyline|null} [routePolyline] Transition routePolyline
|
|
11902
|
+
* @property {string|null} [routeToken] Transition routeToken
|
|
11563
11903
|
* @property {Object.<string,google.maps.routeoptimization.v1.ShipmentRoute.IVehicleLoad>|null} [vehicleLoads] Transition vehicleLoads
|
|
11564
11904
|
*/
|
|
11565
11905
|
|
|
@@ -11651,6 +11991,14 @@
|
|
|
11651
11991
|
*/
|
|
11652
11992
|
Transition.prototype.routePolyline = null;
|
|
11653
11993
|
|
|
11994
|
+
/**
|
|
11995
|
+
* Transition routeToken.
|
|
11996
|
+
* @member {string} routeToken
|
|
11997
|
+
* @memberof google.maps.routeoptimization.v1.ShipmentRoute.Transition
|
|
11998
|
+
* @instance
|
|
11999
|
+
*/
|
|
12000
|
+
Transition.prototype.routeToken = "";
|
|
12001
|
+
|
|
11654
12002
|
/**
|
|
11655
12003
|
* Transition vehicleLoads.
|
|
11656
12004
|
* @member {Object.<string,google.maps.routeoptimization.v1.ShipmentRoute.IVehicleLoad>} vehicleLoads
|
|
@@ -11706,6 +12054,8 @@
|
|
|
11706
12054
|
writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
|
|
11707
12055
|
$root.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad.encode(message.vehicleLoads[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
|
11708
12056
|
}
|
|
12057
|
+
if (message.routeToken != null && Object.hasOwnProperty.call(message, "routeToken"))
|
|
12058
|
+
writer.uint32(/* id 12, wireType 2 =*/98).string(message.routeToken);
|
|
11709
12059
|
return writer;
|
|
11710
12060
|
};
|
|
11711
12061
|
|
|
@@ -11776,6 +12126,10 @@
|
|
|
11776
12126
|
message.routePolyline = $root.google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline.decode(reader, reader.uint32());
|
|
11777
12127
|
break;
|
|
11778
12128
|
}
|
|
12129
|
+
case 12: {
|
|
12130
|
+
message.routeToken = reader.string();
|
|
12131
|
+
break;
|
|
12132
|
+
}
|
|
11779
12133
|
case 11: {
|
|
11780
12134
|
if (message.vehicleLoads === $util.emptyObject)
|
|
11781
12135
|
message.vehicleLoads = {};
|
|
@@ -11875,6 +12229,9 @@
|
|
|
11875
12229
|
if (error)
|
|
11876
12230
|
return "routePolyline." + error;
|
|
11877
12231
|
}
|
|
12232
|
+
if (message.routeToken != null && message.hasOwnProperty("routeToken"))
|
|
12233
|
+
if (!$util.isString(message.routeToken))
|
|
12234
|
+
return "routeToken: string expected";
|
|
11878
12235
|
if (message.vehicleLoads != null && message.hasOwnProperty("vehicleLoads")) {
|
|
11879
12236
|
if (!$util.isObject(message.vehicleLoads))
|
|
11880
12237
|
return "vehicleLoads: object expected";
|
|
@@ -11939,6 +12296,8 @@
|
|
|
11939
12296
|
throw TypeError(".google.maps.routeoptimization.v1.ShipmentRoute.Transition.routePolyline: object expected");
|
|
11940
12297
|
message.routePolyline = $root.google.maps.routeoptimization.v1.ShipmentRoute.EncodedPolyline.fromObject(object.routePolyline);
|
|
11941
12298
|
}
|
|
12299
|
+
if (object.routeToken != null)
|
|
12300
|
+
message.routeToken = String(object.routeToken);
|
|
11942
12301
|
if (object.vehicleLoads) {
|
|
11943
12302
|
if (typeof object.vehicleLoads !== "object")
|
|
11944
12303
|
throw TypeError(".google.maps.routeoptimization.v1.ShipmentRoute.Transition.vehicleLoads: object expected");
|
|
@@ -11977,6 +12336,7 @@
|
|
|
11977
12336
|
object.totalDuration = null;
|
|
11978
12337
|
object.startTime = null;
|
|
11979
12338
|
object.routePolyline = null;
|
|
12339
|
+
object.routeToken = "";
|
|
11980
12340
|
}
|
|
11981
12341
|
if (message.travelDuration != null && message.hasOwnProperty("travelDuration"))
|
|
11982
12342
|
object.travelDuration = $root.google.protobuf.Duration.toObject(message.travelDuration, options);
|
|
@@ -12002,6 +12362,8 @@
|
|
|
12002
12362
|
for (var j = 0; j < keys2.length; ++j)
|
|
12003
12363
|
object.vehicleLoads[keys2[j]] = $root.google.maps.routeoptimization.v1.ShipmentRoute.VehicleLoad.toObject(message.vehicleLoads[keys2[j]], options);
|
|
12004
12364
|
}
|
|
12365
|
+
if (message.routeToken != null && message.hasOwnProperty("routeToken"))
|
|
12366
|
+
object.routeToken = message.routeToken;
|
|
12005
12367
|
return object;
|
|
12006
12368
|
};
|
|
12007
12369
|
|
package/build/protos/protos.json
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
+
"options": {
|
|
3
|
+
"syntax": "proto3"
|
|
4
|
+
},
|
|
2
5
|
"nested": {
|
|
3
6
|
"google": {
|
|
4
7
|
"nested": {
|
|
@@ -646,6 +649,29 @@
|
|
|
646
649
|
}
|
|
647
650
|
}
|
|
648
651
|
},
|
|
652
|
+
"RouteModifiers": {
|
|
653
|
+
"fields": {
|
|
654
|
+
"avoidTolls": {
|
|
655
|
+
"type": "bool",
|
|
656
|
+
"id": 2
|
|
657
|
+
},
|
|
658
|
+
"avoidHighways": {
|
|
659
|
+
"type": "bool",
|
|
660
|
+
"id": 3
|
|
661
|
+
},
|
|
662
|
+
"avoidFerries": {
|
|
663
|
+
"type": "bool",
|
|
664
|
+
"id": 4
|
|
665
|
+
},
|
|
666
|
+
"avoidIndoor": {
|
|
667
|
+
"type": "bool",
|
|
668
|
+
"id": 5,
|
|
669
|
+
"options": {
|
|
670
|
+
"(google.api.field_behavior)": "OPTIONAL"
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
}
|
|
674
|
+
},
|
|
649
675
|
"Vehicle": {
|
|
650
676
|
"oneofs": {
|
|
651
677
|
"_travelDurationMultiple": {
|
|
@@ -663,6 +689,10 @@
|
|
|
663
689
|
"type": "TravelMode",
|
|
664
690
|
"id": 1
|
|
665
691
|
},
|
|
692
|
+
"routeModifiers": {
|
|
693
|
+
"type": "RouteModifiers",
|
|
694
|
+
"id": 2
|
|
695
|
+
},
|
|
666
696
|
"startLocation": {
|
|
667
697
|
"type": "google.type.LatLng",
|
|
668
698
|
"id": 3
|
|
@@ -940,6 +970,11 @@
|
|
|
940
970
|
"softMaxMeters"
|
|
941
971
|
]
|
|
942
972
|
},
|
|
973
|
+
"_costPerKilometerBelowSoftMax": {
|
|
974
|
+
"oneof": [
|
|
975
|
+
"costPerKilometerBelowSoftMax"
|
|
976
|
+
]
|
|
977
|
+
},
|
|
943
978
|
"_costPerKilometerAboveSoftMax": {
|
|
944
979
|
"oneof": [
|
|
945
980
|
"costPerKilometerAboveSoftMax"
|
|
@@ -961,6 +996,13 @@
|
|
|
961
996
|
"proto3_optional": true
|
|
962
997
|
}
|
|
963
998
|
},
|
|
999
|
+
"costPerKilometerBelowSoftMax": {
|
|
1000
|
+
"type": "double",
|
|
1001
|
+
"id": 4,
|
|
1002
|
+
"options": {
|
|
1003
|
+
"proto3_optional": true
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
964
1006
|
"costPerKilometerAboveSoftMax": {
|
|
965
1007
|
"type": "double",
|
|
966
1008
|
"id": 3,
|
|
@@ -1245,6 +1287,13 @@
|
|
|
1245
1287
|
"type": "EncodedPolyline",
|
|
1246
1288
|
"id": 9
|
|
1247
1289
|
},
|
|
1290
|
+
"routeToken": {
|
|
1291
|
+
"type": "string",
|
|
1292
|
+
"id": 12,
|
|
1293
|
+
"options": {
|
|
1294
|
+
"(google.api.field_behavior)": "OUTPUT_ONLY"
|
|
1295
|
+
}
|
|
1296
|
+
},
|
|
1248
1297
|
"vehicleLoads": {
|
|
1249
1298
|
"keyType": "string",
|
|
1250
1299
|
"type": "VehicleLoad",
|
|
@@ -301,7 +301,7 @@ export declare class RouteOptimizationClient {
|
|
|
301
301
|
* @param {boolean} request.populatePolylines
|
|
302
302
|
* If true, polylines will be populated in response `ShipmentRoute`s.
|
|
303
303
|
* @param {boolean} request.populateTransitionPolylines
|
|
304
|
-
* If true, polylines will be populated in response
|
|
304
|
+
* If true, polylines and route tokens will be populated in response
|
|
305
305
|
* {@link protos.google.maps.routeoptimization.v1.ShipmentRoute.transitions|ShipmentRoute.transitions}.
|
|
306
306
|
* @param {boolean} request.allowLargeDeadlineDespiteInterruptionRisk
|
|
307
307
|
* If this is set, then the request can have a deadline
|
|
@@ -350,11 +350,23 @@ export declare class RouteOptimizationClient {
|
|
|
350
350
|
*
|
|
351
351
|
* This method is a Long Running Operation (LRO). The inputs for optimization
|
|
352
352
|
* (`OptimizeToursRequest` messages) and outputs (`OptimizeToursResponse`
|
|
353
|
-
* messages) are read
|
|
353
|
+
* messages) are read from and written to Cloud Storage in user-specified
|
|
354
354
|
* format. Like the `OptimizeTours` method, each `OptimizeToursRequest`
|
|
355
355
|
* contains a `ShipmentModel` and returns an `OptimizeToursResponse`
|
|
356
|
-
* containing `ShipmentRoute`
|
|
357
|
-
* vehicles minimizing the overall cost.
|
|
356
|
+
* containing `ShipmentRoute` fields, which are a set of routes to be
|
|
357
|
+
* performed by vehicles minimizing the overall cost.
|
|
358
|
+
*
|
|
359
|
+
* The user can poll `operations.get` to check the status of the LRO:
|
|
360
|
+
*
|
|
361
|
+
* If the LRO `done` field is false, then at least one request is still
|
|
362
|
+
* being processed. Other requests may have completed successfully and their
|
|
363
|
+
* results are available in Cloud Storage.
|
|
364
|
+
*
|
|
365
|
+
* If the LRO's `done` field is true, then all requests have been processed.
|
|
366
|
+
* Any successfully processed requests will have their results available in
|
|
367
|
+
* Cloud Storage. Any requests that failed will not have their results
|
|
368
|
+
* available in Cloud Storage. If the LRO's `error` field is set, then it
|
|
369
|
+
* contains the error from one of the failed requests.
|
|
358
370
|
*
|
|
359
371
|
* @param {Object} request
|
|
360
372
|
* The request object that will be sent.
|