@googlemaps/places 1.6.0 → 1.7.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/places/v1/place.proto +4 -2
- package/build/protos/google/maps/places/v1/places_service.proto +73 -1
- package/build/protos/google/maps/places/v1/polyline.proto +47 -0
- package/build/protos/google/maps/places/v1/route_modifiers.proto +52 -0
- package/build/protos/google/maps/places/v1/routing_preference.proto +57 -0
- package/build/protos/google/maps/places/v1/routing_summary.proto +54 -0
- package/build/protos/google/maps/places/v1/travel_mode.proto +51 -0
- package/build/protos/protos.d.ts +677 -0
- package/build/protos/protos.js +1716 -1
- package/build/protos/protos.json +165 -1
- package/build/src/v1/places_client.d.ts +6 -0
- package/build/src/v1/places_client.js.map +1 -1
- package/package.json +2 -2
package/build/protos/protos.js
CHANGED
|
@@ -12276,6 +12276,352 @@
|
|
|
12276
12276
|
return Places;
|
|
12277
12277
|
})();
|
|
12278
12278
|
|
|
12279
|
+
v1.RoutingParameters = (function() {
|
|
12280
|
+
|
|
12281
|
+
/**
|
|
12282
|
+
* Properties of a RoutingParameters.
|
|
12283
|
+
* @memberof google.maps.places.v1
|
|
12284
|
+
* @interface IRoutingParameters
|
|
12285
|
+
* @property {google.type.ILatLng|null} [origin] RoutingParameters origin
|
|
12286
|
+
* @property {google.maps.places.v1.TravelMode|null} [travelMode] RoutingParameters travelMode
|
|
12287
|
+
* @property {google.maps.places.v1.IRouteModifiers|null} [routeModifiers] RoutingParameters routeModifiers
|
|
12288
|
+
* @property {google.maps.places.v1.RoutingPreference|null} [routingPreference] RoutingParameters routingPreference
|
|
12289
|
+
*/
|
|
12290
|
+
|
|
12291
|
+
/**
|
|
12292
|
+
* Constructs a new RoutingParameters.
|
|
12293
|
+
* @memberof google.maps.places.v1
|
|
12294
|
+
* @classdesc Represents a RoutingParameters.
|
|
12295
|
+
* @implements IRoutingParameters
|
|
12296
|
+
* @constructor
|
|
12297
|
+
* @param {google.maps.places.v1.IRoutingParameters=} [properties] Properties to set
|
|
12298
|
+
*/
|
|
12299
|
+
function RoutingParameters(properties) {
|
|
12300
|
+
if (properties)
|
|
12301
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
12302
|
+
if (properties[keys[i]] != null)
|
|
12303
|
+
this[keys[i]] = properties[keys[i]];
|
|
12304
|
+
}
|
|
12305
|
+
|
|
12306
|
+
/**
|
|
12307
|
+
* RoutingParameters origin.
|
|
12308
|
+
* @member {google.type.ILatLng|null|undefined} origin
|
|
12309
|
+
* @memberof google.maps.places.v1.RoutingParameters
|
|
12310
|
+
* @instance
|
|
12311
|
+
*/
|
|
12312
|
+
RoutingParameters.prototype.origin = null;
|
|
12313
|
+
|
|
12314
|
+
/**
|
|
12315
|
+
* RoutingParameters travelMode.
|
|
12316
|
+
* @member {google.maps.places.v1.TravelMode} travelMode
|
|
12317
|
+
* @memberof google.maps.places.v1.RoutingParameters
|
|
12318
|
+
* @instance
|
|
12319
|
+
*/
|
|
12320
|
+
RoutingParameters.prototype.travelMode = 0;
|
|
12321
|
+
|
|
12322
|
+
/**
|
|
12323
|
+
* RoutingParameters routeModifiers.
|
|
12324
|
+
* @member {google.maps.places.v1.IRouteModifiers|null|undefined} routeModifiers
|
|
12325
|
+
* @memberof google.maps.places.v1.RoutingParameters
|
|
12326
|
+
* @instance
|
|
12327
|
+
*/
|
|
12328
|
+
RoutingParameters.prototype.routeModifiers = null;
|
|
12329
|
+
|
|
12330
|
+
/**
|
|
12331
|
+
* RoutingParameters routingPreference.
|
|
12332
|
+
* @member {google.maps.places.v1.RoutingPreference} routingPreference
|
|
12333
|
+
* @memberof google.maps.places.v1.RoutingParameters
|
|
12334
|
+
* @instance
|
|
12335
|
+
*/
|
|
12336
|
+
RoutingParameters.prototype.routingPreference = 0;
|
|
12337
|
+
|
|
12338
|
+
/**
|
|
12339
|
+
* Creates a new RoutingParameters instance using the specified properties.
|
|
12340
|
+
* @function create
|
|
12341
|
+
* @memberof google.maps.places.v1.RoutingParameters
|
|
12342
|
+
* @static
|
|
12343
|
+
* @param {google.maps.places.v1.IRoutingParameters=} [properties] Properties to set
|
|
12344
|
+
* @returns {google.maps.places.v1.RoutingParameters} RoutingParameters instance
|
|
12345
|
+
*/
|
|
12346
|
+
RoutingParameters.create = function create(properties) {
|
|
12347
|
+
return new RoutingParameters(properties);
|
|
12348
|
+
};
|
|
12349
|
+
|
|
12350
|
+
/**
|
|
12351
|
+
* Encodes the specified RoutingParameters message. Does not implicitly {@link google.maps.places.v1.RoutingParameters.verify|verify} messages.
|
|
12352
|
+
* @function encode
|
|
12353
|
+
* @memberof google.maps.places.v1.RoutingParameters
|
|
12354
|
+
* @static
|
|
12355
|
+
* @param {google.maps.places.v1.IRoutingParameters} message RoutingParameters message or plain object to encode
|
|
12356
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
12357
|
+
* @returns {$protobuf.Writer} Writer
|
|
12358
|
+
*/
|
|
12359
|
+
RoutingParameters.encode = function encode(message, writer) {
|
|
12360
|
+
if (!writer)
|
|
12361
|
+
writer = $Writer.create();
|
|
12362
|
+
if (message.origin != null && Object.hasOwnProperty.call(message, "origin"))
|
|
12363
|
+
$root.google.type.LatLng.encode(message.origin, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
12364
|
+
if (message.travelMode != null && Object.hasOwnProperty.call(message, "travelMode"))
|
|
12365
|
+
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.travelMode);
|
|
12366
|
+
if (message.routeModifiers != null && Object.hasOwnProperty.call(message, "routeModifiers"))
|
|
12367
|
+
$root.google.maps.places.v1.RouteModifiers.encode(message.routeModifiers, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
12368
|
+
if (message.routingPreference != null && Object.hasOwnProperty.call(message, "routingPreference"))
|
|
12369
|
+
writer.uint32(/* id 4, wireType 0 =*/32).int32(message.routingPreference);
|
|
12370
|
+
return writer;
|
|
12371
|
+
};
|
|
12372
|
+
|
|
12373
|
+
/**
|
|
12374
|
+
* Encodes the specified RoutingParameters message, length delimited. Does not implicitly {@link google.maps.places.v1.RoutingParameters.verify|verify} messages.
|
|
12375
|
+
* @function encodeDelimited
|
|
12376
|
+
* @memberof google.maps.places.v1.RoutingParameters
|
|
12377
|
+
* @static
|
|
12378
|
+
* @param {google.maps.places.v1.IRoutingParameters} message RoutingParameters message or plain object to encode
|
|
12379
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
12380
|
+
* @returns {$protobuf.Writer} Writer
|
|
12381
|
+
*/
|
|
12382
|
+
RoutingParameters.encodeDelimited = function encodeDelimited(message, writer) {
|
|
12383
|
+
return this.encode(message, writer).ldelim();
|
|
12384
|
+
};
|
|
12385
|
+
|
|
12386
|
+
/**
|
|
12387
|
+
* Decodes a RoutingParameters message from the specified reader or buffer.
|
|
12388
|
+
* @function decode
|
|
12389
|
+
* @memberof google.maps.places.v1.RoutingParameters
|
|
12390
|
+
* @static
|
|
12391
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
12392
|
+
* @param {number} [length] Message length if known beforehand
|
|
12393
|
+
* @returns {google.maps.places.v1.RoutingParameters} RoutingParameters
|
|
12394
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
12395
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
12396
|
+
*/
|
|
12397
|
+
RoutingParameters.decode = function decode(reader, length) {
|
|
12398
|
+
if (!(reader instanceof $Reader))
|
|
12399
|
+
reader = $Reader.create(reader);
|
|
12400
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.RoutingParameters();
|
|
12401
|
+
while (reader.pos < end) {
|
|
12402
|
+
var tag = reader.uint32();
|
|
12403
|
+
switch (tag >>> 3) {
|
|
12404
|
+
case 1: {
|
|
12405
|
+
message.origin = $root.google.type.LatLng.decode(reader, reader.uint32());
|
|
12406
|
+
break;
|
|
12407
|
+
}
|
|
12408
|
+
case 2: {
|
|
12409
|
+
message.travelMode = reader.int32();
|
|
12410
|
+
break;
|
|
12411
|
+
}
|
|
12412
|
+
case 3: {
|
|
12413
|
+
message.routeModifiers = $root.google.maps.places.v1.RouteModifiers.decode(reader, reader.uint32());
|
|
12414
|
+
break;
|
|
12415
|
+
}
|
|
12416
|
+
case 4: {
|
|
12417
|
+
message.routingPreference = reader.int32();
|
|
12418
|
+
break;
|
|
12419
|
+
}
|
|
12420
|
+
default:
|
|
12421
|
+
reader.skipType(tag & 7);
|
|
12422
|
+
break;
|
|
12423
|
+
}
|
|
12424
|
+
}
|
|
12425
|
+
return message;
|
|
12426
|
+
};
|
|
12427
|
+
|
|
12428
|
+
/**
|
|
12429
|
+
* Decodes a RoutingParameters message from the specified reader or buffer, length delimited.
|
|
12430
|
+
* @function decodeDelimited
|
|
12431
|
+
* @memberof google.maps.places.v1.RoutingParameters
|
|
12432
|
+
* @static
|
|
12433
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
12434
|
+
* @returns {google.maps.places.v1.RoutingParameters} RoutingParameters
|
|
12435
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
12436
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
12437
|
+
*/
|
|
12438
|
+
RoutingParameters.decodeDelimited = function decodeDelimited(reader) {
|
|
12439
|
+
if (!(reader instanceof $Reader))
|
|
12440
|
+
reader = new $Reader(reader);
|
|
12441
|
+
return this.decode(reader, reader.uint32());
|
|
12442
|
+
};
|
|
12443
|
+
|
|
12444
|
+
/**
|
|
12445
|
+
* Verifies a RoutingParameters message.
|
|
12446
|
+
* @function verify
|
|
12447
|
+
* @memberof google.maps.places.v1.RoutingParameters
|
|
12448
|
+
* @static
|
|
12449
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
12450
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
12451
|
+
*/
|
|
12452
|
+
RoutingParameters.verify = function verify(message) {
|
|
12453
|
+
if (typeof message !== "object" || message === null)
|
|
12454
|
+
return "object expected";
|
|
12455
|
+
if (message.origin != null && message.hasOwnProperty("origin")) {
|
|
12456
|
+
var error = $root.google.type.LatLng.verify(message.origin);
|
|
12457
|
+
if (error)
|
|
12458
|
+
return "origin." + error;
|
|
12459
|
+
}
|
|
12460
|
+
if (message.travelMode != null && message.hasOwnProperty("travelMode"))
|
|
12461
|
+
switch (message.travelMode) {
|
|
12462
|
+
default:
|
|
12463
|
+
return "travelMode: enum value expected";
|
|
12464
|
+
case 0:
|
|
12465
|
+
case 1:
|
|
12466
|
+
case 2:
|
|
12467
|
+
case 3:
|
|
12468
|
+
case 4:
|
|
12469
|
+
break;
|
|
12470
|
+
}
|
|
12471
|
+
if (message.routeModifiers != null && message.hasOwnProperty("routeModifiers")) {
|
|
12472
|
+
var error = $root.google.maps.places.v1.RouteModifiers.verify(message.routeModifiers);
|
|
12473
|
+
if (error)
|
|
12474
|
+
return "routeModifiers." + error;
|
|
12475
|
+
}
|
|
12476
|
+
if (message.routingPreference != null && message.hasOwnProperty("routingPreference"))
|
|
12477
|
+
switch (message.routingPreference) {
|
|
12478
|
+
default:
|
|
12479
|
+
return "routingPreference: enum value expected";
|
|
12480
|
+
case 0:
|
|
12481
|
+
case 1:
|
|
12482
|
+
case 2:
|
|
12483
|
+
case 3:
|
|
12484
|
+
break;
|
|
12485
|
+
}
|
|
12486
|
+
return null;
|
|
12487
|
+
};
|
|
12488
|
+
|
|
12489
|
+
/**
|
|
12490
|
+
* Creates a RoutingParameters message from a plain object. Also converts values to their respective internal types.
|
|
12491
|
+
* @function fromObject
|
|
12492
|
+
* @memberof google.maps.places.v1.RoutingParameters
|
|
12493
|
+
* @static
|
|
12494
|
+
* @param {Object.<string,*>} object Plain object
|
|
12495
|
+
* @returns {google.maps.places.v1.RoutingParameters} RoutingParameters
|
|
12496
|
+
*/
|
|
12497
|
+
RoutingParameters.fromObject = function fromObject(object) {
|
|
12498
|
+
if (object instanceof $root.google.maps.places.v1.RoutingParameters)
|
|
12499
|
+
return object;
|
|
12500
|
+
var message = new $root.google.maps.places.v1.RoutingParameters();
|
|
12501
|
+
if (object.origin != null) {
|
|
12502
|
+
if (typeof object.origin !== "object")
|
|
12503
|
+
throw TypeError(".google.maps.places.v1.RoutingParameters.origin: object expected");
|
|
12504
|
+
message.origin = $root.google.type.LatLng.fromObject(object.origin);
|
|
12505
|
+
}
|
|
12506
|
+
switch (object.travelMode) {
|
|
12507
|
+
default:
|
|
12508
|
+
if (typeof object.travelMode === "number") {
|
|
12509
|
+
message.travelMode = object.travelMode;
|
|
12510
|
+
break;
|
|
12511
|
+
}
|
|
12512
|
+
break;
|
|
12513
|
+
case "TRAVEL_MODE_UNSPECIFIED":
|
|
12514
|
+
case 0:
|
|
12515
|
+
message.travelMode = 0;
|
|
12516
|
+
break;
|
|
12517
|
+
case "DRIVE":
|
|
12518
|
+
case 1:
|
|
12519
|
+
message.travelMode = 1;
|
|
12520
|
+
break;
|
|
12521
|
+
case "BICYCLE":
|
|
12522
|
+
case 2:
|
|
12523
|
+
message.travelMode = 2;
|
|
12524
|
+
break;
|
|
12525
|
+
case "WALK":
|
|
12526
|
+
case 3:
|
|
12527
|
+
message.travelMode = 3;
|
|
12528
|
+
break;
|
|
12529
|
+
case "TWO_WHEELER":
|
|
12530
|
+
case 4:
|
|
12531
|
+
message.travelMode = 4;
|
|
12532
|
+
break;
|
|
12533
|
+
}
|
|
12534
|
+
if (object.routeModifiers != null) {
|
|
12535
|
+
if (typeof object.routeModifiers !== "object")
|
|
12536
|
+
throw TypeError(".google.maps.places.v1.RoutingParameters.routeModifiers: object expected");
|
|
12537
|
+
message.routeModifiers = $root.google.maps.places.v1.RouteModifiers.fromObject(object.routeModifiers);
|
|
12538
|
+
}
|
|
12539
|
+
switch (object.routingPreference) {
|
|
12540
|
+
default:
|
|
12541
|
+
if (typeof object.routingPreference === "number") {
|
|
12542
|
+
message.routingPreference = object.routingPreference;
|
|
12543
|
+
break;
|
|
12544
|
+
}
|
|
12545
|
+
break;
|
|
12546
|
+
case "ROUTING_PREFERENCE_UNSPECIFIED":
|
|
12547
|
+
case 0:
|
|
12548
|
+
message.routingPreference = 0;
|
|
12549
|
+
break;
|
|
12550
|
+
case "TRAFFIC_UNAWARE":
|
|
12551
|
+
case 1:
|
|
12552
|
+
message.routingPreference = 1;
|
|
12553
|
+
break;
|
|
12554
|
+
case "TRAFFIC_AWARE":
|
|
12555
|
+
case 2:
|
|
12556
|
+
message.routingPreference = 2;
|
|
12557
|
+
break;
|
|
12558
|
+
case "TRAFFIC_AWARE_OPTIMAL":
|
|
12559
|
+
case 3:
|
|
12560
|
+
message.routingPreference = 3;
|
|
12561
|
+
break;
|
|
12562
|
+
}
|
|
12563
|
+
return message;
|
|
12564
|
+
};
|
|
12565
|
+
|
|
12566
|
+
/**
|
|
12567
|
+
* Creates a plain object from a RoutingParameters message. Also converts values to other types if specified.
|
|
12568
|
+
* @function toObject
|
|
12569
|
+
* @memberof google.maps.places.v1.RoutingParameters
|
|
12570
|
+
* @static
|
|
12571
|
+
* @param {google.maps.places.v1.RoutingParameters} message RoutingParameters
|
|
12572
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
12573
|
+
* @returns {Object.<string,*>} Plain object
|
|
12574
|
+
*/
|
|
12575
|
+
RoutingParameters.toObject = function toObject(message, options) {
|
|
12576
|
+
if (!options)
|
|
12577
|
+
options = {};
|
|
12578
|
+
var object = {};
|
|
12579
|
+
if (options.defaults) {
|
|
12580
|
+
object.origin = null;
|
|
12581
|
+
object.travelMode = options.enums === String ? "TRAVEL_MODE_UNSPECIFIED" : 0;
|
|
12582
|
+
object.routeModifiers = null;
|
|
12583
|
+
object.routingPreference = options.enums === String ? "ROUTING_PREFERENCE_UNSPECIFIED" : 0;
|
|
12584
|
+
}
|
|
12585
|
+
if (message.origin != null && message.hasOwnProperty("origin"))
|
|
12586
|
+
object.origin = $root.google.type.LatLng.toObject(message.origin, options);
|
|
12587
|
+
if (message.travelMode != null && message.hasOwnProperty("travelMode"))
|
|
12588
|
+
object.travelMode = options.enums === String ? $root.google.maps.places.v1.TravelMode[message.travelMode] === undefined ? message.travelMode : $root.google.maps.places.v1.TravelMode[message.travelMode] : message.travelMode;
|
|
12589
|
+
if (message.routeModifiers != null && message.hasOwnProperty("routeModifiers"))
|
|
12590
|
+
object.routeModifiers = $root.google.maps.places.v1.RouteModifiers.toObject(message.routeModifiers, options);
|
|
12591
|
+
if (message.routingPreference != null && message.hasOwnProperty("routingPreference"))
|
|
12592
|
+
object.routingPreference = options.enums === String ? $root.google.maps.places.v1.RoutingPreference[message.routingPreference] === undefined ? message.routingPreference : $root.google.maps.places.v1.RoutingPreference[message.routingPreference] : message.routingPreference;
|
|
12593
|
+
return object;
|
|
12594
|
+
};
|
|
12595
|
+
|
|
12596
|
+
/**
|
|
12597
|
+
* Converts this RoutingParameters to JSON.
|
|
12598
|
+
* @function toJSON
|
|
12599
|
+
* @memberof google.maps.places.v1.RoutingParameters
|
|
12600
|
+
* @instance
|
|
12601
|
+
* @returns {Object.<string,*>} JSON object
|
|
12602
|
+
*/
|
|
12603
|
+
RoutingParameters.prototype.toJSON = function toJSON() {
|
|
12604
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
12605
|
+
};
|
|
12606
|
+
|
|
12607
|
+
/**
|
|
12608
|
+
* Gets the default type url for RoutingParameters
|
|
12609
|
+
* @function getTypeUrl
|
|
12610
|
+
* @memberof google.maps.places.v1.RoutingParameters
|
|
12611
|
+
* @static
|
|
12612
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
12613
|
+
* @returns {string} The default type url
|
|
12614
|
+
*/
|
|
12615
|
+
RoutingParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
12616
|
+
if (typeUrlPrefix === undefined) {
|
|
12617
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
12618
|
+
}
|
|
12619
|
+
return typeUrlPrefix + "/google.maps.places.v1.RoutingParameters";
|
|
12620
|
+
};
|
|
12621
|
+
|
|
12622
|
+
return RoutingParameters;
|
|
12623
|
+
})();
|
|
12624
|
+
|
|
12279
12625
|
v1.SearchNearbyRequest = (function() {
|
|
12280
12626
|
|
|
12281
12627
|
/**
|
|
@@ -12291,6 +12637,7 @@
|
|
|
12291
12637
|
* @property {number|null} [maxResultCount] SearchNearbyRequest maxResultCount
|
|
12292
12638
|
* @property {google.maps.places.v1.SearchNearbyRequest.ILocationRestriction|null} [locationRestriction] SearchNearbyRequest locationRestriction
|
|
12293
12639
|
* @property {google.maps.places.v1.SearchNearbyRequest.RankPreference|null} [rankPreference] SearchNearbyRequest rankPreference
|
|
12640
|
+
* @property {google.maps.places.v1.IRoutingParameters|null} [routingParameters] SearchNearbyRequest routingParameters
|
|
12294
12641
|
*/
|
|
12295
12642
|
|
|
12296
12643
|
/**
|
|
@@ -12384,6 +12731,14 @@
|
|
|
12384
12731
|
*/
|
|
12385
12732
|
SearchNearbyRequest.prototype.rankPreference = 0;
|
|
12386
12733
|
|
|
12734
|
+
/**
|
|
12735
|
+
* SearchNearbyRequest routingParameters.
|
|
12736
|
+
* @member {google.maps.places.v1.IRoutingParameters|null|undefined} routingParameters
|
|
12737
|
+
* @memberof google.maps.places.v1.SearchNearbyRequest
|
|
12738
|
+
* @instance
|
|
12739
|
+
*/
|
|
12740
|
+
SearchNearbyRequest.prototype.routingParameters = null;
|
|
12741
|
+
|
|
12387
12742
|
/**
|
|
12388
12743
|
* Creates a new SearchNearbyRequest instance using the specified properties.
|
|
12389
12744
|
* @function create
|
|
@@ -12430,6 +12785,8 @@
|
|
|
12430
12785
|
$root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
|
12431
12786
|
if (message.rankPreference != null && Object.hasOwnProperty.call(message, "rankPreference"))
|
|
12432
12787
|
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.rankPreference);
|
|
12788
|
+
if (message.routingParameters != null && Object.hasOwnProperty.call(message, "routingParameters"))
|
|
12789
|
+
$root.google.maps.places.v1.RoutingParameters.encode(message.routingParameters, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
|
12433
12790
|
return writer;
|
|
12434
12791
|
};
|
|
12435
12792
|
|
|
@@ -12508,6 +12865,10 @@
|
|
|
12508
12865
|
message.rankPreference = reader.int32();
|
|
12509
12866
|
break;
|
|
12510
12867
|
}
|
|
12868
|
+
case 10: {
|
|
12869
|
+
message.routingParameters = $root.google.maps.places.v1.RoutingParameters.decode(reader, reader.uint32());
|
|
12870
|
+
break;
|
|
12871
|
+
}
|
|
12511
12872
|
default:
|
|
12512
12873
|
reader.skipType(tag & 7);
|
|
12513
12874
|
break;
|
|
@@ -12594,6 +12955,11 @@
|
|
|
12594
12955
|
case 2:
|
|
12595
12956
|
break;
|
|
12596
12957
|
}
|
|
12958
|
+
if (message.routingParameters != null && message.hasOwnProperty("routingParameters")) {
|
|
12959
|
+
var error = $root.google.maps.places.v1.RoutingParameters.verify(message.routingParameters);
|
|
12960
|
+
if (error)
|
|
12961
|
+
return "routingParameters." + error;
|
|
12962
|
+
}
|
|
12597
12963
|
return null;
|
|
12598
12964
|
};
|
|
12599
12965
|
|
|
@@ -12668,6 +13034,11 @@
|
|
|
12668
13034
|
message.rankPreference = 2;
|
|
12669
13035
|
break;
|
|
12670
13036
|
}
|
|
13037
|
+
if (object.routingParameters != null) {
|
|
13038
|
+
if (typeof object.routingParameters !== "object")
|
|
13039
|
+
throw TypeError(".google.maps.places.v1.SearchNearbyRequest.routingParameters: object expected");
|
|
13040
|
+
message.routingParameters = $root.google.maps.places.v1.RoutingParameters.fromObject(object.routingParameters);
|
|
13041
|
+
}
|
|
12671
13042
|
return message;
|
|
12672
13043
|
};
|
|
12673
13044
|
|
|
@@ -12696,6 +13067,7 @@
|
|
|
12696
13067
|
object.maxResultCount = 0;
|
|
12697
13068
|
object.locationRestriction = null;
|
|
12698
13069
|
object.rankPreference = options.enums === String ? "RANK_PREFERENCE_UNSPECIFIED" : 0;
|
|
13070
|
+
object.routingParameters = null;
|
|
12699
13071
|
}
|
|
12700
13072
|
if (message.languageCode != null && message.hasOwnProperty("languageCode"))
|
|
12701
13073
|
object.languageCode = message.languageCode;
|
|
@@ -12727,6 +13099,8 @@
|
|
|
12727
13099
|
object.locationRestriction = $root.google.maps.places.v1.SearchNearbyRequest.LocationRestriction.toObject(message.locationRestriction, options);
|
|
12728
13100
|
if (message.rankPreference != null && message.hasOwnProperty("rankPreference"))
|
|
12729
13101
|
object.rankPreference = options.enums === String ? $root.google.maps.places.v1.SearchNearbyRequest.RankPreference[message.rankPreference] === undefined ? message.rankPreference : $root.google.maps.places.v1.SearchNearbyRequest.RankPreference[message.rankPreference] : message.rankPreference;
|
|
13102
|
+
if (message.routingParameters != null && message.hasOwnProperty("routingParameters"))
|
|
13103
|
+
object.routingParameters = $root.google.maps.places.v1.RoutingParameters.toObject(message.routingParameters, options);
|
|
12730
13104
|
return object;
|
|
12731
13105
|
};
|
|
12732
13106
|
|
|
@@ -13009,6 +13383,7 @@
|
|
|
13009
13383
|
* @memberof google.maps.places.v1
|
|
13010
13384
|
* @interface ISearchNearbyResponse
|
|
13011
13385
|
* @property {Array.<google.maps.places.v1.IPlace>|null} [places] SearchNearbyResponse places
|
|
13386
|
+
* @property {Array.<google.maps.places.v1.IRoutingSummary>|null} [routingSummaries] SearchNearbyResponse routingSummaries
|
|
13012
13387
|
*/
|
|
13013
13388
|
|
|
13014
13389
|
/**
|
|
@@ -13021,6 +13396,7 @@
|
|
|
13021
13396
|
*/
|
|
13022
13397
|
function SearchNearbyResponse(properties) {
|
|
13023
13398
|
this.places = [];
|
|
13399
|
+
this.routingSummaries = [];
|
|
13024
13400
|
if (properties)
|
|
13025
13401
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
13026
13402
|
if (properties[keys[i]] != null)
|
|
@@ -13035,6 +13411,14 @@
|
|
|
13035
13411
|
*/
|
|
13036
13412
|
SearchNearbyResponse.prototype.places = $util.emptyArray;
|
|
13037
13413
|
|
|
13414
|
+
/**
|
|
13415
|
+
* SearchNearbyResponse routingSummaries.
|
|
13416
|
+
* @member {Array.<google.maps.places.v1.IRoutingSummary>} routingSummaries
|
|
13417
|
+
* @memberof google.maps.places.v1.SearchNearbyResponse
|
|
13418
|
+
* @instance
|
|
13419
|
+
*/
|
|
13420
|
+
SearchNearbyResponse.prototype.routingSummaries = $util.emptyArray;
|
|
13421
|
+
|
|
13038
13422
|
/**
|
|
13039
13423
|
* Creates a new SearchNearbyResponse instance using the specified properties.
|
|
13040
13424
|
* @function create
|
|
@@ -13062,6 +13446,9 @@
|
|
|
13062
13446
|
if (message.places != null && message.places.length)
|
|
13063
13447
|
for (var i = 0; i < message.places.length; ++i)
|
|
13064
13448
|
$root.google.maps.places.v1.Place.encode(message.places[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
13449
|
+
if (message.routingSummaries != null && message.routingSummaries.length)
|
|
13450
|
+
for (var i = 0; i < message.routingSummaries.length; ++i)
|
|
13451
|
+
$root.google.maps.places.v1.RoutingSummary.encode(message.routingSummaries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
13065
13452
|
return writer;
|
|
13066
13453
|
};
|
|
13067
13454
|
|
|
@@ -13102,6 +13489,12 @@
|
|
|
13102
13489
|
message.places.push($root.google.maps.places.v1.Place.decode(reader, reader.uint32()));
|
|
13103
13490
|
break;
|
|
13104
13491
|
}
|
|
13492
|
+
case 2: {
|
|
13493
|
+
if (!(message.routingSummaries && message.routingSummaries.length))
|
|
13494
|
+
message.routingSummaries = [];
|
|
13495
|
+
message.routingSummaries.push($root.google.maps.places.v1.RoutingSummary.decode(reader, reader.uint32()));
|
|
13496
|
+
break;
|
|
13497
|
+
}
|
|
13105
13498
|
default:
|
|
13106
13499
|
reader.skipType(tag & 7);
|
|
13107
13500
|
break;
|
|
@@ -13146,6 +13539,15 @@
|
|
|
13146
13539
|
return "places." + error;
|
|
13147
13540
|
}
|
|
13148
13541
|
}
|
|
13542
|
+
if (message.routingSummaries != null && message.hasOwnProperty("routingSummaries")) {
|
|
13543
|
+
if (!Array.isArray(message.routingSummaries))
|
|
13544
|
+
return "routingSummaries: array expected";
|
|
13545
|
+
for (var i = 0; i < message.routingSummaries.length; ++i) {
|
|
13546
|
+
var error = $root.google.maps.places.v1.RoutingSummary.verify(message.routingSummaries[i]);
|
|
13547
|
+
if (error)
|
|
13548
|
+
return "routingSummaries." + error;
|
|
13549
|
+
}
|
|
13550
|
+
}
|
|
13149
13551
|
return null;
|
|
13150
13552
|
};
|
|
13151
13553
|
|
|
@@ -13171,6 +13573,16 @@
|
|
|
13171
13573
|
message.places[i] = $root.google.maps.places.v1.Place.fromObject(object.places[i]);
|
|
13172
13574
|
}
|
|
13173
13575
|
}
|
|
13576
|
+
if (object.routingSummaries) {
|
|
13577
|
+
if (!Array.isArray(object.routingSummaries))
|
|
13578
|
+
throw TypeError(".google.maps.places.v1.SearchNearbyResponse.routingSummaries: array expected");
|
|
13579
|
+
message.routingSummaries = [];
|
|
13580
|
+
for (var i = 0; i < object.routingSummaries.length; ++i) {
|
|
13581
|
+
if (typeof object.routingSummaries[i] !== "object")
|
|
13582
|
+
throw TypeError(".google.maps.places.v1.SearchNearbyResponse.routingSummaries: object expected");
|
|
13583
|
+
message.routingSummaries[i] = $root.google.maps.places.v1.RoutingSummary.fromObject(object.routingSummaries[i]);
|
|
13584
|
+
}
|
|
13585
|
+
}
|
|
13174
13586
|
return message;
|
|
13175
13587
|
};
|
|
13176
13588
|
|
|
@@ -13187,13 +13599,20 @@
|
|
|
13187
13599
|
if (!options)
|
|
13188
13600
|
options = {};
|
|
13189
13601
|
var object = {};
|
|
13190
|
-
if (options.arrays || options.defaults)
|
|
13602
|
+
if (options.arrays || options.defaults) {
|
|
13191
13603
|
object.places = [];
|
|
13604
|
+
object.routingSummaries = [];
|
|
13605
|
+
}
|
|
13192
13606
|
if (message.places && message.places.length) {
|
|
13193
13607
|
object.places = [];
|
|
13194
13608
|
for (var j = 0; j < message.places.length; ++j)
|
|
13195
13609
|
object.places[j] = $root.google.maps.places.v1.Place.toObject(message.places[j], options);
|
|
13196
13610
|
}
|
|
13611
|
+
if (message.routingSummaries && message.routingSummaries.length) {
|
|
13612
|
+
object.routingSummaries = [];
|
|
13613
|
+
for (var j = 0; j < message.routingSummaries.length; ++j)
|
|
13614
|
+
object.routingSummaries[j] = $root.google.maps.places.v1.RoutingSummary.toObject(message.routingSummaries[j], options);
|
|
13615
|
+
}
|
|
13197
13616
|
return object;
|
|
13198
13617
|
};
|
|
13199
13618
|
|
|
@@ -13245,6 +13664,8 @@
|
|
|
13245
13664
|
* @property {google.maps.places.v1.SearchTextRequest.ILocationBias|null} [locationBias] SearchTextRequest locationBias
|
|
13246
13665
|
* @property {google.maps.places.v1.SearchTextRequest.ILocationRestriction|null} [locationRestriction] SearchTextRequest locationRestriction
|
|
13247
13666
|
* @property {google.maps.places.v1.SearchTextRequest.IEVOptions|null} [evOptions] SearchTextRequest evOptions
|
|
13667
|
+
* @property {google.maps.places.v1.IRoutingParameters|null} [routingParameters] SearchTextRequest routingParameters
|
|
13668
|
+
* @property {google.maps.places.v1.SearchTextRequest.ISearchAlongRouteParameters|null} [searchAlongRouteParameters] SearchTextRequest searchAlongRouteParameters
|
|
13248
13669
|
*/
|
|
13249
13670
|
|
|
13250
13671
|
/**
|
|
@@ -13367,6 +13788,22 @@
|
|
|
13367
13788
|
*/
|
|
13368
13789
|
SearchTextRequest.prototype.evOptions = null;
|
|
13369
13790
|
|
|
13791
|
+
/**
|
|
13792
|
+
* SearchTextRequest routingParameters.
|
|
13793
|
+
* @member {google.maps.places.v1.IRoutingParameters|null|undefined} routingParameters
|
|
13794
|
+
* @memberof google.maps.places.v1.SearchTextRequest
|
|
13795
|
+
* @instance
|
|
13796
|
+
*/
|
|
13797
|
+
SearchTextRequest.prototype.routingParameters = null;
|
|
13798
|
+
|
|
13799
|
+
/**
|
|
13800
|
+
* SearchTextRequest searchAlongRouteParameters.
|
|
13801
|
+
* @member {google.maps.places.v1.SearchTextRequest.ISearchAlongRouteParameters|null|undefined} searchAlongRouteParameters
|
|
13802
|
+
* @memberof google.maps.places.v1.SearchTextRequest
|
|
13803
|
+
* @instance
|
|
13804
|
+
*/
|
|
13805
|
+
SearchTextRequest.prototype.searchAlongRouteParameters = null;
|
|
13806
|
+
|
|
13370
13807
|
/**
|
|
13371
13808
|
* Creates a new SearchTextRequest instance using the specified properties.
|
|
13372
13809
|
* @function create
|
|
@@ -13421,6 +13858,10 @@
|
|
|
13421
13858
|
$root.google.maps.places.v1.SearchTextRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
|
|
13422
13859
|
if (message.evOptions != null && Object.hasOwnProperty.call(message, "evOptions"))
|
|
13423
13860
|
$root.google.maps.places.v1.SearchTextRequest.EVOptions.encode(message.evOptions, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
|
|
13861
|
+
if (message.routingParameters != null && Object.hasOwnProperty.call(message, "routingParameters"))
|
|
13862
|
+
$root.google.maps.places.v1.RoutingParameters.encode(message.routingParameters, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
|
|
13863
|
+
if (message.searchAlongRouteParameters != null && Object.hasOwnProperty.call(message, "searchAlongRouteParameters"))
|
|
13864
|
+
$root.google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters.encode(message.searchAlongRouteParameters, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim();
|
|
13424
13865
|
return writer;
|
|
13425
13866
|
};
|
|
13426
13867
|
|
|
@@ -13514,6 +13955,14 @@
|
|
|
13514
13955
|
message.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.decode(reader, reader.uint32());
|
|
13515
13956
|
break;
|
|
13516
13957
|
}
|
|
13958
|
+
case 16: {
|
|
13959
|
+
message.routingParameters = $root.google.maps.places.v1.RoutingParameters.decode(reader, reader.uint32());
|
|
13960
|
+
break;
|
|
13961
|
+
}
|
|
13962
|
+
case 17: {
|
|
13963
|
+
message.searchAlongRouteParameters = $root.google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters.decode(reader, reader.uint32());
|
|
13964
|
+
break;
|
|
13965
|
+
}
|
|
13517
13966
|
default:
|
|
13518
13967
|
reader.skipType(tag & 7);
|
|
13519
13968
|
break;
|
|
@@ -13613,6 +14062,16 @@
|
|
|
13613
14062
|
if (error)
|
|
13614
14063
|
return "evOptions." + error;
|
|
13615
14064
|
}
|
|
14065
|
+
if (message.routingParameters != null && message.hasOwnProperty("routingParameters")) {
|
|
14066
|
+
var error = $root.google.maps.places.v1.RoutingParameters.verify(message.routingParameters);
|
|
14067
|
+
if (error)
|
|
14068
|
+
return "routingParameters." + error;
|
|
14069
|
+
}
|
|
14070
|
+
if (message.searchAlongRouteParameters != null && message.hasOwnProperty("searchAlongRouteParameters")) {
|
|
14071
|
+
var error = $root.google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters.verify(message.searchAlongRouteParameters);
|
|
14072
|
+
if (error)
|
|
14073
|
+
return "searchAlongRouteParameters." + error;
|
|
14074
|
+
}
|
|
13616
14075
|
return null;
|
|
13617
14076
|
};
|
|
13618
14077
|
|
|
@@ -13716,6 +14175,16 @@
|
|
|
13716
14175
|
throw TypeError(".google.maps.places.v1.SearchTextRequest.evOptions: object expected");
|
|
13717
14176
|
message.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.fromObject(object.evOptions);
|
|
13718
14177
|
}
|
|
14178
|
+
if (object.routingParameters != null) {
|
|
14179
|
+
if (typeof object.routingParameters !== "object")
|
|
14180
|
+
throw TypeError(".google.maps.places.v1.SearchTextRequest.routingParameters: object expected");
|
|
14181
|
+
message.routingParameters = $root.google.maps.places.v1.RoutingParameters.fromObject(object.routingParameters);
|
|
14182
|
+
}
|
|
14183
|
+
if (object.searchAlongRouteParameters != null) {
|
|
14184
|
+
if (typeof object.searchAlongRouteParameters !== "object")
|
|
14185
|
+
throw TypeError(".google.maps.places.v1.SearchTextRequest.searchAlongRouteParameters: object expected");
|
|
14186
|
+
message.searchAlongRouteParameters = $root.google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters.fromObject(object.searchAlongRouteParameters);
|
|
14187
|
+
}
|
|
13719
14188
|
return message;
|
|
13720
14189
|
};
|
|
13721
14190
|
|
|
@@ -13747,6 +14216,8 @@
|
|
|
13747
14216
|
object.locationBias = null;
|
|
13748
14217
|
object.locationRestriction = null;
|
|
13749
14218
|
object.evOptions = null;
|
|
14219
|
+
object.routingParameters = null;
|
|
14220
|
+
object.searchAlongRouteParameters = null;
|
|
13750
14221
|
}
|
|
13751
14222
|
if (message.textQuery != null && message.hasOwnProperty("textQuery"))
|
|
13752
14223
|
object.textQuery = message.textQuery;
|
|
@@ -13777,6 +14248,10 @@
|
|
|
13777
14248
|
object.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.toObject(message.locationRestriction, options);
|
|
13778
14249
|
if (message.evOptions != null && message.hasOwnProperty("evOptions"))
|
|
13779
14250
|
object.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.toObject(message.evOptions, options);
|
|
14251
|
+
if (message.routingParameters != null && message.hasOwnProperty("routingParameters"))
|
|
14252
|
+
object.routingParameters = $root.google.maps.places.v1.RoutingParameters.toObject(message.routingParameters, options);
|
|
14253
|
+
if (message.searchAlongRouteParameters != null && message.hasOwnProperty("searchAlongRouteParameters"))
|
|
14254
|
+
object.searchAlongRouteParameters = $root.google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters.toObject(message.searchAlongRouteParameters, options);
|
|
13780
14255
|
return object;
|
|
13781
14256
|
};
|
|
13782
14257
|
|
|
@@ -14621,6 +15096,214 @@
|
|
|
14621
15096
|
return EVOptions;
|
|
14622
15097
|
})();
|
|
14623
15098
|
|
|
15099
|
+
SearchTextRequest.SearchAlongRouteParameters = (function() {
|
|
15100
|
+
|
|
15101
|
+
/**
|
|
15102
|
+
* Properties of a SearchAlongRouteParameters.
|
|
15103
|
+
* @memberof google.maps.places.v1.SearchTextRequest
|
|
15104
|
+
* @interface ISearchAlongRouteParameters
|
|
15105
|
+
* @property {google.maps.places.v1.IPolyline|null} [polyline] SearchAlongRouteParameters polyline
|
|
15106
|
+
*/
|
|
15107
|
+
|
|
15108
|
+
/**
|
|
15109
|
+
* Constructs a new SearchAlongRouteParameters.
|
|
15110
|
+
* @memberof google.maps.places.v1.SearchTextRequest
|
|
15111
|
+
* @classdesc Represents a SearchAlongRouteParameters.
|
|
15112
|
+
* @implements ISearchAlongRouteParameters
|
|
15113
|
+
* @constructor
|
|
15114
|
+
* @param {google.maps.places.v1.SearchTextRequest.ISearchAlongRouteParameters=} [properties] Properties to set
|
|
15115
|
+
*/
|
|
15116
|
+
function SearchAlongRouteParameters(properties) {
|
|
15117
|
+
if (properties)
|
|
15118
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
15119
|
+
if (properties[keys[i]] != null)
|
|
15120
|
+
this[keys[i]] = properties[keys[i]];
|
|
15121
|
+
}
|
|
15122
|
+
|
|
15123
|
+
/**
|
|
15124
|
+
* SearchAlongRouteParameters polyline.
|
|
15125
|
+
* @member {google.maps.places.v1.IPolyline|null|undefined} polyline
|
|
15126
|
+
* @memberof google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters
|
|
15127
|
+
* @instance
|
|
15128
|
+
*/
|
|
15129
|
+
SearchAlongRouteParameters.prototype.polyline = null;
|
|
15130
|
+
|
|
15131
|
+
/**
|
|
15132
|
+
* Creates a new SearchAlongRouteParameters instance using the specified properties.
|
|
15133
|
+
* @function create
|
|
15134
|
+
* @memberof google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters
|
|
15135
|
+
* @static
|
|
15136
|
+
* @param {google.maps.places.v1.SearchTextRequest.ISearchAlongRouteParameters=} [properties] Properties to set
|
|
15137
|
+
* @returns {google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters} SearchAlongRouteParameters instance
|
|
15138
|
+
*/
|
|
15139
|
+
SearchAlongRouteParameters.create = function create(properties) {
|
|
15140
|
+
return new SearchAlongRouteParameters(properties);
|
|
15141
|
+
};
|
|
15142
|
+
|
|
15143
|
+
/**
|
|
15144
|
+
* Encodes the specified SearchAlongRouteParameters message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters.verify|verify} messages.
|
|
15145
|
+
* @function encode
|
|
15146
|
+
* @memberof google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters
|
|
15147
|
+
* @static
|
|
15148
|
+
* @param {google.maps.places.v1.SearchTextRequest.ISearchAlongRouteParameters} message SearchAlongRouteParameters message or plain object to encode
|
|
15149
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
15150
|
+
* @returns {$protobuf.Writer} Writer
|
|
15151
|
+
*/
|
|
15152
|
+
SearchAlongRouteParameters.encode = function encode(message, writer) {
|
|
15153
|
+
if (!writer)
|
|
15154
|
+
writer = $Writer.create();
|
|
15155
|
+
if (message.polyline != null && Object.hasOwnProperty.call(message, "polyline"))
|
|
15156
|
+
$root.google.maps.places.v1.Polyline.encode(message.polyline, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
15157
|
+
return writer;
|
|
15158
|
+
};
|
|
15159
|
+
|
|
15160
|
+
/**
|
|
15161
|
+
* Encodes the specified SearchAlongRouteParameters message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters.verify|verify} messages.
|
|
15162
|
+
* @function encodeDelimited
|
|
15163
|
+
* @memberof google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters
|
|
15164
|
+
* @static
|
|
15165
|
+
* @param {google.maps.places.v1.SearchTextRequest.ISearchAlongRouteParameters} message SearchAlongRouteParameters message or plain object to encode
|
|
15166
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
15167
|
+
* @returns {$protobuf.Writer} Writer
|
|
15168
|
+
*/
|
|
15169
|
+
SearchAlongRouteParameters.encodeDelimited = function encodeDelimited(message, writer) {
|
|
15170
|
+
return this.encode(message, writer).ldelim();
|
|
15171
|
+
};
|
|
15172
|
+
|
|
15173
|
+
/**
|
|
15174
|
+
* Decodes a SearchAlongRouteParameters message from the specified reader or buffer.
|
|
15175
|
+
* @function decode
|
|
15176
|
+
* @memberof google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters
|
|
15177
|
+
* @static
|
|
15178
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
15179
|
+
* @param {number} [length] Message length if known beforehand
|
|
15180
|
+
* @returns {google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters} SearchAlongRouteParameters
|
|
15181
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
15182
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
15183
|
+
*/
|
|
15184
|
+
SearchAlongRouteParameters.decode = function decode(reader, length) {
|
|
15185
|
+
if (!(reader instanceof $Reader))
|
|
15186
|
+
reader = $Reader.create(reader);
|
|
15187
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters();
|
|
15188
|
+
while (reader.pos < end) {
|
|
15189
|
+
var tag = reader.uint32();
|
|
15190
|
+
switch (tag >>> 3) {
|
|
15191
|
+
case 1: {
|
|
15192
|
+
message.polyline = $root.google.maps.places.v1.Polyline.decode(reader, reader.uint32());
|
|
15193
|
+
break;
|
|
15194
|
+
}
|
|
15195
|
+
default:
|
|
15196
|
+
reader.skipType(tag & 7);
|
|
15197
|
+
break;
|
|
15198
|
+
}
|
|
15199
|
+
}
|
|
15200
|
+
return message;
|
|
15201
|
+
};
|
|
15202
|
+
|
|
15203
|
+
/**
|
|
15204
|
+
* Decodes a SearchAlongRouteParameters message from the specified reader or buffer, length delimited.
|
|
15205
|
+
* @function decodeDelimited
|
|
15206
|
+
* @memberof google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters
|
|
15207
|
+
* @static
|
|
15208
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
15209
|
+
* @returns {google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters} SearchAlongRouteParameters
|
|
15210
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
15211
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
15212
|
+
*/
|
|
15213
|
+
SearchAlongRouteParameters.decodeDelimited = function decodeDelimited(reader) {
|
|
15214
|
+
if (!(reader instanceof $Reader))
|
|
15215
|
+
reader = new $Reader(reader);
|
|
15216
|
+
return this.decode(reader, reader.uint32());
|
|
15217
|
+
};
|
|
15218
|
+
|
|
15219
|
+
/**
|
|
15220
|
+
* Verifies a SearchAlongRouteParameters message.
|
|
15221
|
+
* @function verify
|
|
15222
|
+
* @memberof google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters
|
|
15223
|
+
* @static
|
|
15224
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
15225
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
15226
|
+
*/
|
|
15227
|
+
SearchAlongRouteParameters.verify = function verify(message) {
|
|
15228
|
+
if (typeof message !== "object" || message === null)
|
|
15229
|
+
return "object expected";
|
|
15230
|
+
if (message.polyline != null && message.hasOwnProperty("polyline")) {
|
|
15231
|
+
var error = $root.google.maps.places.v1.Polyline.verify(message.polyline);
|
|
15232
|
+
if (error)
|
|
15233
|
+
return "polyline." + error;
|
|
15234
|
+
}
|
|
15235
|
+
return null;
|
|
15236
|
+
};
|
|
15237
|
+
|
|
15238
|
+
/**
|
|
15239
|
+
* Creates a SearchAlongRouteParameters message from a plain object. Also converts values to their respective internal types.
|
|
15240
|
+
* @function fromObject
|
|
15241
|
+
* @memberof google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters
|
|
15242
|
+
* @static
|
|
15243
|
+
* @param {Object.<string,*>} object Plain object
|
|
15244
|
+
* @returns {google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters} SearchAlongRouteParameters
|
|
15245
|
+
*/
|
|
15246
|
+
SearchAlongRouteParameters.fromObject = function fromObject(object) {
|
|
15247
|
+
if (object instanceof $root.google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters)
|
|
15248
|
+
return object;
|
|
15249
|
+
var message = new $root.google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters();
|
|
15250
|
+
if (object.polyline != null) {
|
|
15251
|
+
if (typeof object.polyline !== "object")
|
|
15252
|
+
throw TypeError(".google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters.polyline: object expected");
|
|
15253
|
+
message.polyline = $root.google.maps.places.v1.Polyline.fromObject(object.polyline);
|
|
15254
|
+
}
|
|
15255
|
+
return message;
|
|
15256
|
+
};
|
|
15257
|
+
|
|
15258
|
+
/**
|
|
15259
|
+
* Creates a plain object from a SearchAlongRouteParameters message. Also converts values to other types if specified.
|
|
15260
|
+
* @function toObject
|
|
15261
|
+
* @memberof google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters
|
|
15262
|
+
* @static
|
|
15263
|
+
* @param {google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters} message SearchAlongRouteParameters
|
|
15264
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
15265
|
+
* @returns {Object.<string,*>} Plain object
|
|
15266
|
+
*/
|
|
15267
|
+
SearchAlongRouteParameters.toObject = function toObject(message, options) {
|
|
15268
|
+
if (!options)
|
|
15269
|
+
options = {};
|
|
15270
|
+
var object = {};
|
|
15271
|
+
if (options.defaults)
|
|
15272
|
+
object.polyline = null;
|
|
15273
|
+
if (message.polyline != null && message.hasOwnProperty("polyline"))
|
|
15274
|
+
object.polyline = $root.google.maps.places.v1.Polyline.toObject(message.polyline, options);
|
|
15275
|
+
return object;
|
|
15276
|
+
};
|
|
15277
|
+
|
|
15278
|
+
/**
|
|
15279
|
+
* Converts this SearchAlongRouteParameters to JSON.
|
|
15280
|
+
* @function toJSON
|
|
15281
|
+
* @memberof google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters
|
|
15282
|
+
* @instance
|
|
15283
|
+
* @returns {Object.<string,*>} JSON object
|
|
15284
|
+
*/
|
|
15285
|
+
SearchAlongRouteParameters.prototype.toJSON = function toJSON() {
|
|
15286
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
15287
|
+
};
|
|
15288
|
+
|
|
15289
|
+
/**
|
|
15290
|
+
* Gets the default type url for SearchAlongRouteParameters
|
|
15291
|
+
* @function getTypeUrl
|
|
15292
|
+
* @memberof google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters
|
|
15293
|
+
* @static
|
|
15294
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
15295
|
+
* @returns {string} The default type url
|
|
15296
|
+
*/
|
|
15297
|
+
SearchAlongRouteParameters.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
15298
|
+
if (typeUrlPrefix === undefined) {
|
|
15299
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
15300
|
+
}
|
|
15301
|
+
return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.SearchAlongRouteParameters";
|
|
15302
|
+
};
|
|
15303
|
+
|
|
15304
|
+
return SearchAlongRouteParameters;
|
|
15305
|
+
})();
|
|
15306
|
+
|
|
14624
15307
|
return SearchTextRequest;
|
|
14625
15308
|
})();
|
|
14626
15309
|
|
|
@@ -14631,6 +15314,7 @@
|
|
|
14631
15314
|
* @memberof google.maps.places.v1
|
|
14632
15315
|
* @interface ISearchTextResponse
|
|
14633
15316
|
* @property {Array.<google.maps.places.v1.IPlace>|null} [places] SearchTextResponse places
|
|
15317
|
+
* @property {Array.<google.maps.places.v1.IRoutingSummary>|null} [routingSummaries] SearchTextResponse routingSummaries
|
|
14634
15318
|
* @property {Array.<google.maps.places.v1.IContextualContent>|null} [contextualContents] SearchTextResponse contextualContents
|
|
14635
15319
|
*/
|
|
14636
15320
|
|
|
@@ -14644,6 +15328,7 @@
|
|
|
14644
15328
|
*/
|
|
14645
15329
|
function SearchTextResponse(properties) {
|
|
14646
15330
|
this.places = [];
|
|
15331
|
+
this.routingSummaries = [];
|
|
14647
15332
|
this.contextualContents = [];
|
|
14648
15333
|
if (properties)
|
|
14649
15334
|
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
@@ -14659,6 +15344,14 @@
|
|
|
14659
15344
|
*/
|
|
14660
15345
|
SearchTextResponse.prototype.places = $util.emptyArray;
|
|
14661
15346
|
|
|
15347
|
+
/**
|
|
15348
|
+
* SearchTextResponse routingSummaries.
|
|
15349
|
+
* @member {Array.<google.maps.places.v1.IRoutingSummary>} routingSummaries
|
|
15350
|
+
* @memberof google.maps.places.v1.SearchTextResponse
|
|
15351
|
+
* @instance
|
|
15352
|
+
*/
|
|
15353
|
+
SearchTextResponse.prototype.routingSummaries = $util.emptyArray;
|
|
15354
|
+
|
|
14662
15355
|
/**
|
|
14663
15356
|
* SearchTextResponse contextualContents.
|
|
14664
15357
|
* @member {Array.<google.maps.places.v1.IContextualContent>} contextualContents
|
|
@@ -14694,6 +15387,9 @@
|
|
|
14694
15387
|
if (message.places != null && message.places.length)
|
|
14695
15388
|
for (var i = 0; i < message.places.length; ++i)
|
|
14696
15389
|
$root.google.maps.places.v1.Place.encode(message.places[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
15390
|
+
if (message.routingSummaries != null && message.routingSummaries.length)
|
|
15391
|
+
for (var i = 0; i < message.routingSummaries.length; ++i)
|
|
15392
|
+
$root.google.maps.places.v1.RoutingSummary.encode(message.routingSummaries[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
14697
15393
|
if (message.contextualContents != null && message.contextualContents.length)
|
|
14698
15394
|
for (var i = 0; i < message.contextualContents.length; ++i)
|
|
14699
15395
|
$root.google.maps.places.v1.ContextualContent.encode(message.contextualContents[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
@@ -14737,6 +15433,12 @@
|
|
|
14737
15433
|
message.places.push($root.google.maps.places.v1.Place.decode(reader, reader.uint32()));
|
|
14738
15434
|
break;
|
|
14739
15435
|
}
|
|
15436
|
+
case 2: {
|
|
15437
|
+
if (!(message.routingSummaries && message.routingSummaries.length))
|
|
15438
|
+
message.routingSummaries = [];
|
|
15439
|
+
message.routingSummaries.push($root.google.maps.places.v1.RoutingSummary.decode(reader, reader.uint32()));
|
|
15440
|
+
break;
|
|
15441
|
+
}
|
|
14740
15442
|
case 3: {
|
|
14741
15443
|
if (!(message.contextualContents && message.contextualContents.length))
|
|
14742
15444
|
message.contextualContents = [];
|
|
@@ -14787,6 +15489,15 @@
|
|
|
14787
15489
|
return "places." + error;
|
|
14788
15490
|
}
|
|
14789
15491
|
}
|
|
15492
|
+
if (message.routingSummaries != null && message.hasOwnProperty("routingSummaries")) {
|
|
15493
|
+
if (!Array.isArray(message.routingSummaries))
|
|
15494
|
+
return "routingSummaries: array expected";
|
|
15495
|
+
for (var i = 0; i < message.routingSummaries.length; ++i) {
|
|
15496
|
+
var error = $root.google.maps.places.v1.RoutingSummary.verify(message.routingSummaries[i]);
|
|
15497
|
+
if (error)
|
|
15498
|
+
return "routingSummaries." + error;
|
|
15499
|
+
}
|
|
15500
|
+
}
|
|
14790
15501
|
if (message.contextualContents != null && message.hasOwnProperty("contextualContents")) {
|
|
14791
15502
|
if (!Array.isArray(message.contextualContents))
|
|
14792
15503
|
return "contextualContents: array expected";
|
|
@@ -14821,6 +15532,16 @@
|
|
|
14821
15532
|
message.places[i] = $root.google.maps.places.v1.Place.fromObject(object.places[i]);
|
|
14822
15533
|
}
|
|
14823
15534
|
}
|
|
15535
|
+
if (object.routingSummaries) {
|
|
15536
|
+
if (!Array.isArray(object.routingSummaries))
|
|
15537
|
+
throw TypeError(".google.maps.places.v1.SearchTextResponse.routingSummaries: array expected");
|
|
15538
|
+
message.routingSummaries = [];
|
|
15539
|
+
for (var i = 0; i < object.routingSummaries.length; ++i) {
|
|
15540
|
+
if (typeof object.routingSummaries[i] !== "object")
|
|
15541
|
+
throw TypeError(".google.maps.places.v1.SearchTextResponse.routingSummaries: object expected");
|
|
15542
|
+
message.routingSummaries[i] = $root.google.maps.places.v1.RoutingSummary.fromObject(object.routingSummaries[i]);
|
|
15543
|
+
}
|
|
15544
|
+
}
|
|
14824
15545
|
if (object.contextualContents) {
|
|
14825
15546
|
if (!Array.isArray(object.contextualContents))
|
|
14826
15547
|
throw TypeError(".google.maps.places.v1.SearchTextResponse.contextualContents: array expected");
|
|
@@ -14849,6 +15570,7 @@
|
|
|
14849
15570
|
var object = {};
|
|
14850
15571
|
if (options.arrays || options.defaults) {
|
|
14851
15572
|
object.places = [];
|
|
15573
|
+
object.routingSummaries = [];
|
|
14852
15574
|
object.contextualContents = [];
|
|
14853
15575
|
}
|
|
14854
15576
|
if (message.places && message.places.length) {
|
|
@@ -14856,6 +15578,11 @@
|
|
|
14856
15578
|
for (var j = 0; j < message.places.length; ++j)
|
|
14857
15579
|
object.places[j] = $root.google.maps.places.v1.Place.toObject(message.places[j], options);
|
|
14858
15580
|
}
|
|
15581
|
+
if (message.routingSummaries && message.routingSummaries.length) {
|
|
15582
|
+
object.routingSummaries = [];
|
|
15583
|
+
for (var j = 0; j < message.routingSummaries.length; ++j)
|
|
15584
|
+
object.routingSummaries[j] = $root.google.maps.places.v1.RoutingSummary.toObject(message.routingSummaries[j], options);
|
|
15585
|
+
}
|
|
14859
15586
|
if (message.contextualContents && message.contextualContents.length) {
|
|
14860
15587
|
object.contextualContents = [];
|
|
14861
15588
|
for (var j = 0; j < message.contextualContents.length; ++j)
|
|
@@ -18454,6 +19181,994 @@
|
|
|
18454
19181
|
return AutocompletePlacesResponse;
|
|
18455
19182
|
})();
|
|
18456
19183
|
|
|
19184
|
+
v1.Polyline = (function() {
|
|
19185
|
+
|
|
19186
|
+
/**
|
|
19187
|
+
* Properties of a Polyline.
|
|
19188
|
+
* @memberof google.maps.places.v1
|
|
19189
|
+
* @interface IPolyline
|
|
19190
|
+
* @property {string|null} [encodedPolyline] Polyline encodedPolyline
|
|
19191
|
+
*/
|
|
19192
|
+
|
|
19193
|
+
/**
|
|
19194
|
+
* Constructs a new Polyline.
|
|
19195
|
+
* @memberof google.maps.places.v1
|
|
19196
|
+
* @classdesc Represents a Polyline.
|
|
19197
|
+
* @implements IPolyline
|
|
19198
|
+
* @constructor
|
|
19199
|
+
* @param {google.maps.places.v1.IPolyline=} [properties] Properties to set
|
|
19200
|
+
*/
|
|
19201
|
+
function Polyline(properties) {
|
|
19202
|
+
if (properties)
|
|
19203
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
19204
|
+
if (properties[keys[i]] != null)
|
|
19205
|
+
this[keys[i]] = properties[keys[i]];
|
|
19206
|
+
}
|
|
19207
|
+
|
|
19208
|
+
/**
|
|
19209
|
+
* Polyline encodedPolyline.
|
|
19210
|
+
* @member {string|null|undefined} encodedPolyline
|
|
19211
|
+
* @memberof google.maps.places.v1.Polyline
|
|
19212
|
+
* @instance
|
|
19213
|
+
*/
|
|
19214
|
+
Polyline.prototype.encodedPolyline = null;
|
|
19215
|
+
|
|
19216
|
+
// OneOf field names bound to virtual getters and setters
|
|
19217
|
+
var $oneOfFields;
|
|
19218
|
+
|
|
19219
|
+
/**
|
|
19220
|
+
* Polyline polylineType.
|
|
19221
|
+
* @member {"encodedPolyline"|undefined} polylineType
|
|
19222
|
+
* @memberof google.maps.places.v1.Polyline
|
|
19223
|
+
* @instance
|
|
19224
|
+
*/
|
|
19225
|
+
Object.defineProperty(Polyline.prototype, "polylineType", {
|
|
19226
|
+
get: $util.oneOfGetter($oneOfFields = ["encodedPolyline"]),
|
|
19227
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
19228
|
+
});
|
|
19229
|
+
|
|
19230
|
+
/**
|
|
19231
|
+
* Creates a new Polyline instance using the specified properties.
|
|
19232
|
+
* @function create
|
|
19233
|
+
* @memberof google.maps.places.v1.Polyline
|
|
19234
|
+
* @static
|
|
19235
|
+
* @param {google.maps.places.v1.IPolyline=} [properties] Properties to set
|
|
19236
|
+
* @returns {google.maps.places.v1.Polyline} Polyline instance
|
|
19237
|
+
*/
|
|
19238
|
+
Polyline.create = function create(properties) {
|
|
19239
|
+
return new Polyline(properties);
|
|
19240
|
+
};
|
|
19241
|
+
|
|
19242
|
+
/**
|
|
19243
|
+
* Encodes the specified Polyline message. Does not implicitly {@link google.maps.places.v1.Polyline.verify|verify} messages.
|
|
19244
|
+
* @function encode
|
|
19245
|
+
* @memberof google.maps.places.v1.Polyline
|
|
19246
|
+
* @static
|
|
19247
|
+
* @param {google.maps.places.v1.IPolyline} message Polyline message or plain object to encode
|
|
19248
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
19249
|
+
* @returns {$protobuf.Writer} Writer
|
|
19250
|
+
*/
|
|
19251
|
+
Polyline.encode = function encode(message, writer) {
|
|
19252
|
+
if (!writer)
|
|
19253
|
+
writer = $Writer.create();
|
|
19254
|
+
if (message.encodedPolyline != null && Object.hasOwnProperty.call(message, "encodedPolyline"))
|
|
19255
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.encodedPolyline);
|
|
19256
|
+
return writer;
|
|
19257
|
+
};
|
|
19258
|
+
|
|
19259
|
+
/**
|
|
19260
|
+
* Encodes the specified Polyline message, length delimited. Does not implicitly {@link google.maps.places.v1.Polyline.verify|verify} messages.
|
|
19261
|
+
* @function encodeDelimited
|
|
19262
|
+
* @memberof google.maps.places.v1.Polyline
|
|
19263
|
+
* @static
|
|
19264
|
+
* @param {google.maps.places.v1.IPolyline} message Polyline message or plain object to encode
|
|
19265
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
19266
|
+
* @returns {$protobuf.Writer} Writer
|
|
19267
|
+
*/
|
|
19268
|
+
Polyline.encodeDelimited = function encodeDelimited(message, writer) {
|
|
19269
|
+
return this.encode(message, writer).ldelim();
|
|
19270
|
+
};
|
|
19271
|
+
|
|
19272
|
+
/**
|
|
19273
|
+
* Decodes a Polyline message from the specified reader or buffer.
|
|
19274
|
+
* @function decode
|
|
19275
|
+
* @memberof google.maps.places.v1.Polyline
|
|
19276
|
+
* @static
|
|
19277
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
19278
|
+
* @param {number} [length] Message length if known beforehand
|
|
19279
|
+
* @returns {google.maps.places.v1.Polyline} Polyline
|
|
19280
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
19281
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
19282
|
+
*/
|
|
19283
|
+
Polyline.decode = function decode(reader, length) {
|
|
19284
|
+
if (!(reader instanceof $Reader))
|
|
19285
|
+
reader = $Reader.create(reader);
|
|
19286
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.Polyline();
|
|
19287
|
+
while (reader.pos < end) {
|
|
19288
|
+
var tag = reader.uint32();
|
|
19289
|
+
switch (tag >>> 3) {
|
|
19290
|
+
case 1: {
|
|
19291
|
+
message.encodedPolyline = reader.string();
|
|
19292
|
+
break;
|
|
19293
|
+
}
|
|
19294
|
+
default:
|
|
19295
|
+
reader.skipType(tag & 7);
|
|
19296
|
+
break;
|
|
19297
|
+
}
|
|
19298
|
+
}
|
|
19299
|
+
return message;
|
|
19300
|
+
};
|
|
19301
|
+
|
|
19302
|
+
/**
|
|
19303
|
+
* Decodes a Polyline message from the specified reader or buffer, length delimited.
|
|
19304
|
+
* @function decodeDelimited
|
|
19305
|
+
* @memberof google.maps.places.v1.Polyline
|
|
19306
|
+
* @static
|
|
19307
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
19308
|
+
* @returns {google.maps.places.v1.Polyline} Polyline
|
|
19309
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
19310
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
19311
|
+
*/
|
|
19312
|
+
Polyline.decodeDelimited = function decodeDelimited(reader) {
|
|
19313
|
+
if (!(reader instanceof $Reader))
|
|
19314
|
+
reader = new $Reader(reader);
|
|
19315
|
+
return this.decode(reader, reader.uint32());
|
|
19316
|
+
};
|
|
19317
|
+
|
|
19318
|
+
/**
|
|
19319
|
+
* Verifies a Polyline message.
|
|
19320
|
+
* @function verify
|
|
19321
|
+
* @memberof google.maps.places.v1.Polyline
|
|
19322
|
+
* @static
|
|
19323
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
19324
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
19325
|
+
*/
|
|
19326
|
+
Polyline.verify = function verify(message) {
|
|
19327
|
+
if (typeof message !== "object" || message === null)
|
|
19328
|
+
return "object expected";
|
|
19329
|
+
var properties = {};
|
|
19330
|
+
if (message.encodedPolyline != null && message.hasOwnProperty("encodedPolyline")) {
|
|
19331
|
+
properties.polylineType = 1;
|
|
19332
|
+
if (!$util.isString(message.encodedPolyline))
|
|
19333
|
+
return "encodedPolyline: string expected";
|
|
19334
|
+
}
|
|
19335
|
+
return null;
|
|
19336
|
+
};
|
|
19337
|
+
|
|
19338
|
+
/**
|
|
19339
|
+
* Creates a Polyline message from a plain object. Also converts values to their respective internal types.
|
|
19340
|
+
* @function fromObject
|
|
19341
|
+
* @memberof google.maps.places.v1.Polyline
|
|
19342
|
+
* @static
|
|
19343
|
+
* @param {Object.<string,*>} object Plain object
|
|
19344
|
+
* @returns {google.maps.places.v1.Polyline} Polyline
|
|
19345
|
+
*/
|
|
19346
|
+
Polyline.fromObject = function fromObject(object) {
|
|
19347
|
+
if (object instanceof $root.google.maps.places.v1.Polyline)
|
|
19348
|
+
return object;
|
|
19349
|
+
var message = new $root.google.maps.places.v1.Polyline();
|
|
19350
|
+
if (object.encodedPolyline != null)
|
|
19351
|
+
message.encodedPolyline = String(object.encodedPolyline);
|
|
19352
|
+
return message;
|
|
19353
|
+
};
|
|
19354
|
+
|
|
19355
|
+
/**
|
|
19356
|
+
* Creates a plain object from a Polyline message. Also converts values to other types if specified.
|
|
19357
|
+
* @function toObject
|
|
19358
|
+
* @memberof google.maps.places.v1.Polyline
|
|
19359
|
+
* @static
|
|
19360
|
+
* @param {google.maps.places.v1.Polyline} message Polyline
|
|
19361
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
19362
|
+
* @returns {Object.<string,*>} Plain object
|
|
19363
|
+
*/
|
|
19364
|
+
Polyline.toObject = function toObject(message, options) {
|
|
19365
|
+
if (!options)
|
|
19366
|
+
options = {};
|
|
19367
|
+
var object = {};
|
|
19368
|
+
if (message.encodedPolyline != null && message.hasOwnProperty("encodedPolyline")) {
|
|
19369
|
+
object.encodedPolyline = message.encodedPolyline;
|
|
19370
|
+
if (options.oneofs)
|
|
19371
|
+
object.polylineType = "encodedPolyline";
|
|
19372
|
+
}
|
|
19373
|
+
return object;
|
|
19374
|
+
};
|
|
19375
|
+
|
|
19376
|
+
/**
|
|
19377
|
+
* Converts this Polyline to JSON.
|
|
19378
|
+
* @function toJSON
|
|
19379
|
+
* @memberof google.maps.places.v1.Polyline
|
|
19380
|
+
* @instance
|
|
19381
|
+
* @returns {Object.<string,*>} JSON object
|
|
19382
|
+
*/
|
|
19383
|
+
Polyline.prototype.toJSON = function toJSON() {
|
|
19384
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
19385
|
+
};
|
|
19386
|
+
|
|
19387
|
+
/**
|
|
19388
|
+
* Gets the default type url for Polyline
|
|
19389
|
+
* @function getTypeUrl
|
|
19390
|
+
* @memberof google.maps.places.v1.Polyline
|
|
19391
|
+
* @static
|
|
19392
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
19393
|
+
* @returns {string} The default type url
|
|
19394
|
+
*/
|
|
19395
|
+
Polyline.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
19396
|
+
if (typeUrlPrefix === undefined) {
|
|
19397
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
19398
|
+
}
|
|
19399
|
+
return typeUrlPrefix + "/google.maps.places.v1.Polyline";
|
|
19400
|
+
};
|
|
19401
|
+
|
|
19402
|
+
return Polyline;
|
|
19403
|
+
})();
|
|
19404
|
+
|
|
19405
|
+
v1.RouteModifiers = (function() {
|
|
19406
|
+
|
|
19407
|
+
/**
|
|
19408
|
+
* Properties of a RouteModifiers.
|
|
19409
|
+
* @memberof google.maps.places.v1
|
|
19410
|
+
* @interface IRouteModifiers
|
|
19411
|
+
* @property {boolean|null} [avoidTolls] RouteModifiers avoidTolls
|
|
19412
|
+
* @property {boolean|null} [avoidHighways] RouteModifiers avoidHighways
|
|
19413
|
+
* @property {boolean|null} [avoidFerries] RouteModifiers avoidFerries
|
|
19414
|
+
* @property {boolean|null} [avoidIndoor] RouteModifiers avoidIndoor
|
|
19415
|
+
*/
|
|
19416
|
+
|
|
19417
|
+
/**
|
|
19418
|
+
* Constructs a new RouteModifiers.
|
|
19419
|
+
* @memberof google.maps.places.v1
|
|
19420
|
+
* @classdesc Represents a RouteModifiers.
|
|
19421
|
+
* @implements IRouteModifiers
|
|
19422
|
+
* @constructor
|
|
19423
|
+
* @param {google.maps.places.v1.IRouteModifiers=} [properties] Properties to set
|
|
19424
|
+
*/
|
|
19425
|
+
function RouteModifiers(properties) {
|
|
19426
|
+
if (properties)
|
|
19427
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
19428
|
+
if (properties[keys[i]] != null)
|
|
19429
|
+
this[keys[i]] = properties[keys[i]];
|
|
19430
|
+
}
|
|
19431
|
+
|
|
19432
|
+
/**
|
|
19433
|
+
* RouteModifiers avoidTolls.
|
|
19434
|
+
* @member {boolean} avoidTolls
|
|
19435
|
+
* @memberof google.maps.places.v1.RouteModifiers
|
|
19436
|
+
* @instance
|
|
19437
|
+
*/
|
|
19438
|
+
RouteModifiers.prototype.avoidTolls = false;
|
|
19439
|
+
|
|
19440
|
+
/**
|
|
19441
|
+
* RouteModifiers avoidHighways.
|
|
19442
|
+
* @member {boolean} avoidHighways
|
|
19443
|
+
* @memberof google.maps.places.v1.RouteModifiers
|
|
19444
|
+
* @instance
|
|
19445
|
+
*/
|
|
19446
|
+
RouteModifiers.prototype.avoidHighways = false;
|
|
19447
|
+
|
|
19448
|
+
/**
|
|
19449
|
+
* RouteModifiers avoidFerries.
|
|
19450
|
+
* @member {boolean} avoidFerries
|
|
19451
|
+
* @memberof google.maps.places.v1.RouteModifiers
|
|
19452
|
+
* @instance
|
|
19453
|
+
*/
|
|
19454
|
+
RouteModifiers.prototype.avoidFerries = false;
|
|
19455
|
+
|
|
19456
|
+
/**
|
|
19457
|
+
* RouteModifiers avoidIndoor.
|
|
19458
|
+
* @member {boolean} avoidIndoor
|
|
19459
|
+
* @memberof google.maps.places.v1.RouteModifiers
|
|
19460
|
+
* @instance
|
|
19461
|
+
*/
|
|
19462
|
+
RouteModifiers.prototype.avoidIndoor = false;
|
|
19463
|
+
|
|
19464
|
+
/**
|
|
19465
|
+
* Creates a new RouteModifiers instance using the specified properties.
|
|
19466
|
+
* @function create
|
|
19467
|
+
* @memberof google.maps.places.v1.RouteModifiers
|
|
19468
|
+
* @static
|
|
19469
|
+
* @param {google.maps.places.v1.IRouteModifiers=} [properties] Properties to set
|
|
19470
|
+
* @returns {google.maps.places.v1.RouteModifiers} RouteModifiers instance
|
|
19471
|
+
*/
|
|
19472
|
+
RouteModifiers.create = function create(properties) {
|
|
19473
|
+
return new RouteModifiers(properties);
|
|
19474
|
+
};
|
|
19475
|
+
|
|
19476
|
+
/**
|
|
19477
|
+
* Encodes the specified RouteModifiers message. Does not implicitly {@link google.maps.places.v1.RouteModifiers.verify|verify} messages.
|
|
19478
|
+
* @function encode
|
|
19479
|
+
* @memberof google.maps.places.v1.RouteModifiers
|
|
19480
|
+
* @static
|
|
19481
|
+
* @param {google.maps.places.v1.IRouteModifiers} message RouteModifiers message or plain object to encode
|
|
19482
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
19483
|
+
* @returns {$protobuf.Writer} Writer
|
|
19484
|
+
*/
|
|
19485
|
+
RouteModifiers.encode = function encode(message, writer) {
|
|
19486
|
+
if (!writer)
|
|
19487
|
+
writer = $Writer.create();
|
|
19488
|
+
if (message.avoidTolls != null && Object.hasOwnProperty.call(message, "avoidTolls"))
|
|
19489
|
+
writer.uint32(/* id 1, wireType 0 =*/8).bool(message.avoidTolls);
|
|
19490
|
+
if (message.avoidHighways != null && Object.hasOwnProperty.call(message, "avoidHighways"))
|
|
19491
|
+
writer.uint32(/* id 2, wireType 0 =*/16).bool(message.avoidHighways);
|
|
19492
|
+
if (message.avoidFerries != null && Object.hasOwnProperty.call(message, "avoidFerries"))
|
|
19493
|
+
writer.uint32(/* id 3, wireType 0 =*/24).bool(message.avoidFerries);
|
|
19494
|
+
if (message.avoidIndoor != null && Object.hasOwnProperty.call(message, "avoidIndoor"))
|
|
19495
|
+
writer.uint32(/* id 4, wireType 0 =*/32).bool(message.avoidIndoor);
|
|
19496
|
+
return writer;
|
|
19497
|
+
};
|
|
19498
|
+
|
|
19499
|
+
/**
|
|
19500
|
+
* Encodes the specified RouteModifiers message, length delimited. Does not implicitly {@link google.maps.places.v1.RouteModifiers.verify|verify} messages.
|
|
19501
|
+
* @function encodeDelimited
|
|
19502
|
+
* @memberof google.maps.places.v1.RouteModifiers
|
|
19503
|
+
* @static
|
|
19504
|
+
* @param {google.maps.places.v1.IRouteModifiers} message RouteModifiers message or plain object to encode
|
|
19505
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
19506
|
+
* @returns {$protobuf.Writer} Writer
|
|
19507
|
+
*/
|
|
19508
|
+
RouteModifiers.encodeDelimited = function encodeDelimited(message, writer) {
|
|
19509
|
+
return this.encode(message, writer).ldelim();
|
|
19510
|
+
};
|
|
19511
|
+
|
|
19512
|
+
/**
|
|
19513
|
+
* Decodes a RouteModifiers message from the specified reader or buffer.
|
|
19514
|
+
* @function decode
|
|
19515
|
+
* @memberof google.maps.places.v1.RouteModifiers
|
|
19516
|
+
* @static
|
|
19517
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
19518
|
+
* @param {number} [length] Message length if known beforehand
|
|
19519
|
+
* @returns {google.maps.places.v1.RouteModifiers} RouteModifiers
|
|
19520
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
19521
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
19522
|
+
*/
|
|
19523
|
+
RouteModifiers.decode = function decode(reader, length) {
|
|
19524
|
+
if (!(reader instanceof $Reader))
|
|
19525
|
+
reader = $Reader.create(reader);
|
|
19526
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.RouteModifiers();
|
|
19527
|
+
while (reader.pos < end) {
|
|
19528
|
+
var tag = reader.uint32();
|
|
19529
|
+
switch (tag >>> 3) {
|
|
19530
|
+
case 1: {
|
|
19531
|
+
message.avoidTolls = reader.bool();
|
|
19532
|
+
break;
|
|
19533
|
+
}
|
|
19534
|
+
case 2: {
|
|
19535
|
+
message.avoidHighways = reader.bool();
|
|
19536
|
+
break;
|
|
19537
|
+
}
|
|
19538
|
+
case 3: {
|
|
19539
|
+
message.avoidFerries = reader.bool();
|
|
19540
|
+
break;
|
|
19541
|
+
}
|
|
19542
|
+
case 4: {
|
|
19543
|
+
message.avoidIndoor = reader.bool();
|
|
19544
|
+
break;
|
|
19545
|
+
}
|
|
19546
|
+
default:
|
|
19547
|
+
reader.skipType(tag & 7);
|
|
19548
|
+
break;
|
|
19549
|
+
}
|
|
19550
|
+
}
|
|
19551
|
+
return message;
|
|
19552
|
+
};
|
|
19553
|
+
|
|
19554
|
+
/**
|
|
19555
|
+
* Decodes a RouteModifiers message from the specified reader or buffer, length delimited.
|
|
19556
|
+
* @function decodeDelimited
|
|
19557
|
+
* @memberof google.maps.places.v1.RouteModifiers
|
|
19558
|
+
* @static
|
|
19559
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
19560
|
+
* @returns {google.maps.places.v1.RouteModifiers} RouteModifiers
|
|
19561
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
19562
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
19563
|
+
*/
|
|
19564
|
+
RouteModifiers.decodeDelimited = function decodeDelimited(reader) {
|
|
19565
|
+
if (!(reader instanceof $Reader))
|
|
19566
|
+
reader = new $Reader(reader);
|
|
19567
|
+
return this.decode(reader, reader.uint32());
|
|
19568
|
+
};
|
|
19569
|
+
|
|
19570
|
+
/**
|
|
19571
|
+
* Verifies a RouteModifiers message.
|
|
19572
|
+
* @function verify
|
|
19573
|
+
* @memberof google.maps.places.v1.RouteModifiers
|
|
19574
|
+
* @static
|
|
19575
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
19576
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
19577
|
+
*/
|
|
19578
|
+
RouteModifiers.verify = function verify(message) {
|
|
19579
|
+
if (typeof message !== "object" || message === null)
|
|
19580
|
+
return "object expected";
|
|
19581
|
+
if (message.avoidTolls != null && message.hasOwnProperty("avoidTolls"))
|
|
19582
|
+
if (typeof message.avoidTolls !== "boolean")
|
|
19583
|
+
return "avoidTolls: boolean expected";
|
|
19584
|
+
if (message.avoidHighways != null && message.hasOwnProperty("avoidHighways"))
|
|
19585
|
+
if (typeof message.avoidHighways !== "boolean")
|
|
19586
|
+
return "avoidHighways: boolean expected";
|
|
19587
|
+
if (message.avoidFerries != null && message.hasOwnProperty("avoidFerries"))
|
|
19588
|
+
if (typeof message.avoidFerries !== "boolean")
|
|
19589
|
+
return "avoidFerries: boolean expected";
|
|
19590
|
+
if (message.avoidIndoor != null && message.hasOwnProperty("avoidIndoor"))
|
|
19591
|
+
if (typeof message.avoidIndoor !== "boolean")
|
|
19592
|
+
return "avoidIndoor: boolean expected";
|
|
19593
|
+
return null;
|
|
19594
|
+
};
|
|
19595
|
+
|
|
19596
|
+
/**
|
|
19597
|
+
* Creates a RouteModifiers message from a plain object. Also converts values to their respective internal types.
|
|
19598
|
+
* @function fromObject
|
|
19599
|
+
* @memberof google.maps.places.v1.RouteModifiers
|
|
19600
|
+
* @static
|
|
19601
|
+
* @param {Object.<string,*>} object Plain object
|
|
19602
|
+
* @returns {google.maps.places.v1.RouteModifiers} RouteModifiers
|
|
19603
|
+
*/
|
|
19604
|
+
RouteModifiers.fromObject = function fromObject(object) {
|
|
19605
|
+
if (object instanceof $root.google.maps.places.v1.RouteModifiers)
|
|
19606
|
+
return object;
|
|
19607
|
+
var message = new $root.google.maps.places.v1.RouteModifiers();
|
|
19608
|
+
if (object.avoidTolls != null)
|
|
19609
|
+
message.avoidTolls = Boolean(object.avoidTolls);
|
|
19610
|
+
if (object.avoidHighways != null)
|
|
19611
|
+
message.avoidHighways = Boolean(object.avoidHighways);
|
|
19612
|
+
if (object.avoidFerries != null)
|
|
19613
|
+
message.avoidFerries = Boolean(object.avoidFerries);
|
|
19614
|
+
if (object.avoidIndoor != null)
|
|
19615
|
+
message.avoidIndoor = Boolean(object.avoidIndoor);
|
|
19616
|
+
return message;
|
|
19617
|
+
};
|
|
19618
|
+
|
|
19619
|
+
/**
|
|
19620
|
+
* Creates a plain object from a RouteModifiers message. Also converts values to other types if specified.
|
|
19621
|
+
* @function toObject
|
|
19622
|
+
* @memberof google.maps.places.v1.RouteModifiers
|
|
19623
|
+
* @static
|
|
19624
|
+
* @param {google.maps.places.v1.RouteModifiers} message RouteModifiers
|
|
19625
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
19626
|
+
* @returns {Object.<string,*>} Plain object
|
|
19627
|
+
*/
|
|
19628
|
+
RouteModifiers.toObject = function toObject(message, options) {
|
|
19629
|
+
if (!options)
|
|
19630
|
+
options = {};
|
|
19631
|
+
var object = {};
|
|
19632
|
+
if (options.defaults) {
|
|
19633
|
+
object.avoidTolls = false;
|
|
19634
|
+
object.avoidHighways = false;
|
|
19635
|
+
object.avoidFerries = false;
|
|
19636
|
+
object.avoidIndoor = false;
|
|
19637
|
+
}
|
|
19638
|
+
if (message.avoidTolls != null && message.hasOwnProperty("avoidTolls"))
|
|
19639
|
+
object.avoidTolls = message.avoidTolls;
|
|
19640
|
+
if (message.avoidHighways != null && message.hasOwnProperty("avoidHighways"))
|
|
19641
|
+
object.avoidHighways = message.avoidHighways;
|
|
19642
|
+
if (message.avoidFerries != null && message.hasOwnProperty("avoidFerries"))
|
|
19643
|
+
object.avoidFerries = message.avoidFerries;
|
|
19644
|
+
if (message.avoidIndoor != null && message.hasOwnProperty("avoidIndoor"))
|
|
19645
|
+
object.avoidIndoor = message.avoidIndoor;
|
|
19646
|
+
return object;
|
|
19647
|
+
};
|
|
19648
|
+
|
|
19649
|
+
/**
|
|
19650
|
+
* Converts this RouteModifiers to JSON.
|
|
19651
|
+
* @function toJSON
|
|
19652
|
+
* @memberof google.maps.places.v1.RouteModifiers
|
|
19653
|
+
* @instance
|
|
19654
|
+
* @returns {Object.<string,*>} JSON object
|
|
19655
|
+
*/
|
|
19656
|
+
RouteModifiers.prototype.toJSON = function toJSON() {
|
|
19657
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
19658
|
+
};
|
|
19659
|
+
|
|
19660
|
+
/**
|
|
19661
|
+
* Gets the default type url for RouteModifiers
|
|
19662
|
+
* @function getTypeUrl
|
|
19663
|
+
* @memberof google.maps.places.v1.RouteModifiers
|
|
19664
|
+
* @static
|
|
19665
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
19666
|
+
* @returns {string} The default type url
|
|
19667
|
+
*/
|
|
19668
|
+
RouteModifiers.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
19669
|
+
if (typeUrlPrefix === undefined) {
|
|
19670
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
19671
|
+
}
|
|
19672
|
+
return typeUrlPrefix + "/google.maps.places.v1.RouteModifiers";
|
|
19673
|
+
};
|
|
19674
|
+
|
|
19675
|
+
return RouteModifiers;
|
|
19676
|
+
})();
|
|
19677
|
+
|
|
19678
|
+
/**
|
|
19679
|
+
* RoutingPreference enum.
|
|
19680
|
+
* @name google.maps.places.v1.RoutingPreference
|
|
19681
|
+
* @enum {number}
|
|
19682
|
+
* @property {number} ROUTING_PREFERENCE_UNSPECIFIED=0 ROUTING_PREFERENCE_UNSPECIFIED value
|
|
19683
|
+
* @property {number} TRAFFIC_UNAWARE=1 TRAFFIC_UNAWARE value
|
|
19684
|
+
* @property {number} TRAFFIC_AWARE=2 TRAFFIC_AWARE value
|
|
19685
|
+
* @property {number} TRAFFIC_AWARE_OPTIMAL=3 TRAFFIC_AWARE_OPTIMAL value
|
|
19686
|
+
*/
|
|
19687
|
+
v1.RoutingPreference = (function() {
|
|
19688
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
19689
|
+
values[valuesById[0] = "ROUTING_PREFERENCE_UNSPECIFIED"] = 0;
|
|
19690
|
+
values[valuesById[1] = "TRAFFIC_UNAWARE"] = 1;
|
|
19691
|
+
values[valuesById[2] = "TRAFFIC_AWARE"] = 2;
|
|
19692
|
+
values[valuesById[3] = "TRAFFIC_AWARE_OPTIMAL"] = 3;
|
|
19693
|
+
return values;
|
|
19694
|
+
})();
|
|
19695
|
+
|
|
19696
|
+
v1.RoutingSummary = (function() {
|
|
19697
|
+
|
|
19698
|
+
/**
|
|
19699
|
+
* Properties of a RoutingSummary.
|
|
19700
|
+
* @memberof google.maps.places.v1
|
|
19701
|
+
* @interface IRoutingSummary
|
|
19702
|
+
* @property {Array.<google.maps.places.v1.RoutingSummary.ILeg>|null} [legs] RoutingSummary legs
|
|
19703
|
+
*/
|
|
19704
|
+
|
|
19705
|
+
/**
|
|
19706
|
+
* Constructs a new RoutingSummary.
|
|
19707
|
+
* @memberof google.maps.places.v1
|
|
19708
|
+
* @classdesc Represents a RoutingSummary.
|
|
19709
|
+
* @implements IRoutingSummary
|
|
19710
|
+
* @constructor
|
|
19711
|
+
* @param {google.maps.places.v1.IRoutingSummary=} [properties] Properties to set
|
|
19712
|
+
*/
|
|
19713
|
+
function RoutingSummary(properties) {
|
|
19714
|
+
this.legs = [];
|
|
19715
|
+
if (properties)
|
|
19716
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
19717
|
+
if (properties[keys[i]] != null)
|
|
19718
|
+
this[keys[i]] = properties[keys[i]];
|
|
19719
|
+
}
|
|
19720
|
+
|
|
19721
|
+
/**
|
|
19722
|
+
* RoutingSummary legs.
|
|
19723
|
+
* @member {Array.<google.maps.places.v1.RoutingSummary.ILeg>} legs
|
|
19724
|
+
* @memberof google.maps.places.v1.RoutingSummary
|
|
19725
|
+
* @instance
|
|
19726
|
+
*/
|
|
19727
|
+
RoutingSummary.prototype.legs = $util.emptyArray;
|
|
19728
|
+
|
|
19729
|
+
/**
|
|
19730
|
+
* Creates a new RoutingSummary instance using the specified properties.
|
|
19731
|
+
* @function create
|
|
19732
|
+
* @memberof google.maps.places.v1.RoutingSummary
|
|
19733
|
+
* @static
|
|
19734
|
+
* @param {google.maps.places.v1.IRoutingSummary=} [properties] Properties to set
|
|
19735
|
+
* @returns {google.maps.places.v1.RoutingSummary} RoutingSummary instance
|
|
19736
|
+
*/
|
|
19737
|
+
RoutingSummary.create = function create(properties) {
|
|
19738
|
+
return new RoutingSummary(properties);
|
|
19739
|
+
};
|
|
19740
|
+
|
|
19741
|
+
/**
|
|
19742
|
+
* Encodes the specified RoutingSummary message. Does not implicitly {@link google.maps.places.v1.RoutingSummary.verify|verify} messages.
|
|
19743
|
+
* @function encode
|
|
19744
|
+
* @memberof google.maps.places.v1.RoutingSummary
|
|
19745
|
+
* @static
|
|
19746
|
+
* @param {google.maps.places.v1.IRoutingSummary} message RoutingSummary message or plain object to encode
|
|
19747
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
19748
|
+
* @returns {$protobuf.Writer} Writer
|
|
19749
|
+
*/
|
|
19750
|
+
RoutingSummary.encode = function encode(message, writer) {
|
|
19751
|
+
if (!writer)
|
|
19752
|
+
writer = $Writer.create();
|
|
19753
|
+
if (message.legs != null && message.legs.length)
|
|
19754
|
+
for (var i = 0; i < message.legs.length; ++i)
|
|
19755
|
+
$root.google.maps.places.v1.RoutingSummary.Leg.encode(message.legs[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
19756
|
+
return writer;
|
|
19757
|
+
};
|
|
19758
|
+
|
|
19759
|
+
/**
|
|
19760
|
+
* Encodes the specified RoutingSummary message, length delimited. Does not implicitly {@link google.maps.places.v1.RoutingSummary.verify|verify} messages.
|
|
19761
|
+
* @function encodeDelimited
|
|
19762
|
+
* @memberof google.maps.places.v1.RoutingSummary
|
|
19763
|
+
* @static
|
|
19764
|
+
* @param {google.maps.places.v1.IRoutingSummary} message RoutingSummary message or plain object to encode
|
|
19765
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
19766
|
+
* @returns {$protobuf.Writer} Writer
|
|
19767
|
+
*/
|
|
19768
|
+
RoutingSummary.encodeDelimited = function encodeDelimited(message, writer) {
|
|
19769
|
+
return this.encode(message, writer).ldelim();
|
|
19770
|
+
};
|
|
19771
|
+
|
|
19772
|
+
/**
|
|
19773
|
+
* Decodes a RoutingSummary message from the specified reader or buffer.
|
|
19774
|
+
* @function decode
|
|
19775
|
+
* @memberof google.maps.places.v1.RoutingSummary
|
|
19776
|
+
* @static
|
|
19777
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
19778
|
+
* @param {number} [length] Message length if known beforehand
|
|
19779
|
+
* @returns {google.maps.places.v1.RoutingSummary} RoutingSummary
|
|
19780
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
19781
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
19782
|
+
*/
|
|
19783
|
+
RoutingSummary.decode = function decode(reader, length) {
|
|
19784
|
+
if (!(reader instanceof $Reader))
|
|
19785
|
+
reader = $Reader.create(reader);
|
|
19786
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.RoutingSummary();
|
|
19787
|
+
while (reader.pos < end) {
|
|
19788
|
+
var tag = reader.uint32();
|
|
19789
|
+
switch (tag >>> 3) {
|
|
19790
|
+
case 1: {
|
|
19791
|
+
if (!(message.legs && message.legs.length))
|
|
19792
|
+
message.legs = [];
|
|
19793
|
+
message.legs.push($root.google.maps.places.v1.RoutingSummary.Leg.decode(reader, reader.uint32()));
|
|
19794
|
+
break;
|
|
19795
|
+
}
|
|
19796
|
+
default:
|
|
19797
|
+
reader.skipType(tag & 7);
|
|
19798
|
+
break;
|
|
19799
|
+
}
|
|
19800
|
+
}
|
|
19801
|
+
return message;
|
|
19802
|
+
};
|
|
19803
|
+
|
|
19804
|
+
/**
|
|
19805
|
+
* Decodes a RoutingSummary message from the specified reader or buffer, length delimited.
|
|
19806
|
+
* @function decodeDelimited
|
|
19807
|
+
* @memberof google.maps.places.v1.RoutingSummary
|
|
19808
|
+
* @static
|
|
19809
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
19810
|
+
* @returns {google.maps.places.v1.RoutingSummary} RoutingSummary
|
|
19811
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
19812
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
19813
|
+
*/
|
|
19814
|
+
RoutingSummary.decodeDelimited = function decodeDelimited(reader) {
|
|
19815
|
+
if (!(reader instanceof $Reader))
|
|
19816
|
+
reader = new $Reader(reader);
|
|
19817
|
+
return this.decode(reader, reader.uint32());
|
|
19818
|
+
};
|
|
19819
|
+
|
|
19820
|
+
/**
|
|
19821
|
+
* Verifies a RoutingSummary message.
|
|
19822
|
+
* @function verify
|
|
19823
|
+
* @memberof google.maps.places.v1.RoutingSummary
|
|
19824
|
+
* @static
|
|
19825
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
19826
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
19827
|
+
*/
|
|
19828
|
+
RoutingSummary.verify = function verify(message) {
|
|
19829
|
+
if (typeof message !== "object" || message === null)
|
|
19830
|
+
return "object expected";
|
|
19831
|
+
if (message.legs != null && message.hasOwnProperty("legs")) {
|
|
19832
|
+
if (!Array.isArray(message.legs))
|
|
19833
|
+
return "legs: array expected";
|
|
19834
|
+
for (var i = 0; i < message.legs.length; ++i) {
|
|
19835
|
+
var error = $root.google.maps.places.v1.RoutingSummary.Leg.verify(message.legs[i]);
|
|
19836
|
+
if (error)
|
|
19837
|
+
return "legs." + error;
|
|
19838
|
+
}
|
|
19839
|
+
}
|
|
19840
|
+
return null;
|
|
19841
|
+
};
|
|
19842
|
+
|
|
19843
|
+
/**
|
|
19844
|
+
* Creates a RoutingSummary message from a plain object. Also converts values to their respective internal types.
|
|
19845
|
+
* @function fromObject
|
|
19846
|
+
* @memberof google.maps.places.v1.RoutingSummary
|
|
19847
|
+
* @static
|
|
19848
|
+
* @param {Object.<string,*>} object Plain object
|
|
19849
|
+
* @returns {google.maps.places.v1.RoutingSummary} RoutingSummary
|
|
19850
|
+
*/
|
|
19851
|
+
RoutingSummary.fromObject = function fromObject(object) {
|
|
19852
|
+
if (object instanceof $root.google.maps.places.v1.RoutingSummary)
|
|
19853
|
+
return object;
|
|
19854
|
+
var message = new $root.google.maps.places.v1.RoutingSummary();
|
|
19855
|
+
if (object.legs) {
|
|
19856
|
+
if (!Array.isArray(object.legs))
|
|
19857
|
+
throw TypeError(".google.maps.places.v1.RoutingSummary.legs: array expected");
|
|
19858
|
+
message.legs = [];
|
|
19859
|
+
for (var i = 0; i < object.legs.length; ++i) {
|
|
19860
|
+
if (typeof object.legs[i] !== "object")
|
|
19861
|
+
throw TypeError(".google.maps.places.v1.RoutingSummary.legs: object expected");
|
|
19862
|
+
message.legs[i] = $root.google.maps.places.v1.RoutingSummary.Leg.fromObject(object.legs[i]);
|
|
19863
|
+
}
|
|
19864
|
+
}
|
|
19865
|
+
return message;
|
|
19866
|
+
};
|
|
19867
|
+
|
|
19868
|
+
/**
|
|
19869
|
+
* Creates a plain object from a RoutingSummary message. Also converts values to other types if specified.
|
|
19870
|
+
* @function toObject
|
|
19871
|
+
* @memberof google.maps.places.v1.RoutingSummary
|
|
19872
|
+
* @static
|
|
19873
|
+
* @param {google.maps.places.v1.RoutingSummary} message RoutingSummary
|
|
19874
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
19875
|
+
* @returns {Object.<string,*>} Plain object
|
|
19876
|
+
*/
|
|
19877
|
+
RoutingSummary.toObject = function toObject(message, options) {
|
|
19878
|
+
if (!options)
|
|
19879
|
+
options = {};
|
|
19880
|
+
var object = {};
|
|
19881
|
+
if (options.arrays || options.defaults)
|
|
19882
|
+
object.legs = [];
|
|
19883
|
+
if (message.legs && message.legs.length) {
|
|
19884
|
+
object.legs = [];
|
|
19885
|
+
for (var j = 0; j < message.legs.length; ++j)
|
|
19886
|
+
object.legs[j] = $root.google.maps.places.v1.RoutingSummary.Leg.toObject(message.legs[j], options);
|
|
19887
|
+
}
|
|
19888
|
+
return object;
|
|
19889
|
+
};
|
|
19890
|
+
|
|
19891
|
+
/**
|
|
19892
|
+
* Converts this RoutingSummary to JSON.
|
|
19893
|
+
* @function toJSON
|
|
19894
|
+
* @memberof google.maps.places.v1.RoutingSummary
|
|
19895
|
+
* @instance
|
|
19896
|
+
* @returns {Object.<string,*>} JSON object
|
|
19897
|
+
*/
|
|
19898
|
+
RoutingSummary.prototype.toJSON = function toJSON() {
|
|
19899
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
19900
|
+
};
|
|
19901
|
+
|
|
19902
|
+
/**
|
|
19903
|
+
* Gets the default type url for RoutingSummary
|
|
19904
|
+
* @function getTypeUrl
|
|
19905
|
+
* @memberof google.maps.places.v1.RoutingSummary
|
|
19906
|
+
* @static
|
|
19907
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
19908
|
+
* @returns {string} The default type url
|
|
19909
|
+
*/
|
|
19910
|
+
RoutingSummary.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
19911
|
+
if (typeUrlPrefix === undefined) {
|
|
19912
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
19913
|
+
}
|
|
19914
|
+
return typeUrlPrefix + "/google.maps.places.v1.RoutingSummary";
|
|
19915
|
+
};
|
|
19916
|
+
|
|
19917
|
+
RoutingSummary.Leg = (function() {
|
|
19918
|
+
|
|
19919
|
+
/**
|
|
19920
|
+
* Properties of a Leg.
|
|
19921
|
+
* @memberof google.maps.places.v1.RoutingSummary
|
|
19922
|
+
* @interface ILeg
|
|
19923
|
+
* @property {google.protobuf.IDuration|null} [duration] Leg duration
|
|
19924
|
+
* @property {number|null} [distanceMeters] Leg distanceMeters
|
|
19925
|
+
*/
|
|
19926
|
+
|
|
19927
|
+
/**
|
|
19928
|
+
* Constructs a new Leg.
|
|
19929
|
+
* @memberof google.maps.places.v1.RoutingSummary
|
|
19930
|
+
* @classdesc Represents a Leg.
|
|
19931
|
+
* @implements ILeg
|
|
19932
|
+
* @constructor
|
|
19933
|
+
* @param {google.maps.places.v1.RoutingSummary.ILeg=} [properties] Properties to set
|
|
19934
|
+
*/
|
|
19935
|
+
function Leg(properties) {
|
|
19936
|
+
if (properties)
|
|
19937
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
19938
|
+
if (properties[keys[i]] != null)
|
|
19939
|
+
this[keys[i]] = properties[keys[i]];
|
|
19940
|
+
}
|
|
19941
|
+
|
|
19942
|
+
/**
|
|
19943
|
+
* Leg duration.
|
|
19944
|
+
* @member {google.protobuf.IDuration|null|undefined} duration
|
|
19945
|
+
* @memberof google.maps.places.v1.RoutingSummary.Leg
|
|
19946
|
+
* @instance
|
|
19947
|
+
*/
|
|
19948
|
+
Leg.prototype.duration = null;
|
|
19949
|
+
|
|
19950
|
+
/**
|
|
19951
|
+
* Leg distanceMeters.
|
|
19952
|
+
* @member {number} distanceMeters
|
|
19953
|
+
* @memberof google.maps.places.v1.RoutingSummary.Leg
|
|
19954
|
+
* @instance
|
|
19955
|
+
*/
|
|
19956
|
+
Leg.prototype.distanceMeters = 0;
|
|
19957
|
+
|
|
19958
|
+
/**
|
|
19959
|
+
* Creates a new Leg instance using the specified properties.
|
|
19960
|
+
* @function create
|
|
19961
|
+
* @memberof google.maps.places.v1.RoutingSummary.Leg
|
|
19962
|
+
* @static
|
|
19963
|
+
* @param {google.maps.places.v1.RoutingSummary.ILeg=} [properties] Properties to set
|
|
19964
|
+
* @returns {google.maps.places.v1.RoutingSummary.Leg} Leg instance
|
|
19965
|
+
*/
|
|
19966
|
+
Leg.create = function create(properties) {
|
|
19967
|
+
return new Leg(properties);
|
|
19968
|
+
};
|
|
19969
|
+
|
|
19970
|
+
/**
|
|
19971
|
+
* Encodes the specified Leg message. Does not implicitly {@link google.maps.places.v1.RoutingSummary.Leg.verify|verify} messages.
|
|
19972
|
+
* @function encode
|
|
19973
|
+
* @memberof google.maps.places.v1.RoutingSummary.Leg
|
|
19974
|
+
* @static
|
|
19975
|
+
* @param {google.maps.places.v1.RoutingSummary.ILeg} message Leg message or plain object to encode
|
|
19976
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
19977
|
+
* @returns {$protobuf.Writer} Writer
|
|
19978
|
+
*/
|
|
19979
|
+
Leg.encode = function encode(message, writer) {
|
|
19980
|
+
if (!writer)
|
|
19981
|
+
writer = $Writer.create();
|
|
19982
|
+
if (message.duration != null && Object.hasOwnProperty.call(message, "duration"))
|
|
19983
|
+
$root.google.protobuf.Duration.encode(message.duration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
19984
|
+
if (message.distanceMeters != null && Object.hasOwnProperty.call(message, "distanceMeters"))
|
|
19985
|
+
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.distanceMeters);
|
|
19986
|
+
return writer;
|
|
19987
|
+
};
|
|
19988
|
+
|
|
19989
|
+
/**
|
|
19990
|
+
* Encodes the specified Leg message, length delimited. Does not implicitly {@link google.maps.places.v1.RoutingSummary.Leg.verify|verify} messages.
|
|
19991
|
+
* @function encodeDelimited
|
|
19992
|
+
* @memberof google.maps.places.v1.RoutingSummary.Leg
|
|
19993
|
+
* @static
|
|
19994
|
+
* @param {google.maps.places.v1.RoutingSummary.ILeg} message Leg message or plain object to encode
|
|
19995
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
19996
|
+
* @returns {$protobuf.Writer} Writer
|
|
19997
|
+
*/
|
|
19998
|
+
Leg.encodeDelimited = function encodeDelimited(message, writer) {
|
|
19999
|
+
return this.encode(message, writer).ldelim();
|
|
20000
|
+
};
|
|
20001
|
+
|
|
20002
|
+
/**
|
|
20003
|
+
* Decodes a Leg message from the specified reader or buffer.
|
|
20004
|
+
* @function decode
|
|
20005
|
+
* @memberof google.maps.places.v1.RoutingSummary.Leg
|
|
20006
|
+
* @static
|
|
20007
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
20008
|
+
* @param {number} [length] Message length if known beforehand
|
|
20009
|
+
* @returns {google.maps.places.v1.RoutingSummary.Leg} Leg
|
|
20010
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
20011
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
20012
|
+
*/
|
|
20013
|
+
Leg.decode = function decode(reader, length) {
|
|
20014
|
+
if (!(reader instanceof $Reader))
|
|
20015
|
+
reader = $Reader.create(reader);
|
|
20016
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.RoutingSummary.Leg();
|
|
20017
|
+
while (reader.pos < end) {
|
|
20018
|
+
var tag = reader.uint32();
|
|
20019
|
+
switch (tag >>> 3) {
|
|
20020
|
+
case 1: {
|
|
20021
|
+
message.duration = $root.google.protobuf.Duration.decode(reader, reader.uint32());
|
|
20022
|
+
break;
|
|
20023
|
+
}
|
|
20024
|
+
case 2: {
|
|
20025
|
+
message.distanceMeters = reader.int32();
|
|
20026
|
+
break;
|
|
20027
|
+
}
|
|
20028
|
+
default:
|
|
20029
|
+
reader.skipType(tag & 7);
|
|
20030
|
+
break;
|
|
20031
|
+
}
|
|
20032
|
+
}
|
|
20033
|
+
return message;
|
|
20034
|
+
};
|
|
20035
|
+
|
|
20036
|
+
/**
|
|
20037
|
+
* Decodes a Leg message from the specified reader or buffer, length delimited.
|
|
20038
|
+
* @function decodeDelimited
|
|
20039
|
+
* @memberof google.maps.places.v1.RoutingSummary.Leg
|
|
20040
|
+
* @static
|
|
20041
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
20042
|
+
* @returns {google.maps.places.v1.RoutingSummary.Leg} Leg
|
|
20043
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
20044
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
20045
|
+
*/
|
|
20046
|
+
Leg.decodeDelimited = function decodeDelimited(reader) {
|
|
20047
|
+
if (!(reader instanceof $Reader))
|
|
20048
|
+
reader = new $Reader(reader);
|
|
20049
|
+
return this.decode(reader, reader.uint32());
|
|
20050
|
+
};
|
|
20051
|
+
|
|
20052
|
+
/**
|
|
20053
|
+
* Verifies a Leg message.
|
|
20054
|
+
* @function verify
|
|
20055
|
+
* @memberof google.maps.places.v1.RoutingSummary.Leg
|
|
20056
|
+
* @static
|
|
20057
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
20058
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
20059
|
+
*/
|
|
20060
|
+
Leg.verify = function verify(message) {
|
|
20061
|
+
if (typeof message !== "object" || message === null)
|
|
20062
|
+
return "object expected";
|
|
20063
|
+
if (message.duration != null && message.hasOwnProperty("duration")) {
|
|
20064
|
+
var error = $root.google.protobuf.Duration.verify(message.duration);
|
|
20065
|
+
if (error)
|
|
20066
|
+
return "duration." + error;
|
|
20067
|
+
}
|
|
20068
|
+
if (message.distanceMeters != null && message.hasOwnProperty("distanceMeters"))
|
|
20069
|
+
if (!$util.isInteger(message.distanceMeters))
|
|
20070
|
+
return "distanceMeters: integer expected";
|
|
20071
|
+
return null;
|
|
20072
|
+
};
|
|
20073
|
+
|
|
20074
|
+
/**
|
|
20075
|
+
* Creates a Leg message from a plain object. Also converts values to their respective internal types.
|
|
20076
|
+
* @function fromObject
|
|
20077
|
+
* @memberof google.maps.places.v1.RoutingSummary.Leg
|
|
20078
|
+
* @static
|
|
20079
|
+
* @param {Object.<string,*>} object Plain object
|
|
20080
|
+
* @returns {google.maps.places.v1.RoutingSummary.Leg} Leg
|
|
20081
|
+
*/
|
|
20082
|
+
Leg.fromObject = function fromObject(object) {
|
|
20083
|
+
if (object instanceof $root.google.maps.places.v1.RoutingSummary.Leg)
|
|
20084
|
+
return object;
|
|
20085
|
+
var message = new $root.google.maps.places.v1.RoutingSummary.Leg();
|
|
20086
|
+
if (object.duration != null) {
|
|
20087
|
+
if (typeof object.duration !== "object")
|
|
20088
|
+
throw TypeError(".google.maps.places.v1.RoutingSummary.Leg.duration: object expected");
|
|
20089
|
+
message.duration = $root.google.protobuf.Duration.fromObject(object.duration);
|
|
20090
|
+
}
|
|
20091
|
+
if (object.distanceMeters != null)
|
|
20092
|
+
message.distanceMeters = object.distanceMeters | 0;
|
|
20093
|
+
return message;
|
|
20094
|
+
};
|
|
20095
|
+
|
|
20096
|
+
/**
|
|
20097
|
+
* Creates a plain object from a Leg message. Also converts values to other types if specified.
|
|
20098
|
+
* @function toObject
|
|
20099
|
+
* @memberof google.maps.places.v1.RoutingSummary.Leg
|
|
20100
|
+
* @static
|
|
20101
|
+
* @param {google.maps.places.v1.RoutingSummary.Leg} message Leg
|
|
20102
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
20103
|
+
* @returns {Object.<string,*>} Plain object
|
|
20104
|
+
*/
|
|
20105
|
+
Leg.toObject = function toObject(message, options) {
|
|
20106
|
+
if (!options)
|
|
20107
|
+
options = {};
|
|
20108
|
+
var object = {};
|
|
20109
|
+
if (options.defaults) {
|
|
20110
|
+
object.duration = null;
|
|
20111
|
+
object.distanceMeters = 0;
|
|
20112
|
+
}
|
|
20113
|
+
if (message.duration != null && message.hasOwnProperty("duration"))
|
|
20114
|
+
object.duration = $root.google.protobuf.Duration.toObject(message.duration, options);
|
|
20115
|
+
if (message.distanceMeters != null && message.hasOwnProperty("distanceMeters"))
|
|
20116
|
+
object.distanceMeters = message.distanceMeters;
|
|
20117
|
+
return object;
|
|
20118
|
+
};
|
|
20119
|
+
|
|
20120
|
+
/**
|
|
20121
|
+
* Converts this Leg to JSON.
|
|
20122
|
+
* @function toJSON
|
|
20123
|
+
* @memberof google.maps.places.v1.RoutingSummary.Leg
|
|
20124
|
+
* @instance
|
|
20125
|
+
* @returns {Object.<string,*>} JSON object
|
|
20126
|
+
*/
|
|
20127
|
+
Leg.prototype.toJSON = function toJSON() {
|
|
20128
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
20129
|
+
};
|
|
20130
|
+
|
|
20131
|
+
/**
|
|
20132
|
+
* Gets the default type url for Leg
|
|
20133
|
+
* @function getTypeUrl
|
|
20134
|
+
* @memberof google.maps.places.v1.RoutingSummary.Leg
|
|
20135
|
+
* @static
|
|
20136
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
20137
|
+
* @returns {string} The default type url
|
|
20138
|
+
*/
|
|
20139
|
+
Leg.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
20140
|
+
if (typeUrlPrefix === undefined) {
|
|
20141
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
20142
|
+
}
|
|
20143
|
+
return typeUrlPrefix + "/google.maps.places.v1.RoutingSummary.Leg";
|
|
20144
|
+
};
|
|
20145
|
+
|
|
20146
|
+
return Leg;
|
|
20147
|
+
})();
|
|
20148
|
+
|
|
20149
|
+
return RoutingSummary;
|
|
20150
|
+
})();
|
|
20151
|
+
|
|
20152
|
+
/**
|
|
20153
|
+
* TravelMode enum.
|
|
20154
|
+
* @name google.maps.places.v1.TravelMode
|
|
20155
|
+
* @enum {number}
|
|
20156
|
+
* @property {number} TRAVEL_MODE_UNSPECIFIED=0 TRAVEL_MODE_UNSPECIFIED value
|
|
20157
|
+
* @property {number} DRIVE=1 DRIVE value
|
|
20158
|
+
* @property {number} BICYCLE=2 BICYCLE value
|
|
20159
|
+
* @property {number} WALK=3 WALK value
|
|
20160
|
+
* @property {number} TWO_WHEELER=4 TWO_WHEELER value
|
|
20161
|
+
*/
|
|
20162
|
+
v1.TravelMode = (function() {
|
|
20163
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
20164
|
+
values[valuesById[0] = "TRAVEL_MODE_UNSPECIFIED"] = 0;
|
|
20165
|
+
values[valuesById[1] = "DRIVE"] = 1;
|
|
20166
|
+
values[valuesById[2] = "BICYCLE"] = 2;
|
|
20167
|
+
values[valuesById[3] = "WALK"] = 3;
|
|
20168
|
+
values[valuesById[4] = "TWO_WHEELER"] = 4;
|
|
20169
|
+
return values;
|
|
20170
|
+
})();
|
|
20171
|
+
|
|
18457
20172
|
return v1;
|
|
18458
20173
|
})();
|
|
18459
20174
|
|