@googlemaps/places 1.2.0 → 1.3.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 +1 -0
- package/build/protos/google/maps/places/v1/place.proto +2 -2
- package/build/protos/google/maps/places/v1/places_service.proto +317 -6
- package/build/protos/protos.d.ts +1256 -0
- package/build/protos/protos.js +3182 -0
- package/build/protos/protos.json +288 -0
- package/build/src/v1/places_client.d.ts +127 -4
- package/build/src/v1/places_client.js +17 -0
- package/build/src/v1/places_client.js.map +1 -1
- package/build/src/v1/places_client_config.json +4 -0
- package/package.json +1 -1
package/build/protos/protos.js
CHANGED
|
@@ -19744,6 +19744,39 @@
|
|
|
19744
19744
|
* @variation 2
|
|
19745
19745
|
*/
|
|
19746
19746
|
|
|
19747
|
+
/**
|
|
19748
|
+
* Callback as used by {@link google.maps.places.v1.Places|autocompletePlaces}.
|
|
19749
|
+
* @memberof google.maps.places.v1.Places
|
|
19750
|
+
* @typedef AutocompletePlacesCallback
|
|
19751
|
+
* @type {function}
|
|
19752
|
+
* @param {Error|null} error Error, if any
|
|
19753
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse} [response] AutocompletePlacesResponse
|
|
19754
|
+
*/
|
|
19755
|
+
|
|
19756
|
+
/**
|
|
19757
|
+
* Calls AutocompletePlaces.
|
|
19758
|
+
* @function autocompletePlaces
|
|
19759
|
+
* @memberof google.maps.places.v1.Places
|
|
19760
|
+
* @instance
|
|
19761
|
+
* @param {google.maps.places.v1.IAutocompletePlacesRequest} request AutocompletePlacesRequest message or plain object
|
|
19762
|
+
* @param {google.maps.places.v1.Places.AutocompletePlacesCallback} callback Node-style callback called with the error, if any, and AutocompletePlacesResponse
|
|
19763
|
+
* @returns {undefined}
|
|
19764
|
+
* @variation 1
|
|
19765
|
+
*/
|
|
19766
|
+
Object.defineProperty(Places.prototype.autocompletePlaces = function autocompletePlaces(request, callback) {
|
|
19767
|
+
return this.rpcCall(autocompletePlaces, $root.google.maps.places.v1.AutocompletePlacesRequest, $root.google.maps.places.v1.AutocompletePlacesResponse, request, callback);
|
|
19768
|
+
}, "name", { value: "AutocompletePlaces" });
|
|
19769
|
+
|
|
19770
|
+
/**
|
|
19771
|
+
* Calls AutocompletePlaces.
|
|
19772
|
+
* @function autocompletePlaces
|
|
19773
|
+
* @memberof google.maps.places.v1.Places
|
|
19774
|
+
* @instance
|
|
19775
|
+
* @param {google.maps.places.v1.IAutocompletePlacesRequest} request AutocompletePlacesRequest message or plain object
|
|
19776
|
+
* @returns {Promise<google.maps.places.v1.AutocompletePlacesResponse>} Promise
|
|
19777
|
+
* @variation 2
|
|
19778
|
+
*/
|
|
19779
|
+
|
|
19747
19780
|
return Places;
|
|
19748
19781
|
})();
|
|
19749
19782
|
|
|
@@ -20715,6 +20748,7 @@
|
|
|
20715
20748
|
* @property {boolean|null} [strictTypeFiltering] SearchTextRequest strictTypeFiltering
|
|
20716
20749
|
* @property {google.maps.places.v1.SearchTextRequest.ILocationBias|null} [locationBias] SearchTextRequest locationBias
|
|
20717
20750
|
* @property {google.maps.places.v1.SearchTextRequest.ILocationRestriction|null} [locationRestriction] SearchTextRequest locationRestriction
|
|
20751
|
+
* @property {google.maps.places.v1.SearchTextRequest.IEVOptions|null} [evOptions] SearchTextRequest evOptions
|
|
20718
20752
|
*/
|
|
20719
20753
|
|
|
20720
20754
|
/**
|
|
@@ -20829,6 +20863,14 @@
|
|
|
20829
20863
|
*/
|
|
20830
20864
|
SearchTextRequest.prototype.locationRestriction = null;
|
|
20831
20865
|
|
|
20866
|
+
/**
|
|
20867
|
+
* SearchTextRequest evOptions.
|
|
20868
|
+
* @member {google.maps.places.v1.SearchTextRequest.IEVOptions|null|undefined} evOptions
|
|
20869
|
+
* @memberof google.maps.places.v1.SearchTextRequest
|
|
20870
|
+
* @instance
|
|
20871
|
+
*/
|
|
20872
|
+
SearchTextRequest.prototype.evOptions = null;
|
|
20873
|
+
|
|
20832
20874
|
/**
|
|
20833
20875
|
* Creates a new SearchTextRequest instance using the specified properties.
|
|
20834
20876
|
* @function create
|
|
@@ -20881,6 +20923,8 @@
|
|
|
20881
20923
|
$root.google.maps.places.v1.SearchTextRequest.LocationBias.encode(message.locationBias, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
|
|
20882
20924
|
if (message.locationRestriction != null && Object.hasOwnProperty.call(message, "locationRestriction"))
|
|
20883
20925
|
$root.google.maps.places.v1.SearchTextRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
|
|
20926
|
+
if (message.evOptions != null && Object.hasOwnProperty.call(message, "evOptions"))
|
|
20927
|
+
$root.google.maps.places.v1.SearchTextRequest.EVOptions.encode(message.evOptions, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim();
|
|
20884
20928
|
return writer;
|
|
20885
20929
|
};
|
|
20886
20930
|
|
|
@@ -20970,6 +21014,10 @@
|
|
|
20970
21014
|
message.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.decode(reader, reader.uint32());
|
|
20971
21015
|
break;
|
|
20972
21016
|
}
|
|
21017
|
+
case 15: {
|
|
21018
|
+
message.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.decode(reader, reader.uint32());
|
|
21019
|
+
break;
|
|
21020
|
+
}
|
|
20973
21021
|
default:
|
|
20974
21022
|
reader.skipType(tag & 7);
|
|
20975
21023
|
break;
|
|
@@ -21064,6 +21112,11 @@
|
|
|
21064
21112
|
if (error)
|
|
21065
21113
|
return "locationRestriction." + error;
|
|
21066
21114
|
}
|
|
21115
|
+
if (message.evOptions != null && message.hasOwnProperty("evOptions")) {
|
|
21116
|
+
var error = $root.google.maps.places.v1.SearchTextRequest.EVOptions.verify(message.evOptions);
|
|
21117
|
+
if (error)
|
|
21118
|
+
return "evOptions." + error;
|
|
21119
|
+
}
|
|
21067
21120
|
return null;
|
|
21068
21121
|
};
|
|
21069
21122
|
|
|
@@ -21162,6 +21215,11 @@
|
|
|
21162
21215
|
throw TypeError(".google.maps.places.v1.SearchTextRequest.locationRestriction: object expected");
|
|
21163
21216
|
message.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.fromObject(object.locationRestriction);
|
|
21164
21217
|
}
|
|
21218
|
+
if (object.evOptions != null) {
|
|
21219
|
+
if (typeof object.evOptions !== "object")
|
|
21220
|
+
throw TypeError(".google.maps.places.v1.SearchTextRequest.evOptions: object expected");
|
|
21221
|
+
message.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.fromObject(object.evOptions);
|
|
21222
|
+
}
|
|
21165
21223
|
return message;
|
|
21166
21224
|
};
|
|
21167
21225
|
|
|
@@ -21192,6 +21250,7 @@
|
|
|
21192
21250
|
object.strictTypeFiltering = false;
|
|
21193
21251
|
object.locationBias = null;
|
|
21194
21252
|
object.locationRestriction = null;
|
|
21253
|
+
object.evOptions = null;
|
|
21195
21254
|
}
|
|
21196
21255
|
if (message.textQuery != null && message.hasOwnProperty("textQuery"))
|
|
21197
21256
|
object.textQuery = message.textQuery;
|
|
@@ -21220,6 +21279,8 @@
|
|
|
21220
21279
|
object.locationBias = $root.google.maps.places.v1.SearchTextRequest.LocationBias.toObject(message.locationBias, options);
|
|
21221
21280
|
if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction"))
|
|
21222
21281
|
object.locationRestriction = $root.google.maps.places.v1.SearchTextRequest.LocationRestriction.toObject(message.locationRestriction, options);
|
|
21282
|
+
if (message.evOptions != null && message.hasOwnProperty("evOptions"))
|
|
21283
|
+
object.evOptions = $root.google.maps.places.v1.SearchTextRequest.EVOptions.toObject(message.evOptions, options);
|
|
21223
21284
|
return object;
|
|
21224
21285
|
};
|
|
21225
21286
|
|
|
@@ -21754,6 +21815,316 @@
|
|
|
21754
21815
|
return LocationRestriction;
|
|
21755
21816
|
})();
|
|
21756
21817
|
|
|
21818
|
+
SearchTextRequest.EVOptions = (function() {
|
|
21819
|
+
|
|
21820
|
+
/**
|
|
21821
|
+
* Properties of a EVOptions.
|
|
21822
|
+
* @memberof google.maps.places.v1.SearchTextRequest
|
|
21823
|
+
* @interface IEVOptions
|
|
21824
|
+
* @property {number|null} [minimumChargingRateKw] EVOptions minimumChargingRateKw
|
|
21825
|
+
* @property {Array.<google.maps.places.v1.EVConnectorType>|null} [connectorTypes] EVOptions connectorTypes
|
|
21826
|
+
*/
|
|
21827
|
+
|
|
21828
|
+
/**
|
|
21829
|
+
* Constructs a new EVOptions.
|
|
21830
|
+
* @memberof google.maps.places.v1.SearchTextRequest
|
|
21831
|
+
* @classdesc Represents a EVOptions.
|
|
21832
|
+
* @implements IEVOptions
|
|
21833
|
+
* @constructor
|
|
21834
|
+
* @param {google.maps.places.v1.SearchTextRequest.IEVOptions=} [properties] Properties to set
|
|
21835
|
+
*/
|
|
21836
|
+
function EVOptions(properties) {
|
|
21837
|
+
this.connectorTypes = [];
|
|
21838
|
+
if (properties)
|
|
21839
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
21840
|
+
if (properties[keys[i]] != null)
|
|
21841
|
+
this[keys[i]] = properties[keys[i]];
|
|
21842
|
+
}
|
|
21843
|
+
|
|
21844
|
+
/**
|
|
21845
|
+
* EVOptions minimumChargingRateKw.
|
|
21846
|
+
* @member {number} minimumChargingRateKw
|
|
21847
|
+
* @memberof google.maps.places.v1.SearchTextRequest.EVOptions
|
|
21848
|
+
* @instance
|
|
21849
|
+
*/
|
|
21850
|
+
EVOptions.prototype.minimumChargingRateKw = 0;
|
|
21851
|
+
|
|
21852
|
+
/**
|
|
21853
|
+
* EVOptions connectorTypes.
|
|
21854
|
+
* @member {Array.<google.maps.places.v1.EVConnectorType>} connectorTypes
|
|
21855
|
+
* @memberof google.maps.places.v1.SearchTextRequest.EVOptions
|
|
21856
|
+
* @instance
|
|
21857
|
+
*/
|
|
21858
|
+
EVOptions.prototype.connectorTypes = $util.emptyArray;
|
|
21859
|
+
|
|
21860
|
+
/**
|
|
21861
|
+
* Creates a new EVOptions instance using the specified properties.
|
|
21862
|
+
* @function create
|
|
21863
|
+
* @memberof google.maps.places.v1.SearchTextRequest.EVOptions
|
|
21864
|
+
* @static
|
|
21865
|
+
* @param {google.maps.places.v1.SearchTextRequest.IEVOptions=} [properties] Properties to set
|
|
21866
|
+
* @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions instance
|
|
21867
|
+
*/
|
|
21868
|
+
EVOptions.create = function create(properties) {
|
|
21869
|
+
return new EVOptions(properties);
|
|
21870
|
+
};
|
|
21871
|
+
|
|
21872
|
+
/**
|
|
21873
|
+
* Encodes the specified EVOptions message. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages.
|
|
21874
|
+
* @function encode
|
|
21875
|
+
* @memberof google.maps.places.v1.SearchTextRequest.EVOptions
|
|
21876
|
+
* @static
|
|
21877
|
+
* @param {google.maps.places.v1.SearchTextRequest.IEVOptions} message EVOptions message or plain object to encode
|
|
21878
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
21879
|
+
* @returns {$protobuf.Writer} Writer
|
|
21880
|
+
*/
|
|
21881
|
+
EVOptions.encode = function encode(message, writer) {
|
|
21882
|
+
if (!writer)
|
|
21883
|
+
writer = $Writer.create();
|
|
21884
|
+
if (message.minimumChargingRateKw != null && Object.hasOwnProperty.call(message, "minimumChargingRateKw"))
|
|
21885
|
+
writer.uint32(/* id 1, wireType 1 =*/9).double(message.minimumChargingRateKw);
|
|
21886
|
+
if (message.connectorTypes != null && message.connectorTypes.length) {
|
|
21887
|
+
writer.uint32(/* id 2, wireType 2 =*/18).fork();
|
|
21888
|
+
for (var i = 0; i < message.connectorTypes.length; ++i)
|
|
21889
|
+
writer.int32(message.connectorTypes[i]);
|
|
21890
|
+
writer.ldelim();
|
|
21891
|
+
}
|
|
21892
|
+
return writer;
|
|
21893
|
+
};
|
|
21894
|
+
|
|
21895
|
+
/**
|
|
21896
|
+
* Encodes the specified EVOptions message, length delimited. Does not implicitly {@link google.maps.places.v1.SearchTextRequest.EVOptions.verify|verify} messages.
|
|
21897
|
+
* @function encodeDelimited
|
|
21898
|
+
* @memberof google.maps.places.v1.SearchTextRequest.EVOptions
|
|
21899
|
+
* @static
|
|
21900
|
+
* @param {google.maps.places.v1.SearchTextRequest.IEVOptions} message EVOptions message or plain object to encode
|
|
21901
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
21902
|
+
* @returns {$protobuf.Writer} Writer
|
|
21903
|
+
*/
|
|
21904
|
+
EVOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
|
21905
|
+
return this.encode(message, writer).ldelim();
|
|
21906
|
+
};
|
|
21907
|
+
|
|
21908
|
+
/**
|
|
21909
|
+
* Decodes a EVOptions message from the specified reader or buffer.
|
|
21910
|
+
* @function decode
|
|
21911
|
+
* @memberof google.maps.places.v1.SearchTextRequest.EVOptions
|
|
21912
|
+
* @static
|
|
21913
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
21914
|
+
* @param {number} [length] Message length if known beforehand
|
|
21915
|
+
* @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions
|
|
21916
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
21917
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
21918
|
+
*/
|
|
21919
|
+
EVOptions.decode = function decode(reader, length) {
|
|
21920
|
+
if (!(reader instanceof $Reader))
|
|
21921
|
+
reader = $Reader.create(reader);
|
|
21922
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.SearchTextRequest.EVOptions();
|
|
21923
|
+
while (reader.pos < end) {
|
|
21924
|
+
var tag = reader.uint32();
|
|
21925
|
+
switch (tag >>> 3) {
|
|
21926
|
+
case 1: {
|
|
21927
|
+
message.minimumChargingRateKw = reader.double();
|
|
21928
|
+
break;
|
|
21929
|
+
}
|
|
21930
|
+
case 2: {
|
|
21931
|
+
if (!(message.connectorTypes && message.connectorTypes.length))
|
|
21932
|
+
message.connectorTypes = [];
|
|
21933
|
+
if ((tag & 7) === 2) {
|
|
21934
|
+
var end2 = reader.uint32() + reader.pos;
|
|
21935
|
+
while (reader.pos < end2)
|
|
21936
|
+
message.connectorTypes.push(reader.int32());
|
|
21937
|
+
} else
|
|
21938
|
+
message.connectorTypes.push(reader.int32());
|
|
21939
|
+
break;
|
|
21940
|
+
}
|
|
21941
|
+
default:
|
|
21942
|
+
reader.skipType(tag & 7);
|
|
21943
|
+
break;
|
|
21944
|
+
}
|
|
21945
|
+
}
|
|
21946
|
+
return message;
|
|
21947
|
+
};
|
|
21948
|
+
|
|
21949
|
+
/**
|
|
21950
|
+
* Decodes a EVOptions message from the specified reader or buffer, length delimited.
|
|
21951
|
+
* @function decodeDelimited
|
|
21952
|
+
* @memberof google.maps.places.v1.SearchTextRequest.EVOptions
|
|
21953
|
+
* @static
|
|
21954
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
21955
|
+
* @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions
|
|
21956
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
21957
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
21958
|
+
*/
|
|
21959
|
+
EVOptions.decodeDelimited = function decodeDelimited(reader) {
|
|
21960
|
+
if (!(reader instanceof $Reader))
|
|
21961
|
+
reader = new $Reader(reader);
|
|
21962
|
+
return this.decode(reader, reader.uint32());
|
|
21963
|
+
};
|
|
21964
|
+
|
|
21965
|
+
/**
|
|
21966
|
+
* Verifies a EVOptions message.
|
|
21967
|
+
* @function verify
|
|
21968
|
+
* @memberof google.maps.places.v1.SearchTextRequest.EVOptions
|
|
21969
|
+
* @static
|
|
21970
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
21971
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
21972
|
+
*/
|
|
21973
|
+
EVOptions.verify = function verify(message) {
|
|
21974
|
+
if (typeof message !== "object" || message === null)
|
|
21975
|
+
return "object expected";
|
|
21976
|
+
if (message.minimumChargingRateKw != null && message.hasOwnProperty("minimumChargingRateKw"))
|
|
21977
|
+
if (typeof message.minimumChargingRateKw !== "number")
|
|
21978
|
+
return "minimumChargingRateKw: number expected";
|
|
21979
|
+
if (message.connectorTypes != null && message.hasOwnProperty("connectorTypes")) {
|
|
21980
|
+
if (!Array.isArray(message.connectorTypes))
|
|
21981
|
+
return "connectorTypes: array expected";
|
|
21982
|
+
for (var i = 0; i < message.connectorTypes.length; ++i)
|
|
21983
|
+
switch (message.connectorTypes[i]) {
|
|
21984
|
+
default:
|
|
21985
|
+
return "connectorTypes: enum value[] expected";
|
|
21986
|
+
case 0:
|
|
21987
|
+
case 1:
|
|
21988
|
+
case 2:
|
|
21989
|
+
case 3:
|
|
21990
|
+
case 4:
|
|
21991
|
+
case 5:
|
|
21992
|
+
case 6:
|
|
21993
|
+
case 7:
|
|
21994
|
+
case 8:
|
|
21995
|
+
case 9:
|
|
21996
|
+
break;
|
|
21997
|
+
}
|
|
21998
|
+
}
|
|
21999
|
+
return null;
|
|
22000
|
+
};
|
|
22001
|
+
|
|
22002
|
+
/**
|
|
22003
|
+
* Creates a EVOptions message from a plain object. Also converts values to their respective internal types.
|
|
22004
|
+
* @function fromObject
|
|
22005
|
+
* @memberof google.maps.places.v1.SearchTextRequest.EVOptions
|
|
22006
|
+
* @static
|
|
22007
|
+
* @param {Object.<string,*>} object Plain object
|
|
22008
|
+
* @returns {google.maps.places.v1.SearchTextRequest.EVOptions} EVOptions
|
|
22009
|
+
*/
|
|
22010
|
+
EVOptions.fromObject = function fromObject(object) {
|
|
22011
|
+
if (object instanceof $root.google.maps.places.v1.SearchTextRequest.EVOptions)
|
|
22012
|
+
return object;
|
|
22013
|
+
var message = new $root.google.maps.places.v1.SearchTextRequest.EVOptions();
|
|
22014
|
+
if (object.minimumChargingRateKw != null)
|
|
22015
|
+
message.minimumChargingRateKw = Number(object.minimumChargingRateKw);
|
|
22016
|
+
if (object.connectorTypes) {
|
|
22017
|
+
if (!Array.isArray(object.connectorTypes))
|
|
22018
|
+
throw TypeError(".google.maps.places.v1.SearchTextRequest.EVOptions.connectorTypes: array expected");
|
|
22019
|
+
message.connectorTypes = [];
|
|
22020
|
+
for (var i = 0; i < object.connectorTypes.length; ++i)
|
|
22021
|
+
switch (object.connectorTypes[i]) {
|
|
22022
|
+
default:
|
|
22023
|
+
if (typeof object.connectorTypes[i] === "number") {
|
|
22024
|
+
message.connectorTypes[i] = object.connectorTypes[i];
|
|
22025
|
+
break;
|
|
22026
|
+
}
|
|
22027
|
+
case "EV_CONNECTOR_TYPE_UNSPECIFIED":
|
|
22028
|
+
case 0:
|
|
22029
|
+
message.connectorTypes[i] = 0;
|
|
22030
|
+
break;
|
|
22031
|
+
case "EV_CONNECTOR_TYPE_OTHER":
|
|
22032
|
+
case 1:
|
|
22033
|
+
message.connectorTypes[i] = 1;
|
|
22034
|
+
break;
|
|
22035
|
+
case "EV_CONNECTOR_TYPE_J1772":
|
|
22036
|
+
case 2:
|
|
22037
|
+
message.connectorTypes[i] = 2;
|
|
22038
|
+
break;
|
|
22039
|
+
case "EV_CONNECTOR_TYPE_TYPE_2":
|
|
22040
|
+
case 3:
|
|
22041
|
+
message.connectorTypes[i] = 3;
|
|
22042
|
+
break;
|
|
22043
|
+
case "EV_CONNECTOR_TYPE_CHADEMO":
|
|
22044
|
+
case 4:
|
|
22045
|
+
message.connectorTypes[i] = 4;
|
|
22046
|
+
break;
|
|
22047
|
+
case "EV_CONNECTOR_TYPE_CCS_COMBO_1":
|
|
22048
|
+
case 5:
|
|
22049
|
+
message.connectorTypes[i] = 5;
|
|
22050
|
+
break;
|
|
22051
|
+
case "EV_CONNECTOR_TYPE_CCS_COMBO_2":
|
|
22052
|
+
case 6:
|
|
22053
|
+
message.connectorTypes[i] = 6;
|
|
22054
|
+
break;
|
|
22055
|
+
case "EV_CONNECTOR_TYPE_TESLA":
|
|
22056
|
+
case 7:
|
|
22057
|
+
message.connectorTypes[i] = 7;
|
|
22058
|
+
break;
|
|
22059
|
+
case "EV_CONNECTOR_TYPE_UNSPECIFIED_GB_T":
|
|
22060
|
+
case 8:
|
|
22061
|
+
message.connectorTypes[i] = 8;
|
|
22062
|
+
break;
|
|
22063
|
+
case "EV_CONNECTOR_TYPE_UNSPECIFIED_WALL_OUTLET":
|
|
22064
|
+
case 9:
|
|
22065
|
+
message.connectorTypes[i] = 9;
|
|
22066
|
+
break;
|
|
22067
|
+
}
|
|
22068
|
+
}
|
|
22069
|
+
return message;
|
|
22070
|
+
};
|
|
22071
|
+
|
|
22072
|
+
/**
|
|
22073
|
+
* Creates a plain object from a EVOptions message. Also converts values to other types if specified.
|
|
22074
|
+
* @function toObject
|
|
22075
|
+
* @memberof google.maps.places.v1.SearchTextRequest.EVOptions
|
|
22076
|
+
* @static
|
|
22077
|
+
* @param {google.maps.places.v1.SearchTextRequest.EVOptions} message EVOptions
|
|
22078
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
22079
|
+
* @returns {Object.<string,*>} Plain object
|
|
22080
|
+
*/
|
|
22081
|
+
EVOptions.toObject = function toObject(message, options) {
|
|
22082
|
+
if (!options)
|
|
22083
|
+
options = {};
|
|
22084
|
+
var object = {};
|
|
22085
|
+
if (options.arrays || options.defaults)
|
|
22086
|
+
object.connectorTypes = [];
|
|
22087
|
+
if (options.defaults)
|
|
22088
|
+
object.minimumChargingRateKw = 0;
|
|
22089
|
+
if (message.minimumChargingRateKw != null && message.hasOwnProperty("minimumChargingRateKw"))
|
|
22090
|
+
object.minimumChargingRateKw = options.json && !isFinite(message.minimumChargingRateKw) ? String(message.minimumChargingRateKw) : message.minimumChargingRateKw;
|
|
22091
|
+
if (message.connectorTypes && message.connectorTypes.length) {
|
|
22092
|
+
object.connectorTypes = [];
|
|
22093
|
+
for (var j = 0; j < message.connectorTypes.length; ++j)
|
|
22094
|
+
object.connectorTypes[j] = options.enums === String ? $root.google.maps.places.v1.EVConnectorType[message.connectorTypes[j]] === undefined ? message.connectorTypes[j] : $root.google.maps.places.v1.EVConnectorType[message.connectorTypes[j]] : message.connectorTypes[j];
|
|
22095
|
+
}
|
|
22096
|
+
return object;
|
|
22097
|
+
};
|
|
22098
|
+
|
|
22099
|
+
/**
|
|
22100
|
+
* Converts this EVOptions to JSON.
|
|
22101
|
+
* @function toJSON
|
|
22102
|
+
* @memberof google.maps.places.v1.SearchTextRequest.EVOptions
|
|
22103
|
+
* @instance
|
|
22104
|
+
* @returns {Object.<string,*>} JSON object
|
|
22105
|
+
*/
|
|
22106
|
+
EVOptions.prototype.toJSON = function toJSON() {
|
|
22107
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
22108
|
+
};
|
|
22109
|
+
|
|
22110
|
+
/**
|
|
22111
|
+
* Gets the default type url for EVOptions
|
|
22112
|
+
* @function getTypeUrl
|
|
22113
|
+
* @memberof google.maps.places.v1.SearchTextRequest.EVOptions
|
|
22114
|
+
* @static
|
|
22115
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
22116
|
+
* @returns {string} The default type url
|
|
22117
|
+
*/
|
|
22118
|
+
EVOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
22119
|
+
if (typeUrlPrefix === undefined) {
|
|
22120
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
22121
|
+
}
|
|
22122
|
+
return typeUrlPrefix + "/google.maps.places.v1.SearchTextRequest.EVOptions";
|
|
22123
|
+
};
|
|
22124
|
+
|
|
22125
|
+
return EVOptions;
|
|
22126
|
+
})();
|
|
22127
|
+
|
|
21757
22128
|
return SearchTextRequest;
|
|
21758
22129
|
})();
|
|
21759
22130
|
|
|
@@ -22490,6 +22861,7 @@
|
|
|
22490
22861
|
* @property {string|null} [name] GetPlaceRequest name
|
|
22491
22862
|
* @property {string|null} [languageCode] GetPlaceRequest languageCode
|
|
22492
22863
|
* @property {string|null} [regionCode] GetPlaceRequest regionCode
|
|
22864
|
+
* @property {string|null} [sessionToken] GetPlaceRequest sessionToken
|
|
22493
22865
|
*/
|
|
22494
22866
|
|
|
22495
22867
|
/**
|
|
@@ -22531,6 +22903,14 @@
|
|
|
22531
22903
|
*/
|
|
22532
22904
|
GetPlaceRequest.prototype.regionCode = "";
|
|
22533
22905
|
|
|
22906
|
+
/**
|
|
22907
|
+
* GetPlaceRequest sessionToken.
|
|
22908
|
+
* @member {string} sessionToken
|
|
22909
|
+
* @memberof google.maps.places.v1.GetPlaceRequest
|
|
22910
|
+
* @instance
|
|
22911
|
+
*/
|
|
22912
|
+
GetPlaceRequest.prototype.sessionToken = "";
|
|
22913
|
+
|
|
22534
22914
|
/**
|
|
22535
22915
|
* Creates a new GetPlaceRequest instance using the specified properties.
|
|
22536
22916
|
* @function create
|
|
@@ -22561,6 +22941,8 @@
|
|
|
22561
22941
|
writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode);
|
|
22562
22942
|
if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode"))
|
|
22563
22943
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.regionCode);
|
|
22944
|
+
if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken"))
|
|
22945
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.sessionToken);
|
|
22564
22946
|
return writer;
|
|
22565
22947
|
};
|
|
22566
22948
|
|
|
@@ -22607,6 +22989,10 @@
|
|
|
22607
22989
|
message.regionCode = reader.string();
|
|
22608
22990
|
break;
|
|
22609
22991
|
}
|
|
22992
|
+
case 4: {
|
|
22993
|
+
message.sessionToken = reader.string();
|
|
22994
|
+
break;
|
|
22995
|
+
}
|
|
22610
22996
|
default:
|
|
22611
22997
|
reader.skipType(tag & 7);
|
|
22612
22998
|
break;
|
|
@@ -22651,6 +23037,9 @@
|
|
|
22651
23037
|
if (message.regionCode != null && message.hasOwnProperty("regionCode"))
|
|
22652
23038
|
if (!$util.isString(message.regionCode))
|
|
22653
23039
|
return "regionCode: string expected";
|
|
23040
|
+
if (message.sessionToken != null && message.hasOwnProperty("sessionToken"))
|
|
23041
|
+
if (!$util.isString(message.sessionToken))
|
|
23042
|
+
return "sessionToken: string expected";
|
|
22654
23043
|
return null;
|
|
22655
23044
|
};
|
|
22656
23045
|
|
|
@@ -22672,6 +23061,8 @@
|
|
|
22672
23061
|
message.languageCode = String(object.languageCode);
|
|
22673
23062
|
if (object.regionCode != null)
|
|
22674
23063
|
message.regionCode = String(object.regionCode);
|
|
23064
|
+
if (object.sessionToken != null)
|
|
23065
|
+
message.sessionToken = String(object.sessionToken);
|
|
22675
23066
|
return message;
|
|
22676
23067
|
};
|
|
22677
23068
|
|
|
@@ -22692,6 +23083,7 @@
|
|
|
22692
23083
|
object.name = "";
|
|
22693
23084
|
object.languageCode = "";
|
|
22694
23085
|
object.regionCode = "";
|
|
23086
|
+
object.sessionToken = "";
|
|
22695
23087
|
}
|
|
22696
23088
|
if (message.name != null && message.hasOwnProperty("name"))
|
|
22697
23089
|
object.name = message.name;
|
|
@@ -22699,6 +23091,8 @@
|
|
|
22699
23091
|
object.languageCode = message.languageCode;
|
|
22700
23092
|
if (message.regionCode != null && message.hasOwnProperty("regionCode"))
|
|
22701
23093
|
object.regionCode = message.regionCode;
|
|
23094
|
+
if (message.sessionToken != null && message.hasOwnProperty("sessionToken"))
|
|
23095
|
+
object.sessionToken = message.sessionToken;
|
|
22702
23096
|
return object;
|
|
22703
23097
|
};
|
|
22704
23098
|
|
|
@@ -22731,6 +23125,2794 @@
|
|
|
22731
23125
|
return GetPlaceRequest;
|
|
22732
23126
|
})();
|
|
22733
23127
|
|
|
23128
|
+
v1.AutocompletePlacesRequest = (function() {
|
|
23129
|
+
|
|
23130
|
+
/**
|
|
23131
|
+
* Properties of an AutocompletePlacesRequest.
|
|
23132
|
+
* @memberof google.maps.places.v1
|
|
23133
|
+
* @interface IAutocompletePlacesRequest
|
|
23134
|
+
* @property {string|null} [input] AutocompletePlacesRequest input
|
|
23135
|
+
* @property {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null} [locationBias] AutocompletePlacesRequest locationBias
|
|
23136
|
+
* @property {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null} [locationRestriction] AutocompletePlacesRequest locationRestriction
|
|
23137
|
+
* @property {Array.<string>|null} [includedPrimaryTypes] AutocompletePlacesRequest includedPrimaryTypes
|
|
23138
|
+
* @property {Array.<string>|null} [includedRegionCodes] AutocompletePlacesRequest includedRegionCodes
|
|
23139
|
+
* @property {string|null} [languageCode] AutocompletePlacesRequest languageCode
|
|
23140
|
+
* @property {string|null} [regionCode] AutocompletePlacesRequest regionCode
|
|
23141
|
+
* @property {google.type.ILatLng|null} [origin] AutocompletePlacesRequest origin
|
|
23142
|
+
* @property {number|null} [inputOffset] AutocompletePlacesRequest inputOffset
|
|
23143
|
+
* @property {boolean|null} [includeQueryPredictions] AutocompletePlacesRequest includeQueryPredictions
|
|
23144
|
+
* @property {string|null} [sessionToken] AutocompletePlacesRequest sessionToken
|
|
23145
|
+
*/
|
|
23146
|
+
|
|
23147
|
+
/**
|
|
23148
|
+
* Constructs a new AutocompletePlacesRequest.
|
|
23149
|
+
* @memberof google.maps.places.v1
|
|
23150
|
+
* @classdesc Represents an AutocompletePlacesRequest.
|
|
23151
|
+
* @implements IAutocompletePlacesRequest
|
|
23152
|
+
* @constructor
|
|
23153
|
+
* @param {google.maps.places.v1.IAutocompletePlacesRequest=} [properties] Properties to set
|
|
23154
|
+
*/
|
|
23155
|
+
function AutocompletePlacesRequest(properties) {
|
|
23156
|
+
this.includedPrimaryTypes = [];
|
|
23157
|
+
this.includedRegionCodes = [];
|
|
23158
|
+
if (properties)
|
|
23159
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
23160
|
+
if (properties[keys[i]] != null)
|
|
23161
|
+
this[keys[i]] = properties[keys[i]];
|
|
23162
|
+
}
|
|
23163
|
+
|
|
23164
|
+
/**
|
|
23165
|
+
* AutocompletePlacesRequest input.
|
|
23166
|
+
* @member {string} input
|
|
23167
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23168
|
+
* @instance
|
|
23169
|
+
*/
|
|
23170
|
+
AutocompletePlacesRequest.prototype.input = "";
|
|
23171
|
+
|
|
23172
|
+
/**
|
|
23173
|
+
* AutocompletePlacesRequest locationBias.
|
|
23174
|
+
* @member {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias|null|undefined} locationBias
|
|
23175
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23176
|
+
* @instance
|
|
23177
|
+
*/
|
|
23178
|
+
AutocompletePlacesRequest.prototype.locationBias = null;
|
|
23179
|
+
|
|
23180
|
+
/**
|
|
23181
|
+
* AutocompletePlacesRequest locationRestriction.
|
|
23182
|
+
* @member {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction|null|undefined} locationRestriction
|
|
23183
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23184
|
+
* @instance
|
|
23185
|
+
*/
|
|
23186
|
+
AutocompletePlacesRequest.prototype.locationRestriction = null;
|
|
23187
|
+
|
|
23188
|
+
/**
|
|
23189
|
+
* AutocompletePlacesRequest includedPrimaryTypes.
|
|
23190
|
+
* @member {Array.<string>} includedPrimaryTypes
|
|
23191
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23192
|
+
* @instance
|
|
23193
|
+
*/
|
|
23194
|
+
AutocompletePlacesRequest.prototype.includedPrimaryTypes = $util.emptyArray;
|
|
23195
|
+
|
|
23196
|
+
/**
|
|
23197
|
+
* AutocompletePlacesRequest includedRegionCodes.
|
|
23198
|
+
* @member {Array.<string>} includedRegionCodes
|
|
23199
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23200
|
+
* @instance
|
|
23201
|
+
*/
|
|
23202
|
+
AutocompletePlacesRequest.prototype.includedRegionCodes = $util.emptyArray;
|
|
23203
|
+
|
|
23204
|
+
/**
|
|
23205
|
+
* AutocompletePlacesRequest languageCode.
|
|
23206
|
+
* @member {string} languageCode
|
|
23207
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23208
|
+
* @instance
|
|
23209
|
+
*/
|
|
23210
|
+
AutocompletePlacesRequest.prototype.languageCode = "";
|
|
23211
|
+
|
|
23212
|
+
/**
|
|
23213
|
+
* AutocompletePlacesRequest regionCode.
|
|
23214
|
+
* @member {string} regionCode
|
|
23215
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23216
|
+
* @instance
|
|
23217
|
+
*/
|
|
23218
|
+
AutocompletePlacesRequest.prototype.regionCode = "";
|
|
23219
|
+
|
|
23220
|
+
/**
|
|
23221
|
+
* AutocompletePlacesRequest origin.
|
|
23222
|
+
* @member {google.type.ILatLng|null|undefined} origin
|
|
23223
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23224
|
+
* @instance
|
|
23225
|
+
*/
|
|
23226
|
+
AutocompletePlacesRequest.prototype.origin = null;
|
|
23227
|
+
|
|
23228
|
+
/**
|
|
23229
|
+
* AutocompletePlacesRequest inputOffset.
|
|
23230
|
+
* @member {number} inputOffset
|
|
23231
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23232
|
+
* @instance
|
|
23233
|
+
*/
|
|
23234
|
+
AutocompletePlacesRequest.prototype.inputOffset = 0;
|
|
23235
|
+
|
|
23236
|
+
/**
|
|
23237
|
+
* AutocompletePlacesRequest includeQueryPredictions.
|
|
23238
|
+
* @member {boolean} includeQueryPredictions
|
|
23239
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23240
|
+
* @instance
|
|
23241
|
+
*/
|
|
23242
|
+
AutocompletePlacesRequest.prototype.includeQueryPredictions = false;
|
|
23243
|
+
|
|
23244
|
+
/**
|
|
23245
|
+
* AutocompletePlacesRequest sessionToken.
|
|
23246
|
+
* @member {string} sessionToken
|
|
23247
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23248
|
+
* @instance
|
|
23249
|
+
*/
|
|
23250
|
+
AutocompletePlacesRequest.prototype.sessionToken = "";
|
|
23251
|
+
|
|
23252
|
+
/**
|
|
23253
|
+
* Creates a new AutocompletePlacesRequest instance using the specified properties.
|
|
23254
|
+
* @function create
|
|
23255
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23256
|
+
* @static
|
|
23257
|
+
* @param {google.maps.places.v1.IAutocompletePlacesRequest=} [properties] Properties to set
|
|
23258
|
+
* @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest instance
|
|
23259
|
+
*/
|
|
23260
|
+
AutocompletePlacesRequest.create = function create(properties) {
|
|
23261
|
+
return new AutocompletePlacesRequest(properties);
|
|
23262
|
+
};
|
|
23263
|
+
|
|
23264
|
+
/**
|
|
23265
|
+
* Encodes the specified AutocompletePlacesRequest message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages.
|
|
23266
|
+
* @function encode
|
|
23267
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23268
|
+
* @static
|
|
23269
|
+
* @param {google.maps.places.v1.IAutocompletePlacesRequest} message AutocompletePlacesRequest message or plain object to encode
|
|
23270
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23271
|
+
* @returns {$protobuf.Writer} Writer
|
|
23272
|
+
*/
|
|
23273
|
+
AutocompletePlacesRequest.encode = function encode(message, writer) {
|
|
23274
|
+
if (!writer)
|
|
23275
|
+
writer = $Writer.create();
|
|
23276
|
+
if (message.input != null && Object.hasOwnProperty.call(message, "input"))
|
|
23277
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.input);
|
|
23278
|
+
if (message.locationBias != null && Object.hasOwnProperty.call(message, "locationBias"))
|
|
23279
|
+
$root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.encode(message.locationBias, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
23280
|
+
if (message.locationRestriction != null && Object.hasOwnProperty.call(message, "locationRestriction"))
|
|
23281
|
+
$root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.encode(message.locationRestriction, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
23282
|
+
if (message.includedPrimaryTypes != null && message.includedPrimaryTypes.length)
|
|
23283
|
+
for (var i = 0; i < message.includedPrimaryTypes.length; ++i)
|
|
23284
|
+
writer.uint32(/* id 4, wireType 2 =*/34).string(message.includedPrimaryTypes[i]);
|
|
23285
|
+
if (message.includedRegionCodes != null && message.includedRegionCodes.length)
|
|
23286
|
+
for (var i = 0; i < message.includedRegionCodes.length; ++i)
|
|
23287
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.includedRegionCodes[i]);
|
|
23288
|
+
if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
|
|
23289
|
+
writer.uint32(/* id 6, wireType 2 =*/50).string(message.languageCode);
|
|
23290
|
+
if (message.regionCode != null && Object.hasOwnProperty.call(message, "regionCode"))
|
|
23291
|
+
writer.uint32(/* id 7, wireType 2 =*/58).string(message.regionCode);
|
|
23292
|
+
if (message.origin != null && Object.hasOwnProperty.call(message, "origin"))
|
|
23293
|
+
$root.google.type.LatLng.encode(message.origin, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
|
23294
|
+
if (message.inputOffset != null && Object.hasOwnProperty.call(message, "inputOffset"))
|
|
23295
|
+
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.inputOffset);
|
|
23296
|
+
if (message.includeQueryPredictions != null && Object.hasOwnProperty.call(message, "includeQueryPredictions"))
|
|
23297
|
+
writer.uint32(/* id 10, wireType 0 =*/80).bool(message.includeQueryPredictions);
|
|
23298
|
+
if (message.sessionToken != null && Object.hasOwnProperty.call(message, "sessionToken"))
|
|
23299
|
+
writer.uint32(/* id 11, wireType 2 =*/90).string(message.sessionToken);
|
|
23300
|
+
return writer;
|
|
23301
|
+
};
|
|
23302
|
+
|
|
23303
|
+
/**
|
|
23304
|
+
* Encodes the specified AutocompletePlacesRequest message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.verify|verify} messages.
|
|
23305
|
+
* @function encodeDelimited
|
|
23306
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23307
|
+
* @static
|
|
23308
|
+
* @param {google.maps.places.v1.IAutocompletePlacesRequest} message AutocompletePlacesRequest message or plain object to encode
|
|
23309
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23310
|
+
* @returns {$protobuf.Writer} Writer
|
|
23311
|
+
*/
|
|
23312
|
+
AutocompletePlacesRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
23313
|
+
return this.encode(message, writer).ldelim();
|
|
23314
|
+
};
|
|
23315
|
+
|
|
23316
|
+
/**
|
|
23317
|
+
* Decodes an AutocompletePlacesRequest message from the specified reader or buffer.
|
|
23318
|
+
* @function decode
|
|
23319
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23320
|
+
* @static
|
|
23321
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23322
|
+
* @param {number} [length] Message length if known beforehand
|
|
23323
|
+
* @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest
|
|
23324
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23325
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23326
|
+
*/
|
|
23327
|
+
AutocompletePlacesRequest.decode = function decode(reader, length) {
|
|
23328
|
+
if (!(reader instanceof $Reader))
|
|
23329
|
+
reader = $Reader.create(reader);
|
|
23330
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesRequest();
|
|
23331
|
+
while (reader.pos < end) {
|
|
23332
|
+
var tag = reader.uint32();
|
|
23333
|
+
switch (tag >>> 3) {
|
|
23334
|
+
case 1: {
|
|
23335
|
+
message.input = reader.string();
|
|
23336
|
+
break;
|
|
23337
|
+
}
|
|
23338
|
+
case 2: {
|
|
23339
|
+
message.locationBias = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.decode(reader, reader.uint32());
|
|
23340
|
+
break;
|
|
23341
|
+
}
|
|
23342
|
+
case 3: {
|
|
23343
|
+
message.locationRestriction = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.decode(reader, reader.uint32());
|
|
23344
|
+
break;
|
|
23345
|
+
}
|
|
23346
|
+
case 4: {
|
|
23347
|
+
if (!(message.includedPrimaryTypes && message.includedPrimaryTypes.length))
|
|
23348
|
+
message.includedPrimaryTypes = [];
|
|
23349
|
+
message.includedPrimaryTypes.push(reader.string());
|
|
23350
|
+
break;
|
|
23351
|
+
}
|
|
23352
|
+
case 5: {
|
|
23353
|
+
if (!(message.includedRegionCodes && message.includedRegionCodes.length))
|
|
23354
|
+
message.includedRegionCodes = [];
|
|
23355
|
+
message.includedRegionCodes.push(reader.string());
|
|
23356
|
+
break;
|
|
23357
|
+
}
|
|
23358
|
+
case 6: {
|
|
23359
|
+
message.languageCode = reader.string();
|
|
23360
|
+
break;
|
|
23361
|
+
}
|
|
23362
|
+
case 7: {
|
|
23363
|
+
message.regionCode = reader.string();
|
|
23364
|
+
break;
|
|
23365
|
+
}
|
|
23366
|
+
case 8: {
|
|
23367
|
+
message.origin = $root.google.type.LatLng.decode(reader, reader.uint32());
|
|
23368
|
+
break;
|
|
23369
|
+
}
|
|
23370
|
+
case 9: {
|
|
23371
|
+
message.inputOffset = reader.int32();
|
|
23372
|
+
break;
|
|
23373
|
+
}
|
|
23374
|
+
case 10: {
|
|
23375
|
+
message.includeQueryPredictions = reader.bool();
|
|
23376
|
+
break;
|
|
23377
|
+
}
|
|
23378
|
+
case 11: {
|
|
23379
|
+
message.sessionToken = reader.string();
|
|
23380
|
+
break;
|
|
23381
|
+
}
|
|
23382
|
+
default:
|
|
23383
|
+
reader.skipType(tag & 7);
|
|
23384
|
+
break;
|
|
23385
|
+
}
|
|
23386
|
+
}
|
|
23387
|
+
return message;
|
|
23388
|
+
};
|
|
23389
|
+
|
|
23390
|
+
/**
|
|
23391
|
+
* Decodes an AutocompletePlacesRequest message from the specified reader or buffer, length delimited.
|
|
23392
|
+
* @function decodeDelimited
|
|
23393
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23394
|
+
* @static
|
|
23395
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23396
|
+
* @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest
|
|
23397
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23398
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23399
|
+
*/
|
|
23400
|
+
AutocompletePlacesRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
23401
|
+
if (!(reader instanceof $Reader))
|
|
23402
|
+
reader = new $Reader(reader);
|
|
23403
|
+
return this.decode(reader, reader.uint32());
|
|
23404
|
+
};
|
|
23405
|
+
|
|
23406
|
+
/**
|
|
23407
|
+
* Verifies an AutocompletePlacesRequest message.
|
|
23408
|
+
* @function verify
|
|
23409
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23410
|
+
* @static
|
|
23411
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
23412
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
23413
|
+
*/
|
|
23414
|
+
AutocompletePlacesRequest.verify = function verify(message) {
|
|
23415
|
+
if (typeof message !== "object" || message === null)
|
|
23416
|
+
return "object expected";
|
|
23417
|
+
if (message.input != null && message.hasOwnProperty("input"))
|
|
23418
|
+
if (!$util.isString(message.input))
|
|
23419
|
+
return "input: string expected";
|
|
23420
|
+
if (message.locationBias != null && message.hasOwnProperty("locationBias")) {
|
|
23421
|
+
var error = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify(message.locationBias);
|
|
23422
|
+
if (error)
|
|
23423
|
+
return "locationBias." + error;
|
|
23424
|
+
}
|
|
23425
|
+
if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction")) {
|
|
23426
|
+
var error = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify(message.locationRestriction);
|
|
23427
|
+
if (error)
|
|
23428
|
+
return "locationRestriction." + error;
|
|
23429
|
+
}
|
|
23430
|
+
if (message.includedPrimaryTypes != null && message.hasOwnProperty("includedPrimaryTypes")) {
|
|
23431
|
+
if (!Array.isArray(message.includedPrimaryTypes))
|
|
23432
|
+
return "includedPrimaryTypes: array expected";
|
|
23433
|
+
for (var i = 0; i < message.includedPrimaryTypes.length; ++i)
|
|
23434
|
+
if (!$util.isString(message.includedPrimaryTypes[i]))
|
|
23435
|
+
return "includedPrimaryTypes: string[] expected";
|
|
23436
|
+
}
|
|
23437
|
+
if (message.includedRegionCodes != null && message.hasOwnProperty("includedRegionCodes")) {
|
|
23438
|
+
if (!Array.isArray(message.includedRegionCodes))
|
|
23439
|
+
return "includedRegionCodes: array expected";
|
|
23440
|
+
for (var i = 0; i < message.includedRegionCodes.length; ++i)
|
|
23441
|
+
if (!$util.isString(message.includedRegionCodes[i]))
|
|
23442
|
+
return "includedRegionCodes: string[] expected";
|
|
23443
|
+
}
|
|
23444
|
+
if (message.languageCode != null && message.hasOwnProperty("languageCode"))
|
|
23445
|
+
if (!$util.isString(message.languageCode))
|
|
23446
|
+
return "languageCode: string expected";
|
|
23447
|
+
if (message.regionCode != null && message.hasOwnProperty("regionCode"))
|
|
23448
|
+
if (!$util.isString(message.regionCode))
|
|
23449
|
+
return "regionCode: string expected";
|
|
23450
|
+
if (message.origin != null && message.hasOwnProperty("origin")) {
|
|
23451
|
+
var error = $root.google.type.LatLng.verify(message.origin);
|
|
23452
|
+
if (error)
|
|
23453
|
+
return "origin." + error;
|
|
23454
|
+
}
|
|
23455
|
+
if (message.inputOffset != null && message.hasOwnProperty("inputOffset"))
|
|
23456
|
+
if (!$util.isInteger(message.inputOffset))
|
|
23457
|
+
return "inputOffset: integer expected";
|
|
23458
|
+
if (message.includeQueryPredictions != null && message.hasOwnProperty("includeQueryPredictions"))
|
|
23459
|
+
if (typeof message.includeQueryPredictions !== "boolean")
|
|
23460
|
+
return "includeQueryPredictions: boolean expected";
|
|
23461
|
+
if (message.sessionToken != null && message.hasOwnProperty("sessionToken"))
|
|
23462
|
+
if (!$util.isString(message.sessionToken))
|
|
23463
|
+
return "sessionToken: string expected";
|
|
23464
|
+
return null;
|
|
23465
|
+
};
|
|
23466
|
+
|
|
23467
|
+
/**
|
|
23468
|
+
* Creates an AutocompletePlacesRequest message from a plain object. Also converts values to their respective internal types.
|
|
23469
|
+
* @function fromObject
|
|
23470
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23471
|
+
* @static
|
|
23472
|
+
* @param {Object.<string,*>} object Plain object
|
|
23473
|
+
* @returns {google.maps.places.v1.AutocompletePlacesRequest} AutocompletePlacesRequest
|
|
23474
|
+
*/
|
|
23475
|
+
AutocompletePlacesRequest.fromObject = function fromObject(object) {
|
|
23476
|
+
if (object instanceof $root.google.maps.places.v1.AutocompletePlacesRequest)
|
|
23477
|
+
return object;
|
|
23478
|
+
var message = new $root.google.maps.places.v1.AutocompletePlacesRequest();
|
|
23479
|
+
if (object.input != null)
|
|
23480
|
+
message.input = String(object.input);
|
|
23481
|
+
if (object.locationBias != null) {
|
|
23482
|
+
if (typeof object.locationBias !== "object")
|
|
23483
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.locationBias: object expected");
|
|
23484
|
+
message.locationBias = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.fromObject(object.locationBias);
|
|
23485
|
+
}
|
|
23486
|
+
if (object.locationRestriction != null) {
|
|
23487
|
+
if (typeof object.locationRestriction !== "object")
|
|
23488
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.locationRestriction: object expected");
|
|
23489
|
+
message.locationRestriction = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.fromObject(object.locationRestriction);
|
|
23490
|
+
}
|
|
23491
|
+
if (object.includedPrimaryTypes) {
|
|
23492
|
+
if (!Array.isArray(object.includedPrimaryTypes))
|
|
23493
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.includedPrimaryTypes: array expected");
|
|
23494
|
+
message.includedPrimaryTypes = [];
|
|
23495
|
+
for (var i = 0; i < object.includedPrimaryTypes.length; ++i)
|
|
23496
|
+
message.includedPrimaryTypes[i] = String(object.includedPrimaryTypes[i]);
|
|
23497
|
+
}
|
|
23498
|
+
if (object.includedRegionCodes) {
|
|
23499
|
+
if (!Array.isArray(object.includedRegionCodes))
|
|
23500
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.includedRegionCodes: array expected");
|
|
23501
|
+
message.includedRegionCodes = [];
|
|
23502
|
+
for (var i = 0; i < object.includedRegionCodes.length; ++i)
|
|
23503
|
+
message.includedRegionCodes[i] = String(object.includedRegionCodes[i]);
|
|
23504
|
+
}
|
|
23505
|
+
if (object.languageCode != null)
|
|
23506
|
+
message.languageCode = String(object.languageCode);
|
|
23507
|
+
if (object.regionCode != null)
|
|
23508
|
+
message.regionCode = String(object.regionCode);
|
|
23509
|
+
if (object.origin != null) {
|
|
23510
|
+
if (typeof object.origin !== "object")
|
|
23511
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.origin: object expected");
|
|
23512
|
+
message.origin = $root.google.type.LatLng.fromObject(object.origin);
|
|
23513
|
+
}
|
|
23514
|
+
if (object.inputOffset != null)
|
|
23515
|
+
message.inputOffset = object.inputOffset | 0;
|
|
23516
|
+
if (object.includeQueryPredictions != null)
|
|
23517
|
+
message.includeQueryPredictions = Boolean(object.includeQueryPredictions);
|
|
23518
|
+
if (object.sessionToken != null)
|
|
23519
|
+
message.sessionToken = String(object.sessionToken);
|
|
23520
|
+
return message;
|
|
23521
|
+
};
|
|
23522
|
+
|
|
23523
|
+
/**
|
|
23524
|
+
* Creates a plain object from an AutocompletePlacesRequest message. Also converts values to other types if specified.
|
|
23525
|
+
* @function toObject
|
|
23526
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23527
|
+
* @static
|
|
23528
|
+
* @param {google.maps.places.v1.AutocompletePlacesRequest} message AutocompletePlacesRequest
|
|
23529
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
23530
|
+
* @returns {Object.<string,*>} Plain object
|
|
23531
|
+
*/
|
|
23532
|
+
AutocompletePlacesRequest.toObject = function toObject(message, options) {
|
|
23533
|
+
if (!options)
|
|
23534
|
+
options = {};
|
|
23535
|
+
var object = {};
|
|
23536
|
+
if (options.arrays || options.defaults) {
|
|
23537
|
+
object.includedPrimaryTypes = [];
|
|
23538
|
+
object.includedRegionCodes = [];
|
|
23539
|
+
}
|
|
23540
|
+
if (options.defaults) {
|
|
23541
|
+
object.input = "";
|
|
23542
|
+
object.locationBias = null;
|
|
23543
|
+
object.locationRestriction = null;
|
|
23544
|
+
object.languageCode = "";
|
|
23545
|
+
object.regionCode = "";
|
|
23546
|
+
object.origin = null;
|
|
23547
|
+
object.inputOffset = 0;
|
|
23548
|
+
object.includeQueryPredictions = false;
|
|
23549
|
+
object.sessionToken = "";
|
|
23550
|
+
}
|
|
23551
|
+
if (message.input != null && message.hasOwnProperty("input"))
|
|
23552
|
+
object.input = message.input;
|
|
23553
|
+
if (message.locationBias != null && message.hasOwnProperty("locationBias"))
|
|
23554
|
+
object.locationBias = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias.toObject(message.locationBias, options);
|
|
23555
|
+
if (message.locationRestriction != null && message.hasOwnProperty("locationRestriction"))
|
|
23556
|
+
object.locationRestriction = $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.toObject(message.locationRestriction, options);
|
|
23557
|
+
if (message.includedPrimaryTypes && message.includedPrimaryTypes.length) {
|
|
23558
|
+
object.includedPrimaryTypes = [];
|
|
23559
|
+
for (var j = 0; j < message.includedPrimaryTypes.length; ++j)
|
|
23560
|
+
object.includedPrimaryTypes[j] = message.includedPrimaryTypes[j];
|
|
23561
|
+
}
|
|
23562
|
+
if (message.includedRegionCodes && message.includedRegionCodes.length) {
|
|
23563
|
+
object.includedRegionCodes = [];
|
|
23564
|
+
for (var j = 0; j < message.includedRegionCodes.length; ++j)
|
|
23565
|
+
object.includedRegionCodes[j] = message.includedRegionCodes[j];
|
|
23566
|
+
}
|
|
23567
|
+
if (message.languageCode != null && message.hasOwnProperty("languageCode"))
|
|
23568
|
+
object.languageCode = message.languageCode;
|
|
23569
|
+
if (message.regionCode != null && message.hasOwnProperty("regionCode"))
|
|
23570
|
+
object.regionCode = message.regionCode;
|
|
23571
|
+
if (message.origin != null && message.hasOwnProperty("origin"))
|
|
23572
|
+
object.origin = $root.google.type.LatLng.toObject(message.origin, options);
|
|
23573
|
+
if (message.inputOffset != null && message.hasOwnProperty("inputOffset"))
|
|
23574
|
+
object.inputOffset = message.inputOffset;
|
|
23575
|
+
if (message.includeQueryPredictions != null && message.hasOwnProperty("includeQueryPredictions"))
|
|
23576
|
+
object.includeQueryPredictions = message.includeQueryPredictions;
|
|
23577
|
+
if (message.sessionToken != null && message.hasOwnProperty("sessionToken"))
|
|
23578
|
+
object.sessionToken = message.sessionToken;
|
|
23579
|
+
return object;
|
|
23580
|
+
};
|
|
23581
|
+
|
|
23582
|
+
/**
|
|
23583
|
+
* Converts this AutocompletePlacesRequest to JSON.
|
|
23584
|
+
* @function toJSON
|
|
23585
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23586
|
+
* @instance
|
|
23587
|
+
* @returns {Object.<string,*>} JSON object
|
|
23588
|
+
*/
|
|
23589
|
+
AutocompletePlacesRequest.prototype.toJSON = function toJSON() {
|
|
23590
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
23591
|
+
};
|
|
23592
|
+
|
|
23593
|
+
/**
|
|
23594
|
+
* Gets the default type url for AutocompletePlacesRequest
|
|
23595
|
+
* @function getTypeUrl
|
|
23596
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23597
|
+
* @static
|
|
23598
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
23599
|
+
* @returns {string} The default type url
|
|
23600
|
+
*/
|
|
23601
|
+
AutocompletePlacesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
23602
|
+
if (typeUrlPrefix === undefined) {
|
|
23603
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
23604
|
+
}
|
|
23605
|
+
return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesRequest";
|
|
23606
|
+
};
|
|
23607
|
+
|
|
23608
|
+
AutocompletePlacesRequest.LocationBias = (function() {
|
|
23609
|
+
|
|
23610
|
+
/**
|
|
23611
|
+
* Properties of a LocationBias.
|
|
23612
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23613
|
+
* @interface ILocationBias
|
|
23614
|
+
* @property {google.geo.type.IViewport|null} [rectangle] LocationBias rectangle
|
|
23615
|
+
* @property {google.maps.places.v1.ICircle|null} [circle] LocationBias circle
|
|
23616
|
+
*/
|
|
23617
|
+
|
|
23618
|
+
/**
|
|
23619
|
+
* Constructs a new LocationBias.
|
|
23620
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23621
|
+
* @classdesc Represents a LocationBias.
|
|
23622
|
+
* @implements ILocationBias
|
|
23623
|
+
* @constructor
|
|
23624
|
+
* @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias=} [properties] Properties to set
|
|
23625
|
+
*/
|
|
23626
|
+
function LocationBias(properties) {
|
|
23627
|
+
if (properties)
|
|
23628
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
23629
|
+
if (properties[keys[i]] != null)
|
|
23630
|
+
this[keys[i]] = properties[keys[i]];
|
|
23631
|
+
}
|
|
23632
|
+
|
|
23633
|
+
/**
|
|
23634
|
+
* LocationBias rectangle.
|
|
23635
|
+
* @member {google.geo.type.IViewport|null|undefined} rectangle
|
|
23636
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias
|
|
23637
|
+
* @instance
|
|
23638
|
+
*/
|
|
23639
|
+
LocationBias.prototype.rectangle = null;
|
|
23640
|
+
|
|
23641
|
+
/**
|
|
23642
|
+
* LocationBias circle.
|
|
23643
|
+
* @member {google.maps.places.v1.ICircle|null|undefined} circle
|
|
23644
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias
|
|
23645
|
+
* @instance
|
|
23646
|
+
*/
|
|
23647
|
+
LocationBias.prototype.circle = null;
|
|
23648
|
+
|
|
23649
|
+
// OneOf field names bound to virtual getters and setters
|
|
23650
|
+
var $oneOfFields;
|
|
23651
|
+
|
|
23652
|
+
/**
|
|
23653
|
+
* LocationBias type.
|
|
23654
|
+
* @member {"rectangle"|"circle"|undefined} type
|
|
23655
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias
|
|
23656
|
+
* @instance
|
|
23657
|
+
*/
|
|
23658
|
+
Object.defineProperty(LocationBias.prototype, "type", {
|
|
23659
|
+
get: $util.oneOfGetter($oneOfFields = ["rectangle", "circle"]),
|
|
23660
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
23661
|
+
});
|
|
23662
|
+
|
|
23663
|
+
/**
|
|
23664
|
+
* Creates a new LocationBias instance using the specified properties.
|
|
23665
|
+
* @function create
|
|
23666
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias
|
|
23667
|
+
* @static
|
|
23668
|
+
* @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias=} [properties] Properties to set
|
|
23669
|
+
* @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias instance
|
|
23670
|
+
*/
|
|
23671
|
+
LocationBias.create = function create(properties) {
|
|
23672
|
+
return new LocationBias(properties);
|
|
23673
|
+
};
|
|
23674
|
+
|
|
23675
|
+
/**
|
|
23676
|
+
* Encodes the specified LocationBias message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages.
|
|
23677
|
+
* @function encode
|
|
23678
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias
|
|
23679
|
+
* @static
|
|
23680
|
+
* @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias} message LocationBias message or plain object to encode
|
|
23681
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23682
|
+
* @returns {$protobuf.Writer} Writer
|
|
23683
|
+
*/
|
|
23684
|
+
LocationBias.encode = function encode(message, writer) {
|
|
23685
|
+
if (!writer)
|
|
23686
|
+
writer = $Writer.create();
|
|
23687
|
+
if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle"))
|
|
23688
|
+
$root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
23689
|
+
if (message.circle != null && Object.hasOwnProperty.call(message, "circle"))
|
|
23690
|
+
$root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
23691
|
+
return writer;
|
|
23692
|
+
};
|
|
23693
|
+
|
|
23694
|
+
/**
|
|
23695
|
+
* Encodes the specified LocationBias message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationBias.verify|verify} messages.
|
|
23696
|
+
* @function encodeDelimited
|
|
23697
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias
|
|
23698
|
+
* @static
|
|
23699
|
+
* @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationBias} message LocationBias message or plain object to encode
|
|
23700
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23701
|
+
* @returns {$protobuf.Writer} Writer
|
|
23702
|
+
*/
|
|
23703
|
+
LocationBias.encodeDelimited = function encodeDelimited(message, writer) {
|
|
23704
|
+
return this.encode(message, writer).ldelim();
|
|
23705
|
+
};
|
|
23706
|
+
|
|
23707
|
+
/**
|
|
23708
|
+
* Decodes a LocationBias message from the specified reader or buffer.
|
|
23709
|
+
* @function decode
|
|
23710
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias
|
|
23711
|
+
* @static
|
|
23712
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23713
|
+
* @param {number} [length] Message length if known beforehand
|
|
23714
|
+
* @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias
|
|
23715
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23716
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23717
|
+
*/
|
|
23718
|
+
LocationBias.decode = function decode(reader, length) {
|
|
23719
|
+
if (!(reader instanceof $Reader))
|
|
23720
|
+
reader = $Reader.create(reader);
|
|
23721
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias();
|
|
23722
|
+
while (reader.pos < end) {
|
|
23723
|
+
var tag = reader.uint32();
|
|
23724
|
+
switch (tag >>> 3) {
|
|
23725
|
+
case 1: {
|
|
23726
|
+
message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32());
|
|
23727
|
+
break;
|
|
23728
|
+
}
|
|
23729
|
+
case 2: {
|
|
23730
|
+
message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32());
|
|
23731
|
+
break;
|
|
23732
|
+
}
|
|
23733
|
+
default:
|
|
23734
|
+
reader.skipType(tag & 7);
|
|
23735
|
+
break;
|
|
23736
|
+
}
|
|
23737
|
+
}
|
|
23738
|
+
return message;
|
|
23739
|
+
};
|
|
23740
|
+
|
|
23741
|
+
/**
|
|
23742
|
+
* Decodes a LocationBias message from the specified reader or buffer, length delimited.
|
|
23743
|
+
* @function decodeDelimited
|
|
23744
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias
|
|
23745
|
+
* @static
|
|
23746
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23747
|
+
* @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias
|
|
23748
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23749
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23750
|
+
*/
|
|
23751
|
+
LocationBias.decodeDelimited = function decodeDelimited(reader) {
|
|
23752
|
+
if (!(reader instanceof $Reader))
|
|
23753
|
+
reader = new $Reader(reader);
|
|
23754
|
+
return this.decode(reader, reader.uint32());
|
|
23755
|
+
};
|
|
23756
|
+
|
|
23757
|
+
/**
|
|
23758
|
+
* Verifies a LocationBias message.
|
|
23759
|
+
* @function verify
|
|
23760
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias
|
|
23761
|
+
* @static
|
|
23762
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
23763
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
23764
|
+
*/
|
|
23765
|
+
LocationBias.verify = function verify(message) {
|
|
23766
|
+
if (typeof message !== "object" || message === null)
|
|
23767
|
+
return "object expected";
|
|
23768
|
+
var properties = {};
|
|
23769
|
+
if (message.rectangle != null && message.hasOwnProperty("rectangle")) {
|
|
23770
|
+
properties.type = 1;
|
|
23771
|
+
{
|
|
23772
|
+
var error = $root.google.geo.type.Viewport.verify(message.rectangle);
|
|
23773
|
+
if (error)
|
|
23774
|
+
return "rectangle." + error;
|
|
23775
|
+
}
|
|
23776
|
+
}
|
|
23777
|
+
if (message.circle != null && message.hasOwnProperty("circle")) {
|
|
23778
|
+
if (properties.type === 1)
|
|
23779
|
+
return "type: multiple values";
|
|
23780
|
+
properties.type = 1;
|
|
23781
|
+
{
|
|
23782
|
+
var error = $root.google.maps.places.v1.Circle.verify(message.circle);
|
|
23783
|
+
if (error)
|
|
23784
|
+
return "circle." + error;
|
|
23785
|
+
}
|
|
23786
|
+
}
|
|
23787
|
+
return null;
|
|
23788
|
+
};
|
|
23789
|
+
|
|
23790
|
+
/**
|
|
23791
|
+
* Creates a LocationBias message from a plain object. Also converts values to their respective internal types.
|
|
23792
|
+
* @function fromObject
|
|
23793
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias
|
|
23794
|
+
* @static
|
|
23795
|
+
* @param {Object.<string,*>} object Plain object
|
|
23796
|
+
* @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} LocationBias
|
|
23797
|
+
*/
|
|
23798
|
+
LocationBias.fromObject = function fromObject(object) {
|
|
23799
|
+
if (object instanceof $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias)
|
|
23800
|
+
return object;
|
|
23801
|
+
var message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationBias();
|
|
23802
|
+
if (object.rectangle != null) {
|
|
23803
|
+
if (typeof object.rectangle !== "object")
|
|
23804
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationBias.rectangle: object expected");
|
|
23805
|
+
message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle);
|
|
23806
|
+
}
|
|
23807
|
+
if (object.circle != null) {
|
|
23808
|
+
if (typeof object.circle !== "object")
|
|
23809
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationBias.circle: object expected");
|
|
23810
|
+
message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle);
|
|
23811
|
+
}
|
|
23812
|
+
return message;
|
|
23813
|
+
};
|
|
23814
|
+
|
|
23815
|
+
/**
|
|
23816
|
+
* Creates a plain object from a LocationBias message. Also converts values to other types if specified.
|
|
23817
|
+
* @function toObject
|
|
23818
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias
|
|
23819
|
+
* @static
|
|
23820
|
+
* @param {google.maps.places.v1.AutocompletePlacesRequest.LocationBias} message LocationBias
|
|
23821
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
23822
|
+
* @returns {Object.<string,*>} Plain object
|
|
23823
|
+
*/
|
|
23824
|
+
LocationBias.toObject = function toObject(message, options) {
|
|
23825
|
+
if (!options)
|
|
23826
|
+
options = {};
|
|
23827
|
+
var object = {};
|
|
23828
|
+
if (message.rectangle != null && message.hasOwnProperty("rectangle")) {
|
|
23829
|
+
object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options);
|
|
23830
|
+
if (options.oneofs)
|
|
23831
|
+
object.type = "rectangle";
|
|
23832
|
+
}
|
|
23833
|
+
if (message.circle != null && message.hasOwnProperty("circle")) {
|
|
23834
|
+
object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options);
|
|
23835
|
+
if (options.oneofs)
|
|
23836
|
+
object.type = "circle";
|
|
23837
|
+
}
|
|
23838
|
+
return object;
|
|
23839
|
+
};
|
|
23840
|
+
|
|
23841
|
+
/**
|
|
23842
|
+
* Converts this LocationBias to JSON.
|
|
23843
|
+
* @function toJSON
|
|
23844
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias
|
|
23845
|
+
* @instance
|
|
23846
|
+
* @returns {Object.<string,*>} JSON object
|
|
23847
|
+
*/
|
|
23848
|
+
LocationBias.prototype.toJSON = function toJSON() {
|
|
23849
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
23850
|
+
};
|
|
23851
|
+
|
|
23852
|
+
/**
|
|
23853
|
+
* Gets the default type url for LocationBias
|
|
23854
|
+
* @function getTypeUrl
|
|
23855
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationBias
|
|
23856
|
+
* @static
|
|
23857
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
23858
|
+
* @returns {string} The default type url
|
|
23859
|
+
*/
|
|
23860
|
+
LocationBias.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
23861
|
+
if (typeUrlPrefix === undefined) {
|
|
23862
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
23863
|
+
}
|
|
23864
|
+
return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesRequest.LocationBias";
|
|
23865
|
+
};
|
|
23866
|
+
|
|
23867
|
+
return LocationBias;
|
|
23868
|
+
})();
|
|
23869
|
+
|
|
23870
|
+
AutocompletePlacesRequest.LocationRestriction = (function() {
|
|
23871
|
+
|
|
23872
|
+
/**
|
|
23873
|
+
* Properties of a LocationRestriction.
|
|
23874
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23875
|
+
* @interface ILocationRestriction
|
|
23876
|
+
* @property {google.geo.type.IViewport|null} [rectangle] LocationRestriction rectangle
|
|
23877
|
+
* @property {google.maps.places.v1.ICircle|null} [circle] LocationRestriction circle
|
|
23878
|
+
*/
|
|
23879
|
+
|
|
23880
|
+
/**
|
|
23881
|
+
* Constructs a new LocationRestriction.
|
|
23882
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest
|
|
23883
|
+
* @classdesc Represents a LocationRestriction.
|
|
23884
|
+
* @implements ILocationRestriction
|
|
23885
|
+
* @constructor
|
|
23886
|
+
* @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction=} [properties] Properties to set
|
|
23887
|
+
*/
|
|
23888
|
+
function LocationRestriction(properties) {
|
|
23889
|
+
if (properties)
|
|
23890
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
23891
|
+
if (properties[keys[i]] != null)
|
|
23892
|
+
this[keys[i]] = properties[keys[i]];
|
|
23893
|
+
}
|
|
23894
|
+
|
|
23895
|
+
/**
|
|
23896
|
+
* LocationRestriction rectangle.
|
|
23897
|
+
* @member {google.geo.type.IViewport|null|undefined} rectangle
|
|
23898
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction
|
|
23899
|
+
* @instance
|
|
23900
|
+
*/
|
|
23901
|
+
LocationRestriction.prototype.rectangle = null;
|
|
23902
|
+
|
|
23903
|
+
/**
|
|
23904
|
+
* LocationRestriction circle.
|
|
23905
|
+
* @member {google.maps.places.v1.ICircle|null|undefined} circle
|
|
23906
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction
|
|
23907
|
+
* @instance
|
|
23908
|
+
*/
|
|
23909
|
+
LocationRestriction.prototype.circle = null;
|
|
23910
|
+
|
|
23911
|
+
// OneOf field names bound to virtual getters and setters
|
|
23912
|
+
var $oneOfFields;
|
|
23913
|
+
|
|
23914
|
+
/**
|
|
23915
|
+
* LocationRestriction type.
|
|
23916
|
+
* @member {"rectangle"|"circle"|undefined} type
|
|
23917
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction
|
|
23918
|
+
* @instance
|
|
23919
|
+
*/
|
|
23920
|
+
Object.defineProperty(LocationRestriction.prototype, "type", {
|
|
23921
|
+
get: $util.oneOfGetter($oneOfFields = ["rectangle", "circle"]),
|
|
23922
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
23923
|
+
});
|
|
23924
|
+
|
|
23925
|
+
/**
|
|
23926
|
+
* Creates a new LocationRestriction instance using the specified properties.
|
|
23927
|
+
* @function create
|
|
23928
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction
|
|
23929
|
+
* @static
|
|
23930
|
+
* @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction=} [properties] Properties to set
|
|
23931
|
+
* @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction instance
|
|
23932
|
+
*/
|
|
23933
|
+
LocationRestriction.create = function create(properties) {
|
|
23934
|
+
return new LocationRestriction(properties);
|
|
23935
|
+
};
|
|
23936
|
+
|
|
23937
|
+
/**
|
|
23938
|
+
* Encodes the specified LocationRestriction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages.
|
|
23939
|
+
* @function encode
|
|
23940
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction
|
|
23941
|
+
* @static
|
|
23942
|
+
* @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction} message LocationRestriction message or plain object to encode
|
|
23943
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23944
|
+
* @returns {$protobuf.Writer} Writer
|
|
23945
|
+
*/
|
|
23946
|
+
LocationRestriction.encode = function encode(message, writer) {
|
|
23947
|
+
if (!writer)
|
|
23948
|
+
writer = $Writer.create();
|
|
23949
|
+
if (message.rectangle != null && Object.hasOwnProperty.call(message, "rectangle"))
|
|
23950
|
+
$root.google.geo.type.Viewport.encode(message.rectangle, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
23951
|
+
if (message.circle != null && Object.hasOwnProperty.call(message, "circle"))
|
|
23952
|
+
$root.google.maps.places.v1.Circle.encode(message.circle, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
23953
|
+
return writer;
|
|
23954
|
+
};
|
|
23955
|
+
|
|
23956
|
+
/**
|
|
23957
|
+
* Encodes the specified LocationRestriction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.verify|verify} messages.
|
|
23958
|
+
* @function encodeDelimited
|
|
23959
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction
|
|
23960
|
+
* @static
|
|
23961
|
+
* @param {google.maps.places.v1.AutocompletePlacesRequest.ILocationRestriction} message LocationRestriction message or plain object to encode
|
|
23962
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
23963
|
+
* @returns {$protobuf.Writer} Writer
|
|
23964
|
+
*/
|
|
23965
|
+
LocationRestriction.encodeDelimited = function encodeDelimited(message, writer) {
|
|
23966
|
+
return this.encode(message, writer).ldelim();
|
|
23967
|
+
};
|
|
23968
|
+
|
|
23969
|
+
/**
|
|
23970
|
+
* Decodes a LocationRestriction message from the specified reader or buffer.
|
|
23971
|
+
* @function decode
|
|
23972
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction
|
|
23973
|
+
* @static
|
|
23974
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
23975
|
+
* @param {number} [length] Message length if known beforehand
|
|
23976
|
+
* @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction
|
|
23977
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
23978
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
23979
|
+
*/
|
|
23980
|
+
LocationRestriction.decode = function decode(reader, length) {
|
|
23981
|
+
if (!(reader instanceof $Reader))
|
|
23982
|
+
reader = $Reader.create(reader);
|
|
23983
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction();
|
|
23984
|
+
while (reader.pos < end) {
|
|
23985
|
+
var tag = reader.uint32();
|
|
23986
|
+
switch (tag >>> 3) {
|
|
23987
|
+
case 1: {
|
|
23988
|
+
message.rectangle = $root.google.geo.type.Viewport.decode(reader, reader.uint32());
|
|
23989
|
+
break;
|
|
23990
|
+
}
|
|
23991
|
+
case 2: {
|
|
23992
|
+
message.circle = $root.google.maps.places.v1.Circle.decode(reader, reader.uint32());
|
|
23993
|
+
break;
|
|
23994
|
+
}
|
|
23995
|
+
default:
|
|
23996
|
+
reader.skipType(tag & 7);
|
|
23997
|
+
break;
|
|
23998
|
+
}
|
|
23999
|
+
}
|
|
24000
|
+
return message;
|
|
24001
|
+
};
|
|
24002
|
+
|
|
24003
|
+
/**
|
|
24004
|
+
* Decodes a LocationRestriction message from the specified reader or buffer, length delimited.
|
|
24005
|
+
* @function decodeDelimited
|
|
24006
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction
|
|
24007
|
+
* @static
|
|
24008
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24009
|
+
* @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction
|
|
24010
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24011
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24012
|
+
*/
|
|
24013
|
+
LocationRestriction.decodeDelimited = function decodeDelimited(reader) {
|
|
24014
|
+
if (!(reader instanceof $Reader))
|
|
24015
|
+
reader = new $Reader(reader);
|
|
24016
|
+
return this.decode(reader, reader.uint32());
|
|
24017
|
+
};
|
|
24018
|
+
|
|
24019
|
+
/**
|
|
24020
|
+
* Verifies a LocationRestriction message.
|
|
24021
|
+
* @function verify
|
|
24022
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction
|
|
24023
|
+
* @static
|
|
24024
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
24025
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
24026
|
+
*/
|
|
24027
|
+
LocationRestriction.verify = function verify(message) {
|
|
24028
|
+
if (typeof message !== "object" || message === null)
|
|
24029
|
+
return "object expected";
|
|
24030
|
+
var properties = {};
|
|
24031
|
+
if (message.rectangle != null && message.hasOwnProperty("rectangle")) {
|
|
24032
|
+
properties.type = 1;
|
|
24033
|
+
{
|
|
24034
|
+
var error = $root.google.geo.type.Viewport.verify(message.rectangle);
|
|
24035
|
+
if (error)
|
|
24036
|
+
return "rectangle." + error;
|
|
24037
|
+
}
|
|
24038
|
+
}
|
|
24039
|
+
if (message.circle != null && message.hasOwnProperty("circle")) {
|
|
24040
|
+
if (properties.type === 1)
|
|
24041
|
+
return "type: multiple values";
|
|
24042
|
+
properties.type = 1;
|
|
24043
|
+
{
|
|
24044
|
+
var error = $root.google.maps.places.v1.Circle.verify(message.circle);
|
|
24045
|
+
if (error)
|
|
24046
|
+
return "circle." + error;
|
|
24047
|
+
}
|
|
24048
|
+
}
|
|
24049
|
+
return null;
|
|
24050
|
+
};
|
|
24051
|
+
|
|
24052
|
+
/**
|
|
24053
|
+
* Creates a LocationRestriction message from a plain object. Also converts values to their respective internal types.
|
|
24054
|
+
* @function fromObject
|
|
24055
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction
|
|
24056
|
+
* @static
|
|
24057
|
+
* @param {Object.<string,*>} object Plain object
|
|
24058
|
+
* @returns {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} LocationRestriction
|
|
24059
|
+
*/
|
|
24060
|
+
LocationRestriction.fromObject = function fromObject(object) {
|
|
24061
|
+
if (object instanceof $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction)
|
|
24062
|
+
return object;
|
|
24063
|
+
var message = new $root.google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction();
|
|
24064
|
+
if (object.rectangle != null) {
|
|
24065
|
+
if (typeof object.rectangle !== "object")
|
|
24066
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.rectangle: object expected");
|
|
24067
|
+
message.rectangle = $root.google.geo.type.Viewport.fromObject(object.rectangle);
|
|
24068
|
+
}
|
|
24069
|
+
if (object.circle != null) {
|
|
24070
|
+
if (typeof object.circle !== "object")
|
|
24071
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction.circle: object expected");
|
|
24072
|
+
message.circle = $root.google.maps.places.v1.Circle.fromObject(object.circle);
|
|
24073
|
+
}
|
|
24074
|
+
return message;
|
|
24075
|
+
};
|
|
24076
|
+
|
|
24077
|
+
/**
|
|
24078
|
+
* Creates a plain object from a LocationRestriction message. Also converts values to other types if specified.
|
|
24079
|
+
* @function toObject
|
|
24080
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction
|
|
24081
|
+
* @static
|
|
24082
|
+
* @param {google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction} message LocationRestriction
|
|
24083
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
24084
|
+
* @returns {Object.<string,*>} Plain object
|
|
24085
|
+
*/
|
|
24086
|
+
LocationRestriction.toObject = function toObject(message, options) {
|
|
24087
|
+
if (!options)
|
|
24088
|
+
options = {};
|
|
24089
|
+
var object = {};
|
|
24090
|
+
if (message.rectangle != null && message.hasOwnProperty("rectangle")) {
|
|
24091
|
+
object.rectangle = $root.google.geo.type.Viewport.toObject(message.rectangle, options);
|
|
24092
|
+
if (options.oneofs)
|
|
24093
|
+
object.type = "rectangle";
|
|
24094
|
+
}
|
|
24095
|
+
if (message.circle != null && message.hasOwnProperty("circle")) {
|
|
24096
|
+
object.circle = $root.google.maps.places.v1.Circle.toObject(message.circle, options);
|
|
24097
|
+
if (options.oneofs)
|
|
24098
|
+
object.type = "circle";
|
|
24099
|
+
}
|
|
24100
|
+
return object;
|
|
24101
|
+
};
|
|
24102
|
+
|
|
24103
|
+
/**
|
|
24104
|
+
* Converts this LocationRestriction to JSON.
|
|
24105
|
+
* @function toJSON
|
|
24106
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction
|
|
24107
|
+
* @instance
|
|
24108
|
+
* @returns {Object.<string,*>} JSON object
|
|
24109
|
+
*/
|
|
24110
|
+
LocationRestriction.prototype.toJSON = function toJSON() {
|
|
24111
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
24112
|
+
};
|
|
24113
|
+
|
|
24114
|
+
/**
|
|
24115
|
+
* Gets the default type url for LocationRestriction
|
|
24116
|
+
* @function getTypeUrl
|
|
24117
|
+
* @memberof google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction
|
|
24118
|
+
* @static
|
|
24119
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
24120
|
+
* @returns {string} The default type url
|
|
24121
|
+
*/
|
|
24122
|
+
LocationRestriction.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
24123
|
+
if (typeUrlPrefix === undefined) {
|
|
24124
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
24125
|
+
}
|
|
24126
|
+
return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesRequest.LocationRestriction";
|
|
24127
|
+
};
|
|
24128
|
+
|
|
24129
|
+
return LocationRestriction;
|
|
24130
|
+
})();
|
|
24131
|
+
|
|
24132
|
+
return AutocompletePlacesRequest;
|
|
24133
|
+
})();
|
|
24134
|
+
|
|
24135
|
+
v1.AutocompletePlacesResponse = (function() {
|
|
24136
|
+
|
|
24137
|
+
/**
|
|
24138
|
+
* Properties of an AutocompletePlacesResponse.
|
|
24139
|
+
* @memberof google.maps.places.v1
|
|
24140
|
+
* @interface IAutocompletePlacesResponse
|
|
24141
|
+
* @property {Array.<google.maps.places.v1.AutocompletePlacesResponse.ISuggestion>|null} [suggestions] AutocompletePlacesResponse suggestions
|
|
24142
|
+
*/
|
|
24143
|
+
|
|
24144
|
+
/**
|
|
24145
|
+
* Constructs a new AutocompletePlacesResponse.
|
|
24146
|
+
* @memberof google.maps.places.v1
|
|
24147
|
+
* @classdesc Represents an AutocompletePlacesResponse.
|
|
24148
|
+
* @implements IAutocompletePlacesResponse
|
|
24149
|
+
* @constructor
|
|
24150
|
+
* @param {google.maps.places.v1.IAutocompletePlacesResponse=} [properties] Properties to set
|
|
24151
|
+
*/
|
|
24152
|
+
function AutocompletePlacesResponse(properties) {
|
|
24153
|
+
this.suggestions = [];
|
|
24154
|
+
if (properties)
|
|
24155
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
24156
|
+
if (properties[keys[i]] != null)
|
|
24157
|
+
this[keys[i]] = properties[keys[i]];
|
|
24158
|
+
}
|
|
24159
|
+
|
|
24160
|
+
/**
|
|
24161
|
+
* AutocompletePlacesResponse suggestions.
|
|
24162
|
+
* @member {Array.<google.maps.places.v1.AutocompletePlacesResponse.ISuggestion>} suggestions
|
|
24163
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse
|
|
24164
|
+
* @instance
|
|
24165
|
+
*/
|
|
24166
|
+
AutocompletePlacesResponse.prototype.suggestions = $util.emptyArray;
|
|
24167
|
+
|
|
24168
|
+
/**
|
|
24169
|
+
* Creates a new AutocompletePlacesResponse instance using the specified properties.
|
|
24170
|
+
* @function create
|
|
24171
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse
|
|
24172
|
+
* @static
|
|
24173
|
+
* @param {google.maps.places.v1.IAutocompletePlacesResponse=} [properties] Properties to set
|
|
24174
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse instance
|
|
24175
|
+
*/
|
|
24176
|
+
AutocompletePlacesResponse.create = function create(properties) {
|
|
24177
|
+
return new AutocompletePlacesResponse(properties);
|
|
24178
|
+
};
|
|
24179
|
+
|
|
24180
|
+
/**
|
|
24181
|
+
* Encodes the specified AutocompletePlacesResponse message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages.
|
|
24182
|
+
* @function encode
|
|
24183
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse
|
|
24184
|
+
* @static
|
|
24185
|
+
* @param {google.maps.places.v1.IAutocompletePlacesResponse} message AutocompletePlacesResponse message or plain object to encode
|
|
24186
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24187
|
+
* @returns {$protobuf.Writer} Writer
|
|
24188
|
+
*/
|
|
24189
|
+
AutocompletePlacesResponse.encode = function encode(message, writer) {
|
|
24190
|
+
if (!writer)
|
|
24191
|
+
writer = $Writer.create();
|
|
24192
|
+
if (message.suggestions != null && message.suggestions.length)
|
|
24193
|
+
for (var i = 0; i < message.suggestions.length; ++i)
|
|
24194
|
+
$root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.encode(message.suggestions[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
24195
|
+
return writer;
|
|
24196
|
+
};
|
|
24197
|
+
|
|
24198
|
+
/**
|
|
24199
|
+
* Encodes the specified AutocompletePlacesResponse message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.verify|verify} messages.
|
|
24200
|
+
* @function encodeDelimited
|
|
24201
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse
|
|
24202
|
+
* @static
|
|
24203
|
+
* @param {google.maps.places.v1.IAutocompletePlacesResponse} message AutocompletePlacesResponse message or plain object to encode
|
|
24204
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24205
|
+
* @returns {$protobuf.Writer} Writer
|
|
24206
|
+
*/
|
|
24207
|
+
AutocompletePlacesResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
24208
|
+
return this.encode(message, writer).ldelim();
|
|
24209
|
+
};
|
|
24210
|
+
|
|
24211
|
+
/**
|
|
24212
|
+
* Decodes an AutocompletePlacesResponse message from the specified reader or buffer.
|
|
24213
|
+
* @function decode
|
|
24214
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse
|
|
24215
|
+
* @static
|
|
24216
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24217
|
+
* @param {number} [length] Message length if known beforehand
|
|
24218
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse
|
|
24219
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24220
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24221
|
+
*/
|
|
24222
|
+
AutocompletePlacesResponse.decode = function decode(reader, length) {
|
|
24223
|
+
if (!(reader instanceof $Reader))
|
|
24224
|
+
reader = $Reader.create(reader);
|
|
24225
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse();
|
|
24226
|
+
while (reader.pos < end) {
|
|
24227
|
+
var tag = reader.uint32();
|
|
24228
|
+
switch (tag >>> 3) {
|
|
24229
|
+
case 1: {
|
|
24230
|
+
if (!(message.suggestions && message.suggestions.length))
|
|
24231
|
+
message.suggestions = [];
|
|
24232
|
+
message.suggestions.push($root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.decode(reader, reader.uint32()));
|
|
24233
|
+
break;
|
|
24234
|
+
}
|
|
24235
|
+
default:
|
|
24236
|
+
reader.skipType(tag & 7);
|
|
24237
|
+
break;
|
|
24238
|
+
}
|
|
24239
|
+
}
|
|
24240
|
+
return message;
|
|
24241
|
+
};
|
|
24242
|
+
|
|
24243
|
+
/**
|
|
24244
|
+
* Decodes an AutocompletePlacesResponse message from the specified reader or buffer, length delimited.
|
|
24245
|
+
* @function decodeDelimited
|
|
24246
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse
|
|
24247
|
+
* @static
|
|
24248
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24249
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse
|
|
24250
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24251
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24252
|
+
*/
|
|
24253
|
+
AutocompletePlacesResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
24254
|
+
if (!(reader instanceof $Reader))
|
|
24255
|
+
reader = new $Reader(reader);
|
|
24256
|
+
return this.decode(reader, reader.uint32());
|
|
24257
|
+
};
|
|
24258
|
+
|
|
24259
|
+
/**
|
|
24260
|
+
* Verifies an AutocompletePlacesResponse message.
|
|
24261
|
+
* @function verify
|
|
24262
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse
|
|
24263
|
+
* @static
|
|
24264
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
24265
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
24266
|
+
*/
|
|
24267
|
+
AutocompletePlacesResponse.verify = function verify(message) {
|
|
24268
|
+
if (typeof message !== "object" || message === null)
|
|
24269
|
+
return "object expected";
|
|
24270
|
+
if (message.suggestions != null && message.hasOwnProperty("suggestions")) {
|
|
24271
|
+
if (!Array.isArray(message.suggestions))
|
|
24272
|
+
return "suggestions: array expected";
|
|
24273
|
+
for (var i = 0; i < message.suggestions.length; ++i) {
|
|
24274
|
+
var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify(message.suggestions[i]);
|
|
24275
|
+
if (error)
|
|
24276
|
+
return "suggestions." + error;
|
|
24277
|
+
}
|
|
24278
|
+
}
|
|
24279
|
+
return null;
|
|
24280
|
+
};
|
|
24281
|
+
|
|
24282
|
+
/**
|
|
24283
|
+
* Creates an AutocompletePlacesResponse message from a plain object. Also converts values to their respective internal types.
|
|
24284
|
+
* @function fromObject
|
|
24285
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse
|
|
24286
|
+
* @static
|
|
24287
|
+
* @param {Object.<string,*>} object Plain object
|
|
24288
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse} AutocompletePlacesResponse
|
|
24289
|
+
*/
|
|
24290
|
+
AutocompletePlacesResponse.fromObject = function fromObject(object) {
|
|
24291
|
+
if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse)
|
|
24292
|
+
return object;
|
|
24293
|
+
var message = new $root.google.maps.places.v1.AutocompletePlacesResponse();
|
|
24294
|
+
if (object.suggestions) {
|
|
24295
|
+
if (!Array.isArray(object.suggestions))
|
|
24296
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.suggestions: array expected");
|
|
24297
|
+
message.suggestions = [];
|
|
24298
|
+
for (var i = 0; i < object.suggestions.length; ++i) {
|
|
24299
|
+
if (typeof object.suggestions[i] !== "object")
|
|
24300
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.suggestions: object expected");
|
|
24301
|
+
message.suggestions[i] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.fromObject(object.suggestions[i]);
|
|
24302
|
+
}
|
|
24303
|
+
}
|
|
24304
|
+
return message;
|
|
24305
|
+
};
|
|
24306
|
+
|
|
24307
|
+
/**
|
|
24308
|
+
* Creates a plain object from an AutocompletePlacesResponse message. Also converts values to other types if specified.
|
|
24309
|
+
* @function toObject
|
|
24310
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse
|
|
24311
|
+
* @static
|
|
24312
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse} message AutocompletePlacesResponse
|
|
24313
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
24314
|
+
* @returns {Object.<string,*>} Plain object
|
|
24315
|
+
*/
|
|
24316
|
+
AutocompletePlacesResponse.toObject = function toObject(message, options) {
|
|
24317
|
+
if (!options)
|
|
24318
|
+
options = {};
|
|
24319
|
+
var object = {};
|
|
24320
|
+
if (options.arrays || options.defaults)
|
|
24321
|
+
object.suggestions = [];
|
|
24322
|
+
if (message.suggestions && message.suggestions.length) {
|
|
24323
|
+
object.suggestions = [];
|
|
24324
|
+
for (var j = 0; j < message.suggestions.length; ++j)
|
|
24325
|
+
object.suggestions[j] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.toObject(message.suggestions[j], options);
|
|
24326
|
+
}
|
|
24327
|
+
return object;
|
|
24328
|
+
};
|
|
24329
|
+
|
|
24330
|
+
/**
|
|
24331
|
+
* Converts this AutocompletePlacesResponse to JSON.
|
|
24332
|
+
* @function toJSON
|
|
24333
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse
|
|
24334
|
+
* @instance
|
|
24335
|
+
* @returns {Object.<string,*>} JSON object
|
|
24336
|
+
*/
|
|
24337
|
+
AutocompletePlacesResponse.prototype.toJSON = function toJSON() {
|
|
24338
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
24339
|
+
};
|
|
24340
|
+
|
|
24341
|
+
/**
|
|
24342
|
+
* Gets the default type url for AutocompletePlacesResponse
|
|
24343
|
+
* @function getTypeUrl
|
|
24344
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse
|
|
24345
|
+
* @static
|
|
24346
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
24347
|
+
* @returns {string} The default type url
|
|
24348
|
+
*/
|
|
24349
|
+
AutocompletePlacesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
24350
|
+
if (typeUrlPrefix === undefined) {
|
|
24351
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
24352
|
+
}
|
|
24353
|
+
return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse";
|
|
24354
|
+
};
|
|
24355
|
+
|
|
24356
|
+
AutocompletePlacesResponse.Suggestion = (function() {
|
|
24357
|
+
|
|
24358
|
+
/**
|
|
24359
|
+
* Properties of a Suggestion.
|
|
24360
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse
|
|
24361
|
+
* @interface ISuggestion
|
|
24362
|
+
* @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null} [placePrediction] Suggestion placePrediction
|
|
24363
|
+
* @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null} [queryPrediction] Suggestion queryPrediction
|
|
24364
|
+
*/
|
|
24365
|
+
|
|
24366
|
+
/**
|
|
24367
|
+
* Constructs a new Suggestion.
|
|
24368
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse
|
|
24369
|
+
* @classdesc Represents a Suggestion.
|
|
24370
|
+
* @implements ISuggestion
|
|
24371
|
+
* @constructor
|
|
24372
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion=} [properties] Properties to set
|
|
24373
|
+
*/
|
|
24374
|
+
function Suggestion(properties) {
|
|
24375
|
+
if (properties)
|
|
24376
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
24377
|
+
if (properties[keys[i]] != null)
|
|
24378
|
+
this[keys[i]] = properties[keys[i]];
|
|
24379
|
+
}
|
|
24380
|
+
|
|
24381
|
+
/**
|
|
24382
|
+
* Suggestion placePrediction.
|
|
24383
|
+
* @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction|null|undefined} placePrediction
|
|
24384
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24385
|
+
* @instance
|
|
24386
|
+
*/
|
|
24387
|
+
Suggestion.prototype.placePrediction = null;
|
|
24388
|
+
|
|
24389
|
+
/**
|
|
24390
|
+
* Suggestion queryPrediction.
|
|
24391
|
+
* @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction|null|undefined} queryPrediction
|
|
24392
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24393
|
+
* @instance
|
|
24394
|
+
*/
|
|
24395
|
+
Suggestion.prototype.queryPrediction = null;
|
|
24396
|
+
|
|
24397
|
+
// OneOf field names bound to virtual getters and setters
|
|
24398
|
+
var $oneOfFields;
|
|
24399
|
+
|
|
24400
|
+
/**
|
|
24401
|
+
* Suggestion kind.
|
|
24402
|
+
* @member {"placePrediction"|"queryPrediction"|undefined} kind
|
|
24403
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24404
|
+
* @instance
|
|
24405
|
+
*/
|
|
24406
|
+
Object.defineProperty(Suggestion.prototype, "kind", {
|
|
24407
|
+
get: $util.oneOfGetter($oneOfFields = ["placePrediction", "queryPrediction"]),
|
|
24408
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
24409
|
+
});
|
|
24410
|
+
|
|
24411
|
+
/**
|
|
24412
|
+
* Creates a new Suggestion instance using the specified properties.
|
|
24413
|
+
* @function create
|
|
24414
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24415
|
+
* @static
|
|
24416
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion=} [properties] Properties to set
|
|
24417
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion instance
|
|
24418
|
+
*/
|
|
24419
|
+
Suggestion.create = function create(properties) {
|
|
24420
|
+
return new Suggestion(properties);
|
|
24421
|
+
};
|
|
24422
|
+
|
|
24423
|
+
/**
|
|
24424
|
+
* Encodes the specified Suggestion message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages.
|
|
24425
|
+
* @function encode
|
|
24426
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24427
|
+
* @static
|
|
24428
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion} message Suggestion message or plain object to encode
|
|
24429
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24430
|
+
* @returns {$protobuf.Writer} Writer
|
|
24431
|
+
*/
|
|
24432
|
+
Suggestion.encode = function encode(message, writer) {
|
|
24433
|
+
if (!writer)
|
|
24434
|
+
writer = $Writer.create();
|
|
24435
|
+
if (message.placePrediction != null && Object.hasOwnProperty.call(message, "placePrediction"))
|
|
24436
|
+
$root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.encode(message.placePrediction, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
24437
|
+
if (message.queryPrediction != null && Object.hasOwnProperty.call(message, "queryPrediction"))
|
|
24438
|
+
$root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.encode(message.queryPrediction, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
24439
|
+
return writer;
|
|
24440
|
+
};
|
|
24441
|
+
|
|
24442
|
+
/**
|
|
24443
|
+
* Encodes the specified Suggestion message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.verify|verify} messages.
|
|
24444
|
+
* @function encodeDelimited
|
|
24445
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24446
|
+
* @static
|
|
24447
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.ISuggestion} message Suggestion message or plain object to encode
|
|
24448
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24449
|
+
* @returns {$protobuf.Writer} Writer
|
|
24450
|
+
*/
|
|
24451
|
+
Suggestion.encodeDelimited = function encodeDelimited(message, writer) {
|
|
24452
|
+
return this.encode(message, writer).ldelim();
|
|
24453
|
+
};
|
|
24454
|
+
|
|
24455
|
+
/**
|
|
24456
|
+
* Decodes a Suggestion message from the specified reader or buffer.
|
|
24457
|
+
* @function decode
|
|
24458
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24459
|
+
* @static
|
|
24460
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24461
|
+
* @param {number} [length] Message length if known beforehand
|
|
24462
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion
|
|
24463
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24464
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24465
|
+
*/
|
|
24466
|
+
Suggestion.decode = function decode(reader, length) {
|
|
24467
|
+
if (!(reader instanceof $Reader))
|
|
24468
|
+
reader = $Reader.create(reader);
|
|
24469
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion();
|
|
24470
|
+
while (reader.pos < end) {
|
|
24471
|
+
var tag = reader.uint32();
|
|
24472
|
+
switch (tag >>> 3) {
|
|
24473
|
+
case 1: {
|
|
24474
|
+
message.placePrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.decode(reader, reader.uint32());
|
|
24475
|
+
break;
|
|
24476
|
+
}
|
|
24477
|
+
case 2: {
|
|
24478
|
+
message.queryPrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.decode(reader, reader.uint32());
|
|
24479
|
+
break;
|
|
24480
|
+
}
|
|
24481
|
+
default:
|
|
24482
|
+
reader.skipType(tag & 7);
|
|
24483
|
+
break;
|
|
24484
|
+
}
|
|
24485
|
+
}
|
|
24486
|
+
return message;
|
|
24487
|
+
};
|
|
24488
|
+
|
|
24489
|
+
/**
|
|
24490
|
+
* Decodes a Suggestion message from the specified reader or buffer, length delimited.
|
|
24491
|
+
* @function decodeDelimited
|
|
24492
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24493
|
+
* @static
|
|
24494
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24495
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion
|
|
24496
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24497
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24498
|
+
*/
|
|
24499
|
+
Suggestion.decodeDelimited = function decodeDelimited(reader) {
|
|
24500
|
+
if (!(reader instanceof $Reader))
|
|
24501
|
+
reader = new $Reader(reader);
|
|
24502
|
+
return this.decode(reader, reader.uint32());
|
|
24503
|
+
};
|
|
24504
|
+
|
|
24505
|
+
/**
|
|
24506
|
+
* Verifies a Suggestion message.
|
|
24507
|
+
* @function verify
|
|
24508
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24509
|
+
* @static
|
|
24510
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
24511
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
24512
|
+
*/
|
|
24513
|
+
Suggestion.verify = function verify(message) {
|
|
24514
|
+
if (typeof message !== "object" || message === null)
|
|
24515
|
+
return "object expected";
|
|
24516
|
+
var properties = {};
|
|
24517
|
+
if (message.placePrediction != null && message.hasOwnProperty("placePrediction")) {
|
|
24518
|
+
properties.kind = 1;
|
|
24519
|
+
{
|
|
24520
|
+
var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify(message.placePrediction);
|
|
24521
|
+
if (error)
|
|
24522
|
+
return "placePrediction." + error;
|
|
24523
|
+
}
|
|
24524
|
+
}
|
|
24525
|
+
if (message.queryPrediction != null && message.hasOwnProperty("queryPrediction")) {
|
|
24526
|
+
if (properties.kind === 1)
|
|
24527
|
+
return "kind: multiple values";
|
|
24528
|
+
properties.kind = 1;
|
|
24529
|
+
{
|
|
24530
|
+
var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify(message.queryPrediction);
|
|
24531
|
+
if (error)
|
|
24532
|
+
return "queryPrediction." + error;
|
|
24533
|
+
}
|
|
24534
|
+
}
|
|
24535
|
+
return null;
|
|
24536
|
+
};
|
|
24537
|
+
|
|
24538
|
+
/**
|
|
24539
|
+
* Creates a Suggestion message from a plain object. Also converts values to their respective internal types.
|
|
24540
|
+
* @function fromObject
|
|
24541
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24542
|
+
* @static
|
|
24543
|
+
* @param {Object.<string,*>} object Plain object
|
|
24544
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} Suggestion
|
|
24545
|
+
*/
|
|
24546
|
+
Suggestion.fromObject = function fromObject(object) {
|
|
24547
|
+
if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion)
|
|
24548
|
+
return object;
|
|
24549
|
+
var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion();
|
|
24550
|
+
if (object.placePrediction != null) {
|
|
24551
|
+
if (typeof object.placePrediction !== "object")
|
|
24552
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.placePrediction: object expected");
|
|
24553
|
+
message.placePrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.fromObject(object.placePrediction);
|
|
24554
|
+
}
|
|
24555
|
+
if (object.queryPrediction != null) {
|
|
24556
|
+
if (typeof object.queryPrediction !== "object")
|
|
24557
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.queryPrediction: object expected");
|
|
24558
|
+
message.queryPrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.fromObject(object.queryPrediction);
|
|
24559
|
+
}
|
|
24560
|
+
return message;
|
|
24561
|
+
};
|
|
24562
|
+
|
|
24563
|
+
/**
|
|
24564
|
+
* Creates a plain object from a Suggestion message. Also converts values to other types if specified.
|
|
24565
|
+
* @function toObject
|
|
24566
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24567
|
+
* @static
|
|
24568
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion} message Suggestion
|
|
24569
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
24570
|
+
* @returns {Object.<string,*>} Plain object
|
|
24571
|
+
*/
|
|
24572
|
+
Suggestion.toObject = function toObject(message, options) {
|
|
24573
|
+
if (!options)
|
|
24574
|
+
options = {};
|
|
24575
|
+
var object = {};
|
|
24576
|
+
if (message.placePrediction != null && message.hasOwnProperty("placePrediction")) {
|
|
24577
|
+
object.placePrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.toObject(message.placePrediction, options);
|
|
24578
|
+
if (options.oneofs)
|
|
24579
|
+
object.kind = "placePrediction";
|
|
24580
|
+
}
|
|
24581
|
+
if (message.queryPrediction != null && message.hasOwnProperty("queryPrediction")) {
|
|
24582
|
+
object.queryPrediction = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.toObject(message.queryPrediction, options);
|
|
24583
|
+
if (options.oneofs)
|
|
24584
|
+
object.kind = "queryPrediction";
|
|
24585
|
+
}
|
|
24586
|
+
return object;
|
|
24587
|
+
};
|
|
24588
|
+
|
|
24589
|
+
/**
|
|
24590
|
+
* Converts this Suggestion to JSON.
|
|
24591
|
+
* @function toJSON
|
|
24592
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24593
|
+
* @instance
|
|
24594
|
+
* @returns {Object.<string,*>} JSON object
|
|
24595
|
+
*/
|
|
24596
|
+
Suggestion.prototype.toJSON = function toJSON() {
|
|
24597
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
24598
|
+
};
|
|
24599
|
+
|
|
24600
|
+
/**
|
|
24601
|
+
* Gets the default type url for Suggestion
|
|
24602
|
+
* @function getTypeUrl
|
|
24603
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24604
|
+
* @static
|
|
24605
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
24606
|
+
* @returns {string} The default type url
|
|
24607
|
+
*/
|
|
24608
|
+
Suggestion.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
24609
|
+
if (typeUrlPrefix === undefined) {
|
|
24610
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
24611
|
+
}
|
|
24612
|
+
return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion";
|
|
24613
|
+
};
|
|
24614
|
+
|
|
24615
|
+
Suggestion.StringRange = (function() {
|
|
24616
|
+
|
|
24617
|
+
/**
|
|
24618
|
+
* Properties of a StringRange.
|
|
24619
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24620
|
+
* @interface IStringRange
|
|
24621
|
+
* @property {number|null} [startOffset] StringRange startOffset
|
|
24622
|
+
* @property {number|null} [endOffset] StringRange endOffset
|
|
24623
|
+
*/
|
|
24624
|
+
|
|
24625
|
+
/**
|
|
24626
|
+
* Constructs a new StringRange.
|
|
24627
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24628
|
+
* @classdesc Represents a StringRange.
|
|
24629
|
+
* @implements IStringRange
|
|
24630
|
+
* @constructor
|
|
24631
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange=} [properties] Properties to set
|
|
24632
|
+
*/
|
|
24633
|
+
function StringRange(properties) {
|
|
24634
|
+
if (properties)
|
|
24635
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
24636
|
+
if (properties[keys[i]] != null)
|
|
24637
|
+
this[keys[i]] = properties[keys[i]];
|
|
24638
|
+
}
|
|
24639
|
+
|
|
24640
|
+
/**
|
|
24641
|
+
* StringRange startOffset.
|
|
24642
|
+
* @member {number} startOffset
|
|
24643
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange
|
|
24644
|
+
* @instance
|
|
24645
|
+
*/
|
|
24646
|
+
StringRange.prototype.startOffset = 0;
|
|
24647
|
+
|
|
24648
|
+
/**
|
|
24649
|
+
* StringRange endOffset.
|
|
24650
|
+
* @member {number} endOffset
|
|
24651
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange
|
|
24652
|
+
* @instance
|
|
24653
|
+
*/
|
|
24654
|
+
StringRange.prototype.endOffset = 0;
|
|
24655
|
+
|
|
24656
|
+
/**
|
|
24657
|
+
* Creates a new StringRange instance using the specified properties.
|
|
24658
|
+
* @function create
|
|
24659
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange
|
|
24660
|
+
* @static
|
|
24661
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange=} [properties] Properties to set
|
|
24662
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange instance
|
|
24663
|
+
*/
|
|
24664
|
+
StringRange.create = function create(properties) {
|
|
24665
|
+
return new StringRange(properties);
|
|
24666
|
+
};
|
|
24667
|
+
|
|
24668
|
+
/**
|
|
24669
|
+
* Encodes the specified StringRange message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages.
|
|
24670
|
+
* @function encode
|
|
24671
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange
|
|
24672
|
+
* @static
|
|
24673
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange} message StringRange message or plain object to encode
|
|
24674
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24675
|
+
* @returns {$protobuf.Writer} Writer
|
|
24676
|
+
*/
|
|
24677
|
+
StringRange.encode = function encode(message, writer) {
|
|
24678
|
+
if (!writer)
|
|
24679
|
+
writer = $Writer.create();
|
|
24680
|
+
if (message.startOffset != null && Object.hasOwnProperty.call(message, "startOffset"))
|
|
24681
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.startOffset);
|
|
24682
|
+
if (message.endOffset != null && Object.hasOwnProperty.call(message, "endOffset"))
|
|
24683
|
+
writer.uint32(/* id 2, wireType 0 =*/16).int32(message.endOffset);
|
|
24684
|
+
return writer;
|
|
24685
|
+
};
|
|
24686
|
+
|
|
24687
|
+
/**
|
|
24688
|
+
* Encodes the specified StringRange message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify|verify} messages.
|
|
24689
|
+
* @function encodeDelimited
|
|
24690
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange
|
|
24691
|
+
* @static
|
|
24692
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange} message StringRange message or plain object to encode
|
|
24693
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24694
|
+
* @returns {$protobuf.Writer} Writer
|
|
24695
|
+
*/
|
|
24696
|
+
StringRange.encodeDelimited = function encodeDelimited(message, writer) {
|
|
24697
|
+
return this.encode(message, writer).ldelim();
|
|
24698
|
+
};
|
|
24699
|
+
|
|
24700
|
+
/**
|
|
24701
|
+
* Decodes a StringRange message from the specified reader or buffer.
|
|
24702
|
+
* @function decode
|
|
24703
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange
|
|
24704
|
+
* @static
|
|
24705
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24706
|
+
* @param {number} [length] Message length if known beforehand
|
|
24707
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange
|
|
24708
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24709
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24710
|
+
*/
|
|
24711
|
+
StringRange.decode = function decode(reader, length) {
|
|
24712
|
+
if (!(reader instanceof $Reader))
|
|
24713
|
+
reader = $Reader.create(reader);
|
|
24714
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange();
|
|
24715
|
+
while (reader.pos < end) {
|
|
24716
|
+
var tag = reader.uint32();
|
|
24717
|
+
switch (tag >>> 3) {
|
|
24718
|
+
case 1: {
|
|
24719
|
+
message.startOffset = reader.int32();
|
|
24720
|
+
break;
|
|
24721
|
+
}
|
|
24722
|
+
case 2: {
|
|
24723
|
+
message.endOffset = reader.int32();
|
|
24724
|
+
break;
|
|
24725
|
+
}
|
|
24726
|
+
default:
|
|
24727
|
+
reader.skipType(tag & 7);
|
|
24728
|
+
break;
|
|
24729
|
+
}
|
|
24730
|
+
}
|
|
24731
|
+
return message;
|
|
24732
|
+
};
|
|
24733
|
+
|
|
24734
|
+
/**
|
|
24735
|
+
* Decodes a StringRange message from the specified reader or buffer, length delimited.
|
|
24736
|
+
* @function decodeDelimited
|
|
24737
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange
|
|
24738
|
+
* @static
|
|
24739
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24740
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange
|
|
24741
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24742
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24743
|
+
*/
|
|
24744
|
+
StringRange.decodeDelimited = function decodeDelimited(reader) {
|
|
24745
|
+
if (!(reader instanceof $Reader))
|
|
24746
|
+
reader = new $Reader(reader);
|
|
24747
|
+
return this.decode(reader, reader.uint32());
|
|
24748
|
+
};
|
|
24749
|
+
|
|
24750
|
+
/**
|
|
24751
|
+
* Verifies a StringRange message.
|
|
24752
|
+
* @function verify
|
|
24753
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange
|
|
24754
|
+
* @static
|
|
24755
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
24756
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
24757
|
+
*/
|
|
24758
|
+
StringRange.verify = function verify(message) {
|
|
24759
|
+
if (typeof message !== "object" || message === null)
|
|
24760
|
+
return "object expected";
|
|
24761
|
+
if (message.startOffset != null && message.hasOwnProperty("startOffset"))
|
|
24762
|
+
if (!$util.isInteger(message.startOffset))
|
|
24763
|
+
return "startOffset: integer expected";
|
|
24764
|
+
if (message.endOffset != null && message.hasOwnProperty("endOffset"))
|
|
24765
|
+
if (!$util.isInteger(message.endOffset))
|
|
24766
|
+
return "endOffset: integer expected";
|
|
24767
|
+
return null;
|
|
24768
|
+
};
|
|
24769
|
+
|
|
24770
|
+
/**
|
|
24771
|
+
* Creates a StringRange message from a plain object. Also converts values to their respective internal types.
|
|
24772
|
+
* @function fromObject
|
|
24773
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange
|
|
24774
|
+
* @static
|
|
24775
|
+
* @param {Object.<string,*>} object Plain object
|
|
24776
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} StringRange
|
|
24777
|
+
*/
|
|
24778
|
+
StringRange.fromObject = function fromObject(object) {
|
|
24779
|
+
if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange)
|
|
24780
|
+
return object;
|
|
24781
|
+
var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange();
|
|
24782
|
+
if (object.startOffset != null)
|
|
24783
|
+
message.startOffset = object.startOffset | 0;
|
|
24784
|
+
if (object.endOffset != null)
|
|
24785
|
+
message.endOffset = object.endOffset | 0;
|
|
24786
|
+
return message;
|
|
24787
|
+
};
|
|
24788
|
+
|
|
24789
|
+
/**
|
|
24790
|
+
* Creates a plain object from a StringRange message. Also converts values to other types if specified.
|
|
24791
|
+
* @function toObject
|
|
24792
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange
|
|
24793
|
+
* @static
|
|
24794
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange} message StringRange
|
|
24795
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
24796
|
+
* @returns {Object.<string,*>} Plain object
|
|
24797
|
+
*/
|
|
24798
|
+
StringRange.toObject = function toObject(message, options) {
|
|
24799
|
+
if (!options)
|
|
24800
|
+
options = {};
|
|
24801
|
+
var object = {};
|
|
24802
|
+
if (options.defaults) {
|
|
24803
|
+
object.startOffset = 0;
|
|
24804
|
+
object.endOffset = 0;
|
|
24805
|
+
}
|
|
24806
|
+
if (message.startOffset != null && message.hasOwnProperty("startOffset"))
|
|
24807
|
+
object.startOffset = message.startOffset;
|
|
24808
|
+
if (message.endOffset != null && message.hasOwnProperty("endOffset"))
|
|
24809
|
+
object.endOffset = message.endOffset;
|
|
24810
|
+
return object;
|
|
24811
|
+
};
|
|
24812
|
+
|
|
24813
|
+
/**
|
|
24814
|
+
* Converts this StringRange to JSON.
|
|
24815
|
+
* @function toJSON
|
|
24816
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange
|
|
24817
|
+
* @instance
|
|
24818
|
+
* @returns {Object.<string,*>} JSON object
|
|
24819
|
+
*/
|
|
24820
|
+
StringRange.prototype.toJSON = function toJSON() {
|
|
24821
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
24822
|
+
};
|
|
24823
|
+
|
|
24824
|
+
/**
|
|
24825
|
+
* Gets the default type url for StringRange
|
|
24826
|
+
* @function getTypeUrl
|
|
24827
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange
|
|
24828
|
+
* @static
|
|
24829
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
24830
|
+
* @returns {string} The default type url
|
|
24831
|
+
*/
|
|
24832
|
+
StringRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
24833
|
+
if (typeUrlPrefix === undefined) {
|
|
24834
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
24835
|
+
}
|
|
24836
|
+
return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange";
|
|
24837
|
+
};
|
|
24838
|
+
|
|
24839
|
+
return StringRange;
|
|
24840
|
+
})();
|
|
24841
|
+
|
|
24842
|
+
Suggestion.FormattableText = (function() {
|
|
24843
|
+
|
|
24844
|
+
/**
|
|
24845
|
+
* Properties of a FormattableText.
|
|
24846
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24847
|
+
* @interface IFormattableText
|
|
24848
|
+
* @property {string|null} [text] FormattableText text
|
|
24849
|
+
* @property {Array.<google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange>|null} [matches] FormattableText matches
|
|
24850
|
+
*/
|
|
24851
|
+
|
|
24852
|
+
/**
|
|
24853
|
+
* Constructs a new FormattableText.
|
|
24854
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
24855
|
+
* @classdesc Represents a FormattableText.
|
|
24856
|
+
* @implements IFormattableText
|
|
24857
|
+
* @constructor
|
|
24858
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText=} [properties] Properties to set
|
|
24859
|
+
*/
|
|
24860
|
+
function FormattableText(properties) {
|
|
24861
|
+
this.matches = [];
|
|
24862
|
+
if (properties)
|
|
24863
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
24864
|
+
if (properties[keys[i]] != null)
|
|
24865
|
+
this[keys[i]] = properties[keys[i]];
|
|
24866
|
+
}
|
|
24867
|
+
|
|
24868
|
+
/**
|
|
24869
|
+
* FormattableText text.
|
|
24870
|
+
* @member {string} text
|
|
24871
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText
|
|
24872
|
+
* @instance
|
|
24873
|
+
*/
|
|
24874
|
+
FormattableText.prototype.text = "";
|
|
24875
|
+
|
|
24876
|
+
/**
|
|
24877
|
+
* FormattableText matches.
|
|
24878
|
+
* @member {Array.<google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStringRange>} matches
|
|
24879
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText
|
|
24880
|
+
* @instance
|
|
24881
|
+
*/
|
|
24882
|
+
FormattableText.prototype.matches = $util.emptyArray;
|
|
24883
|
+
|
|
24884
|
+
/**
|
|
24885
|
+
* Creates a new FormattableText instance using the specified properties.
|
|
24886
|
+
* @function create
|
|
24887
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText
|
|
24888
|
+
* @static
|
|
24889
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText=} [properties] Properties to set
|
|
24890
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText instance
|
|
24891
|
+
*/
|
|
24892
|
+
FormattableText.create = function create(properties) {
|
|
24893
|
+
return new FormattableText(properties);
|
|
24894
|
+
};
|
|
24895
|
+
|
|
24896
|
+
/**
|
|
24897
|
+
* Encodes the specified FormattableText message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages.
|
|
24898
|
+
* @function encode
|
|
24899
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText
|
|
24900
|
+
* @static
|
|
24901
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText} message FormattableText message or plain object to encode
|
|
24902
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24903
|
+
* @returns {$protobuf.Writer} Writer
|
|
24904
|
+
*/
|
|
24905
|
+
FormattableText.encode = function encode(message, writer) {
|
|
24906
|
+
if (!writer)
|
|
24907
|
+
writer = $Writer.create();
|
|
24908
|
+
if (message.text != null && Object.hasOwnProperty.call(message, "text"))
|
|
24909
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.text);
|
|
24910
|
+
if (message.matches != null && message.matches.length)
|
|
24911
|
+
for (var i = 0; i < message.matches.length; ++i)
|
|
24912
|
+
$root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.encode(message.matches[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
24913
|
+
return writer;
|
|
24914
|
+
};
|
|
24915
|
+
|
|
24916
|
+
/**
|
|
24917
|
+
* Encodes the specified FormattableText message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify|verify} messages.
|
|
24918
|
+
* @function encodeDelimited
|
|
24919
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText
|
|
24920
|
+
* @static
|
|
24921
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText} message FormattableText message or plain object to encode
|
|
24922
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
24923
|
+
* @returns {$protobuf.Writer} Writer
|
|
24924
|
+
*/
|
|
24925
|
+
FormattableText.encodeDelimited = function encodeDelimited(message, writer) {
|
|
24926
|
+
return this.encode(message, writer).ldelim();
|
|
24927
|
+
};
|
|
24928
|
+
|
|
24929
|
+
/**
|
|
24930
|
+
* Decodes a FormattableText message from the specified reader or buffer.
|
|
24931
|
+
* @function decode
|
|
24932
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText
|
|
24933
|
+
* @static
|
|
24934
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24935
|
+
* @param {number} [length] Message length if known beforehand
|
|
24936
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText
|
|
24937
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24938
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24939
|
+
*/
|
|
24940
|
+
FormattableText.decode = function decode(reader, length) {
|
|
24941
|
+
if (!(reader instanceof $Reader))
|
|
24942
|
+
reader = $Reader.create(reader);
|
|
24943
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText();
|
|
24944
|
+
while (reader.pos < end) {
|
|
24945
|
+
var tag = reader.uint32();
|
|
24946
|
+
switch (tag >>> 3) {
|
|
24947
|
+
case 1: {
|
|
24948
|
+
message.text = reader.string();
|
|
24949
|
+
break;
|
|
24950
|
+
}
|
|
24951
|
+
case 2: {
|
|
24952
|
+
if (!(message.matches && message.matches.length))
|
|
24953
|
+
message.matches = [];
|
|
24954
|
+
message.matches.push($root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.decode(reader, reader.uint32()));
|
|
24955
|
+
break;
|
|
24956
|
+
}
|
|
24957
|
+
default:
|
|
24958
|
+
reader.skipType(tag & 7);
|
|
24959
|
+
break;
|
|
24960
|
+
}
|
|
24961
|
+
}
|
|
24962
|
+
return message;
|
|
24963
|
+
};
|
|
24964
|
+
|
|
24965
|
+
/**
|
|
24966
|
+
* Decodes a FormattableText message from the specified reader or buffer, length delimited.
|
|
24967
|
+
* @function decodeDelimited
|
|
24968
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText
|
|
24969
|
+
* @static
|
|
24970
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
24971
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText
|
|
24972
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
24973
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
24974
|
+
*/
|
|
24975
|
+
FormattableText.decodeDelimited = function decodeDelimited(reader) {
|
|
24976
|
+
if (!(reader instanceof $Reader))
|
|
24977
|
+
reader = new $Reader(reader);
|
|
24978
|
+
return this.decode(reader, reader.uint32());
|
|
24979
|
+
};
|
|
24980
|
+
|
|
24981
|
+
/**
|
|
24982
|
+
* Verifies a FormattableText message.
|
|
24983
|
+
* @function verify
|
|
24984
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText
|
|
24985
|
+
* @static
|
|
24986
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
24987
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
24988
|
+
*/
|
|
24989
|
+
FormattableText.verify = function verify(message) {
|
|
24990
|
+
if (typeof message !== "object" || message === null)
|
|
24991
|
+
return "object expected";
|
|
24992
|
+
if (message.text != null && message.hasOwnProperty("text"))
|
|
24993
|
+
if (!$util.isString(message.text))
|
|
24994
|
+
return "text: string expected";
|
|
24995
|
+
if (message.matches != null && message.hasOwnProperty("matches")) {
|
|
24996
|
+
if (!Array.isArray(message.matches))
|
|
24997
|
+
return "matches: array expected";
|
|
24998
|
+
for (var i = 0; i < message.matches.length; ++i) {
|
|
24999
|
+
var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.verify(message.matches[i]);
|
|
25000
|
+
if (error)
|
|
25001
|
+
return "matches." + error;
|
|
25002
|
+
}
|
|
25003
|
+
}
|
|
25004
|
+
return null;
|
|
25005
|
+
};
|
|
25006
|
+
|
|
25007
|
+
/**
|
|
25008
|
+
* Creates a FormattableText message from a plain object. Also converts values to their respective internal types.
|
|
25009
|
+
* @function fromObject
|
|
25010
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText
|
|
25011
|
+
* @static
|
|
25012
|
+
* @param {Object.<string,*>} object Plain object
|
|
25013
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} FormattableText
|
|
25014
|
+
*/
|
|
25015
|
+
FormattableText.fromObject = function fromObject(object) {
|
|
25016
|
+
if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText)
|
|
25017
|
+
return object;
|
|
25018
|
+
var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText();
|
|
25019
|
+
if (object.text != null)
|
|
25020
|
+
message.text = String(object.text);
|
|
25021
|
+
if (object.matches) {
|
|
25022
|
+
if (!Array.isArray(object.matches))
|
|
25023
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.matches: array expected");
|
|
25024
|
+
message.matches = [];
|
|
25025
|
+
for (var i = 0; i < object.matches.length; ++i) {
|
|
25026
|
+
if (typeof object.matches[i] !== "object")
|
|
25027
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.matches: object expected");
|
|
25028
|
+
message.matches[i] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.fromObject(object.matches[i]);
|
|
25029
|
+
}
|
|
25030
|
+
}
|
|
25031
|
+
return message;
|
|
25032
|
+
};
|
|
25033
|
+
|
|
25034
|
+
/**
|
|
25035
|
+
* Creates a plain object from a FormattableText message. Also converts values to other types if specified.
|
|
25036
|
+
* @function toObject
|
|
25037
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText
|
|
25038
|
+
* @static
|
|
25039
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText} message FormattableText
|
|
25040
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
25041
|
+
* @returns {Object.<string,*>} Plain object
|
|
25042
|
+
*/
|
|
25043
|
+
FormattableText.toObject = function toObject(message, options) {
|
|
25044
|
+
if (!options)
|
|
25045
|
+
options = {};
|
|
25046
|
+
var object = {};
|
|
25047
|
+
if (options.arrays || options.defaults)
|
|
25048
|
+
object.matches = [];
|
|
25049
|
+
if (options.defaults)
|
|
25050
|
+
object.text = "";
|
|
25051
|
+
if (message.text != null && message.hasOwnProperty("text"))
|
|
25052
|
+
object.text = message.text;
|
|
25053
|
+
if (message.matches && message.matches.length) {
|
|
25054
|
+
object.matches = [];
|
|
25055
|
+
for (var j = 0; j < message.matches.length; ++j)
|
|
25056
|
+
object.matches[j] = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StringRange.toObject(message.matches[j], options);
|
|
25057
|
+
}
|
|
25058
|
+
return object;
|
|
25059
|
+
};
|
|
25060
|
+
|
|
25061
|
+
/**
|
|
25062
|
+
* Converts this FormattableText to JSON.
|
|
25063
|
+
* @function toJSON
|
|
25064
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText
|
|
25065
|
+
* @instance
|
|
25066
|
+
* @returns {Object.<string,*>} JSON object
|
|
25067
|
+
*/
|
|
25068
|
+
FormattableText.prototype.toJSON = function toJSON() {
|
|
25069
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
25070
|
+
};
|
|
25071
|
+
|
|
25072
|
+
/**
|
|
25073
|
+
* Gets the default type url for FormattableText
|
|
25074
|
+
* @function getTypeUrl
|
|
25075
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText
|
|
25076
|
+
* @static
|
|
25077
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
25078
|
+
* @returns {string} The default type url
|
|
25079
|
+
*/
|
|
25080
|
+
FormattableText.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
25081
|
+
if (typeUrlPrefix === undefined) {
|
|
25082
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
25083
|
+
}
|
|
25084
|
+
return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText";
|
|
25085
|
+
};
|
|
25086
|
+
|
|
25087
|
+
return FormattableText;
|
|
25088
|
+
})();
|
|
25089
|
+
|
|
25090
|
+
Suggestion.StructuredFormat = (function() {
|
|
25091
|
+
|
|
25092
|
+
/**
|
|
25093
|
+
* Properties of a StructuredFormat.
|
|
25094
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
25095
|
+
* @interface IStructuredFormat
|
|
25096
|
+
* @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [mainText] StructuredFormat mainText
|
|
25097
|
+
* @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [secondaryText] StructuredFormat secondaryText
|
|
25098
|
+
*/
|
|
25099
|
+
|
|
25100
|
+
/**
|
|
25101
|
+
* Constructs a new StructuredFormat.
|
|
25102
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
25103
|
+
* @classdesc Represents a StructuredFormat.
|
|
25104
|
+
* @implements IStructuredFormat
|
|
25105
|
+
* @constructor
|
|
25106
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat=} [properties] Properties to set
|
|
25107
|
+
*/
|
|
25108
|
+
function StructuredFormat(properties) {
|
|
25109
|
+
if (properties)
|
|
25110
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
25111
|
+
if (properties[keys[i]] != null)
|
|
25112
|
+
this[keys[i]] = properties[keys[i]];
|
|
25113
|
+
}
|
|
25114
|
+
|
|
25115
|
+
/**
|
|
25116
|
+
* StructuredFormat mainText.
|
|
25117
|
+
* @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} mainText
|
|
25118
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat
|
|
25119
|
+
* @instance
|
|
25120
|
+
*/
|
|
25121
|
+
StructuredFormat.prototype.mainText = null;
|
|
25122
|
+
|
|
25123
|
+
/**
|
|
25124
|
+
* StructuredFormat secondaryText.
|
|
25125
|
+
* @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} secondaryText
|
|
25126
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat
|
|
25127
|
+
* @instance
|
|
25128
|
+
*/
|
|
25129
|
+
StructuredFormat.prototype.secondaryText = null;
|
|
25130
|
+
|
|
25131
|
+
/**
|
|
25132
|
+
* Creates a new StructuredFormat instance using the specified properties.
|
|
25133
|
+
* @function create
|
|
25134
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat
|
|
25135
|
+
* @static
|
|
25136
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat=} [properties] Properties to set
|
|
25137
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat instance
|
|
25138
|
+
*/
|
|
25139
|
+
StructuredFormat.create = function create(properties) {
|
|
25140
|
+
return new StructuredFormat(properties);
|
|
25141
|
+
};
|
|
25142
|
+
|
|
25143
|
+
/**
|
|
25144
|
+
* Encodes the specified StructuredFormat message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages.
|
|
25145
|
+
* @function encode
|
|
25146
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat
|
|
25147
|
+
* @static
|
|
25148
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat} message StructuredFormat message or plain object to encode
|
|
25149
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
25150
|
+
* @returns {$protobuf.Writer} Writer
|
|
25151
|
+
*/
|
|
25152
|
+
StructuredFormat.encode = function encode(message, writer) {
|
|
25153
|
+
if (!writer)
|
|
25154
|
+
writer = $Writer.create();
|
|
25155
|
+
if (message.mainText != null && Object.hasOwnProperty.call(message, "mainText"))
|
|
25156
|
+
$root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.mainText, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
25157
|
+
if (message.secondaryText != null && Object.hasOwnProperty.call(message, "secondaryText"))
|
|
25158
|
+
$root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.secondaryText, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
25159
|
+
return writer;
|
|
25160
|
+
};
|
|
25161
|
+
|
|
25162
|
+
/**
|
|
25163
|
+
* Encodes the specified StructuredFormat message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify|verify} messages.
|
|
25164
|
+
* @function encodeDelimited
|
|
25165
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat
|
|
25166
|
+
* @static
|
|
25167
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat} message StructuredFormat message or plain object to encode
|
|
25168
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
25169
|
+
* @returns {$protobuf.Writer} Writer
|
|
25170
|
+
*/
|
|
25171
|
+
StructuredFormat.encodeDelimited = function encodeDelimited(message, writer) {
|
|
25172
|
+
return this.encode(message, writer).ldelim();
|
|
25173
|
+
};
|
|
25174
|
+
|
|
25175
|
+
/**
|
|
25176
|
+
* Decodes a StructuredFormat message from the specified reader or buffer.
|
|
25177
|
+
* @function decode
|
|
25178
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat
|
|
25179
|
+
* @static
|
|
25180
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
25181
|
+
* @param {number} [length] Message length if known beforehand
|
|
25182
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat
|
|
25183
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
25184
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
25185
|
+
*/
|
|
25186
|
+
StructuredFormat.decode = function decode(reader, length) {
|
|
25187
|
+
if (!(reader instanceof $Reader))
|
|
25188
|
+
reader = $Reader.create(reader);
|
|
25189
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat();
|
|
25190
|
+
while (reader.pos < end) {
|
|
25191
|
+
var tag = reader.uint32();
|
|
25192
|
+
switch (tag >>> 3) {
|
|
25193
|
+
case 1: {
|
|
25194
|
+
message.mainText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32());
|
|
25195
|
+
break;
|
|
25196
|
+
}
|
|
25197
|
+
case 2: {
|
|
25198
|
+
message.secondaryText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32());
|
|
25199
|
+
break;
|
|
25200
|
+
}
|
|
25201
|
+
default:
|
|
25202
|
+
reader.skipType(tag & 7);
|
|
25203
|
+
break;
|
|
25204
|
+
}
|
|
25205
|
+
}
|
|
25206
|
+
return message;
|
|
25207
|
+
};
|
|
25208
|
+
|
|
25209
|
+
/**
|
|
25210
|
+
* Decodes a StructuredFormat message from the specified reader or buffer, length delimited.
|
|
25211
|
+
* @function decodeDelimited
|
|
25212
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat
|
|
25213
|
+
* @static
|
|
25214
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
25215
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat
|
|
25216
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
25217
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
25218
|
+
*/
|
|
25219
|
+
StructuredFormat.decodeDelimited = function decodeDelimited(reader) {
|
|
25220
|
+
if (!(reader instanceof $Reader))
|
|
25221
|
+
reader = new $Reader(reader);
|
|
25222
|
+
return this.decode(reader, reader.uint32());
|
|
25223
|
+
};
|
|
25224
|
+
|
|
25225
|
+
/**
|
|
25226
|
+
* Verifies a StructuredFormat message.
|
|
25227
|
+
* @function verify
|
|
25228
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat
|
|
25229
|
+
* @static
|
|
25230
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
25231
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
25232
|
+
*/
|
|
25233
|
+
StructuredFormat.verify = function verify(message) {
|
|
25234
|
+
if (typeof message !== "object" || message === null)
|
|
25235
|
+
return "object expected";
|
|
25236
|
+
if (message.mainText != null && message.hasOwnProperty("mainText")) {
|
|
25237
|
+
var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.mainText);
|
|
25238
|
+
if (error)
|
|
25239
|
+
return "mainText." + error;
|
|
25240
|
+
}
|
|
25241
|
+
if (message.secondaryText != null && message.hasOwnProperty("secondaryText")) {
|
|
25242
|
+
var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.secondaryText);
|
|
25243
|
+
if (error)
|
|
25244
|
+
return "secondaryText." + error;
|
|
25245
|
+
}
|
|
25246
|
+
return null;
|
|
25247
|
+
};
|
|
25248
|
+
|
|
25249
|
+
/**
|
|
25250
|
+
* Creates a StructuredFormat message from a plain object. Also converts values to their respective internal types.
|
|
25251
|
+
* @function fromObject
|
|
25252
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat
|
|
25253
|
+
* @static
|
|
25254
|
+
* @param {Object.<string,*>} object Plain object
|
|
25255
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} StructuredFormat
|
|
25256
|
+
*/
|
|
25257
|
+
StructuredFormat.fromObject = function fromObject(object) {
|
|
25258
|
+
if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat)
|
|
25259
|
+
return object;
|
|
25260
|
+
var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat();
|
|
25261
|
+
if (object.mainText != null) {
|
|
25262
|
+
if (typeof object.mainText !== "object")
|
|
25263
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.mainText: object expected");
|
|
25264
|
+
message.mainText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.mainText);
|
|
25265
|
+
}
|
|
25266
|
+
if (object.secondaryText != null) {
|
|
25267
|
+
if (typeof object.secondaryText !== "object")
|
|
25268
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.secondaryText: object expected");
|
|
25269
|
+
message.secondaryText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.secondaryText);
|
|
25270
|
+
}
|
|
25271
|
+
return message;
|
|
25272
|
+
};
|
|
25273
|
+
|
|
25274
|
+
/**
|
|
25275
|
+
* Creates a plain object from a StructuredFormat message. Also converts values to other types if specified.
|
|
25276
|
+
* @function toObject
|
|
25277
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat
|
|
25278
|
+
* @static
|
|
25279
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat} message StructuredFormat
|
|
25280
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
25281
|
+
* @returns {Object.<string,*>} Plain object
|
|
25282
|
+
*/
|
|
25283
|
+
StructuredFormat.toObject = function toObject(message, options) {
|
|
25284
|
+
if (!options)
|
|
25285
|
+
options = {};
|
|
25286
|
+
var object = {};
|
|
25287
|
+
if (options.defaults) {
|
|
25288
|
+
object.mainText = null;
|
|
25289
|
+
object.secondaryText = null;
|
|
25290
|
+
}
|
|
25291
|
+
if (message.mainText != null && message.hasOwnProperty("mainText"))
|
|
25292
|
+
object.mainText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.mainText, options);
|
|
25293
|
+
if (message.secondaryText != null && message.hasOwnProperty("secondaryText"))
|
|
25294
|
+
object.secondaryText = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.secondaryText, options);
|
|
25295
|
+
return object;
|
|
25296
|
+
};
|
|
25297
|
+
|
|
25298
|
+
/**
|
|
25299
|
+
* Converts this StructuredFormat to JSON.
|
|
25300
|
+
* @function toJSON
|
|
25301
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat
|
|
25302
|
+
* @instance
|
|
25303
|
+
* @returns {Object.<string,*>} JSON object
|
|
25304
|
+
*/
|
|
25305
|
+
StructuredFormat.prototype.toJSON = function toJSON() {
|
|
25306
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
25307
|
+
};
|
|
25308
|
+
|
|
25309
|
+
/**
|
|
25310
|
+
* Gets the default type url for StructuredFormat
|
|
25311
|
+
* @function getTypeUrl
|
|
25312
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat
|
|
25313
|
+
* @static
|
|
25314
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
25315
|
+
* @returns {string} The default type url
|
|
25316
|
+
*/
|
|
25317
|
+
StructuredFormat.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
25318
|
+
if (typeUrlPrefix === undefined) {
|
|
25319
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
25320
|
+
}
|
|
25321
|
+
return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat";
|
|
25322
|
+
};
|
|
25323
|
+
|
|
25324
|
+
return StructuredFormat;
|
|
25325
|
+
})();
|
|
25326
|
+
|
|
25327
|
+
Suggestion.PlacePrediction = (function() {
|
|
25328
|
+
|
|
25329
|
+
/**
|
|
25330
|
+
* Properties of a PlacePrediction.
|
|
25331
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
25332
|
+
* @interface IPlacePrediction
|
|
25333
|
+
* @property {string|null} [place] PlacePrediction place
|
|
25334
|
+
* @property {string|null} [placeId] PlacePrediction placeId
|
|
25335
|
+
* @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [text] PlacePrediction text
|
|
25336
|
+
* @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null} [structuredFormat] PlacePrediction structuredFormat
|
|
25337
|
+
* @property {Array.<string>|null} [types] PlacePrediction types
|
|
25338
|
+
* @property {number|null} [distanceMeters] PlacePrediction distanceMeters
|
|
25339
|
+
*/
|
|
25340
|
+
|
|
25341
|
+
/**
|
|
25342
|
+
* Constructs a new PlacePrediction.
|
|
25343
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
25344
|
+
* @classdesc Represents a PlacePrediction.
|
|
25345
|
+
* @implements IPlacePrediction
|
|
25346
|
+
* @constructor
|
|
25347
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction=} [properties] Properties to set
|
|
25348
|
+
*/
|
|
25349
|
+
function PlacePrediction(properties) {
|
|
25350
|
+
this.types = [];
|
|
25351
|
+
if (properties)
|
|
25352
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
25353
|
+
if (properties[keys[i]] != null)
|
|
25354
|
+
this[keys[i]] = properties[keys[i]];
|
|
25355
|
+
}
|
|
25356
|
+
|
|
25357
|
+
/**
|
|
25358
|
+
* PlacePrediction place.
|
|
25359
|
+
* @member {string} place
|
|
25360
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction
|
|
25361
|
+
* @instance
|
|
25362
|
+
*/
|
|
25363
|
+
PlacePrediction.prototype.place = "";
|
|
25364
|
+
|
|
25365
|
+
/**
|
|
25366
|
+
* PlacePrediction placeId.
|
|
25367
|
+
* @member {string} placeId
|
|
25368
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction
|
|
25369
|
+
* @instance
|
|
25370
|
+
*/
|
|
25371
|
+
PlacePrediction.prototype.placeId = "";
|
|
25372
|
+
|
|
25373
|
+
/**
|
|
25374
|
+
* PlacePrediction text.
|
|
25375
|
+
* @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} text
|
|
25376
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction
|
|
25377
|
+
* @instance
|
|
25378
|
+
*/
|
|
25379
|
+
PlacePrediction.prototype.text = null;
|
|
25380
|
+
|
|
25381
|
+
/**
|
|
25382
|
+
* PlacePrediction structuredFormat.
|
|
25383
|
+
* @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null|undefined} structuredFormat
|
|
25384
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction
|
|
25385
|
+
* @instance
|
|
25386
|
+
*/
|
|
25387
|
+
PlacePrediction.prototype.structuredFormat = null;
|
|
25388
|
+
|
|
25389
|
+
/**
|
|
25390
|
+
* PlacePrediction types.
|
|
25391
|
+
* @member {Array.<string>} types
|
|
25392
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction
|
|
25393
|
+
* @instance
|
|
25394
|
+
*/
|
|
25395
|
+
PlacePrediction.prototype.types = $util.emptyArray;
|
|
25396
|
+
|
|
25397
|
+
/**
|
|
25398
|
+
* PlacePrediction distanceMeters.
|
|
25399
|
+
* @member {number} distanceMeters
|
|
25400
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction
|
|
25401
|
+
* @instance
|
|
25402
|
+
*/
|
|
25403
|
+
PlacePrediction.prototype.distanceMeters = 0;
|
|
25404
|
+
|
|
25405
|
+
/**
|
|
25406
|
+
* Creates a new PlacePrediction instance using the specified properties.
|
|
25407
|
+
* @function create
|
|
25408
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction
|
|
25409
|
+
* @static
|
|
25410
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction=} [properties] Properties to set
|
|
25411
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction instance
|
|
25412
|
+
*/
|
|
25413
|
+
PlacePrediction.create = function create(properties) {
|
|
25414
|
+
return new PlacePrediction(properties);
|
|
25415
|
+
};
|
|
25416
|
+
|
|
25417
|
+
/**
|
|
25418
|
+
* Encodes the specified PlacePrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages.
|
|
25419
|
+
* @function encode
|
|
25420
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction
|
|
25421
|
+
* @static
|
|
25422
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction} message PlacePrediction message or plain object to encode
|
|
25423
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
25424
|
+
* @returns {$protobuf.Writer} Writer
|
|
25425
|
+
*/
|
|
25426
|
+
PlacePrediction.encode = function encode(message, writer) {
|
|
25427
|
+
if (!writer)
|
|
25428
|
+
writer = $Writer.create();
|
|
25429
|
+
if (message.place != null && Object.hasOwnProperty.call(message, "place"))
|
|
25430
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.place);
|
|
25431
|
+
if (message.placeId != null && Object.hasOwnProperty.call(message, "placeId"))
|
|
25432
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.placeId);
|
|
25433
|
+
if (message.text != null && Object.hasOwnProperty.call(message, "text"))
|
|
25434
|
+
$root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.text, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
25435
|
+
if (message.structuredFormat != null && Object.hasOwnProperty.call(message, "structuredFormat"))
|
|
25436
|
+
$root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.encode(message.structuredFormat, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
25437
|
+
if (message.types != null && message.types.length)
|
|
25438
|
+
for (var i = 0; i < message.types.length; ++i)
|
|
25439
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.types[i]);
|
|
25440
|
+
if (message.distanceMeters != null && Object.hasOwnProperty.call(message, "distanceMeters"))
|
|
25441
|
+
writer.uint32(/* id 6, wireType 0 =*/48).int32(message.distanceMeters);
|
|
25442
|
+
return writer;
|
|
25443
|
+
};
|
|
25444
|
+
|
|
25445
|
+
/**
|
|
25446
|
+
* Encodes the specified PlacePrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.verify|verify} messages.
|
|
25447
|
+
* @function encodeDelimited
|
|
25448
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction
|
|
25449
|
+
* @static
|
|
25450
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IPlacePrediction} message PlacePrediction message or plain object to encode
|
|
25451
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
25452
|
+
* @returns {$protobuf.Writer} Writer
|
|
25453
|
+
*/
|
|
25454
|
+
PlacePrediction.encodeDelimited = function encodeDelimited(message, writer) {
|
|
25455
|
+
return this.encode(message, writer).ldelim();
|
|
25456
|
+
};
|
|
25457
|
+
|
|
25458
|
+
/**
|
|
25459
|
+
* Decodes a PlacePrediction message from the specified reader or buffer.
|
|
25460
|
+
* @function decode
|
|
25461
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction
|
|
25462
|
+
* @static
|
|
25463
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
25464
|
+
* @param {number} [length] Message length if known beforehand
|
|
25465
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction
|
|
25466
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
25467
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
25468
|
+
*/
|
|
25469
|
+
PlacePrediction.decode = function decode(reader, length) {
|
|
25470
|
+
if (!(reader instanceof $Reader))
|
|
25471
|
+
reader = $Reader.create(reader);
|
|
25472
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction();
|
|
25473
|
+
while (reader.pos < end) {
|
|
25474
|
+
var tag = reader.uint32();
|
|
25475
|
+
switch (tag >>> 3) {
|
|
25476
|
+
case 1: {
|
|
25477
|
+
message.place = reader.string();
|
|
25478
|
+
break;
|
|
25479
|
+
}
|
|
25480
|
+
case 2: {
|
|
25481
|
+
message.placeId = reader.string();
|
|
25482
|
+
break;
|
|
25483
|
+
}
|
|
25484
|
+
case 3: {
|
|
25485
|
+
message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32());
|
|
25486
|
+
break;
|
|
25487
|
+
}
|
|
25488
|
+
case 4: {
|
|
25489
|
+
message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.decode(reader, reader.uint32());
|
|
25490
|
+
break;
|
|
25491
|
+
}
|
|
25492
|
+
case 5: {
|
|
25493
|
+
if (!(message.types && message.types.length))
|
|
25494
|
+
message.types = [];
|
|
25495
|
+
message.types.push(reader.string());
|
|
25496
|
+
break;
|
|
25497
|
+
}
|
|
25498
|
+
case 6: {
|
|
25499
|
+
message.distanceMeters = reader.int32();
|
|
25500
|
+
break;
|
|
25501
|
+
}
|
|
25502
|
+
default:
|
|
25503
|
+
reader.skipType(tag & 7);
|
|
25504
|
+
break;
|
|
25505
|
+
}
|
|
25506
|
+
}
|
|
25507
|
+
return message;
|
|
25508
|
+
};
|
|
25509
|
+
|
|
25510
|
+
/**
|
|
25511
|
+
* Decodes a PlacePrediction message from the specified reader or buffer, length delimited.
|
|
25512
|
+
* @function decodeDelimited
|
|
25513
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction
|
|
25514
|
+
* @static
|
|
25515
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
25516
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction
|
|
25517
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
25518
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
25519
|
+
*/
|
|
25520
|
+
PlacePrediction.decodeDelimited = function decodeDelimited(reader) {
|
|
25521
|
+
if (!(reader instanceof $Reader))
|
|
25522
|
+
reader = new $Reader(reader);
|
|
25523
|
+
return this.decode(reader, reader.uint32());
|
|
25524
|
+
};
|
|
25525
|
+
|
|
25526
|
+
/**
|
|
25527
|
+
* Verifies a PlacePrediction message.
|
|
25528
|
+
* @function verify
|
|
25529
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction
|
|
25530
|
+
* @static
|
|
25531
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
25532
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
25533
|
+
*/
|
|
25534
|
+
PlacePrediction.verify = function verify(message) {
|
|
25535
|
+
if (typeof message !== "object" || message === null)
|
|
25536
|
+
return "object expected";
|
|
25537
|
+
if (message.place != null && message.hasOwnProperty("place"))
|
|
25538
|
+
if (!$util.isString(message.place))
|
|
25539
|
+
return "place: string expected";
|
|
25540
|
+
if (message.placeId != null && message.hasOwnProperty("placeId"))
|
|
25541
|
+
if (!$util.isString(message.placeId))
|
|
25542
|
+
return "placeId: string expected";
|
|
25543
|
+
if (message.text != null && message.hasOwnProperty("text")) {
|
|
25544
|
+
var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.text);
|
|
25545
|
+
if (error)
|
|
25546
|
+
return "text." + error;
|
|
25547
|
+
}
|
|
25548
|
+
if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) {
|
|
25549
|
+
var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify(message.structuredFormat);
|
|
25550
|
+
if (error)
|
|
25551
|
+
return "structuredFormat." + error;
|
|
25552
|
+
}
|
|
25553
|
+
if (message.types != null && message.hasOwnProperty("types")) {
|
|
25554
|
+
if (!Array.isArray(message.types))
|
|
25555
|
+
return "types: array expected";
|
|
25556
|
+
for (var i = 0; i < message.types.length; ++i)
|
|
25557
|
+
if (!$util.isString(message.types[i]))
|
|
25558
|
+
return "types: string[] expected";
|
|
25559
|
+
}
|
|
25560
|
+
if (message.distanceMeters != null && message.hasOwnProperty("distanceMeters"))
|
|
25561
|
+
if (!$util.isInteger(message.distanceMeters))
|
|
25562
|
+
return "distanceMeters: integer expected";
|
|
25563
|
+
return null;
|
|
25564
|
+
};
|
|
25565
|
+
|
|
25566
|
+
/**
|
|
25567
|
+
* Creates a PlacePrediction message from a plain object. Also converts values to their respective internal types.
|
|
25568
|
+
* @function fromObject
|
|
25569
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction
|
|
25570
|
+
* @static
|
|
25571
|
+
* @param {Object.<string,*>} object Plain object
|
|
25572
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} PlacePrediction
|
|
25573
|
+
*/
|
|
25574
|
+
PlacePrediction.fromObject = function fromObject(object) {
|
|
25575
|
+
if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction)
|
|
25576
|
+
return object;
|
|
25577
|
+
var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction();
|
|
25578
|
+
if (object.place != null)
|
|
25579
|
+
message.place = String(object.place);
|
|
25580
|
+
if (object.placeId != null)
|
|
25581
|
+
message.placeId = String(object.placeId);
|
|
25582
|
+
if (object.text != null) {
|
|
25583
|
+
if (typeof object.text !== "object")
|
|
25584
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.text: object expected");
|
|
25585
|
+
message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.text);
|
|
25586
|
+
}
|
|
25587
|
+
if (object.structuredFormat != null) {
|
|
25588
|
+
if (typeof object.structuredFormat !== "object")
|
|
25589
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.structuredFormat: object expected");
|
|
25590
|
+
message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.fromObject(object.structuredFormat);
|
|
25591
|
+
}
|
|
25592
|
+
if (object.types) {
|
|
25593
|
+
if (!Array.isArray(object.types))
|
|
25594
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction.types: array expected");
|
|
25595
|
+
message.types = [];
|
|
25596
|
+
for (var i = 0; i < object.types.length; ++i)
|
|
25597
|
+
message.types[i] = String(object.types[i]);
|
|
25598
|
+
}
|
|
25599
|
+
if (object.distanceMeters != null)
|
|
25600
|
+
message.distanceMeters = object.distanceMeters | 0;
|
|
25601
|
+
return message;
|
|
25602
|
+
};
|
|
25603
|
+
|
|
25604
|
+
/**
|
|
25605
|
+
* Creates a plain object from a PlacePrediction message. Also converts values to other types if specified.
|
|
25606
|
+
* @function toObject
|
|
25607
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction
|
|
25608
|
+
* @static
|
|
25609
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction} message PlacePrediction
|
|
25610
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
25611
|
+
* @returns {Object.<string,*>} Plain object
|
|
25612
|
+
*/
|
|
25613
|
+
PlacePrediction.toObject = function toObject(message, options) {
|
|
25614
|
+
if (!options)
|
|
25615
|
+
options = {};
|
|
25616
|
+
var object = {};
|
|
25617
|
+
if (options.arrays || options.defaults)
|
|
25618
|
+
object.types = [];
|
|
25619
|
+
if (options.defaults) {
|
|
25620
|
+
object.place = "";
|
|
25621
|
+
object.placeId = "";
|
|
25622
|
+
object.text = null;
|
|
25623
|
+
object.structuredFormat = null;
|
|
25624
|
+
object.distanceMeters = 0;
|
|
25625
|
+
}
|
|
25626
|
+
if (message.place != null && message.hasOwnProperty("place"))
|
|
25627
|
+
object.place = message.place;
|
|
25628
|
+
if (message.placeId != null && message.hasOwnProperty("placeId"))
|
|
25629
|
+
object.placeId = message.placeId;
|
|
25630
|
+
if (message.text != null && message.hasOwnProperty("text"))
|
|
25631
|
+
object.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.text, options);
|
|
25632
|
+
if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat"))
|
|
25633
|
+
object.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.toObject(message.structuredFormat, options);
|
|
25634
|
+
if (message.types && message.types.length) {
|
|
25635
|
+
object.types = [];
|
|
25636
|
+
for (var j = 0; j < message.types.length; ++j)
|
|
25637
|
+
object.types[j] = message.types[j];
|
|
25638
|
+
}
|
|
25639
|
+
if (message.distanceMeters != null && message.hasOwnProperty("distanceMeters"))
|
|
25640
|
+
object.distanceMeters = message.distanceMeters;
|
|
25641
|
+
return object;
|
|
25642
|
+
};
|
|
25643
|
+
|
|
25644
|
+
/**
|
|
25645
|
+
* Converts this PlacePrediction to JSON.
|
|
25646
|
+
* @function toJSON
|
|
25647
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction
|
|
25648
|
+
* @instance
|
|
25649
|
+
* @returns {Object.<string,*>} JSON object
|
|
25650
|
+
*/
|
|
25651
|
+
PlacePrediction.prototype.toJSON = function toJSON() {
|
|
25652
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
25653
|
+
};
|
|
25654
|
+
|
|
25655
|
+
/**
|
|
25656
|
+
* Gets the default type url for PlacePrediction
|
|
25657
|
+
* @function getTypeUrl
|
|
25658
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction
|
|
25659
|
+
* @static
|
|
25660
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
25661
|
+
* @returns {string} The default type url
|
|
25662
|
+
*/
|
|
25663
|
+
PlacePrediction.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
25664
|
+
if (typeUrlPrefix === undefined) {
|
|
25665
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
25666
|
+
}
|
|
25667
|
+
return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.PlacePrediction";
|
|
25668
|
+
};
|
|
25669
|
+
|
|
25670
|
+
return PlacePrediction;
|
|
25671
|
+
})();
|
|
25672
|
+
|
|
25673
|
+
Suggestion.QueryPrediction = (function() {
|
|
25674
|
+
|
|
25675
|
+
/**
|
|
25676
|
+
* Properties of a QueryPrediction.
|
|
25677
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
25678
|
+
* @interface IQueryPrediction
|
|
25679
|
+
* @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null} [text] QueryPrediction text
|
|
25680
|
+
* @property {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null} [structuredFormat] QueryPrediction structuredFormat
|
|
25681
|
+
*/
|
|
25682
|
+
|
|
25683
|
+
/**
|
|
25684
|
+
* Constructs a new QueryPrediction.
|
|
25685
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion
|
|
25686
|
+
* @classdesc Represents a QueryPrediction.
|
|
25687
|
+
* @implements IQueryPrediction
|
|
25688
|
+
* @constructor
|
|
25689
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction=} [properties] Properties to set
|
|
25690
|
+
*/
|
|
25691
|
+
function QueryPrediction(properties) {
|
|
25692
|
+
if (properties)
|
|
25693
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
25694
|
+
if (properties[keys[i]] != null)
|
|
25695
|
+
this[keys[i]] = properties[keys[i]];
|
|
25696
|
+
}
|
|
25697
|
+
|
|
25698
|
+
/**
|
|
25699
|
+
* QueryPrediction text.
|
|
25700
|
+
* @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IFormattableText|null|undefined} text
|
|
25701
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction
|
|
25702
|
+
* @instance
|
|
25703
|
+
*/
|
|
25704
|
+
QueryPrediction.prototype.text = null;
|
|
25705
|
+
|
|
25706
|
+
/**
|
|
25707
|
+
* QueryPrediction structuredFormat.
|
|
25708
|
+
* @member {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IStructuredFormat|null|undefined} structuredFormat
|
|
25709
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction
|
|
25710
|
+
* @instance
|
|
25711
|
+
*/
|
|
25712
|
+
QueryPrediction.prototype.structuredFormat = null;
|
|
25713
|
+
|
|
25714
|
+
/**
|
|
25715
|
+
* Creates a new QueryPrediction instance using the specified properties.
|
|
25716
|
+
* @function create
|
|
25717
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction
|
|
25718
|
+
* @static
|
|
25719
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction=} [properties] Properties to set
|
|
25720
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction instance
|
|
25721
|
+
*/
|
|
25722
|
+
QueryPrediction.create = function create(properties) {
|
|
25723
|
+
return new QueryPrediction(properties);
|
|
25724
|
+
};
|
|
25725
|
+
|
|
25726
|
+
/**
|
|
25727
|
+
* Encodes the specified QueryPrediction message. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages.
|
|
25728
|
+
* @function encode
|
|
25729
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction
|
|
25730
|
+
* @static
|
|
25731
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction} message QueryPrediction message or plain object to encode
|
|
25732
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
25733
|
+
* @returns {$protobuf.Writer} Writer
|
|
25734
|
+
*/
|
|
25735
|
+
QueryPrediction.encode = function encode(message, writer) {
|
|
25736
|
+
if (!writer)
|
|
25737
|
+
writer = $Writer.create();
|
|
25738
|
+
if (message.text != null && Object.hasOwnProperty.call(message, "text"))
|
|
25739
|
+
$root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.encode(message.text, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
25740
|
+
if (message.structuredFormat != null && Object.hasOwnProperty.call(message, "structuredFormat"))
|
|
25741
|
+
$root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.encode(message.structuredFormat, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
25742
|
+
return writer;
|
|
25743
|
+
};
|
|
25744
|
+
|
|
25745
|
+
/**
|
|
25746
|
+
* Encodes the specified QueryPrediction message, length delimited. Does not implicitly {@link google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.verify|verify} messages.
|
|
25747
|
+
* @function encodeDelimited
|
|
25748
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction
|
|
25749
|
+
* @static
|
|
25750
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.IQueryPrediction} message QueryPrediction message or plain object to encode
|
|
25751
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
25752
|
+
* @returns {$protobuf.Writer} Writer
|
|
25753
|
+
*/
|
|
25754
|
+
QueryPrediction.encodeDelimited = function encodeDelimited(message, writer) {
|
|
25755
|
+
return this.encode(message, writer).ldelim();
|
|
25756
|
+
};
|
|
25757
|
+
|
|
25758
|
+
/**
|
|
25759
|
+
* Decodes a QueryPrediction message from the specified reader or buffer.
|
|
25760
|
+
* @function decode
|
|
25761
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction
|
|
25762
|
+
* @static
|
|
25763
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
25764
|
+
* @param {number} [length] Message length if known beforehand
|
|
25765
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction
|
|
25766
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
25767
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
25768
|
+
*/
|
|
25769
|
+
QueryPrediction.decode = function decode(reader, length) {
|
|
25770
|
+
if (!(reader instanceof $Reader))
|
|
25771
|
+
reader = $Reader.create(reader);
|
|
25772
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction();
|
|
25773
|
+
while (reader.pos < end) {
|
|
25774
|
+
var tag = reader.uint32();
|
|
25775
|
+
switch (tag >>> 3) {
|
|
25776
|
+
case 1: {
|
|
25777
|
+
message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.decode(reader, reader.uint32());
|
|
25778
|
+
break;
|
|
25779
|
+
}
|
|
25780
|
+
case 2: {
|
|
25781
|
+
message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.decode(reader, reader.uint32());
|
|
25782
|
+
break;
|
|
25783
|
+
}
|
|
25784
|
+
default:
|
|
25785
|
+
reader.skipType(tag & 7);
|
|
25786
|
+
break;
|
|
25787
|
+
}
|
|
25788
|
+
}
|
|
25789
|
+
return message;
|
|
25790
|
+
};
|
|
25791
|
+
|
|
25792
|
+
/**
|
|
25793
|
+
* Decodes a QueryPrediction message from the specified reader or buffer, length delimited.
|
|
25794
|
+
* @function decodeDelimited
|
|
25795
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction
|
|
25796
|
+
* @static
|
|
25797
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
25798
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction
|
|
25799
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
25800
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
25801
|
+
*/
|
|
25802
|
+
QueryPrediction.decodeDelimited = function decodeDelimited(reader) {
|
|
25803
|
+
if (!(reader instanceof $Reader))
|
|
25804
|
+
reader = new $Reader(reader);
|
|
25805
|
+
return this.decode(reader, reader.uint32());
|
|
25806
|
+
};
|
|
25807
|
+
|
|
25808
|
+
/**
|
|
25809
|
+
* Verifies a QueryPrediction message.
|
|
25810
|
+
* @function verify
|
|
25811
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction
|
|
25812
|
+
* @static
|
|
25813
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
25814
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
25815
|
+
*/
|
|
25816
|
+
QueryPrediction.verify = function verify(message) {
|
|
25817
|
+
if (typeof message !== "object" || message === null)
|
|
25818
|
+
return "object expected";
|
|
25819
|
+
if (message.text != null && message.hasOwnProperty("text")) {
|
|
25820
|
+
var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.verify(message.text);
|
|
25821
|
+
if (error)
|
|
25822
|
+
return "text." + error;
|
|
25823
|
+
}
|
|
25824
|
+
if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat")) {
|
|
25825
|
+
var error = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.verify(message.structuredFormat);
|
|
25826
|
+
if (error)
|
|
25827
|
+
return "structuredFormat." + error;
|
|
25828
|
+
}
|
|
25829
|
+
return null;
|
|
25830
|
+
};
|
|
25831
|
+
|
|
25832
|
+
/**
|
|
25833
|
+
* Creates a QueryPrediction message from a plain object. Also converts values to their respective internal types.
|
|
25834
|
+
* @function fromObject
|
|
25835
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction
|
|
25836
|
+
* @static
|
|
25837
|
+
* @param {Object.<string,*>} object Plain object
|
|
25838
|
+
* @returns {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} QueryPrediction
|
|
25839
|
+
*/
|
|
25840
|
+
QueryPrediction.fromObject = function fromObject(object) {
|
|
25841
|
+
if (object instanceof $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction)
|
|
25842
|
+
return object;
|
|
25843
|
+
var message = new $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction();
|
|
25844
|
+
if (object.text != null) {
|
|
25845
|
+
if (typeof object.text !== "object")
|
|
25846
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.text: object expected");
|
|
25847
|
+
message.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.fromObject(object.text);
|
|
25848
|
+
}
|
|
25849
|
+
if (object.structuredFormat != null) {
|
|
25850
|
+
if (typeof object.structuredFormat !== "object")
|
|
25851
|
+
throw TypeError(".google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction.structuredFormat: object expected");
|
|
25852
|
+
message.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.fromObject(object.structuredFormat);
|
|
25853
|
+
}
|
|
25854
|
+
return message;
|
|
25855
|
+
};
|
|
25856
|
+
|
|
25857
|
+
/**
|
|
25858
|
+
* Creates a plain object from a QueryPrediction message. Also converts values to other types if specified.
|
|
25859
|
+
* @function toObject
|
|
25860
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction
|
|
25861
|
+
* @static
|
|
25862
|
+
* @param {google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction} message QueryPrediction
|
|
25863
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
25864
|
+
* @returns {Object.<string,*>} Plain object
|
|
25865
|
+
*/
|
|
25866
|
+
QueryPrediction.toObject = function toObject(message, options) {
|
|
25867
|
+
if (!options)
|
|
25868
|
+
options = {};
|
|
25869
|
+
var object = {};
|
|
25870
|
+
if (options.defaults) {
|
|
25871
|
+
object.text = null;
|
|
25872
|
+
object.structuredFormat = null;
|
|
25873
|
+
}
|
|
25874
|
+
if (message.text != null && message.hasOwnProperty("text"))
|
|
25875
|
+
object.text = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.FormattableText.toObject(message.text, options);
|
|
25876
|
+
if (message.structuredFormat != null && message.hasOwnProperty("structuredFormat"))
|
|
25877
|
+
object.structuredFormat = $root.google.maps.places.v1.AutocompletePlacesResponse.Suggestion.StructuredFormat.toObject(message.structuredFormat, options);
|
|
25878
|
+
return object;
|
|
25879
|
+
};
|
|
25880
|
+
|
|
25881
|
+
/**
|
|
25882
|
+
* Converts this QueryPrediction to JSON.
|
|
25883
|
+
* @function toJSON
|
|
25884
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction
|
|
25885
|
+
* @instance
|
|
25886
|
+
* @returns {Object.<string,*>} JSON object
|
|
25887
|
+
*/
|
|
25888
|
+
QueryPrediction.prototype.toJSON = function toJSON() {
|
|
25889
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
25890
|
+
};
|
|
25891
|
+
|
|
25892
|
+
/**
|
|
25893
|
+
* Gets the default type url for QueryPrediction
|
|
25894
|
+
* @function getTypeUrl
|
|
25895
|
+
* @memberof google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction
|
|
25896
|
+
* @static
|
|
25897
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
25898
|
+
* @returns {string} The default type url
|
|
25899
|
+
*/
|
|
25900
|
+
QueryPrediction.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
25901
|
+
if (typeUrlPrefix === undefined) {
|
|
25902
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
25903
|
+
}
|
|
25904
|
+
return typeUrlPrefix + "/google.maps.places.v1.AutocompletePlacesResponse.Suggestion.QueryPrediction";
|
|
25905
|
+
};
|
|
25906
|
+
|
|
25907
|
+
return QueryPrediction;
|
|
25908
|
+
})();
|
|
25909
|
+
|
|
25910
|
+
return Suggestion;
|
|
25911
|
+
})();
|
|
25912
|
+
|
|
25913
|
+
return AutocompletePlacesResponse;
|
|
25914
|
+
})();
|
|
25915
|
+
|
|
22734
25916
|
return v1;
|
|
22735
25917
|
})();
|
|
22736
25918
|
|