1 | // Copyright 2023 Google LLC
|
2 | //
|
3 | // Licensed under the Apache License, Version 2.0 (the "License");
|
4 | // you may not use this file except in compliance with the License.
|
5 | // You may obtain a copy of the License at
|
6 | //
|
7 | // http://www.apache.org/licenses/LICENSE-2.0
|
8 | //
|
9 | // Unless required by applicable law or agreed to in writing, software
|
10 | // distributed under the License is distributed on an "AS IS" BASIS,
|
11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 | // See the License for the specific language governing permissions and
|
13 | // limitations under the License.
|
14 |
|
15 | /*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
|
16 | (function(global, factory) { /* global define, require, module */
|
17 |
|
18 | /* AMD */ if (typeof define === 'function' && define.amd)
|
19 | define(["protobufjs/minimal"], factory);
|
20 |
|
21 | /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports)
|
22 | module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal);
|
23 |
|
24 | })(this, function($protobuf) {
|
25 | ;
|
26 |
|
27 | // Common aliases
|
28 | var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
|
29 |
|
30 | // Exported root namespace
|
31 | var $root = $protobuf.roots._google_cloud_datastore_protos || ($protobuf.roots._google_cloud_datastore_protos = {});
|
32 |
|
33 | $root.google = (function() {
|
34 |
|
35 | /**
|
36 | * Namespace google.
|
37 | * @exports google
|
38 | * @namespace
|
39 | */
|
40 | var google = {};
|
41 |
|
42 | google.datastore = (function() {
|
43 |
|
44 | /**
|
45 | * Namespace datastore.
|
46 | * @memberof google
|
47 | * @namespace
|
48 | */
|
49 | var datastore = {};
|
50 |
|
51 | datastore.admin = (function() {
|
52 |
|
53 | /**
|
54 | * Namespace admin.
|
55 | * @memberof google.datastore
|
56 | * @namespace
|
57 | */
|
58 | var admin = {};
|
59 |
|
60 | admin.v1 = (function() {
|
61 |
|
62 | /**
|
63 | * Namespace v1.
|
64 | * @memberof google.datastore.admin
|
65 | * @namespace
|
66 | */
|
67 | var v1 = {};
|
68 |
|
69 | v1.DatastoreAdmin = (function() {
|
70 |
|
71 | /**
|
72 | * Constructs a new DatastoreAdmin service.
|
73 | * @memberof google.datastore.admin.v1
|
74 | * @classdesc Represents a DatastoreAdmin
|
75 | * @extends $protobuf.rpc.Service
|
76 | * @constructor
|
77 | * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
|
78 | * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
|
79 | * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
|
80 | */
|
81 | function DatastoreAdmin(rpcImpl, requestDelimited, responseDelimited) {
|
82 | $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
|
83 | }
|
84 |
|
85 | (DatastoreAdmin.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = DatastoreAdmin;
|
86 |
|
87 | /**
|
88 | * Creates new DatastoreAdmin service using the specified rpc implementation.
|
89 | * @function create
|
90 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
91 | * @static
|
92 | * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
|
93 | * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
|
94 | * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
|
95 | * @returns {DatastoreAdmin} RPC service. Useful where requests and/or responses are streamed.
|
96 | */
|
97 | DatastoreAdmin.create = function create(rpcImpl, requestDelimited, responseDelimited) {
|
98 | return new this(rpcImpl, requestDelimited, responseDelimited);
|
99 | };
|
100 |
|
101 | /**
|
102 | * Callback as used by {@link google.datastore.admin.v1.DatastoreAdmin|exportEntities}.
|
103 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
104 | * @typedef ExportEntitiesCallback
|
105 | * @type {function}
|
106 | * @param {Error|null} error Error, if any
|
107 | * @param {google.longrunning.Operation} [response] Operation
|
108 | */
|
109 |
|
110 | /**
|
111 | * Calls ExportEntities.
|
112 | * @function exportEntities
|
113 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
114 | * @instance
|
115 | * @param {google.datastore.admin.v1.IExportEntitiesRequest} request ExportEntitiesRequest message or plain object
|
116 | * @param {google.datastore.admin.v1.DatastoreAdmin.ExportEntitiesCallback} callback Node-style callback called with the error, if any, and Operation
|
117 | * @returns {undefined}
|
118 | * @variation 1
|
119 | */
|
120 | Object.defineProperty(DatastoreAdmin.prototype.exportEntities = function exportEntities(request, callback) {
|
121 | return this.rpcCall(exportEntities, $root.google.datastore.admin.v1.ExportEntitiesRequest, $root.google.longrunning.Operation, request, callback);
|
122 | }, "name", { value: "ExportEntities" });
|
123 |
|
124 | /**
|
125 | * Calls ExportEntities.
|
126 | * @function exportEntities
|
127 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
128 | * @instance
|
129 | * @param {google.datastore.admin.v1.IExportEntitiesRequest} request ExportEntitiesRequest message or plain object
|
130 | * @returns {Promise<google.longrunning.Operation>} Promise
|
131 | * @variation 2
|
132 | */
|
133 |
|
134 | /**
|
135 | * Callback as used by {@link google.datastore.admin.v1.DatastoreAdmin|importEntities}.
|
136 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
137 | * @typedef ImportEntitiesCallback
|
138 | * @type {function}
|
139 | * @param {Error|null} error Error, if any
|
140 | * @param {google.longrunning.Operation} [response] Operation
|
141 | */
|
142 |
|
143 | /**
|
144 | * Calls ImportEntities.
|
145 | * @function importEntities
|
146 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
147 | * @instance
|
148 | * @param {google.datastore.admin.v1.IImportEntitiesRequest} request ImportEntitiesRequest message or plain object
|
149 | * @param {google.datastore.admin.v1.DatastoreAdmin.ImportEntitiesCallback} callback Node-style callback called with the error, if any, and Operation
|
150 | * @returns {undefined}
|
151 | * @variation 1
|
152 | */
|
153 | Object.defineProperty(DatastoreAdmin.prototype.importEntities = function importEntities(request, callback) {
|
154 | return this.rpcCall(importEntities, $root.google.datastore.admin.v1.ImportEntitiesRequest, $root.google.longrunning.Operation, request, callback);
|
155 | }, "name", { value: "ImportEntities" });
|
156 |
|
157 | /**
|
158 | * Calls ImportEntities.
|
159 | * @function importEntities
|
160 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
161 | * @instance
|
162 | * @param {google.datastore.admin.v1.IImportEntitiesRequest} request ImportEntitiesRequest message or plain object
|
163 | * @returns {Promise<google.longrunning.Operation>} Promise
|
164 | * @variation 2
|
165 | */
|
166 |
|
167 | /**
|
168 | * Callback as used by {@link google.datastore.admin.v1.DatastoreAdmin|createIndex}.
|
169 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
170 | * @typedef CreateIndexCallback
|
171 | * @type {function}
|
172 | * @param {Error|null} error Error, if any
|
173 | * @param {google.longrunning.Operation} [response] Operation
|
174 | */
|
175 |
|
176 | /**
|
177 | * Calls CreateIndex.
|
178 | * @function createIndex
|
179 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
180 | * @instance
|
181 | * @param {google.datastore.admin.v1.ICreateIndexRequest} request CreateIndexRequest message or plain object
|
182 | * @param {google.datastore.admin.v1.DatastoreAdmin.CreateIndexCallback} callback Node-style callback called with the error, if any, and Operation
|
183 | * @returns {undefined}
|
184 | * @variation 1
|
185 | */
|
186 | Object.defineProperty(DatastoreAdmin.prototype.createIndex = function createIndex(request, callback) {
|
187 | return this.rpcCall(createIndex, $root.google.datastore.admin.v1.CreateIndexRequest, $root.google.longrunning.Operation, request, callback);
|
188 | }, "name", { value: "CreateIndex" });
|
189 |
|
190 | /**
|
191 | * Calls CreateIndex.
|
192 | * @function createIndex
|
193 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
194 | * @instance
|
195 | * @param {google.datastore.admin.v1.ICreateIndexRequest} request CreateIndexRequest message or plain object
|
196 | * @returns {Promise<google.longrunning.Operation>} Promise
|
197 | * @variation 2
|
198 | */
|
199 |
|
200 | /**
|
201 | * Callback as used by {@link google.datastore.admin.v1.DatastoreAdmin|deleteIndex}.
|
202 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
203 | * @typedef DeleteIndexCallback
|
204 | * @type {function}
|
205 | * @param {Error|null} error Error, if any
|
206 | * @param {google.longrunning.Operation} [response] Operation
|
207 | */
|
208 |
|
209 | /**
|
210 | * Calls DeleteIndex.
|
211 | * @function deleteIndex
|
212 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
213 | * @instance
|
214 | * @param {google.datastore.admin.v1.IDeleteIndexRequest} request DeleteIndexRequest message or plain object
|
215 | * @param {google.datastore.admin.v1.DatastoreAdmin.DeleteIndexCallback} callback Node-style callback called with the error, if any, and Operation
|
216 | * @returns {undefined}
|
217 | * @variation 1
|
218 | */
|
219 | Object.defineProperty(DatastoreAdmin.prototype.deleteIndex = function deleteIndex(request, callback) {
|
220 | return this.rpcCall(deleteIndex, $root.google.datastore.admin.v1.DeleteIndexRequest, $root.google.longrunning.Operation, request, callback);
|
221 | }, "name", { value: "DeleteIndex" });
|
222 |
|
223 | /**
|
224 | * Calls DeleteIndex.
|
225 | * @function deleteIndex
|
226 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
227 | * @instance
|
228 | * @param {google.datastore.admin.v1.IDeleteIndexRequest} request DeleteIndexRequest message or plain object
|
229 | * @returns {Promise<google.longrunning.Operation>} Promise
|
230 | * @variation 2
|
231 | */
|
232 |
|
233 | /**
|
234 | * Callback as used by {@link google.datastore.admin.v1.DatastoreAdmin|getIndex}.
|
235 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
236 | * @typedef GetIndexCallback
|
237 | * @type {function}
|
238 | * @param {Error|null} error Error, if any
|
239 | * @param {google.datastore.admin.v1.Index} [response] Index
|
240 | */
|
241 |
|
242 | /**
|
243 | * Calls GetIndex.
|
244 | * @function getIndex
|
245 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
246 | * @instance
|
247 | * @param {google.datastore.admin.v1.IGetIndexRequest} request GetIndexRequest message or plain object
|
248 | * @param {google.datastore.admin.v1.DatastoreAdmin.GetIndexCallback} callback Node-style callback called with the error, if any, and Index
|
249 | * @returns {undefined}
|
250 | * @variation 1
|
251 | */
|
252 | Object.defineProperty(DatastoreAdmin.prototype.getIndex = function getIndex(request, callback) {
|
253 | return this.rpcCall(getIndex, $root.google.datastore.admin.v1.GetIndexRequest, $root.google.datastore.admin.v1.Index, request, callback);
|
254 | }, "name", { value: "GetIndex" });
|
255 |
|
256 | /**
|
257 | * Calls GetIndex.
|
258 | * @function getIndex
|
259 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
260 | * @instance
|
261 | * @param {google.datastore.admin.v1.IGetIndexRequest} request GetIndexRequest message or plain object
|
262 | * @returns {Promise<google.datastore.admin.v1.Index>} Promise
|
263 | * @variation 2
|
264 | */
|
265 |
|
266 | /**
|
267 | * Callback as used by {@link google.datastore.admin.v1.DatastoreAdmin|listIndexes}.
|
268 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
269 | * @typedef ListIndexesCallback
|
270 | * @type {function}
|
271 | * @param {Error|null} error Error, if any
|
272 | * @param {google.datastore.admin.v1.ListIndexesResponse} [response] ListIndexesResponse
|
273 | */
|
274 |
|
275 | /**
|
276 | * Calls ListIndexes.
|
277 | * @function listIndexes
|
278 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
279 | * @instance
|
280 | * @param {google.datastore.admin.v1.IListIndexesRequest} request ListIndexesRequest message or plain object
|
281 | * @param {google.datastore.admin.v1.DatastoreAdmin.ListIndexesCallback} callback Node-style callback called with the error, if any, and ListIndexesResponse
|
282 | * @returns {undefined}
|
283 | * @variation 1
|
284 | */
|
285 | Object.defineProperty(DatastoreAdmin.prototype.listIndexes = function listIndexes(request, callback) {
|
286 | return this.rpcCall(listIndexes, $root.google.datastore.admin.v1.ListIndexesRequest, $root.google.datastore.admin.v1.ListIndexesResponse, request, callback);
|
287 | }, "name", { value: "ListIndexes" });
|
288 |
|
289 | /**
|
290 | * Calls ListIndexes.
|
291 | * @function listIndexes
|
292 | * @memberof google.datastore.admin.v1.DatastoreAdmin
|
293 | * @instance
|
294 | * @param {google.datastore.admin.v1.IListIndexesRequest} request ListIndexesRequest message or plain object
|
295 | * @returns {Promise<google.datastore.admin.v1.ListIndexesResponse>} Promise
|
296 | * @variation 2
|
297 | */
|
298 |
|
299 | return DatastoreAdmin;
|
300 | })();
|
301 |
|
302 | v1.CommonMetadata = (function() {
|
303 |
|
304 | /**
|
305 | * Properties of a CommonMetadata.
|
306 | * @memberof google.datastore.admin.v1
|
307 | * @interface ICommonMetadata
|
308 | * @property {google.protobuf.ITimestamp|null} [startTime] CommonMetadata startTime
|
309 | * @property {google.protobuf.ITimestamp|null} [endTime] CommonMetadata endTime
|
310 | * @property {google.datastore.admin.v1.OperationType|null} [operationType] CommonMetadata operationType
|
311 | * @property {Object.<string,string>|null} [labels] CommonMetadata labels
|
312 | * @property {google.datastore.admin.v1.CommonMetadata.State|null} [state] CommonMetadata state
|
313 | */
|
314 |
|
315 | /**
|
316 | * Constructs a new CommonMetadata.
|
317 | * @memberof google.datastore.admin.v1
|
318 | * @classdesc Represents a CommonMetadata.
|
319 | * @implements ICommonMetadata
|
320 | * @constructor
|
321 | * @param {google.datastore.admin.v1.ICommonMetadata=} [properties] Properties to set
|
322 | */
|
323 | function CommonMetadata(properties) {
|
324 | this.labels = {};
|
325 | if (properties)
|
326 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
327 | if (properties[keys[i]] != null)
|
328 | this[keys[i]] = properties[keys[i]];
|
329 | }
|
330 |
|
331 | /**
|
332 | * CommonMetadata startTime.
|
333 | * @member {google.protobuf.ITimestamp|null|undefined} startTime
|
334 | * @memberof google.datastore.admin.v1.CommonMetadata
|
335 | * @instance
|
336 | */
|
337 | CommonMetadata.prototype.startTime = null;
|
338 |
|
339 | /**
|
340 | * CommonMetadata endTime.
|
341 | * @member {google.protobuf.ITimestamp|null|undefined} endTime
|
342 | * @memberof google.datastore.admin.v1.CommonMetadata
|
343 | * @instance
|
344 | */
|
345 | CommonMetadata.prototype.endTime = null;
|
346 |
|
347 | /**
|
348 | * CommonMetadata operationType.
|
349 | * @member {google.datastore.admin.v1.OperationType} operationType
|
350 | * @memberof google.datastore.admin.v1.CommonMetadata
|
351 | * @instance
|
352 | */
|
353 | CommonMetadata.prototype.operationType = 0;
|
354 |
|
355 | /**
|
356 | * CommonMetadata labels.
|
357 | * @member {Object.<string,string>} labels
|
358 | * @memberof google.datastore.admin.v1.CommonMetadata
|
359 | * @instance
|
360 | */
|
361 | CommonMetadata.prototype.labels = $util.emptyObject;
|
362 |
|
363 | /**
|
364 | * CommonMetadata state.
|
365 | * @member {google.datastore.admin.v1.CommonMetadata.State} state
|
366 | * @memberof google.datastore.admin.v1.CommonMetadata
|
367 | * @instance
|
368 | */
|
369 | CommonMetadata.prototype.state = 0;
|
370 |
|
371 | /**
|
372 | * Creates a new CommonMetadata instance using the specified properties.
|
373 | * @function create
|
374 | * @memberof google.datastore.admin.v1.CommonMetadata
|
375 | * @static
|
376 | * @param {google.datastore.admin.v1.ICommonMetadata=} [properties] Properties to set
|
377 | * @returns {google.datastore.admin.v1.CommonMetadata} CommonMetadata instance
|
378 | */
|
379 | CommonMetadata.create = function create(properties) {
|
380 | return new CommonMetadata(properties);
|
381 | };
|
382 |
|
383 | /**
|
384 | * Encodes the specified CommonMetadata message. Does not implicitly {@link google.datastore.admin.v1.CommonMetadata.verify|verify} messages.
|
385 | * @function encode
|
386 | * @memberof google.datastore.admin.v1.CommonMetadata
|
387 | * @static
|
388 | * @param {google.datastore.admin.v1.ICommonMetadata} message CommonMetadata message or plain object to encode
|
389 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
390 | * @returns {$protobuf.Writer} Writer
|
391 | */
|
392 | CommonMetadata.encode = function encode(message, writer) {
|
393 | if (!writer)
|
394 | writer = $Writer.create();
|
395 | if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime"))
|
396 | $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
397 | if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime"))
|
398 | $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
399 | if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType"))
|
400 | writer.uint32(/* id 3, wireType 0 =*/24).int32(message.operationType);
|
401 | if (message.labels != null && Object.hasOwnProperty.call(message, "labels"))
|
402 | for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i)
|
403 | writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim();
|
404 | if (message.state != null && Object.hasOwnProperty.call(message, "state"))
|
405 | writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state);
|
406 | return writer;
|
407 | };
|
408 |
|
409 | /**
|
410 | * Encodes the specified CommonMetadata message, length delimited. Does not implicitly {@link google.datastore.admin.v1.CommonMetadata.verify|verify} messages.
|
411 | * @function encodeDelimited
|
412 | * @memberof google.datastore.admin.v1.CommonMetadata
|
413 | * @static
|
414 | * @param {google.datastore.admin.v1.ICommonMetadata} message CommonMetadata message or plain object to encode
|
415 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
416 | * @returns {$protobuf.Writer} Writer
|
417 | */
|
418 | CommonMetadata.encodeDelimited = function encodeDelimited(message, writer) {
|
419 | return this.encode(message, writer).ldelim();
|
420 | };
|
421 |
|
422 | /**
|
423 | * Decodes a CommonMetadata message from the specified reader or buffer.
|
424 | * @function decode
|
425 | * @memberof google.datastore.admin.v1.CommonMetadata
|
426 | * @static
|
427 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
428 | * @param {number} [length] Message length if known beforehand
|
429 | * @returns {google.datastore.admin.v1.CommonMetadata} CommonMetadata
|
430 | * @throws {Error} If the payload is not a reader or valid buffer
|
431 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
432 | */
|
433 | CommonMetadata.decode = function decode(reader, length) {
|
434 | if (!(reader instanceof $Reader))
|
435 | reader = $Reader.create(reader);
|
436 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.CommonMetadata(), key, value;
|
437 | while (reader.pos < end) {
|
438 | var tag = reader.uint32();
|
439 | switch (tag >>> 3) {
|
440 | case 1: {
|
441 | message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
442 | break;
|
443 | }
|
444 | case 2: {
|
445 | message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
446 | break;
|
447 | }
|
448 | case 3: {
|
449 | message.operationType = reader.int32();
|
450 | break;
|
451 | }
|
452 | case 4: {
|
453 | if (message.labels === $util.emptyObject)
|
454 | message.labels = {};
|
455 | var end2 = reader.uint32() + reader.pos;
|
456 | key = "";
|
457 | value = "";
|
458 | while (reader.pos < end2) {
|
459 | var tag2 = reader.uint32();
|
460 | switch (tag2 >>> 3) {
|
461 | case 1:
|
462 | key = reader.string();
|
463 | break;
|
464 | case 2:
|
465 | value = reader.string();
|
466 | break;
|
467 | default:
|
468 | reader.skipType(tag2 & 7);
|
469 | break;
|
470 | }
|
471 | }
|
472 | message.labels[key] = value;
|
473 | break;
|
474 | }
|
475 | case 5: {
|
476 | message.state = reader.int32();
|
477 | break;
|
478 | }
|
479 | default:
|
480 | reader.skipType(tag & 7);
|
481 | break;
|
482 | }
|
483 | }
|
484 | return message;
|
485 | };
|
486 |
|
487 | /**
|
488 | * Decodes a CommonMetadata message from the specified reader or buffer, length delimited.
|
489 | * @function decodeDelimited
|
490 | * @memberof google.datastore.admin.v1.CommonMetadata
|
491 | * @static
|
492 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
493 | * @returns {google.datastore.admin.v1.CommonMetadata} CommonMetadata
|
494 | * @throws {Error} If the payload is not a reader or valid buffer
|
495 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
496 | */
|
497 | CommonMetadata.decodeDelimited = function decodeDelimited(reader) {
|
498 | if (!(reader instanceof $Reader))
|
499 | reader = new $Reader(reader);
|
500 | return this.decode(reader, reader.uint32());
|
501 | };
|
502 |
|
503 | /**
|
504 | * Verifies a CommonMetadata message.
|
505 | * @function verify
|
506 | * @memberof google.datastore.admin.v1.CommonMetadata
|
507 | * @static
|
508 | * @param {Object.<string,*>} message Plain object to verify
|
509 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
510 | */
|
511 | CommonMetadata.verify = function verify(message) {
|
512 | if (typeof message !== "object" || message === null)
|
513 | return "object expected";
|
514 | if (message.startTime != null && message.hasOwnProperty("startTime")) {
|
515 | var error = $root.google.protobuf.Timestamp.verify(message.startTime);
|
516 | if (error)
|
517 | return "startTime." + error;
|
518 | }
|
519 | if (message.endTime != null && message.hasOwnProperty("endTime")) {
|
520 | var error = $root.google.protobuf.Timestamp.verify(message.endTime);
|
521 | if (error)
|
522 | return "endTime." + error;
|
523 | }
|
524 | if (message.operationType != null && message.hasOwnProperty("operationType"))
|
525 | switch (message.operationType) {
|
526 | default:
|
527 | return "operationType: enum value expected";
|
528 | case 0:
|
529 | case 1:
|
530 | case 2:
|
531 | case 3:
|
532 | case 4:
|
533 | break;
|
534 | }
|
535 | if (message.labels != null && message.hasOwnProperty("labels")) {
|
536 | if (!$util.isObject(message.labels))
|
537 | return "labels: object expected";
|
538 | var key = Object.keys(message.labels);
|
539 | for (var i = 0; i < key.length; ++i)
|
540 | if (!$util.isString(message.labels[key[i]]))
|
541 | return "labels: string{k:string} expected";
|
542 | }
|
543 | if (message.state != null && message.hasOwnProperty("state"))
|
544 | switch (message.state) {
|
545 | default:
|
546 | return "state: enum value expected";
|
547 | case 0:
|
548 | case 1:
|
549 | case 2:
|
550 | case 3:
|
551 | case 4:
|
552 | case 5:
|
553 | case 6:
|
554 | case 7:
|
555 | break;
|
556 | }
|
557 | return null;
|
558 | };
|
559 |
|
560 | /**
|
561 | * Creates a CommonMetadata message from a plain object. Also converts values to their respective internal types.
|
562 | * @function fromObject
|
563 | * @memberof google.datastore.admin.v1.CommonMetadata
|
564 | * @static
|
565 | * @param {Object.<string,*>} object Plain object
|
566 | * @returns {google.datastore.admin.v1.CommonMetadata} CommonMetadata
|
567 | */
|
568 | CommonMetadata.fromObject = function fromObject(object) {
|
569 | if (object instanceof $root.google.datastore.admin.v1.CommonMetadata)
|
570 | return object;
|
571 | var message = new $root.google.datastore.admin.v1.CommonMetadata();
|
572 | if (object.startTime != null) {
|
573 | if (typeof object.startTime !== "object")
|
574 | throw TypeError(".google.datastore.admin.v1.CommonMetadata.startTime: object expected");
|
575 | message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime);
|
576 | }
|
577 | if (object.endTime != null) {
|
578 | if (typeof object.endTime !== "object")
|
579 | throw TypeError(".google.datastore.admin.v1.CommonMetadata.endTime: object expected");
|
580 | message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime);
|
581 | }
|
582 | switch (object.operationType) {
|
583 | default:
|
584 | if (typeof object.operationType === "number") {
|
585 | message.operationType = object.operationType;
|
586 | break;
|
587 | }
|
588 | break;
|
589 | case "OPERATION_TYPE_UNSPECIFIED":
|
590 | case 0:
|
591 | message.operationType = 0;
|
592 | break;
|
593 | case "EXPORT_ENTITIES":
|
594 | case 1:
|
595 | message.operationType = 1;
|
596 | break;
|
597 | case "IMPORT_ENTITIES":
|
598 | case 2:
|
599 | message.operationType = 2;
|
600 | break;
|
601 | case "CREATE_INDEX":
|
602 | case 3:
|
603 | message.operationType = 3;
|
604 | break;
|
605 | case "DELETE_INDEX":
|
606 | case 4:
|
607 | message.operationType = 4;
|
608 | break;
|
609 | }
|
610 | if (object.labels) {
|
611 | if (typeof object.labels !== "object")
|
612 | throw TypeError(".google.datastore.admin.v1.CommonMetadata.labels: object expected");
|
613 | message.labels = {};
|
614 | for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i)
|
615 | message.labels[keys[i]] = String(object.labels[keys[i]]);
|
616 | }
|
617 | switch (object.state) {
|
618 | default:
|
619 | if (typeof object.state === "number") {
|
620 | message.state = object.state;
|
621 | break;
|
622 | }
|
623 | break;
|
624 | case "STATE_UNSPECIFIED":
|
625 | case 0:
|
626 | message.state = 0;
|
627 | break;
|
628 | case "INITIALIZING":
|
629 | case 1:
|
630 | message.state = 1;
|
631 | break;
|
632 | case "PROCESSING":
|
633 | case 2:
|
634 | message.state = 2;
|
635 | break;
|
636 | case "CANCELLING":
|
637 | case 3:
|
638 | message.state = 3;
|
639 | break;
|
640 | case "FINALIZING":
|
641 | case 4:
|
642 | message.state = 4;
|
643 | break;
|
644 | case "SUCCESSFUL":
|
645 | case 5:
|
646 | message.state = 5;
|
647 | break;
|
648 | case "FAILED":
|
649 | case 6:
|
650 | message.state = 6;
|
651 | break;
|
652 | case "CANCELLED":
|
653 | case 7:
|
654 | message.state = 7;
|
655 | break;
|
656 | }
|
657 | return message;
|
658 | };
|
659 |
|
660 | /**
|
661 | * Creates a plain object from a CommonMetadata message. Also converts values to other types if specified.
|
662 | * @function toObject
|
663 | * @memberof google.datastore.admin.v1.CommonMetadata
|
664 | * @static
|
665 | * @param {google.datastore.admin.v1.CommonMetadata} message CommonMetadata
|
666 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
667 | * @returns {Object.<string,*>} Plain object
|
668 | */
|
669 | CommonMetadata.toObject = function toObject(message, options) {
|
670 | if (!options)
|
671 | options = {};
|
672 | var object = {};
|
673 | if (options.objects || options.defaults)
|
674 | object.labels = {};
|
675 | if (options.defaults) {
|
676 | object.startTime = null;
|
677 | object.endTime = null;
|
678 | object.operationType = options.enums === String ? "OPERATION_TYPE_UNSPECIFIED" : 0;
|
679 | object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
|
680 | }
|
681 | if (message.startTime != null && message.hasOwnProperty("startTime"))
|
682 | object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options);
|
683 | if (message.endTime != null && message.hasOwnProperty("endTime"))
|
684 | object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options);
|
685 | if (message.operationType != null && message.hasOwnProperty("operationType"))
|
686 | object.operationType = options.enums === String ? $root.google.datastore.admin.v1.OperationType[message.operationType] === undefined ? message.operationType : $root.google.datastore.admin.v1.OperationType[message.operationType] : message.operationType;
|
687 | var keys2;
|
688 | if (message.labels && (keys2 = Object.keys(message.labels)).length) {
|
689 | object.labels = {};
|
690 | for (var j = 0; j < keys2.length; ++j)
|
691 | object.labels[keys2[j]] = message.labels[keys2[j]];
|
692 | }
|
693 | if (message.state != null && message.hasOwnProperty("state"))
|
694 | object.state = options.enums === String ? $root.google.datastore.admin.v1.CommonMetadata.State[message.state] === undefined ? message.state : $root.google.datastore.admin.v1.CommonMetadata.State[message.state] : message.state;
|
695 | return object;
|
696 | };
|
697 |
|
698 | /**
|
699 | * Converts this CommonMetadata to JSON.
|
700 | * @function toJSON
|
701 | * @memberof google.datastore.admin.v1.CommonMetadata
|
702 | * @instance
|
703 | * @returns {Object.<string,*>} JSON object
|
704 | */
|
705 | CommonMetadata.prototype.toJSON = function toJSON() {
|
706 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
707 | };
|
708 |
|
709 | /**
|
710 | * Gets the default type url for CommonMetadata
|
711 | * @function getTypeUrl
|
712 | * @memberof google.datastore.admin.v1.CommonMetadata
|
713 | * @static
|
714 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
715 | * @returns {string} The default type url
|
716 | */
|
717 | CommonMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
718 | if (typeUrlPrefix === undefined) {
|
719 | typeUrlPrefix = "type.googleapis.com";
|
720 | }
|
721 | return typeUrlPrefix + "/google.datastore.admin.v1.CommonMetadata";
|
722 | };
|
723 |
|
724 | /**
|
725 | * State enum.
|
726 | * @name google.datastore.admin.v1.CommonMetadata.State
|
727 | * @enum {number}
|
728 | * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
|
729 | * @property {number} INITIALIZING=1 INITIALIZING value
|
730 | * @property {number} PROCESSING=2 PROCESSING value
|
731 | * @property {number} CANCELLING=3 CANCELLING value
|
732 | * @property {number} FINALIZING=4 FINALIZING value
|
733 | * @property {number} SUCCESSFUL=5 SUCCESSFUL value
|
734 | * @property {number} FAILED=6 FAILED value
|
735 | * @property {number} CANCELLED=7 CANCELLED value
|
736 | */
|
737 | CommonMetadata.State = (function() {
|
738 | var valuesById = {}, values = Object.create(valuesById);
|
739 | values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
|
740 | values[valuesById[1] = "INITIALIZING"] = 1;
|
741 | values[valuesById[2] = "PROCESSING"] = 2;
|
742 | values[valuesById[3] = "CANCELLING"] = 3;
|
743 | values[valuesById[4] = "FINALIZING"] = 4;
|
744 | values[valuesById[5] = "SUCCESSFUL"] = 5;
|
745 | values[valuesById[6] = "FAILED"] = 6;
|
746 | values[valuesById[7] = "CANCELLED"] = 7;
|
747 | return values;
|
748 | })();
|
749 |
|
750 | return CommonMetadata;
|
751 | })();
|
752 |
|
753 | v1.Progress = (function() {
|
754 |
|
755 | /**
|
756 | * Properties of a Progress.
|
757 | * @memberof google.datastore.admin.v1
|
758 | * @interface IProgress
|
759 | * @property {number|Long|null} [workCompleted] Progress workCompleted
|
760 | * @property {number|Long|null} [workEstimated] Progress workEstimated
|
761 | */
|
762 |
|
763 | /**
|
764 | * Constructs a new Progress.
|
765 | * @memberof google.datastore.admin.v1
|
766 | * @classdesc Represents a Progress.
|
767 | * @implements IProgress
|
768 | * @constructor
|
769 | * @param {google.datastore.admin.v1.IProgress=} [properties] Properties to set
|
770 | */
|
771 | function Progress(properties) {
|
772 | if (properties)
|
773 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
774 | if (properties[keys[i]] != null)
|
775 | this[keys[i]] = properties[keys[i]];
|
776 | }
|
777 |
|
778 | /**
|
779 | * Progress workCompleted.
|
780 | * @member {number|Long} workCompleted
|
781 | * @memberof google.datastore.admin.v1.Progress
|
782 | * @instance
|
783 | */
|
784 | Progress.prototype.workCompleted = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
785 |
|
786 | /**
|
787 | * Progress workEstimated.
|
788 | * @member {number|Long} workEstimated
|
789 | * @memberof google.datastore.admin.v1.Progress
|
790 | * @instance
|
791 | */
|
792 | Progress.prototype.workEstimated = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
793 |
|
794 | /**
|
795 | * Creates a new Progress instance using the specified properties.
|
796 | * @function create
|
797 | * @memberof google.datastore.admin.v1.Progress
|
798 | * @static
|
799 | * @param {google.datastore.admin.v1.IProgress=} [properties] Properties to set
|
800 | * @returns {google.datastore.admin.v1.Progress} Progress instance
|
801 | */
|
802 | Progress.create = function create(properties) {
|
803 | return new Progress(properties);
|
804 | };
|
805 |
|
806 | /**
|
807 | * Encodes the specified Progress message. Does not implicitly {@link google.datastore.admin.v1.Progress.verify|verify} messages.
|
808 | * @function encode
|
809 | * @memberof google.datastore.admin.v1.Progress
|
810 | * @static
|
811 | * @param {google.datastore.admin.v1.IProgress} message Progress message or plain object to encode
|
812 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
813 | * @returns {$protobuf.Writer} Writer
|
814 | */
|
815 | Progress.encode = function encode(message, writer) {
|
816 | if (!writer)
|
817 | writer = $Writer.create();
|
818 | if (message.workCompleted != null && Object.hasOwnProperty.call(message, "workCompleted"))
|
819 | writer.uint32(/* id 1, wireType 0 =*/8).int64(message.workCompleted);
|
820 | if (message.workEstimated != null && Object.hasOwnProperty.call(message, "workEstimated"))
|
821 | writer.uint32(/* id 2, wireType 0 =*/16).int64(message.workEstimated);
|
822 | return writer;
|
823 | };
|
824 |
|
825 | /**
|
826 | * Encodes the specified Progress message, length delimited. Does not implicitly {@link google.datastore.admin.v1.Progress.verify|verify} messages.
|
827 | * @function encodeDelimited
|
828 | * @memberof google.datastore.admin.v1.Progress
|
829 | * @static
|
830 | * @param {google.datastore.admin.v1.IProgress} message Progress message or plain object to encode
|
831 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
832 | * @returns {$protobuf.Writer} Writer
|
833 | */
|
834 | Progress.encodeDelimited = function encodeDelimited(message, writer) {
|
835 | return this.encode(message, writer).ldelim();
|
836 | };
|
837 |
|
838 | /**
|
839 | * Decodes a Progress message from the specified reader or buffer.
|
840 | * @function decode
|
841 | * @memberof google.datastore.admin.v1.Progress
|
842 | * @static
|
843 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
844 | * @param {number} [length] Message length if known beforehand
|
845 | * @returns {google.datastore.admin.v1.Progress} Progress
|
846 | * @throws {Error} If the payload is not a reader or valid buffer
|
847 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
848 | */
|
849 | Progress.decode = function decode(reader, length) {
|
850 | if (!(reader instanceof $Reader))
|
851 | reader = $Reader.create(reader);
|
852 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.Progress();
|
853 | while (reader.pos < end) {
|
854 | var tag = reader.uint32();
|
855 | switch (tag >>> 3) {
|
856 | case 1: {
|
857 | message.workCompleted = reader.int64();
|
858 | break;
|
859 | }
|
860 | case 2: {
|
861 | message.workEstimated = reader.int64();
|
862 | break;
|
863 | }
|
864 | default:
|
865 | reader.skipType(tag & 7);
|
866 | break;
|
867 | }
|
868 | }
|
869 | return message;
|
870 | };
|
871 |
|
872 | /**
|
873 | * Decodes a Progress message from the specified reader or buffer, length delimited.
|
874 | * @function decodeDelimited
|
875 | * @memberof google.datastore.admin.v1.Progress
|
876 | * @static
|
877 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
878 | * @returns {google.datastore.admin.v1.Progress} Progress
|
879 | * @throws {Error} If the payload is not a reader or valid buffer
|
880 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
881 | */
|
882 | Progress.decodeDelimited = function decodeDelimited(reader) {
|
883 | if (!(reader instanceof $Reader))
|
884 | reader = new $Reader(reader);
|
885 | return this.decode(reader, reader.uint32());
|
886 | };
|
887 |
|
888 | /**
|
889 | * Verifies a Progress message.
|
890 | * @function verify
|
891 | * @memberof google.datastore.admin.v1.Progress
|
892 | * @static
|
893 | * @param {Object.<string,*>} message Plain object to verify
|
894 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
895 | */
|
896 | Progress.verify = function verify(message) {
|
897 | if (typeof message !== "object" || message === null)
|
898 | return "object expected";
|
899 | if (message.workCompleted != null && message.hasOwnProperty("workCompleted"))
|
900 | if (!$util.isInteger(message.workCompleted) && !(message.workCompleted && $util.isInteger(message.workCompleted.low) && $util.isInteger(message.workCompleted.high)))
|
901 | return "workCompleted: integer|Long expected";
|
902 | if (message.workEstimated != null && message.hasOwnProperty("workEstimated"))
|
903 | if (!$util.isInteger(message.workEstimated) && !(message.workEstimated && $util.isInteger(message.workEstimated.low) && $util.isInteger(message.workEstimated.high)))
|
904 | return "workEstimated: integer|Long expected";
|
905 | return null;
|
906 | };
|
907 |
|
908 | /**
|
909 | * Creates a Progress message from a plain object. Also converts values to their respective internal types.
|
910 | * @function fromObject
|
911 | * @memberof google.datastore.admin.v1.Progress
|
912 | * @static
|
913 | * @param {Object.<string,*>} object Plain object
|
914 | * @returns {google.datastore.admin.v1.Progress} Progress
|
915 | */
|
916 | Progress.fromObject = function fromObject(object) {
|
917 | if (object instanceof $root.google.datastore.admin.v1.Progress)
|
918 | return object;
|
919 | var message = new $root.google.datastore.admin.v1.Progress();
|
920 | if (object.workCompleted != null)
|
921 | if ($util.Long)
|
922 | (message.workCompleted = $util.Long.fromValue(object.workCompleted)).unsigned = false;
|
923 | else if (typeof object.workCompleted === "string")
|
924 | message.workCompleted = parseInt(object.workCompleted, 10);
|
925 | else if (typeof object.workCompleted === "number")
|
926 | message.workCompleted = object.workCompleted;
|
927 | else if (typeof object.workCompleted === "object")
|
928 | message.workCompleted = new $util.LongBits(object.workCompleted.low >>> 0, object.workCompleted.high >>> 0).toNumber();
|
929 | if (object.workEstimated != null)
|
930 | if ($util.Long)
|
931 | (message.workEstimated = $util.Long.fromValue(object.workEstimated)).unsigned = false;
|
932 | else if (typeof object.workEstimated === "string")
|
933 | message.workEstimated = parseInt(object.workEstimated, 10);
|
934 | else if (typeof object.workEstimated === "number")
|
935 | message.workEstimated = object.workEstimated;
|
936 | else if (typeof object.workEstimated === "object")
|
937 | message.workEstimated = new $util.LongBits(object.workEstimated.low >>> 0, object.workEstimated.high >>> 0).toNumber();
|
938 | return message;
|
939 | };
|
940 |
|
941 | /**
|
942 | * Creates a plain object from a Progress message. Also converts values to other types if specified.
|
943 | * @function toObject
|
944 | * @memberof google.datastore.admin.v1.Progress
|
945 | * @static
|
946 | * @param {google.datastore.admin.v1.Progress} message Progress
|
947 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
948 | * @returns {Object.<string,*>} Plain object
|
949 | */
|
950 | Progress.toObject = function toObject(message, options) {
|
951 | if (!options)
|
952 | options = {};
|
953 | var object = {};
|
954 | if (options.defaults) {
|
955 | if ($util.Long) {
|
956 | var long = new $util.Long(0, 0, false);
|
957 | object.workCompleted = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
958 | } else
|
959 | object.workCompleted = options.longs === String ? "0" : 0;
|
960 | if ($util.Long) {
|
961 | var long = new $util.Long(0, 0, false);
|
962 | object.workEstimated = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
963 | } else
|
964 | object.workEstimated = options.longs === String ? "0" : 0;
|
965 | }
|
966 | if (message.workCompleted != null && message.hasOwnProperty("workCompleted"))
|
967 | if (typeof message.workCompleted === "number")
|
968 | object.workCompleted = options.longs === String ? String(message.workCompleted) : message.workCompleted;
|
969 | else
|
970 | object.workCompleted = options.longs === String ? $util.Long.prototype.toString.call(message.workCompleted) : options.longs === Number ? new $util.LongBits(message.workCompleted.low >>> 0, message.workCompleted.high >>> 0).toNumber() : message.workCompleted;
|
971 | if (message.workEstimated != null && message.hasOwnProperty("workEstimated"))
|
972 | if (typeof message.workEstimated === "number")
|
973 | object.workEstimated = options.longs === String ? String(message.workEstimated) : message.workEstimated;
|
974 | else
|
975 | object.workEstimated = options.longs === String ? $util.Long.prototype.toString.call(message.workEstimated) : options.longs === Number ? new $util.LongBits(message.workEstimated.low >>> 0, message.workEstimated.high >>> 0).toNumber() : message.workEstimated;
|
976 | return object;
|
977 | };
|
978 |
|
979 | /**
|
980 | * Converts this Progress to JSON.
|
981 | * @function toJSON
|
982 | * @memberof google.datastore.admin.v1.Progress
|
983 | * @instance
|
984 | * @returns {Object.<string,*>} JSON object
|
985 | */
|
986 | Progress.prototype.toJSON = function toJSON() {
|
987 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
988 | };
|
989 |
|
990 | /**
|
991 | * Gets the default type url for Progress
|
992 | * @function getTypeUrl
|
993 | * @memberof google.datastore.admin.v1.Progress
|
994 | * @static
|
995 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
996 | * @returns {string} The default type url
|
997 | */
|
998 | Progress.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
999 | if (typeUrlPrefix === undefined) {
|
1000 | typeUrlPrefix = "type.googleapis.com";
|
1001 | }
|
1002 | return typeUrlPrefix + "/google.datastore.admin.v1.Progress";
|
1003 | };
|
1004 |
|
1005 | return Progress;
|
1006 | })();
|
1007 |
|
1008 | v1.ExportEntitiesRequest = (function() {
|
1009 |
|
1010 | /**
|
1011 | * Properties of an ExportEntitiesRequest.
|
1012 | * @memberof google.datastore.admin.v1
|
1013 | * @interface IExportEntitiesRequest
|
1014 | * @property {string|null} [projectId] ExportEntitiesRequest projectId
|
1015 | * @property {Object.<string,string>|null} [labels] ExportEntitiesRequest labels
|
1016 | * @property {google.datastore.admin.v1.IEntityFilter|null} [entityFilter] ExportEntitiesRequest entityFilter
|
1017 | * @property {string|null} [outputUrlPrefix] ExportEntitiesRequest outputUrlPrefix
|
1018 | */
|
1019 |
|
1020 | /**
|
1021 | * Constructs a new ExportEntitiesRequest.
|
1022 | * @memberof google.datastore.admin.v1
|
1023 | * @classdesc Represents an ExportEntitiesRequest.
|
1024 | * @implements IExportEntitiesRequest
|
1025 | * @constructor
|
1026 | * @param {google.datastore.admin.v1.IExportEntitiesRequest=} [properties] Properties to set
|
1027 | */
|
1028 | function ExportEntitiesRequest(properties) {
|
1029 | this.labels = {};
|
1030 | if (properties)
|
1031 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
1032 | if (properties[keys[i]] != null)
|
1033 | this[keys[i]] = properties[keys[i]];
|
1034 | }
|
1035 |
|
1036 | /**
|
1037 | * ExportEntitiesRequest projectId.
|
1038 | * @member {string} projectId
|
1039 | * @memberof google.datastore.admin.v1.ExportEntitiesRequest
|
1040 | * @instance
|
1041 | */
|
1042 | ExportEntitiesRequest.prototype.projectId = "";
|
1043 |
|
1044 | /**
|
1045 | * ExportEntitiesRequest labels.
|
1046 | * @member {Object.<string,string>} labels
|
1047 | * @memberof google.datastore.admin.v1.ExportEntitiesRequest
|
1048 | * @instance
|
1049 | */
|
1050 | ExportEntitiesRequest.prototype.labels = $util.emptyObject;
|
1051 |
|
1052 | /**
|
1053 | * ExportEntitiesRequest entityFilter.
|
1054 | * @member {google.datastore.admin.v1.IEntityFilter|null|undefined} entityFilter
|
1055 | * @memberof google.datastore.admin.v1.ExportEntitiesRequest
|
1056 | * @instance
|
1057 | */
|
1058 | ExportEntitiesRequest.prototype.entityFilter = null;
|
1059 |
|
1060 | /**
|
1061 | * ExportEntitiesRequest outputUrlPrefix.
|
1062 | * @member {string} outputUrlPrefix
|
1063 | * @memberof google.datastore.admin.v1.ExportEntitiesRequest
|
1064 | * @instance
|
1065 | */
|
1066 | ExportEntitiesRequest.prototype.outputUrlPrefix = "";
|
1067 |
|
1068 | /**
|
1069 | * Creates a new ExportEntitiesRequest instance using the specified properties.
|
1070 | * @function create
|
1071 | * @memberof google.datastore.admin.v1.ExportEntitiesRequest
|
1072 | * @static
|
1073 | * @param {google.datastore.admin.v1.IExportEntitiesRequest=} [properties] Properties to set
|
1074 | * @returns {google.datastore.admin.v1.ExportEntitiesRequest} ExportEntitiesRequest instance
|
1075 | */
|
1076 | ExportEntitiesRequest.create = function create(properties) {
|
1077 | return new ExportEntitiesRequest(properties);
|
1078 | };
|
1079 |
|
1080 | /**
|
1081 | * Encodes the specified ExportEntitiesRequest message. Does not implicitly {@link google.datastore.admin.v1.ExportEntitiesRequest.verify|verify} messages.
|
1082 | * @function encode
|
1083 | * @memberof google.datastore.admin.v1.ExportEntitiesRequest
|
1084 | * @static
|
1085 | * @param {google.datastore.admin.v1.IExportEntitiesRequest} message ExportEntitiesRequest message or plain object to encode
|
1086 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1087 | * @returns {$protobuf.Writer} Writer
|
1088 | */
|
1089 | ExportEntitiesRequest.encode = function encode(message, writer) {
|
1090 | if (!writer)
|
1091 | writer = $Writer.create();
|
1092 | if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
|
1093 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId);
|
1094 | if (message.labels != null && Object.hasOwnProperty.call(message, "labels"))
|
1095 | for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i)
|
1096 | writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim();
|
1097 | if (message.entityFilter != null && Object.hasOwnProperty.call(message, "entityFilter"))
|
1098 | $root.google.datastore.admin.v1.EntityFilter.encode(message.entityFilter, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
1099 | if (message.outputUrlPrefix != null && Object.hasOwnProperty.call(message, "outputUrlPrefix"))
|
1100 | writer.uint32(/* id 4, wireType 2 =*/34).string(message.outputUrlPrefix);
|
1101 | return writer;
|
1102 | };
|
1103 |
|
1104 | /**
|
1105 | * Encodes the specified ExportEntitiesRequest message, length delimited. Does not implicitly {@link google.datastore.admin.v1.ExportEntitiesRequest.verify|verify} messages.
|
1106 | * @function encodeDelimited
|
1107 | * @memberof google.datastore.admin.v1.ExportEntitiesRequest
|
1108 | * @static
|
1109 | * @param {google.datastore.admin.v1.IExportEntitiesRequest} message ExportEntitiesRequest message or plain object to encode
|
1110 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1111 | * @returns {$protobuf.Writer} Writer
|
1112 | */
|
1113 | ExportEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
1114 | return this.encode(message, writer).ldelim();
|
1115 | };
|
1116 |
|
1117 | /**
|
1118 | * Decodes an ExportEntitiesRequest message from the specified reader or buffer.
|
1119 | * @function decode
|
1120 | * @memberof google.datastore.admin.v1.ExportEntitiesRequest
|
1121 | * @static
|
1122 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1123 | * @param {number} [length] Message length if known beforehand
|
1124 | * @returns {google.datastore.admin.v1.ExportEntitiesRequest} ExportEntitiesRequest
|
1125 | * @throws {Error} If the payload is not a reader or valid buffer
|
1126 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1127 | */
|
1128 | ExportEntitiesRequest.decode = function decode(reader, length) {
|
1129 | if (!(reader instanceof $Reader))
|
1130 | reader = $Reader.create(reader);
|
1131 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.ExportEntitiesRequest(), key, value;
|
1132 | while (reader.pos < end) {
|
1133 | var tag = reader.uint32();
|
1134 | switch (tag >>> 3) {
|
1135 | case 1: {
|
1136 | message.projectId = reader.string();
|
1137 | break;
|
1138 | }
|
1139 | case 2: {
|
1140 | if (message.labels === $util.emptyObject)
|
1141 | message.labels = {};
|
1142 | var end2 = reader.uint32() + reader.pos;
|
1143 | key = "";
|
1144 | value = "";
|
1145 | while (reader.pos < end2) {
|
1146 | var tag2 = reader.uint32();
|
1147 | switch (tag2 >>> 3) {
|
1148 | case 1:
|
1149 | key = reader.string();
|
1150 | break;
|
1151 | case 2:
|
1152 | value = reader.string();
|
1153 | break;
|
1154 | default:
|
1155 | reader.skipType(tag2 & 7);
|
1156 | break;
|
1157 | }
|
1158 | }
|
1159 | message.labels[key] = value;
|
1160 | break;
|
1161 | }
|
1162 | case 3: {
|
1163 | message.entityFilter = $root.google.datastore.admin.v1.EntityFilter.decode(reader, reader.uint32());
|
1164 | break;
|
1165 | }
|
1166 | case 4: {
|
1167 | message.outputUrlPrefix = reader.string();
|
1168 | break;
|
1169 | }
|
1170 | default:
|
1171 | reader.skipType(tag & 7);
|
1172 | break;
|
1173 | }
|
1174 | }
|
1175 | return message;
|
1176 | };
|
1177 |
|
1178 | /**
|
1179 | * Decodes an ExportEntitiesRequest message from the specified reader or buffer, length delimited.
|
1180 | * @function decodeDelimited
|
1181 | * @memberof google.datastore.admin.v1.ExportEntitiesRequest
|
1182 | * @static
|
1183 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1184 | * @returns {google.datastore.admin.v1.ExportEntitiesRequest} ExportEntitiesRequest
|
1185 | * @throws {Error} If the payload is not a reader or valid buffer
|
1186 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1187 | */
|
1188 | ExportEntitiesRequest.decodeDelimited = function decodeDelimited(reader) {
|
1189 | if (!(reader instanceof $Reader))
|
1190 | reader = new $Reader(reader);
|
1191 | return this.decode(reader, reader.uint32());
|
1192 | };
|
1193 |
|
1194 | /**
|
1195 | * Verifies an ExportEntitiesRequest message.
|
1196 | * @function verify
|
1197 | * @memberof google.datastore.admin.v1.ExportEntitiesRequest
|
1198 | * @static
|
1199 | * @param {Object.<string,*>} message Plain object to verify
|
1200 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
1201 | */
|
1202 | ExportEntitiesRequest.verify = function verify(message) {
|
1203 | if (typeof message !== "object" || message === null)
|
1204 | return "object expected";
|
1205 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
1206 | if (!$util.isString(message.projectId))
|
1207 | return "projectId: string expected";
|
1208 | if (message.labels != null && message.hasOwnProperty("labels")) {
|
1209 | if (!$util.isObject(message.labels))
|
1210 | return "labels: object expected";
|
1211 | var key = Object.keys(message.labels);
|
1212 | for (var i = 0; i < key.length; ++i)
|
1213 | if (!$util.isString(message.labels[key[i]]))
|
1214 | return "labels: string{k:string} expected";
|
1215 | }
|
1216 | if (message.entityFilter != null && message.hasOwnProperty("entityFilter")) {
|
1217 | var error = $root.google.datastore.admin.v1.EntityFilter.verify(message.entityFilter);
|
1218 | if (error)
|
1219 | return "entityFilter." + error;
|
1220 | }
|
1221 | if (message.outputUrlPrefix != null && message.hasOwnProperty("outputUrlPrefix"))
|
1222 | if (!$util.isString(message.outputUrlPrefix))
|
1223 | return "outputUrlPrefix: string expected";
|
1224 | return null;
|
1225 | };
|
1226 |
|
1227 | /**
|
1228 | * Creates an ExportEntitiesRequest message from a plain object. Also converts values to their respective internal types.
|
1229 | * @function fromObject
|
1230 | * @memberof google.datastore.admin.v1.ExportEntitiesRequest
|
1231 | * @static
|
1232 | * @param {Object.<string,*>} object Plain object
|
1233 | * @returns {google.datastore.admin.v1.ExportEntitiesRequest} ExportEntitiesRequest
|
1234 | */
|
1235 | ExportEntitiesRequest.fromObject = function fromObject(object) {
|
1236 | if (object instanceof $root.google.datastore.admin.v1.ExportEntitiesRequest)
|
1237 | return object;
|
1238 | var message = new $root.google.datastore.admin.v1.ExportEntitiesRequest();
|
1239 | if (object.projectId != null)
|
1240 | message.projectId = String(object.projectId);
|
1241 | if (object.labels) {
|
1242 | if (typeof object.labels !== "object")
|
1243 | throw TypeError(".google.datastore.admin.v1.ExportEntitiesRequest.labels: object expected");
|
1244 | message.labels = {};
|
1245 | for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i)
|
1246 | message.labels[keys[i]] = String(object.labels[keys[i]]);
|
1247 | }
|
1248 | if (object.entityFilter != null) {
|
1249 | if (typeof object.entityFilter !== "object")
|
1250 | throw TypeError(".google.datastore.admin.v1.ExportEntitiesRequest.entityFilter: object expected");
|
1251 | message.entityFilter = $root.google.datastore.admin.v1.EntityFilter.fromObject(object.entityFilter);
|
1252 | }
|
1253 | if (object.outputUrlPrefix != null)
|
1254 | message.outputUrlPrefix = String(object.outputUrlPrefix);
|
1255 | return message;
|
1256 | };
|
1257 |
|
1258 | /**
|
1259 | * Creates a plain object from an ExportEntitiesRequest message. Also converts values to other types if specified.
|
1260 | * @function toObject
|
1261 | * @memberof google.datastore.admin.v1.ExportEntitiesRequest
|
1262 | * @static
|
1263 | * @param {google.datastore.admin.v1.ExportEntitiesRequest} message ExportEntitiesRequest
|
1264 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
1265 | * @returns {Object.<string,*>} Plain object
|
1266 | */
|
1267 | ExportEntitiesRequest.toObject = function toObject(message, options) {
|
1268 | if (!options)
|
1269 | options = {};
|
1270 | var object = {};
|
1271 | if (options.objects || options.defaults)
|
1272 | object.labels = {};
|
1273 | if (options.defaults) {
|
1274 | object.projectId = "";
|
1275 | object.entityFilter = null;
|
1276 | object.outputUrlPrefix = "";
|
1277 | }
|
1278 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
1279 | object.projectId = message.projectId;
|
1280 | var keys2;
|
1281 | if (message.labels && (keys2 = Object.keys(message.labels)).length) {
|
1282 | object.labels = {};
|
1283 | for (var j = 0; j < keys2.length; ++j)
|
1284 | object.labels[keys2[j]] = message.labels[keys2[j]];
|
1285 | }
|
1286 | if (message.entityFilter != null && message.hasOwnProperty("entityFilter"))
|
1287 | object.entityFilter = $root.google.datastore.admin.v1.EntityFilter.toObject(message.entityFilter, options);
|
1288 | if (message.outputUrlPrefix != null && message.hasOwnProperty("outputUrlPrefix"))
|
1289 | object.outputUrlPrefix = message.outputUrlPrefix;
|
1290 | return object;
|
1291 | };
|
1292 |
|
1293 | /**
|
1294 | * Converts this ExportEntitiesRequest to JSON.
|
1295 | * @function toJSON
|
1296 | * @memberof google.datastore.admin.v1.ExportEntitiesRequest
|
1297 | * @instance
|
1298 | * @returns {Object.<string,*>} JSON object
|
1299 | */
|
1300 | ExportEntitiesRequest.prototype.toJSON = function toJSON() {
|
1301 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
1302 | };
|
1303 |
|
1304 | /**
|
1305 | * Gets the default type url for ExportEntitiesRequest
|
1306 | * @function getTypeUrl
|
1307 | * @memberof google.datastore.admin.v1.ExportEntitiesRequest
|
1308 | * @static
|
1309 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
1310 | * @returns {string} The default type url
|
1311 | */
|
1312 | ExportEntitiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
1313 | if (typeUrlPrefix === undefined) {
|
1314 | typeUrlPrefix = "type.googleapis.com";
|
1315 | }
|
1316 | return typeUrlPrefix + "/google.datastore.admin.v1.ExportEntitiesRequest";
|
1317 | };
|
1318 |
|
1319 | return ExportEntitiesRequest;
|
1320 | })();
|
1321 |
|
1322 | v1.ImportEntitiesRequest = (function() {
|
1323 |
|
1324 | /**
|
1325 | * Properties of an ImportEntitiesRequest.
|
1326 | * @memberof google.datastore.admin.v1
|
1327 | * @interface IImportEntitiesRequest
|
1328 | * @property {string|null} [projectId] ImportEntitiesRequest projectId
|
1329 | * @property {Object.<string,string>|null} [labels] ImportEntitiesRequest labels
|
1330 | * @property {string|null} [inputUrl] ImportEntitiesRequest inputUrl
|
1331 | * @property {google.datastore.admin.v1.IEntityFilter|null} [entityFilter] ImportEntitiesRequest entityFilter
|
1332 | */
|
1333 |
|
1334 | /**
|
1335 | * Constructs a new ImportEntitiesRequest.
|
1336 | * @memberof google.datastore.admin.v1
|
1337 | * @classdesc Represents an ImportEntitiesRequest.
|
1338 | * @implements IImportEntitiesRequest
|
1339 | * @constructor
|
1340 | * @param {google.datastore.admin.v1.IImportEntitiesRequest=} [properties] Properties to set
|
1341 | */
|
1342 | function ImportEntitiesRequest(properties) {
|
1343 | this.labels = {};
|
1344 | if (properties)
|
1345 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
1346 | if (properties[keys[i]] != null)
|
1347 | this[keys[i]] = properties[keys[i]];
|
1348 | }
|
1349 |
|
1350 | /**
|
1351 | * ImportEntitiesRequest projectId.
|
1352 | * @member {string} projectId
|
1353 | * @memberof google.datastore.admin.v1.ImportEntitiesRequest
|
1354 | * @instance
|
1355 | */
|
1356 | ImportEntitiesRequest.prototype.projectId = "";
|
1357 |
|
1358 | /**
|
1359 | * ImportEntitiesRequest labels.
|
1360 | * @member {Object.<string,string>} labels
|
1361 | * @memberof google.datastore.admin.v1.ImportEntitiesRequest
|
1362 | * @instance
|
1363 | */
|
1364 | ImportEntitiesRequest.prototype.labels = $util.emptyObject;
|
1365 |
|
1366 | /**
|
1367 | * ImportEntitiesRequest inputUrl.
|
1368 | * @member {string} inputUrl
|
1369 | * @memberof google.datastore.admin.v1.ImportEntitiesRequest
|
1370 | * @instance
|
1371 | */
|
1372 | ImportEntitiesRequest.prototype.inputUrl = "";
|
1373 |
|
1374 | /**
|
1375 | * ImportEntitiesRequest entityFilter.
|
1376 | * @member {google.datastore.admin.v1.IEntityFilter|null|undefined} entityFilter
|
1377 | * @memberof google.datastore.admin.v1.ImportEntitiesRequest
|
1378 | * @instance
|
1379 | */
|
1380 | ImportEntitiesRequest.prototype.entityFilter = null;
|
1381 |
|
1382 | /**
|
1383 | * Creates a new ImportEntitiesRequest instance using the specified properties.
|
1384 | * @function create
|
1385 | * @memberof google.datastore.admin.v1.ImportEntitiesRequest
|
1386 | * @static
|
1387 | * @param {google.datastore.admin.v1.IImportEntitiesRequest=} [properties] Properties to set
|
1388 | * @returns {google.datastore.admin.v1.ImportEntitiesRequest} ImportEntitiesRequest instance
|
1389 | */
|
1390 | ImportEntitiesRequest.create = function create(properties) {
|
1391 | return new ImportEntitiesRequest(properties);
|
1392 | };
|
1393 |
|
1394 | /**
|
1395 | * Encodes the specified ImportEntitiesRequest message. Does not implicitly {@link google.datastore.admin.v1.ImportEntitiesRequest.verify|verify} messages.
|
1396 | * @function encode
|
1397 | * @memberof google.datastore.admin.v1.ImportEntitiesRequest
|
1398 | * @static
|
1399 | * @param {google.datastore.admin.v1.IImportEntitiesRequest} message ImportEntitiesRequest message or plain object to encode
|
1400 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1401 | * @returns {$protobuf.Writer} Writer
|
1402 | */
|
1403 | ImportEntitiesRequest.encode = function encode(message, writer) {
|
1404 | if (!writer)
|
1405 | writer = $Writer.create();
|
1406 | if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
|
1407 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId);
|
1408 | if (message.labels != null && Object.hasOwnProperty.call(message, "labels"))
|
1409 | for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i)
|
1410 | writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim();
|
1411 | if (message.inputUrl != null && Object.hasOwnProperty.call(message, "inputUrl"))
|
1412 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.inputUrl);
|
1413 | if (message.entityFilter != null && Object.hasOwnProperty.call(message, "entityFilter"))
|
1414 | $root.google.datastore.admin.v1.EntityFilter.encode(message.entityFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
1415 | return writer;
|
1416 | };
|
1417 |
|
1418 | /**
|
1419 | * Encodes the specified ImportEntitiesRequest message, length delimited. Does not implicitly {@link google.datastore.admin.v1.ImportEntitiesRequest.verify|verify} messages.
|
1420 | * @function encodeDelimited
|
1421 | * @memberof google.datastore.admin.v1.ImportEntitiesRequest
|
1422 | * @static
|
1423 | * @param {google.datastore.admin.v1.IImportEntitiesRequest} message ImportEntitiesRequest message or plain object to encode
|
1424 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1425 | * @returns {$protobuf.Writer} Writer
|
1426 | */
|
1427 | ImportEntitiesRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
1428 | return this.encode(message, writer).ldelim();
|
1429 | };
|
1430 |
|
1431 | /**
|
1432 | * Decodes an ImportEntitiesRequest message from the specified reader or buffer.
|
1433 | * @function decode
|
1434 | * @memberof google.datastore.admin.v1.ImportEntitiesRequest
|
1435 | * @static
|
1436 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1437 | * @param {number} [length] Message length if known beforehand
|
1438 | * @returns {google.datastore.admin.v1.ImportEntitiesRequest} ImportEntitiesRequest
|
1439 | * @throws {Error} If the payload is not a reader or valid buffer
|
1440 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1441 | */
|
1442 | ImportEntitiesRequest.decode = function decode(reader, length) {
|
1443 | if (!(reader instanceof $Reader))
|
1444 | reader = $Reader.create(reader);
|
1445 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.ImportEntitiesRequest(), key, value;
|
1446 | while (reader.pos < end) {
|
1447 | var tag = reader.uint32();
|
1448 | switch (tag >>> 3) {
|
1449 | case 1: {
|
1450 | message.projectId = reader.string();
|
1451 | break;
|
1452 | }
|
1453 | case 2: {
|
1454 | if (message.labels === $util.emptyObject)
|
1455 | message.labels = {};
|
1456 | var end2 = reader.uint32() + reader.pos;
|
1457 | key = "";
|
1458 | value = "";
|
1459 | while (reader.pos < end2) {
|
1460 | var tag2 = reader.uint32();
|
1461 | switch (tag2 >>> 3) {
|
1462 | case 1:
|
1463 | key = reader.string();
|
1464 | break;
|
1465 | case 2:
|
1466 | value = reader.string();
|
1467 | break;
|
1468 | default:
|
1469 | reader.skipType(tag2 & 7);
|
1470 | break;
|
1471 | }
|
1472 | }
|
1473 | message.labels[key] = value;
|
1474 | break;
|
1475 | }
|
1476 | case 3: {
|
1477 | message.inputUrl = reader.string();
|
1478 | break;
|
1479 | }
|
1480 | case 4: {
|
1481 | message.entityFilter = $root.google.datastore.admin.v1.EntityFilter.decode(reader, reader.uint32());
|
1482 | break;
|
1483 | }
|
1484 | default:
|
1485 | reader.skipType(tag & 7);
|
1486 | break;
|
1487 | }
|
1488 | }
|
1489 | return message;
|
1490 | };
|
1491 |
|
1492 | /**
|
1493 | * Decodes an ImportEntitiesRequest message from the specified reader or buffer, length delimited.
|
1494 | * @function decodeDelimited
|
1495 | * @memberof google.datastore.admin.v1.ImportEntitiesRequest
|
1496 | * @static
|
1497 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1498 | * @returns {google.datastore.admin.v1.ImportEntitiesRequest} ImportEntitiesRequest
|
1499 | * @throws {Error} If the payload is not a reader or valid buffer
|
1500 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1501 | */
|
1502 | ImportEntitiesRequest.decodeDelimited = function decodeDelimited(reader) {
|
1503 | if (!(reader instanceof $Reader))
|
1504 | reader = new $Reader(reader);
|
1505 | return this.decode(reader, reader.uint32());
|
1506 | };
|
1507 |
|
1508 | /**
|
1509 | * Verifies an ImportEntitiesRequest message.
|
1510 | * @function verify
|
1511 | * @memberof google.datastore.admin.v1.ImportEntitiesRequest
|
1512 | * @static
|
1513 | * @param {Object.<string,*>} message Plain object to verify
|
1514 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
1515 | */
|
1516 | ImportEntitiesRequest.verify = function verify(message) {
|
1517 | if (typeof message !== "object" || message === null)
|
1518 | return "object expected";
|
1519 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
1520 | if (!$util.isString(message.projectId))
|
1521 | return "projectId: string expected";
|
1522 | if (message.labels != null && message.hasOwnProperty("labels")) {
|
1523 | if (!$util.isObject(message.labels))
|
1524 | return "labels: object expected";
|
1525 | var key = Object.keys(message.labels);
|
1526 | for (var i = 0; i < key.length; ++i)
|
1527 | if (!$util.isString(message.labels[key[i]]))
|
1528 | return "labels: string{k:string} expected";
|
1529 | }
|
1530 | if (message.inputUrl != null && message.hasOwnProperty("inputUrl"))
|
1531 | if (!$util.isString(message.inputUrl))
|
1532 | return "inputUrl: string expected";
|
1533 | if (message.entityFilter != null && message.hasOwnProperty("entityFilter")) {
|
1534 | var error = $root.google.datastore.admin.v1.EntityFilter.verify(message.entityFilter);
|
1535 | if (error)
|
1536 | return "entityFilter." + error;
|
1537 | }
|
1538 | return null;
|
1539 | };
|
1540 |
|
1541 | /**
|
1542 | * Creates an ImportEntitiesRequest message from a plain object. Also converts values to their respective internal types.
|
1543 | * @function fromObject
|
1544 | * @memberof google.datastore.admin.v1.ImportEntitiesRequest
|
1545 | * @static
|
1546 | * @param {Object.<string,*>} object Plain object
|
1547 | * @returns {google.datastore.admin.v1.ImportEntitiesRequest} ImportEntitiesRequest
|
1548 | */
|
1549 | ImportEntitiesRequest.fromObject = function fromObject(object) {
|
1550 | if (object instanceof $root.google.datastore.admin.v1.ImportEntitiesRequest)
|
1551 | return object;
|
1552 | var message = new $root.google.datastore.admin.v1.ImportEntitiesRequest();
|
1553 | if (object.projectId != null)
|
1554 | message.projectId = String(object.projectId);
|
1555 | if (object.labels) {
|
1556 | if (typeof object.labels !== "object")
|
1557 | throw TypeError(".google.datastore.admin.v1.ImportEntitiesRequest.labels: object expected");
|
1558 | message.labels = {};
|
1559 | for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i)
|
1560 | message.labels[keys[i]] = String(object.labels[keys[i]]);
|
1561 | }
|
1562 | if (object.inputUrl != null)
|
1563 | message.inputUrl = String(object.inputUrl);
|
1564 | if (object.entityFilter != null) {
|
1565 | if (typeof object.entityFilter !== "object")
|
1566 | throw TypeError(".google.datastore.admin.v1.ImportEntitiesRequest.entityFilter: object expected");
|
1567 | message.entityFilter = $root.google.datastore.admin.v1.EntityFilter.fromObject(object.entityFilter);
|
1568 | }
|
1569 | return message;
|
1570 | };
|
1571 |
|
1572 | /**
|
1573 | * Creates a plain object from an ImportEntitiesRequest message. Also converts values to other types if specified.
|
1574 | * @function toObject
|
1575 | * @memberof google.datastore.admin.v1.ImportEntitiesRequest
|
1576 | * @static
|
1577 | * @param {google.datastore.admin.v1.ImportEntitiesRequest} message ImportEntitiesRequest
|
1578 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
1579 | * @returns {Object.<string,*>} Plain object
|
1580 | */
|
1581 | ImportEntitiesRequest.toObject = function toObject(message, options) {
|
1582 | if (!options)
|
1583 | options = {};
|
1584 | var object = {};
|
1585 | if (options.objects || options.defaults)
|
1586 | object.labels = {};
|
1587 | if (options.defaults) {
|
1588 | object.projectId = "";
|
1589 | object.inputUrl = "";
|
1590 | object.entityFilter = null;
|
1591 | }
|
1592 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
1593 | object.projectId = message.projectId;
|
1594 | var keys2;
|
1595 | if (message.labels && (keys2 = Object.keys(message.labels)).length) {
|
1596 | object.labels = {};
|
1597 | for (var j = 0; j < keys2.length; ++j)
|
1598 | object.labels[keys2[j]] = message.labels[keys2[j]];
|
1599 | }
|
1600 | if (message.inputUrl != null && message.hasOwnProperty("inputUrl"))
|
1601 | object.inputUrl = message.inputUrl;
|
1602 | if (message.entityFilter != null && message.hasOwnProperty("entityFilter"))
|
1603 | object.entityFilter = $root.google.datastore.admin.v1.EntityFilter.toObject(message.entityFilter, options);
|
1604 | return object;
|
1605 | };
|
1606 |
|
1607 | /**
|
1608 | * Converts this ImportEntitiesRequest to JSON.
|
1609 | * @function toJSON
|
1610 | * @memberof google.datastore.admin.v1.ImportEntitiesRequest
|
1611 | * @instance
|
1612 | * @returns {Object.<string,*>} JSON object
|
1613 | */
|
1614 | ImportEntitiesRequest.prototype.toJSON = function toJSON() {
|
1615 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
1616 | };
|
1617 |
|
1618 | /**
|
1619 | * Gets the default type url for ImportEntitiesRequest
|
1620 | * @function getTypeUrl
|
1621 | * @memberof google.datastore.admin.v1.ImportEntitiesRequest
|
1622 | * @static
|
1623 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
1624 | * @returns {string} The default type url
|
1625 | */
|
1626 | ImportEntitiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
1627 | if (typeUrlPrefix === undefined) {
|
1628 | typeUrlPrefix = "type.googleapis.com";
|
1629 | }
|
1630 | return typeUrlPrefix + "/google.datastore.admin.v1.ImportEntitiesRequest";
|
1631 | };
|
1632 |
|
1633 | return ImportEntitiesRequest;
|
1634 | })();
|
1635 |
|
1636 | v1.ExportEntitiesResponse = (function() {
|
1637 |
|
1638 | /**
|
1639 | * Properties of an ExportEntitiesResponse.
|
1640 | * @memberof google.datastore.admin.v1
|
1641 | * @interface IExportEntitiesResponse
|
1642 | * @property {string|null} [outputUrl] ExportEntitiesResponse outputUrl
|
1643 | */
|
1644 |
|
1645 | /**
|
1646 | * Constructs a new ExportEntitiesResponse.
|
1647 | * @memberof google.datastore.admin.v1
|
1648 | * @classdesc Represents an ExportEntitiesResponse.
|
1649 | * @implements IExportEntitiesResponse
|
1650 | * @constructor
|
1651 | * @param {google.datastore.admin.v1.IExportEntitiesResponse=} [properties] Properties to set
|
1652 | */
|
1653 | function ExportEntitiesResponse(properties) {
|
1654 | if (properties)
|
1655 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
1656 | if (properties[keys[i]] != null)
|
1657 | this[keys[i]] = properties[keys[i]];
|
1658 | }
|
1659 |
|
1660 | /**
|
1661 | * ExportEntitiesResponse outputUrl.
|
1662 | * @member {string} outputUrl
|
1663 | * @memberof google.datastore.admin.v1.ExportEntitiesResponse
|
1664 | * @instance
|
1665 | */
|
1666 | ExportEntitiesResponse.prototype.outputUrl = "";
|
1667 |
|
1668 | /**
|
1669 | * Creates a new ExportEntitiesResponse instance using the specified properties.
|
1670 | * @function create
|
1671 | * @memberof google.datastore.admin.v1.ExportEntitiesResponse
|
1672 | * @static
|
1673 | * @param {google.datastore.admin.v1.IExportEntitiesResponse=} [properties] Properties to set
|
1674 | * @returns {google.datastore.admin.v1.ExportEntitiesResponse} ExportEntitiesResponse instance
|
1675 | */
|
1676 | ExportEntitiesResponse.create = function create(properties) {
|
1677 | return new ExportEntitiesResponse(properties);
|
1678 | };
|
1679 |
|
1680 | /**
|
1681 | * Encodes the specified ExportEntitiesResponse message. Does not implicitly {@link google.datastore.admin.v1.ExportEntitiesResponse.verify|verify} messages.
|
1682 | * @function encode
|
1683 | * @memberof google.datastore.admin.v1.ExportEntitiesResponse
|
1684 | * @static
|
1685 | * @param {google.datastore.admin.v1.IExportEntitiesResponse} message ExportEntitiesResponse message or plain object to encode
|
1686 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1687 | * @returns {$protobuf.Writer} Writer
|
1688 | */
|
1689 | ExportEntitiesResponse.encode = function encode(message, writer) {
|
1690 | if (!writer)
|
1691 | writer = $Writer.create();
|
1692 | if (message.outputUrl != null && Object.hasOwnProperty.call(message, "outputUrl"))
|
1693 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.outputUrl);
|
1694 | return writer;
|
1695 | };
|
1696 |
|
1697 | /**
|
1698 | * Encodes the specified ExportEntitiesResponse message, length delimited. Does not implicitly {@link google.datastore.admin.v1.ExportEntitiesResponse.verify|verify} messages.
|
1699 | * @function encodeDelimited
|
1700 | * @memberof google.datastore.admin.v1.ExportEntitiesResponse
|
1701 | * @static
|
1702 | * @param {google.datastore.admin.v1.IExportEntitiesResponse} message ExportEntitiesResponse message or plain object to encode
|
1703 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1704 | * @returns {$protobuf.Writer} Writer
|
1705 | */
|
1706 | ExportEntitiesResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
1707 | return this.encode(message, writer).ldelim();
|
1708 | };
|
1709 |
|
1710 | /**
|
1711 | * Decodes an ExportEntitiesResponse message from the specified reader or buffer.
|
1712 | * @function decode
|
1713 | * @memberof google.datastore.admin.v1.ExportEntitiesResponse
|
1714 | * @static
|
1715 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1716 | * @param {number} [length] Message length if known beforehand
|
1717 | * @returns {google.datastore.admin.v1.ExportEntitiesResponse} ExportEntitiesResponse
|
1718 | * @throws {Error} If the payload is not a reader or valid buffer
|
1719 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1720 | */
|
1721 | ExportEntitiesResponse.decode = function decode(reader, length) {
|
1722 | if (!(reader instanceof $Reader))
|
1723 | reader = $Reader.create(reader);
|
1724 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.ExportEntitiesResponse();
|
1725 | while (reader.pos < end) {
|
1726 | var tag = reader.uint32();
|
1727 | switch (tag >>> 3) {
|
1728 | case 1: {
|
1729 | message.outputUrl = reader.string();
|
1730 | break;
|
1731 | }
|
1732 | default:
|
1733 | reader.skipType(tag & 7);
|
1734 | break;
|
1735 | }
|
1736 | }
|
1737 | return message;
|
1738 | };
|
1739 |
|
1740 | /**
|
1741 | * Decodes an ExportEntitiesResponse message from the specified reader or buffer, length delimited.
|
1742 | * @function decodeDelimited
|
1743 | * @memberof google.datastore.admin.v1.ExportEntitiesResponse
|
1744 | * @static
|
1745 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1746 | * @returns {google.datastore.admin.v1.ExportEntitiesResponse} ExportEntitiesResponse
|
1747 | * @throws {Error} If the payload is not a reader or valid buffer
|
1748 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1749 | */
|
1750 | ExportEntitiesResponse.decodeDelimited = function decodeDelimited(reader) {
|
1751 | if (!(reader instanceof $Reader))
|
1752 | reader = new $Reader(reader);
|
1753 | return this.decode(reader, reader.uint32());
|
1754 | };
|
1755 |
|
1756 | /**
|
1757 | * Verifies an ExportEntitiesResponse message.
|
1758 | * @function verify
|
1759 | * @memberof google.datastore.admin.v1.ExportEntitiesResponse
|
1760 | * @static
|
1761 | * @param {Object.<string,*>} message Plain object to verify
|
1762 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
1763 | */
|
1764 | ExportEntitiesResponse.verify = function verify(message) {
|
1765 | if (typeof message !== "object" || message === null)
|
1766 | return "object expected";
|
1767 | if (message.outputUrl != null && message.hasOwnProperty("outputUrl"))
|
1768 | if (!$util.isString(message.outputUrl))
|
1769 | return "outputUrl: string expected";
|
1770 | return null;
|
1771 | };
|
1772 |
|
1773 | /**
|
1774 | * Creates an ExportEntitiesResponse message from a plain object. Also converts values to their respective internal types.
|
1775 | * @function fromObject
|
1776 | * @memberof google.datastore.admin.v1.ExportEntitiesResponse
|
1777 | * @static
|
1778 | * @param {Object.<string,*>} object Plain object
|
1779 | * @returns {google.datastore.admin.v1.ExportEntitiesResponse} ExportEntitiesResponse
|
1780 | */
|
1781 | ExportEntitiesResponse.fromObject = function fromObject(object) {
|
1782 | if (object instanceof $root.google.datastore.admin.v1.ExportEntitiesResponse)
|
1783 | return object;
|
1784 | var message = new $root.google.datastore.admin.v1.ExportEntitiesResponse();
|
1785 | if (object.outputUrl != null)
|
1786 | message.outputUrl = String(object.outputUrl);
|
1787 | return message;
|
1788 | };
|
1789 |
|
1790 | /**
|
1791 | * Creates a plain object from an ExportEntitiesResponse message. Also converts values to other types if specified.
|
1792 | * @function toObject
|
1793 | * @memberof google.datastore.admin.v1.ExportEntitiesResponse
|
1794 | * @static
|
1795 | * @param {google.datastore.admin.v1.ExportEntitiesResponse} message ExportEntitiesResponse
|
1796 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
1797 | * @returns {Object.<string,*>} Plain object
|
1798 | */
|
1799 | ExportEntitiesResponse.toObject = function toObject(message, options) {
|
1800 | if (!options)
|
1801 | options = {};
|
1802 | var object = {};
|
1803 | if (options.defaults)
|
1804 | object.outputUrl = "";
|
1805 | if (message.outputUrl != null && message.hasOwnProperty("outputUrl"))
|
1806 | object.outputUrl = message.outputUrl;
|
1807 | return object;
|
1808 | };
|
1809 |
|
1810 | /**
|
1811 | * Converts this ExportEntitiesResponse to JSON.
|
1812 | * @function toJSON
|
1813 | * @memberof google.datastore.admin.v1.ExportEntitiesResponse
|
1814 | * @instance
|
1815 | * @returns {Object.<string,*>} JSON object
|
1816 | */
|
1817 | ExportEntitiesResponse.prototype.toJSON = function toJSON() {
|
1818 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
1819 | };
|
1820 |
|
1821 | /**
|
1822 | * Gets the default type url for ExportEntitiesResponse
|
1823 | * @function getTypeUrl
|
1824 | * @memberof google.datastore.admin.v1.ExportEntitiesResponse
|
1825 | * @static
|
1826 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
1827 | * @returns {string} The default type url
|
1828 | */
|
1829 | ExportEntitiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
1830 | if (typeUrlPrefix === undefined) {
|
1831 | typeUrlPrefix = "type.googleapis.com";
|
1832 | }
|
1833 | return typeUrlPrefix + "/google.datastore.admin.v1.ExportEntitiesResponse";
|
1834 | };
|
1835 |
|
1836 | return ExportEntitiesResponse;
|
1837 | })();
|
1838 |
|
1839 | v1.ExportEntitiesMetadata = (function() {
|
1840 |
|
1841 | /**
|
1842 | * Properties of an ExportEntitiesMetadata.
|
1843 | * @memberof google.datastore.admin.v1
|
1844 | * @interface IExportEntitiesMetadata
|
1845 | * @property {google.datastore.admin.v1.ICommonMetadata|null} [common] ExportEntitiesMetadata common
|
1846 | * @property {google.datastore.admin.v1.IProgress|null} [progressEntities] ExportEntitiesMetadata progressEntities
|
1847 | * @property {google.datastore.admin.v1.IProgress|null} [progressBytes] ExportEntitiesMetadata progressBytes
|
1848 | * @property {google.datastore.admin.v1.IEntityFilter|null} [entityFilter] ExportEntitiesMetadata entityFilter
|
1849 | * @property {string|null} [outputUrlPrefix] ExportEntitiesMetadata outputUrlPrefix
|
1850 | */
|
1851 |
|
1852 | /**
|
1853 | * Constructs a new ExportEntitiesMetadata.
|
1854 | * @memberof google.datastore.admin.v1
|
1855 | * @classdesc Represents an ExportEntitiesMetadata.
|
1856 | * @implements IExportEntitiesMetadata
|
1857 | * @constructor
|
1858 | * @param {google.datastore.admin.v1.IExportEntitiesMetadata=} [properties] Properties to set
|
1859 | */
|
1860 | function ExportEntitiesMetadata(properties) {
|
1861 | if (properties)
|
1862 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
1863 | if (properties[keys[i]] != null)
|
1864 | this[keys[i]] = properties[keys[i]];
|
1865 | }
|
1866 |
|
1867 | /**
|
1868 | * ExportEntitiesMetadata common.
|
1869 | * @member {google.datastore.admin.v1.ICommonMetadata|null|undefined} common
|
1870 | * @memberof google.datastore.admin.v1.ExportEntitiesMetadata
|
1871 | * @instance
|
1872 | */
|
1873 | ExportEntitiesMetadata.prototype.common = null;
|
1874 |
|
1875 | /**
|
1876 | * ExportEntitiesMetadata progressEntities.
|
1877 | * @member {google.datastore.admin.v1.IProgress|null|undefined} progressEntities
|
1878 | * @memberof google.datastore.admin.v1.ExportEntitiesMetadata
|
1879 | * @instance
|
1880 | */
|
1881 | ExportEntitiesMetadata.prototype.progressEntities = null;
|
1882 |
|
1883 | /**
|
1884 | * ExportEntitiesMetadata progressBytes.
|
1885 | * @member {google.datastore.admin.v1.IProgress|null|undefined} progressBytes
|
1886 | * @memberof google.datastore.admin.v1.ExportEntitiesMetadata
|
1887 | * @instance
|
1888 | */
|
1889 | ExportEntitiesMetadata.prototype.progressBytes = null;
|
1890 |
|
1891 | /**
|
1892 | * ExportEntitiesMetadata entityFilter.
|
1893 | * @member {google.datastore.admin.v1.IEntityFilter|null|undefined} entityFilter
|
1894 | * @memberof google.datastore.admin.v1.ExportEntitiesMetadata
|
1895 | * @instance
|
1896 | */
|
1897 | ExportEntitiesMetadata.prototype.entityFilter = null;
|
1898 |
|
1899 | /**
|
1900 | * ExportEntitiesMetadata outputUrlPrefix.
|
1901 | * @member {string} outputUrlPrefix
|
1902 | * @memberof google.datastore.admin.v1.ExportEntitiesMetadata
|
1903 | * @instance
|
1904 | */
|
1905 | ExportEntitiesMetadata.prototype.outputUrlPrefix = "";
|
1906 |
|
1907 | /**
|
1908 | * Creates a new ExportEntitiesMetadata instance using the specified properties.
|
1909 | * @function create
|
1910 | * @memberof google.datastore.admin.v1.ExportEntitiesMetadata
|
1911 | * @static
|
1912 | * @param {google.datastore.admin.v1.IExportEntitiesMetadata=} [properties] Properties to set
|
1913 | * @returns {google.datastore.admin.v1.ExportEntitiesMetadata} ExportEntitiesMetadata instance
|
1914 | */
|
1915 | ExportEntitiesMetadata.create = function create(properties) {
|
1916 | return new ExportEntitiesMetadata(properties);
|
1917 | };
|
1918 |
|
1919 | /**
|
1920 | * Encodes the specified ExportEntitiesMetadata message. Does not implicitly {@link google.datastore.admin.v1.ExportEntitiesMetadata.verify|verify} messages.
|
1921 | * @function encode
|
1922 | * @memberof google.datastore.admin.v1.ExportEntitiesMetadata
|
1923 | * @static
|
1924 | * @param {google.datastore.admin.v1.IExportEntitiesMetadata} message ExportEntitiesMetadata message or plain object to encode
|
1925 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1926 | * @returns {$protobuf.Writer} Writer
|
1927 | */
|
1928 | ExportEntitiesMetadata.encode = function encode(message, writer) {
|
1929 | if (!writer)
|
1930 | writer = $Writer.create();
|
1931 | if (message.common != null && Object.hasOwnProperty.call(message, "common"))
|
1932 | $root.google.datastore.admin.v1.CommonMetadata.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
1933 | if (message.progressEntities != null && Object.hasOwnProperty.call(message, "progressEntities"))
|
1934 | $root.google.datastore.admin.v1.Progress.encode(message.progressEntities, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
1935 | if (message.progressBytes != null && Object.hasOwnProperty.call(message, "progressBytes"))
|
1936 | $root.google.datastore.admin.v1.Progress.encode(message.progressBytes, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
1937 | if (message.entityFilter != null && Object.hasOwnProperty.call(message, "entityFilter"))
|
1938 | $root.google.datastore.admin.v1.EntityFilter.encode(message.entityFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
1939 | if (message.outputUrlPrefix != null && Object.hasOwnProperty.call(message, "outputUrlPrefix"))
|
1940 | writer.uint32(/* id 5, wireType 2 =*/42).string(message.outputUrlPrefix);
|
1941 | return writer;
|
1942 | };
|
1943 |
|
1944 | /**
|
1945 | * Encodes the specified ExportEntitiesMetadata message, length delimited. Does not implicitly {@link google.datastore.admin.v1.ExportEntitiesMetadata.verify|verify} messages.
|
1946 | * @function encodeDelimited
|
1947 | * @memberof google.datastore.admin.v1.ExportEntitiesMetadata
|
1948 | * @static
|
1949 | * @param {google.datastore.admin.v1.IExportEntitiesMetadata} message ExportEntitiesMetadata message or plain object to encode
|
1950 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
1951 | * @returns {$protobuf.Writer} Writer
|
1952 | */
|
1953 | ExportEntitiesMetadata.encodeDelimited = function encodeDelimited(message, writer) {
|
1954 | return this.encode(message, writer).ldelim();
|
1955 | };
|
1956 |
|
1957 | /**
|
1958 | * Decodes an ExportEntitiesMetadata message from the specified reader or buffer.
|
1959 | * @function decode
|
1960 | * @memberof google.datastore.admin.v1.ExportEntitiesMetadata
|
1961 | * @static
|
1962 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
1963 | * @param {number} [length] Message length if known beforehand
|
1964 | * @returns {google.datastore.admin.v1.ExportEntitiesMetadata} ExportEntitiesMetadata
|
1965 | * @throws {Error} If the payload is not a reader or valid buffer
|
1966 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
1967 | */
|
1968 | ExportEntitiesMetadata.decode = function decode(reader, length) {
|
1969 | if (!(reader instanceof $Reader))
|
1970 | reader = $Reader.create(reader);
|
1971 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.ExportEntitiesMetadata();
|
1972 | while (reader.pos < end) {
|
1973 | var tag = reader.uint32();
|
1974 | switch (tag >>> 3) {
|
1975 | case 1: {
|
1976 | message.common = $root.google.datastore.admin.v1.CommonMetadata.decode(reader, reader.uint32());
|
1977 | break;
|
1978 | }
|
1979 | case 2: {
|
1980 | message.progressEntities = $root.google.datastore.admin.v1.Progress.decode(reader, reader.uint32());
|
1981 | break;
|
1982 | }
|
1983 | case 3: {
|
1984 | message.progressBytes = $root.google.datastore.admin.v1.Progress.decode(reader, reader.uint32());
|
1985 | break;
|
1986 | }
|
1987 | case 4: {
|
1988 | message.entityFilter = $root.google.datastore.admin.v1.EntityFilter.decode(reader, reader.uint32());
|
1989 | break;
|
1990 | }
|
1991 | case 5: {
|
1992 | message.outputUrlPrefix = reader.string();
|
1993 | break;
|
1994 | }
|
1995 | default:
|
1996 | reader.skipType(tag & 7);
|
1997 | break;
|
1998 | }
|
1999 | }
|
2000 | return message;
|
2001 | };
|
2002 |
|
2003 | /**
|
2004 | * Decodes an ExportEntitiesMetadata message from the specified reader or buffer, length delimited.
|
2005 | * @function decodeDelimited
|
2006 | * @memberof google.datastore.admin.v1.ExportEntitiesMetadata
|
2007 | * @static
|
2008 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
2009 | * @returns {google.datastore.admin.v1.ExportEntitiesMetadata} ExportEntitiesMetadata
|
2010 | * @throws {Error} If the payload is not a reader or valid buffer
|
2011 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
2012 | */
|
2013 | ExportEntitiesMetadata.decodeDelimited = function decodeDelimited(reader) {
|
2014 | if (!(reader instanceof $Reader))
|
2015 | reader = new $Reader(reader);
|
2016 | return this.decode(reader, reader.uint32());
|
2017 | };
|
2018 |
|
2019 | /**
|
2020 | * Verifies an ExportEntitiesMetadata message.
|
2021 | * @function verify
|
2022 | * @memberof google.datastore.admin.v1.ExportEntitiesMetadata
|
2023 | * @static
|
2024 | * @param {Object.<string,*>} message Plain object to verify
|
2025 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
2026 | */
|
2027 | ExportEntitiesMetadata.verify = function verify(message) {
|
2028 | if (typeof message !== "object" || message === null)
|
2029 | return "object expected";
|
2030 | if (message.common != null && message.hasOwnProperty("common")) {
|
2031 | var error = $root.google.datastore.admin.v1.CommonMetadata.verify(message.common);
|
2032 | if (error)
|
2033 | return "common." + error;
|
2034 | }
|
2035 | if (message.progressEntities != null && message.hasOwnProperty("progressEntities")) {
|
2036 | var error = $root.google.datastore.admin.v1.Progress.verify(message.progressEntities);
|
2037 | if (error)
|
2038 | return "progressEntities." + error;
|
2039 | }
|
2040 | if (message.progressBytes != null && message.hasOwnProperty("progressBytes")) {
|
2041 | var error = $root.google.datastore.admin.v1.Progress.verify(message.progressBytes);
|
2042 | if (error)
|
2043 | return "progressBytes." + error;
|
2044 | }
|
2045 | if (message.entityFilter != null && message.hasOwnProperty("entityFilter")) {
|
2046 | var error = $root.google.datastore.admin.v1.EntityFilter.verify(message.entityFilter);
|
2047 | if (error)
|
2048 | return "entityFilter." + error;
|
2049 | }
|
2050 | if (message.outputUrlPrefix != null && message.hasOwnProperty("outputUrlPrefix"))
|
2051 | if (!$util.isString(message.outputUrlPrefix))
|
2052 | return "outputUrlPrefix: string expected";
|
2053 | return null;
|
2054 | };
|
2055 |
|
2056 | /**
|
2057 | * Creates an ExportEntitiesMetadata message from a plain object. Also converts values to their respective internal types.
|
2058 | * @function fromObject
|
2059 | * @memberof google.datastore.admin.v1.ExportEntitiesMetadata
|
2060 | * @static
|
2061 | * @param {Object.<string,*>} object Plain object
|
2062 | * @returns {google.datastore.admin.v1.ExportEntitiesMetadata} ExportEntitiesMetadata
|
2063 | */
|
2064 | ExportEntitiesMetadata.fromObject = function fromObject(object) {
|
2065 | if (object instanceof $root.google.datastore.admin.v1.ExportEntitiesMetadata)
|
2066 | return object;
|
2067 | var message = new $root.google.datastore.admin.v1.ExportEntitiesMetadata();
|
2068 | if (object.common != null) {
|
2069 | if (typeof object.common !== "object")
|
2070 | throw TypeError(".google.datastore.admin.v1.ExportEntitiesMetadata.common: object expected");
|
2071 | message.common = $root.google.datastore.admin.v1.CommonMetadata.fromObject(object.common);
|
2072 | }
|
2073 | if (object.progressEntities != null) {
|
2074 | if (typeof object.progressEntities !== "object")
|
2075 | throw TypeError(".google.datastore.admin.v1.ExportEntitiesMetadata.progressEntities: object expected");
|
2076 | message.progressEntities = $root.google.datastore.admin.v1.Progress.fromObject(object.progressEntities);
|
2077 | }
|
2078 | if (object.progressBytes != null) {
|
2079 | if (typeof object.progressBytes !== "object")
|
2080 | throw TypeError(".google.datastore.admin.v1.ExportEntitiesMetadata.progressBytes: object expected");
|
2081 | message.progressBytes = $root.google.datastore.admin.v1.Progress.fromObject(object.progressBytes);
|
2082 | }
|
2083 | if (object.entityFilter != null) {
|
2084 | if (typeof object.entityFilter !== "object")
|
2085 | throw TypeError(".google.datastore.admin.v1.ExportEntitiesMetadata.entityFilter: object expected");
|
2086 | message.entityFilter = $root.google.datastore.admin.v1.EntityFilter.fromObject(object.entityFilter);
|
2087 | }
|
2088 | if (object.outputUrlPrefix != null)
|
2089 | message.outputUrlPrefix = String(object.outputUrlPrefix);
|
2090 | return message;
|
2091 | };
|
2092 |
|
2093 | /**
|
2094 | * Creates a plain object from an ExportEntitiesMetadata message. Also converts values to other types if specified.
|
2095 | * @function toObject
|
2096 | * @memberof google.datastore.admin.v1.ExportEntitiesMetadata
|
2097 | * @static
|
2098 | * @param {google.datastore.admin.v1.ExportEntitiesMetadata} message ExportEntitiesMetadata
|
2099 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
2100 | * @returns {Object.<string,*>} Plain object
|
2101 | */
|
2102 | ExportEntitiesMetadata.toObject = function toObject(message, options) {
|
2103 | if (!options)
|
2104 | options = {};
|
2105 | var object = {};
|
2106 | if (options.defaults) {
|
2107 | object.common = null;
|
2108 | object.progressEntities = null;
|
2109 | object.progressBytes = null;
|
2110 | object.entityFilter = null;
|
2111 | object.outputUrlPrefix = "";
|
2112 | }
|
2113 | if (message.common != null && message.hasOwnProperty("common"))
|
2114 | object.common = $root.google.datastore.admin.v1.CommonMetadata.toObject(message.common, options);
|
2115 | if (message.progressEntities != null && message.hasOwnProperty("progressEntities"))
|
2116 | object.progressEntities = $root.google.datastore.admin.v1.Progress.toObject(message.progressEntities, options);
|
2117 | if (message.progressBytes != null && message.hasOwnProperty("progressBytes"))
|
2118 | object.progressBytes = $root.google.datastore.admin.v1.Progress.toObject(message.progressBytes, options);
|
2119 | if (message.entityFilter != null && message.hasOwnProperty("entityFilter"))
|
2120 | object.entityFilter = $root.google.datastore.admin.v1.EntityFilter.toObject(message.entityFilter, options);
|
2121 | if (message.outputUrlPrefix != null && message.hasOwnProperty("outputUrlPrefix"))
|
2122 | object.outputUrlPrefix = message.outputUrlPrefix;
|
2123 | return object;
|
2124 | };
|
2125 |
|
2126 | /**
|
2127 | * Converts this ExportEntitiesMetadata to JSON.
|
2128 | * @function toJSON
|
2129 | * @memberof google.datastore.admin.v1.ExportEntitiesMetadata
|
2130 | * @instance
|
2131 | * @returns {Object.<string,*>} JSON object
|
2132 | */
|
2133 | ExportEntitiesMetadata.prototype.toJSON = function toJSON() {
|
2134 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
2135 | };
|
2136 |
|
2137 | /**
|
2138 | * Gets the default type url for ExportEntitiesMetadata
|
2139 | * @function getTypeUrl
|
2140 | * @memberof google.datastore.admin.v1.ExportEntitiesMetadata
|
2141 | * @static
|
2142 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
2143 | * @returns {string} The default type url
|
2144 | */
|
2145 | ExportEntitiesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
2146 | if (typeUrlPrefix === undefined) {
|
2147 | typeUrlPrefix = "type.googleapis.com";
|
2148 | }
|
2149 | return typeUrlPrefix + "/google.datastore.admin.v1.ExportEntitiesMetadata";
|
2150 | };
|
2151 |
|
2152 | return ExportEntitiesMetadata;
|
2153 | })();
|
2154 |
|
2155 | v1.ImportEntitiesMetadata = (function() {
|
2156 |
|
2157 | /**
|
2158 | * Properties of an ImportEntitiesMetadata.
|
2159 | * @memberof google.datastore.admin.v1
|
2160 | * @interface IImportEntitiesMetadata
|
2161 | * @property {google.datastore.admin.v1.ICommonMetadata|null} [common] ImportEntitiesMetadata common
|
2162 | * @property {google.datastore.admin.v1.IProgress|null} [progressEntities] ImportEntitiesMetadata progressEntities
|
2163 | * @property {google.datastore.admin.v1.IProgress|null} [progressBytes] ImportEntitiesMetadata progressBytes
|
2164 | * @property {google.datastore.admin.v1.IEntityFilter|null} [entityFilter] ImportEntitiesMetadata entityFilter
|
2165 | * @property {string|null} [inputUrl] ImportEntitiesMetadata inputUrl
|
2166 | */
|
2167 |
|
2168 | /**
|
2169 | * Constructs a new ImportEntitiesMetadata.
|
2170 | * @memberof google.datastore.admin.v1
|
2171 | * @classdesc Represents an ImportEntitiesMetadata.
|
2172 | * @implements IImportEntitiesMetadata
|
2173 | * @constructor
|
2174 | * @param {google.datastore.admin.v1.IImportEntitiesMetadata=} [properties] Properties to set
|
2175 | */
|
2176 | function ImportEntitiesMetadata(properties) {
|
2177 | if (properties)
|
2178 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
2179 | if (properties[keys[i]] != null)
|
2180 | this[keys[i]] = properties[keys[i]];
|
2181 | }
|
2182 |
|
2183 | /**
|
2184 | * ImportEntitiesMetadata common.
|
2185 | * @member {google.datastore.admin.v1.ICommonMetadata|null|undefined} common
|
2186 | * @memberof google.datastore.admin.v1.ImportEntitiesMetadata
|
2187 | * @instance
|
2188 | */
|
2189 | ImportEntitiesMetadata.prototype.common = null;
|
2190 |
|
2191 | /**
|
2192 | * ImportEntitiesMetadata progressEntities.
|
2193 | * @member {google.datastore.admin.v1.IProgress|null|undefined} progressEntities
|
2194 | * @memberof google.datastore.admin.v1.ImportEntitiesMetadata
|
2195 | * @instance
|
2196 | */
|
2197 | ImportEntitiesMetadata.prototype.progressEntities = null;
|
2198 |
|
2199 | /**
|
2200 | * ImportEntitiesMetadata progressBytes.
|
2201 | * @member {google.datastore.admin.v1.IProgress|null|undefined} progressBytes
|
2202 | * @memberof google.datastore.admin.v1.ImportEntitiesMetadata
|
2203 | * @instance
|
2204 | */
|
2205 | ImportEntitiesMetadata.prototype.progressBytes = null;
|
2206 |
|
2207 | /**
|
2208 | * ImportEntitiesMetadata entityFilter.
|
2209 | * @member {google.datastore.admin.v1.IEntityFilter|null|undefined} entityFilter
|
2210 | * @memberof google.datastore.admin.v1.ImportEntitiesMetadata
|
2211 | * @instance
|
2212 | */
|
2213 | ImportEntitiesMetadata.prototype.entityFilter = null;
|
2214 |
|
2215 | /**
|
2216 | * ImportEntitiesMetadata inputUrl.
|
2217 | * @member {string} inputUrl
|
2218 | * @memberof google.datastore.admin.v1.ImportEntitiesMetadata
|
2219 | * @instance
|
2220 | */
|
2221 | ImportEntitiesMetadata.prototype.inputUrl = "";
|
2222 |
|
2223 | /**
|
2224 | * Creates a new ImportEntitiesMetadata instance using the specified properties.
|
2225 | * @function create
|
2226 | * @memberof google.datastore.admin.v1.ImportEntitiesMetadata
|
2227 | * @static
|
2228 | * @param {google.datastore.admin.v1.IImportEntitiesMetadata=} [properties] Properties to set
|
2229 | * @returns {google.datastore.admin.v1.ImportEntitiesMetadata} ImportEntitiesMetadata instance
|
2230 | */
|
2231 | ImportEntitiesMetadata.create = function create(properties) {
|
2232 | return new ImportEntitiesMetadata(properties);
|
2233 | };
|
2234 |
|
2235 | /**
|
2236 | * Encodes the specified ImportEntitiesMetadata message. Does not implicitly {@link google.datastore.admin.v1.ImportEntitiesMetadata.verify|verify} messages.
|
2237 | * @function encode
|
2238 | * @memberof google.datastore.admin.v1.ImportEntitiesMetadata
|
2239 | * @static
|
2240 | * @param {google.datastore.admin.v1.IImportEntitiesMetadata} message ImportEntitiesMetadata message or plain object to encode
|
2241 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
2242 | * @returns {$protobuf.Writer} Writer
|
2243 | */
|
2244 | ImportEntitiesMetadata.encode = function encode(message, writer) {
|
2245 | if (!writer)
|
2246 | writer = $Writer.create();
|
2247 | if (message.common != null && Object.hasOwnProperty.call(message, "common"))
|
2248 | $root.google.datastore.admin.v1.CommonMetadata.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
2249 | if (message.progressEntities != null && Object.hasOwnProperty.call(message, "progressEntities"))
|
2250 | $root.google.datastore.admin.v1.Progress.encode(message.progressEntities, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
2251 | if (message.progressBytes != null && Object.hasOwnProperty.call(message, "progressBytes"))
|
2252 | $root.google.datastore.admin.v1.Progress.encode(message.progressBytes, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
2253 | if (message.entityFilter != null && Object.hasOwnProperty.call(message, "entityFilter"))
|
2254 | $root.google.datastore.admin.v1.EntityFilter.encode(message.entityFilter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
2255 | if (message.inputUrl != null && Object.hasOwnProperty.call(message, "inputUrl"))
|
2256 | writer.uint32(/* id 5, wireType 2 =*/42).string(message.inputUrl);
|
2257 | return writer;
|
2258 | };
|
2259 |
|
2260 | /**
|
2261 | * Encodes the specified ImportEntitiesMetadata message, length delimited. Does not implicitly {@link google.datastore.admin.v1.ImportEntitiesMetadata.verify|verify} messages.
|
2262 | * @function encodeDelimited
|
2263 | * @memberof google.datastore.admin.v1.ImportEntitiesMetadata
|
2264 | * @static
|
2265 | * @param {google.datastore.admin.v1.IImportEntitiesMetadata} message ImportEntitiesMetadata message or plain object to encode
|
2266 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
2267 | * @returns {$protobuf.Writer} Writer
|
2268 | */
|
2269 | ImportEntitiesMetadata.encodeDelimited = function encodeDelimited(message, writer) {
|
2270 | return this.encode(message, writer).ldelim();
|
2271 | };
|
2272 |
|
2273 | /**
|
2274 | * Decodes an ImportEntitiesMetadata message from the specified reader or buffer.
|
2275 | * @function decode
|
2276 | * @memberof google.datastore.admin.v1.ImportEntitiesMetadata
|
2277 | * @static
|
2278 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
2279 | * @param {number} [length] Message length if known beforehand
|
2280 | * @returns {google.datastore.admin.v1.ImportEntitiesMetadata} ImportEntitiesMetadata
|
2281 | * @throws {Error} If the payload is not a reader or valid buffer
|
2282 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
2283 | */
|
2284 | ImportEntitiesMetadata.decode = function decode(reader, length) {
|
2285 | if (!(reader instanceof $Reader))
|
2286 | reader = $Reader.create(reader);
|
2287 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.ImportEntitiesMetadata();
|
2288 | while (reader.pos < end) {
|
2289 | var tag = reader.uint32();
|
2290 | switch (tag >>> 3) {
|
2291 | case 1: {
|
2292 | message.common = $root.google.datastore.admin.v1.CommonMetadata.decode(reader, reader.uint32());
|
2293 | break;
|
2294 | }
|
2295 | case 2: {
|
2296 | message.progressEntities = $root.google.datastore.admin.v1.Progress.decode(reader, reader.uint32());
|
2297 | break;
|
2298 | }
|
2299 | case 3: {
|
2300 | message.progressBytes = $root.google.datastore.admin.v1.Progress.decode(reader, reader.uint32());
|
2301 | break;
|
2302 | }
|
2303 | case 4: {
|
2304 | message.entityFilter = $root.google.datastore.admin.v1.EntityFilter.decode(reader, reader.uint32());
|
2305 | break;
|
2306 | }
|
2307 | case 5: {
|
2308 | message.inputUrl = reader.string();
|
2309 | break;
|
2310 | }
|
2311 | default:
|
2312 | reader.skipType(tag & 7);
|
2313 | break;
|
2314 | }
|
2315 | }
|
2316 | return message;
|
2317 | };
|
2318 |
|
2319 | /**
|
2320 | * Decodes an ImportEntitiesMetadata message from the specified reader or buffer, length delimited.
|
2321 | * @function decodeDelimited
|
2322 | * @memberof google.datastore.admin.v1.ImportEntitiesMetadata
|
2323 | * @static
|
2324 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
2325 | * @returns {google.datastore.admin.v1.ImportEntitiesMetadata} ImportEntitiesMetadata
|
2326 | * @throws {Error} If the payload is not a reader or valid buffer
|
2327 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
2328 | */
|
2329 | ImportEntitiesMetadata.decodeDelimited = function decodeDelimited(reader) {
|
2330 | if (!(reader instanceof $Reader))
|
2331 | reader = new $Reader(reader);
|
2332 | return this.decode(reader, reader.uint32());
|
2333 | };
|
2334 |
|
2335 | /**
|
2336 | * Verifies an ImportEntitiesMetadata message.
|
2337 | * @function verify
|
2338 | * @memberof google.datastore.admin.v1.ImportEntitiesMetadata
|
2339 | * @static
|
2340 | * @param {Object.<string,*>} message Plain object to verify
|
2341 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
2342 | */
|
2343 | ImportEntitiesMetadata.verify = function verify(message) {
|
2344 | if (typeof message !== "object" || message === null)
|
2345 | return "object expected";
|
2346 | if (message.common != null && message.hasOwnProperty("common")) {
|
2347 | var error = $root.google.datastore.admin.v1.CommonMetadata.verify(message.common);
|
2348 | if (error)
|
2349 | return "common." + error;
|
2350 | }
|
2351 | if (message.progressEntities != null && message.hasOwnProperty("progressEntities")) {
|
2352 | var error = $root.google.datastore.admin.v1.Progress.verify(message.progressEntities);
|
2353 | if (error)
|
2354 | return "progressEntities." + error;
|
2355 | }
|
2356 | if (message.progressBytes != null && message.hasOwnProperty("progressBytes")) {
|
2357 | var error = $root.google.datastore.admin.v1.Progress.verify(message.progressBytes);
|
2358 | if (error)
|
2359 | return "progressBytes." + error;
|
2360 | }
|
2361 | if (message.entityFilter != null && message.hasOwnProperty("entityFilter")) {
|
2362 | var error = $root.google.datastore.admin.v1.EntityFilter.verify(message.entityFilter);
|
2363 | if (error)
|
2364 | return "entityFilter." + error;
|
2365 | }
|
2366 | if (message.inputUrl != null && message.hasOwnProperty("inputUrl"))
|
2367 | if (!$util.isString(message.inputUrl))
|
2368 | return "inputUrl: string expected";
|
2369 | return null;
|
2370 | };
|
2371 |
|
2372 | /**
|
2373 | * Creates an ImportEntitiesMetadata message from a plain object. Also converts values to their respective internal types.
|
2374 | * @function fromObject
|
2375 | * @memberof google.datastore.admin.v1.ImportEntitiesMetadata
|
2376 | * @static
|
2377 | * @param {Object.<string,*>} object Plain object
|
2378 | * @returns {google.datastore.admin.v1.ImportEntitiesMetadata} ImportEntitiesMetadata
|
2379 | */
|
2380 | ImportEntitiesMetadata.fromObject = function fromObject(object) {
|
2381 | if (object instanceof $root.google.datastore.admin.v1.ImportEntitiesMetadata)
|
2382 | return object;
|
2383 | var message = new $root.google.datastore.admin.v1.ImportEntitiesMetadata();
|
2384 | if (object.common != null) {
|
2385 | if (typeof object.common !== "object")
|
2386 | throw TypeError(".google.datastore.admin.v1.ImportEntitiesMetadata.common: object expected");
|
2387 | message.common = $root.google.datastore.admin.v1.CommonMetadata.fromObject(object.common);
|
2388 | }
|
2389 | if (object.progressEntities != null) {
|
2390 | if (typeof object.progressEntities !== "object")
|
2391 | throw TypeError(".google.datastore.admin.v1.ImportEntitiesMetadata.progressEntities: object expected");
|
2392 | message.progressEntities = $root.google.datastore.admin.v1.Progress.fromObject(object.progressEntities);
|
2393 | }
|
2394 | if (object.progressBytes != null) {
|
2395 | if (typeof object.progressBytes !== "object")
|
2396 | throw TypeError(".google.datastore.admin.v1.ImportEntitiesMetadata.progressBytes: object expected");
|
2397 | message.progressBytes = $root.google.datastore.admin.v1.Progress.fromObject(object.progressBytes);
|
2398 | }
|
2399 | if (object.entityFilter != null) {
|
2400 | if (typeof object.entityFilter !== "object")
|
2401 | throw TypeError(".google.datastore.admin.v1.ImportEntitiesMetadata.entityFilter: object expected");
|
2402 | message.entityFilter = $root.google.datastore.admin.v1.EntityFilter.fromObject(object.entityFilter);
|
2403 | }
|
2404 | if (object.inputUrl != null)
|
2405 | message.inputUrl = String(object.inputUrl);
|
2406 | return message;
|
2407 | };
|
2408 |
|
2409 | /**
|
2410 | * Creates a plain object from an ImportEntitiesMetadata message. Also converts values to other types if specified.
|
2411 | * @function toObject
|
2412 | * @memberof google.datastore.admin.v1.ImportEntitiesMetadata
|
2413 | * @static
|
2414 | * @param {google.datastore.admin.v1.ImportEntitiesMetadata} message ImportEntitiesMetadata
|
2415 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
2416 | * @returns {Object.<string,*>} Plain object
|
2417 | */
|
2418 | ImportEntitiesMetadata.toObject = function toObject(message, options) {
|
2419 | if (!options)
|
2420 | options = {};
|
2421 | var object = {};
|
2422 | if (options.defaults) {
|
2423 | object.common = null;
|
2424 | object.progressEntities = null;
|
2425 | object.progressBytes = null;
|
2426 | object.entityFilter = null;
|
2427 | object.inputUrl = "";
|
2428 | }
|
2429 | if (message.common != null && message.hasOwnProperty("common"))
|
2430 | object.common = $root.google.datastore.admin.v1.CommonMetadata.toObject(message.common, options);
|
2431 | if (message.progressEntities != null && message.hasOwnProperty("progressEntities"))
|
2432 | object.progressEntities = $root.google.datastore.admin.v1.Progress.toObject(message.progressEntities, options);
|
2433 | if (message.progressBytes != null && message.hasOwnProperty("progressBytes"))
|
2434 | object.progressBytes = $root.google.datastore.admin.v1.Progress.toObject(message.progressBytes, options);
|
2435 | if (message.entityFilter != null && message.hasOwnProperty("entityFilter"))
|
2436 | object.entityFilter = $root.google.datastore.admin.v1.EntityFilter.toObject(message.entityFilter, options);
|
2437 | if (message.inputUrl != null && message.hasOwnProperty("inputUrl"))
|
2438 | object.inputUrl = message.inputUrl;
|
2439 | return object;
|
2440 | };
|
2441 |
|
2442 | /**
|
2443 | * Converts this ImportEntitiesMetadata to JSON.
|
2444 | * @function toJSON
|
2445 | * @memberof google.datastore.admin.v1.ImportEntitiesMetadata
|
2446 | * @instance
|
2447 | * @returns {Object.<string,*>} JSON object
|
2448 | */
|
2449 | ImportEntitiesMetadata.prototype.toJSON = function toJSON() {
|
2450 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
2451 | };
|
2452 |
|
2453 | /**
|
2454 | * Gets the default type url for ImportEntitiesMetadata
|
2455 | * @function getTypeUrl
|
2456 | * @memberof google.datastore.admin.v1.ImportEntitiesMetadata
|
2457 | * @static
|
2458 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
2459 | * @returns {string} The default type url
|
2460 | */
|
2461 | ImportEntitiesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
2462 | if (typeUrlPrefix === undefined) {
|
2463 | typeUrlPrefix = "type.googleapis.com";
|
2464 | }
|
2465 | return typeUrlPrefix + "/google.datastore.admin.v1.ImportEntitiesMetadata";
|
2466 | };
|
2467 |
|
2468 | return ImportEntitiesMetadata;
|
2469 | })();
|
2470 |
|
2471 | v1.EntityFilter = (function() {
|
2472 |
|
2473 | /**
|
2474 | * Properties of an EntityFilter.
|
2475 | * @memberof google.datastore.admin.v1
|
2476 | * @interface IEntityFilter
|
2477 | * @property {Array.<string>|null} [kinds] EntityFilter kinds
|
2478 | * @property {Array.<string>|null} [namespaceIds] EntityFilter namespaceIds
|
2479 | */
|
2480 |
|
2481 | /**
|
2482 | * Constructs a new EntityFilter.
|
2483 | * @memberof google.datastore.admin.v1
|
2484 | * @classdesc Represents an EntityFilter.
|
2485 | * @implements IEntityFilter
|
2486 | * @constructor
|
2487 | * @param {google.datastore.admin.v1.IEntityFilter=} [properties] Properties to set
|
2488 | */
|
2489 | function EntityFilter(properties) {
|
2490 | this.kinds = [];
|
2491 | this.namespaceIds = [];
|
2492 | if (properties)
|
2493 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
2494 | if (properties[keys[i]] != null)
|
2495 | this[keys[i]] = properties[keys[i]];
|
2496 | }
|
2497 |
|
2498 | /**
|
2499 | * EntityFilter kinds.
|
2500 | * @member {Array.<string>} kinds
|
2501 | * @memberof google.datastore.admin.v1.EntityFilter
|
2502 | * @instance
|
2503 | */
|
2504 | EntityFilter.prototype.kinds = $util.emptyArray;
|
2505 |
|
2506 | /**
|
2507 | * EntityFilter namespaceIds.
|
2508 | * @member {Array.<string>} namespaceIds
|
2509 | * @memberof google.datastore.admin.v1.EntityFilter
|
2510 | * @instance
|
2511 | */
|
2512 | EntityFilter.prototype.namespaceIds = $util.emptyArray;
|
2513 |
|
2514 | /**
|
2515 | * Creates a new EntityFilter instance using the specified properties.
|
2516 | * @function create
|
2517 | * @memberof google.datastore.admin.v1.EntityFilter
|
2518 | * @static
|
2519 | * @param {google.datastore.admin.v1.IEntityFilter=} [properties] Properties to set
|
2520 | * @returns {google.datastore.admin.v1.EntityFilter} EntityFilter instance
|
2521 | */
|
2522 | EntityFilter.create = function create(properties) {
|
2523 | return new EntityFilter(properties);
|
2524 | };
|
2525 |
|
2526 | /**
|
2527 | * Encodes the specified EntityFilter message. Does not implicitly {@link google.datastore.admin.v1.EntityFilter.verify|verify} messages.
|
2528 | * @function encode
|
2529 | * @memberof google.datastore.admin.v1.EntityFilter
|
2530 | * @static
|
2531 | * @param {google.datastore.admin.v1.IEntityFilter} message EntityFilter message or plain object to encode
|
2532 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
2533 | * @returns {$protobuf.Writer} Writer
|
2534 | */
|
2535 | EntityFilter.encode = function encode(message, writer) {
|
2536 | if (!writer)
|
2537 | writer = $Writer.create();
|
2538 | if (message.kinds != null && message.kinds.length)
|
2539 | for (var i = 0; i < message.kinds.length; ++i)
|
2540 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.kinds[i]);
|
2541 | if (message.namespaceIds != null && message.namespaceIds.length)
|
2542 | for (var i = 0; i < message.namespaceIds.length; ++i)
|
2543 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.namespaceIds[i]);
|
2544 | return writer;
|
2545 | };
|
2546 |
|
2547 | /**
|
2548 | * Encodes the specified EntityFilter message, length delimited. Does not implicitly {@link google.datastore.admin.v1.EntityFilter.verify|verify} messages.
|
2549 | * @function encodeDelimited
|
2550 | * @memberof google.datastore.admin.v1.EntityFilter
|
2551 | * @static
|
2552 | * @param {google.datastore.admin.v1.IEntityFilter} message EntityFilter message or plain object to encode
|
2553 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
2554 | * @returns {$protobuf.Writer} Writer
|
2555 | */
|
2556 | EntityFilter.encodeDelimited = function encodeDelimited(message, writer) {
|
2557 | return this.encode(message, writer).ldelim();
|
2558 | };
|
2559 |
|
2560 | /**
|
2561 | * Decodes an EntityFilter message from the specified reader or buffer.
|
2562 | * @function decode
|
2563 | * @memberof google.datastore.admin.v1.EntityFilter
|
2564 | * @static
|
2565 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
2566 | * @param {number} [length] Message length if known beforehand
|
2567 | * @returns {google.datastore.admin.v1.EntityFilter} EntityFilter
|
2568 | * @throws {Error} If the payload is not a reader or valid buffer
|
2569 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
2570 | */
|
2571 | EntityFilter.decode = function decode(reader, length) {
|
2572 | if (!(reader instanceof $Reader))
|
2573 | reader = $Reader.create(reader);
|
2574 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.EntityFilter();
|
2575 | while (reader.pos < end) {
|
2576 | var tag = reader.uint32();
|
2577 | switch (tag >>> 3) {
|
2578 | case 1: {
|
2579 | if (!(message.kinds && message.kinds.length))
|
2580 | message.kinds = [];
|
2581 | message.kinds.push(reader.string());
|
2582 | break;
|
2583 | }
|
2584 | case 2: {
|
2585 | if (!(message.namespaceIds && message.namespaceIds.length))
|
2586 | message.namespaceIds = [];
|
2587 | message.namespaceIds.push(reader.string());
|
2588 | break;
|
2589 | }
|
2590 | default:
|
2591 | reader.skipType(tag & 7);
|
2592 | break;
|
2593 | }
|
2594 | }
|
2595 | return message;
|
2596 | };
|
2597 |
|
2598 | /**
|
2599 | * Decodes an EntityFilter message from the specified reader or buffer, length delimited.
|
2600 | * @function decodeDelimited
|
2601 | * @memberof google.datastore.admin.v1.EntityFilter
|
2602 | * @static
|
2603 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
2604 | * @returns {google.datastore.admin.v1.EntityFilter} EntityFilter
|
2605 | * @throws {Error} If the payload is not a reader or valid buffer
|
2606 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
2607 | */
|
2608 | EntityFilter.decodeDelimited = function decodeDelimited(reader) {
|
2609 | if (!(reader instanceof $Reader))
|
2610 | reader = new $Reader(reader);
|
2611 | return this.decode(reader, reader.uint32());
|
2612 | };
|
2613 |
|
2614 | /**
|
2615 | * Verifies an EntityFilter message.
|
2616 | * @function verify
|
2617 | * @memberof google.datastore.admin.v1.EntityFilter
|
2618 | * @static
|
2619 | * @param {Object.<string,*>} message Plain object to verify
|
2620 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
2621 | */
|
2622 | EntityFilter.verify = function verify(message) {
|
2623 | if (typeof message !== "object" || message === null)
|
2624 | return "object expected";
|
2625 | if (message.kinds != null && message.hasOwnProperty("kinds")) {
|
2626 | if (!Array.isArray(message.kinds))
|
2627 | return "kinds: array expected";
|
2628 | for (var i = 0; i < message.kinds.length; ++i)
|
2629 | if (!$util.isString(message.kinds[i]))
|
2630 | return "kinds: string[] expected";
|
2631 | }
|
2632 | if (message.namespaceIds != null && message.hasOwnProperty("namespaceIds")) {
|
2633 | if (!Array.isArray(message.namespaceIds))
|
2634 | return "namespaceIds: array expected";
|
2635 | for (var i = 0; i < message.namespaceIds.length; ++i)
|
2636 | if (!$util.isString(message.namespaceIds[i]))
|
2637 | return "namespaceIds: string[] expected";
|
2638 | }
|
2639 | return null;
|
2640 | };
|
2641 |
|
2642 | /**
|
2643 | * Creates an EntityFilter message from a plain object. Also converts values to their respective internal types.
|
2644 | * @function fromObject
|
2645 | * @memberof google.datastore.admin.v1.EntityFilter
|
2646 | * @static
|
2647 | * @param {Object.<string,*>} object Plain object
|
2648 | * @returns {google.datastore.admin.v1.EntityFilter} EntityFilter
|
2649 | */
|
2650 | EntityFilter.fromObject = function fromObject(object) {
|
2651 | if (object instanceof $root.google.datastore.admin.v1.EntityFilter)
|
2652 | return object;
|
2653 | var message = new $root.google.datastore.admin.v1.EntityFilter();
|
2654 | if (object.kinds) {
|
2655 | if (!Array.isArray(object.kinds))
|
2656 | throw TypeError(".google.datastore.admin.v1.EntityFilter.kinds: array expected");
|
2657 | message.kinds = [];
|
2658 | for (var i = 0; i < object.kinds.length; ++i)
|
2659 | message.kinds[i] = String(object.kinds[i]);
|
2660 | }
|
2661 | if (object.namespaceIds) {
|
2662 | if (!Array.isArray(object.namespaceIds))
|
2663 | throw TypeError(".google.datastore.admin.v1.EntityFilter.namespaceIds: array expected");
|
2664 | message.namespaceIds = [];
|
2665 | for (var i = 0; i < object.namespaceIds.length; ++i)
|
2666 | message.namespaceIds[i] = String(object.namespaceIds[i]);
|
2667 | }
|
2668 | return message;
|
2669 | };
|
2670 |
|
2671 | /**
|
2672 | * Creates a plain object from an EntityFilter message. Also converts values to other types if specified.
|
2673 | * @function toObject
|
2674 | * @memberof google.datastore.admin.v1.EntityFilter
|
2675 | * @static
|
2676 | * @param {google.datastore.admin.v1.EntityFilter} message EntityFilter
|
2677 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
2678 | * @returns {Object.<string,*>} Plain object
|
2679 | */
|
2680 | EntityFilter.toObject = function toObject(message, options) {
|
2681 | if (!options)
|
2682 | options = {};
|
2683 | var object = {};
|
2684 | if (options.arrays || options.defaults) {
|
2685 | object.kinds = [];
|
2686 | object.namespaceIds = [];
|
2687 | }
|
2688 | if (message.kinds && message.kinds.length) {
|
2689 | object.kinds = [];
|
2690 | for (var j = 0; j < message.kinds.length; ++j)
|
2691 | object.kinds[j] = message.kinds[j];
|
2692 | }
|
2693 | if (message.namespaceIds && message.namespaceIds.length) {
|
2694 | object.namespaceIds = [];
|
2695 | for (var j = 0; j < message.namespaceIds.length; ++j)
|
2696 | object.namespaceIds[j] = message.namespaceIds[j];
|
2697 | }
|
2698 | return object;
|
2699 | };
|
2700 |
|
2701 | /**
|
2702 | * Converts this EntityFilter to JSON.
|
2703 | * @function toJSON
|
2704 | * @memberof google.datastore.admin.v1.EntityFilter
|
2705 | * @instance
|
2706 | * @returns {Object.<string,*>} JSON object
|
2707 | */
|
2708 | EntityFilter.prototype.toJSON = function toJSON() {
|
2709 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
2710 | };
|
2711 |
|
2712 | /**
|
2713 | * Gets the default type url for EntityFilter
|
2714 | * @function getTypeUrl
|
2715 | * @memberof google.datastore.admin.v1.EntityFilter
|
2716 | * @static
|
2717 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
2718 | * @returns {string} The default type url
|
2719 | */
|
2720 | EntityFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
2721 | if (typeUrlPrefix === undefined) {
|
2722 | typeUrlPrefix = "type.googleapis.com";
|
2723 | }
|
2724 | return typeUrlPrefix + "/google.datastore.admin.v1.EntityFilter";
|
2725 | };
|
2726 |
|
2727 | return EntityFilter;
|
2728 | })();
|
2729 |
|
2730 | v1.CreateIndexRequest = (function() {
|
2731 |
|
2732 | /**
|
2733 | * Properties of a CreateIndexRequest.
|
2734 | * @memberof google.datastore.admin.v1
|
2735 | * @interface ICreateIndexRequest
|
2736 | * @property {string|null} [projectId] CreateIndexRequest projectId
|
2737 | * @property {google.datastore.admin.v1.IIndex|null} [index] CreateIndexRequest index
|
2738 | */
|
2739 |
|
2740 | /**
|
2741 | * Constructs a new CreateIndexRequest.
|
2742 | * @memberof google.datastore.admin.v1
|
2743 | * @classdesc Represents a CreateIndexRequest.
|
2744 | * @implements ICreateIndexRequest
|
2745 | * @constructor
|
2746 | * @param {google.datastore.admin.v1.ICreateIndexRequest=} [properties] Properties to set
|
2747 | */
|
2748 | function CreateIndexRequest(properties) {
|
2749 | if (properties)
|
2750 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
2751 | if (properties[keys[i]] != null)
|
2752 | this[keys[i]] = properties[keys[i]];
|
2753 | }
|
2754 |
|
2755 | /**
|
2756 | * CreateIndexRequest projectId.
|
2757 | * @member {string} projectId
|
2758 | * @memberof google.datastore.admin.v1.CreateIndexRequest
|
2759 | * @instance
|
2760 | */
|
2761 | CreateIndexRequest.prototype.projectId = "";
|
2762 |
|
2763 | /**
|
2764 | * CreateIndexRequest index.
|
2765 | * @member {google.datastore.admin.v1.IIndex|null|undefined} index
|
2766 | * @memberof google.datastore.admin.v1.CreateIndexRequest
|
2767 | * @instance
|
2768 | */
|
2769 | CreateIndexRequest.prototype.index = null;
|
2770 |
|
2771 | /**
|
2772 | * Creates a new CreateIndexRequest instance using the specified properties.
|
2773 | * @function create
|
2774 | * @memberof google.datastore.admin.v1.CreateIndexRequest
|
2775 | * @static
|
2776 | * @param {google.datastore.admin.v1.ICreateIndexRequest=} [properties] Properties to set
|
2777 | * @returns {google.datastore.admin.v1.CreateIndexRequest} CreateIndexRequest instance
|
2778 | */
|
2779 | CreateIndexRequest.create = function create(properties) {
|
2780 | return new CreateIndexRequest(properties);
|
2781 | };
|
2782 |
|
2783 | /**
|
2784 | * Encodes the specified CreateIndexRequest message. Does not implicitly {@link google.datastore.admin.v1.CreateIndexRequest.verify|verify} messages.
|
2785 | * @function encode
|
2786 | * @memberof google.datastore.admin.v1.CreateIndexRequest
|
2787 | * @static
|
2788 | * @param {google.datastore.admin.v1.ICreateIndexRequest} message CreateIndexRequest message or plain object to encode
|
2789 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
2790 | * @returns {$protobuf.Writer} Writer
|
2791 | */
|
2792 | CreateIndexRequest.encode = function encode(message, writer) {
|
2793 | if (!writer)
|
2794 | writer = $Writer.create();
|
2795 | if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
|
2796 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId);
|
2797 | if (message.index != null && Object.hasOwnProperty.call(message, "index"))
|
2798 | $root.google.datastore.admin.v1.Index.encode(message.index, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
2799 | return writer;
|
2800 | };
|
2801 |
|
2802 | /**
|
2803 | * Encodes the specified CreateIndexRequest message, length delimited. Does not implicitly {@link google.datastore.admin.v1.CreateIndexRequest.verify|verify} messages.
|
2804 | * @function encodeDelimited
|
2805 | * @memberof google.datastore.admin.v1.CreateIndexRequest
|
2806 | * @static
|
2807 | * @param {google.datastore.admin.v1.ICreateIndexRequest} message CreateIndexRequest message or plain object to encode
|
2808 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
2809 | * @returns {$protobuf.Writer} Writer
|
2810 | */
|
2811 | CreateIndexRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
2812 | return this.encode(message, writer).ldelim();
|
2813 | };
|
2814 |
|
2815 | /**
|
2816 | * Decodes a CreateIndexRequest message from the specified reader or buffer.
|
2817 | * @function decode
|
2818 | * @memberof google.datastore.admin.v1.CreateIndexRequest
|
2819 | * @static
|
2820 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
2821 | * @param {number} [length] Message length if known beforehand
|
2822 | * @returns {google.datastore.admin.v1.CreateIndexRequest} CreateIndexRequest
|
2823 | * @throws {Error} If the payload is not a reader or valid buffer
|
2824 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
2825 | */
|
2826 | CreateIndexRequest.decode = function decode(reader, length) {
|
2827 | if (!(reader instanceof $Reader))
|
2828 | reader = $Reader.create(reader);
|
2829 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.CreateIndexRequest();
|
2830 | while (reader.pos < end) {
|
2831 | var tag = reader.uint32();
|
2832 | switch (tag >>> 3) {
|
2833 | case 1: {
|
2834 | message.projectId = reader.string();
|
2835 | break;
|
2836 | }
|
2837 | case 3: {
|
2838 | message.index = $root.google.datastore.admin.v1.Index.decode(reader, reader.uint32());
|
2839 | break;
|
2840 | }
|
2841 | default:
|
2842 | reader.skipType(tag & 7);
|
2843 | break;
|
2844 | }
|
2845 | }
|
2846 | return message;
|
2847 | };
|
2848 |
|
2849 | /**
|
2850 | * Decodes a CreateIndexRequest message from the specified reader or buffer, length delimited.
|
2851 | * @function decodeDelimited
|
2852 | * @memberof google.datastore.admin.v1.CreateIndexRequest
|
2853 | * @static
|
2854 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
2855 | * @returns {google.datastore.admin.v1.CreateIndexRequest} CreateIndexRequest
|
2856 | * @throws {Error} If the payload is not a reader or valid buffer
|
2857 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
2858 | */
|
2859 | CreateIndexRequest.decodeDelimited = function decodeDelimited(reader) {
|
2860 | if (!(reader instanceof $Reader))
|
2861 | reader = new $Reader(reader);
|
2862 | return this.decode(reader, reader.uint32());
|
2863 | };
|
2864 |
|
2865 | /**
|
2866 | * Verifies a CreateIndexRequest message.
|
2867 | * @function verify
|
2868 | * @memberof google.datastore.admin.v1.CreateIndexRequest
|
2869 | * @static
|
2870 | * @param {Object.<string,*>} message Plain object to verify
|
2871 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
2872 | */
|
2873 | CreateIndexRequest.verify = function verify(message) {
|
2874 | if (typeof message !== "object" || message === null)
|
2875 | return "object expected";
|
2876 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
2877 | if (!$util.isString(message.projectId))
|
2878 | return "projectId: string expected";
|
2879 | if (message.index != null && message.hasOwnProperty("index")) {
|
2880 | var error = $root.google.datastore.admin.v1.Index.verify(message.index);
|
2881 | if (error)
|
2882 | return "index." + error;
|
2883 | }
|
2884 | return null;
|
2885 | };
|
2886 |
|
2887 | /**
|
2888 | * Creates a CreateIndexRequest message from a plain object. Also converts values to their respective internal types.
|
2889 | * @function fromObject
|
2890 | * @memberof google.datastore.admin.v1.CreateIndexRequest
|
2891 | * @static
|
2892 | * @param {Object.<string,*>} object Plain object
|
2893 | * @returns {google.datastore.admin.v1.CreateIndexRequest} CreateIndexRequest
|
2894 | */
|
2895 | CreateIndexRequest.fromObject = function fromObject(object) {
|
2896 | if (object instanceof $root.google.datastore.admin.v1.CreateIndexRequest)
|
2897 | return object;
|
2898 | var message = new $root.google.datastore.admin.v1.CreateIndexRequest();
|
2899 | if (object.projectId != null)
|
2900 | message.projectId = String(object.projectId);
|
2901 | if (object.index != null) {
|
2902 | if (typeof object.index !== "object")
|
2903 | throw TypeError(".google.datastore.admin.v1.CreateIndexRequest.index: object expected");
|
2904 | message.index = $root.google.datastore.admin.v1.Index.fromObject(object.index);
|
2905 | }
|
2906 | return message;
|
2907 | };
|
2908 |
|
2909 | /**
|
2910 | * Creates a plain object from a CreateIndexRequest message. Also converts values to other types if specified.
|
2911 | * @function toObject
|
2912 | * @memberof google.datastore.admin.v1.CreateIndexRequest
|
2913 | * @static
|
2914 | * @param {google.datastore.admin.v1.CreateIndexRequest} message CreateIndexRequest
|
2915 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
2916 | * @returns {Object.<string,*>} Plain object
|
2917 | */
|
2918 | CreateIndexRequest.toObject = function toObject(message, options) {
|
2919 | if (!options)
|
2920 | options = {};
|
2921 | var object = {};
|
2922 | if (options.defaults) {
|
2923 | object.projectId = "";
|
2924 | object.index = null;
|
2925 | }
|
2926 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
2927 | object.projectId = message.projectId;
|
2928 | if (message.index != null && message.hasOwnProperty("index"))
|
2929 | object.index = $root.google.datastore.admin.v1.Index.toObject(message.index, options);
|
2930 | return object;
|
2931 | };
|
2932 |
|
2933 | /**
|
2934 | * Converts this CreateIndexRequest to JSON.
|
2935 | * @function toJSON
|
2936 | * @memberof google.datastore.admin.v1.CreateIndexRequest
|
2937 | * @instance
|
2938 | * @returns {Object.<string,*>} JSON object
|
2939 | */
|
2940 | CreateIndexRequest.prototype.toJSON = function toJSON() {
|
2941 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
2942 | };
|
2943 |
|
2944 | /**
|
2945 | * Gets the default type url for CreateIndexRequest
|
2946 | * @function getTypeUrl
|
2947 | * @memberof google.datastore.admin.v1.CreateIndexRequest
|
2948 | * @static
|
2949 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
2950 | * @returns {string} The default type url
|
2951 | */
|
2952 | CreateIndexRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
2953 | if (typeUrlPrefix === undefined) {
|
2954 | typeUrlPrefix = "type.googleapis.com";
|
2955 | }
|
2956 | return typeUrlPrefix + "/google.datastore.admin.v1.CreateIndexRequest";
|
2957 | };
|
2958 |
|
2959 | return CreateIndexRequest;
|
2960 | })();
|
2961 |
|
2962 | v1.DeleteIndexRequest = (function() {
|
2963 |
|
2964 | /**
|
2965 | * Properties of a DeleteIndexRequest.
|
2966 | * @memberof google.datastore.admin.v1
|
2967 | * @interface IDeleteIndexRequest
|
2968 | * @property {string|null} [projectId] DeleteIndexRequest projectId
|
2969 | * @property {string|null} [indexId] DeleteIndexRequest indexId
|
2970 | */
|
2971 |
|
2972 | /**
|
2973 | * Constructs a new DeleteIndexRequest.
|
2974 | * @memberof google.datastore.admin.v1
|
2975 | * @classdesc Represents a DeleteIndexRequest.
|
2976 | * @implements IDeleteIndexRequest
|
2977 | * @constructor
|
2978 | * @param {google.datastore.admin.v1.IDeleteIndexRequest=} [properties] Properties to set
|
2979 | */
|
2980 | function DeleteIndexRequest(properties) {
|
2981 | if (properties)
|
2982 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
2983 | if (properties[keys[i]] != null)
|
2984 | this[keys[i]] = properties[keys[i]];
|
2985 | }
|
2986 |
|
2987 | /**
|
2988 | * DeleteIndexRequest projectId.
|
2989 | * @member {string} projectId
|
2990 | * @memberof google.datastore.admin.v1.DeleteIndexRequest
|
2991 | * @instance
|
2992 | */
|
2993 | DeleteIndexRequest.prototype.projectId = "";
|
2994 |
|
2995 | /**
|
2996 | * DeleteIndexRequest indexId.
|
2997 | * @member {string} indexId
|
2998 | * @memberof google.datastore.admin.v1.DeleteIndexRequest
|
2999 | * @instance
|
3000 | */
|
3001 | DeleteIndexRequest.prototype.indexId = "";
|
3002 |
|
3003 | /**
|
3004 | * Creates a new DeleteIndexRequest instance using the specified properties.
|
3005 | * @function create
|
3006 | * @memberof google.datastore.admin.v1.DeleteIndexRequest
|
3007 | * @static
|
3008 | * @param {google.datastore.admin.v1.IDeleteIndexRequest=} [properties] Properties to set
|
3009 | * @returns {google.datastore.admin.v1.DeleteIndexRequest} DeleteIndexRequest instance
|
3010 | */
|
3011 | DeleteIndexRequest.create = function create(properties) {
|
3012 | return new DeleteIndexRequest(properties);
|
3013 | };
|
3014 |
|
3015 | /**
|
3016 | * Encodes the specified DeleteIndexRequest message. Does not implicitly {@link google.datastore.admin.v1.DeleteIndexRequest.verify|verify} messages.
|
3017 | * @function encode
|
3018 | * @memberof google.datastore.admin.v1.DeleteIndexRequest
|
3019 | * @static
|
3020 | * @param {google.datastore.admin.v1.IDeleteIndexRequest} message DeleteIndexRequest message or plain object to encode
|
3021 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
3022 | * @returns {$protobuf.Writer} Writer
|
3023 | */
|
3024 | DeleteIndexRequest.encode = function encode(message, writer) {
|
3025 | if (!writer)
|
3026 | writer = $Writer.create();
|
3027 | if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
|
3028 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId);
|
3029 | if (message.indexId != null && Object.hasOwnProperty.call(message, "indexId"))
|
3030 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.indexId);
|
3031 | return writer;
|
3032 | };
|
3033 |
|
3034 | /**
|
3035 | * Encodes the specified DeleteIndexRequest message, length delimited. Does not implicitly {@link google.datastore.admin.v1.DeleteIndexRequest.verify|verify} messages.
|
3036 | * @function encodeDelimited
|
3037 | * @memberof google.datastore.admin.v1.DeleteIndexRequest
|
3038 | * @static
|
3039 | * @param {google.datastore.admin.v1.IDeleteIndexRequest} message DeleteIndexRequest message or plain object to encode
|
3040 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
3041 | * @returns {$protobuf.Writer} Writer
|
3042 | */
|
3043 | DeleteIndexRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
3044 | return this.encode(message, writer).ldelim();
|
3045 | };
|
3046 |
|
3047 | /**
|
3048 | * Decodes a DeleteIndexRequest message from the specified reader or buffer.
|
3049 | * @function decode
|
3050 | * @memberof google.datastore.admin.v1.DeleteIndexRequest
|
3051 | * @static
|
3052 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
3053 | * @param {number} [length] Message length if known beforehand
|
3054 | * @returns {google.datastore.admin.v1.DeleteIndexRequest} DeleteIndexRequest
|
3055 | * @throws {Error} If the payload is not a reader or valid buffer
|
3056 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
3057 | */
|
3058 | DeleteIndexRequest.decode = function decode(reader, length) {
|
3059 | if (!(reader instanceof $Reader))
|
3060 | reader = $Reader.create(reader);
|
3061 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.DeleteIndexRequest();
|
3062 | while (reader.pos < end) {
|
3063 | var tag = reader.uint32();
|
3064 | switch (tag >>> 3) {
|
3065 | case 1: {
|
3066 | message.projectId = reader.string();
|
3067 | break;
|
3068 | }
|
3069 | case 3: {
|
3070 | message.indexId = reader.string();
|
3071 | break;
|
3072 | }
|
3073 | default:
|
3074 | reader.skipType(tag & 7);
|
3075 | break;
|
3076 | }
|
3077 | }
|
3078 | return message;
|
3079 | };
|
3080 |
|
3081 | /**
|
3082 | * Decodes a DeleteIndexRequest message from the specified reader or buffer, length delimited.
|
3083 | * @function decodeDelimited
|
3084 | * @memberof google.datastore.admin.v1.DeleteIndexRequest
|
3085 | * @static
|
3086 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
3087 | * @returns {google.datastore.admin.v1.DeleteIndexRequest} DeleteIndexRequest
|
3088 | * @throws {Error} If the payload is not a reader or valid buffer
|
3089 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
3090 | */
|
3091 | DeleteIndexRequest.decodeDelimited = function decodeDelimited(reader) {
|
3092 | if (!(reader instanceof $Reader))
|
3093 | reader = new $Reader(reader);
|
3094 | return this.decode(reader, reader.uint32());
|
3095 | };
|
3096 |
|
3097 | /**
|
3098 | * Verifies a DeleteIndexRequest message.
|
3099 | * @function verify
|
3100 | * @memberof google.datastore.admin.v1.DeleteIndexRequest
|
3101 | * @static
|
3102 | * @param {Object.<string,*>} message Plain object to verify
|
3103 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
3104 | */
|
3105 | DeleteIndexRequest.verify = function verify(message) {
|
3106 | if (typeof message !== "object" || message === null)
|
3107 | return "object expected";
|
3108 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
3109 | if (!$util.isString(message.projectId))
|
3110 | return "projectId: string expected";
|
3111 | if (message.indexId != null && message.hasOwnProperty("indexId"))
|
3112 | if (!$util.isString(message.indexId))
|
3113 | return "indexId: string expected";
|
3114 | return null;
|
3115 | };
|
3116 |
|
3117 | /**
|
3118 | * Creates a DeleteIndexRequest message from a plain object. Also converts values to their respective internal types.
|
3119 | * @function fromObject
|
3120 | * @memberof google.datastore.admin.v1.DeleteIndexRequest
|
3121 | * @static
|
3122 | * @param {Object.<string,*>} object Plain object
|
3123 | * @returns {google.datastore.admin.v1.DeleteIndexRequest} DeleteIndexRequest
|
3124 | */
|
3125 | DeleteIndexRequest.fromObject = function fromObject(object) {
|
3126 | if (object instanceof $root.google.datastore.admin.v1.DeleteIndexRequest)
|
3127 | return object;
|
3128 | var message = new $root.google.datastore.admin.v1.DeleteIndexRequest();
|
3129 | if (object.projectId != null)
|
3130 | message.projectId = String(object.projectId);
|
3131 | if (object.indexId != null)
|
3132 | message.indexId = String(object.indexId);
|
3133 | return message;
|
3134 | };
|
3135 |
|
3136 | /**
|
3137 | * Creates a plain object from a DeleteIndexRequest message. Also converts values to other types if specified.
|
3138 | * @function toObject
|
3139 | * @memberof google.datastore.admin.v1.DeleteIndexRequest
|
3140 | * @static
|
3141 | * @param {google.datastore.admin.v1.DeleteIndexRequest} message DeleteIndexRequest
|
3142 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
3143 | * @returns {Object.<string,*>} Plain object
|
3144 | */
|
3145 | DeleteIndexRequest.toObject = function toObject(message, options) {
|
3146 | if (!options)
|
3147 | options = {};
|
3148 | var object = {};
|
3149 | if (options.defaults) {
|
3150 | object.projectId = "";
|
3151 | object.indexId = "";
|
3152 | }
|
3153 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
3154 | object.projectId = message.projectId;
|
3155 | if (message.indexId != null && message.hasOwnProperty("indexId"))
|
3156 | object.indexId = message.indexId;
|
3157 | return object;
|
3158 | };
|
3159 |
|
3160 | /**
|
3161 | * Converts this DeleteIndexRequest to JSON.
|
3162 | * @function toJSON
|
3163 | * @memberof google.datastore.admin.v1.DeleteIndexRequest
|
3164 | * @instance
|
3165 | * @returns {Object.<string,*>} JSON object
|
3166 | */
|
3167 | DeleteIndexRequest.prototype.toJSON = function toJSON() {
|
3168 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
3169 | };
|
3170 |
|
3171 | /**
|
3172 | * Gets the default type url for DeleteIndexRequest
|
3173 | * @function getTypeUrl
|
3174 | * @memberof google.datastore.admin.v1.DeleteIndexRequest
|
3175 | * @static
|
3176 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
3177 | * @returns {string} The default type url
|
3178 | */
|
3179 | DeleteIndexRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
3180 | if (typeUrlPrefix === undefined) {
|
3181 | typeUrlPrefix = "type.googleapis.com";
|
3182 | }
|
3183 | return typeUrlPrefix + "/google.datastore.admin.v1.DeleteIndexRequest";
|
3184 | };
|
3185 |
|
3186 | return DeleteIndexRequest;
|
3187 | })();
|
3188 |
|
3189 | v1.GetIndexRequest = (function() {
|
3190 |
|
3191 | /**
|
3192 | * Properties of a GetIndexRequest.
|
3193 | * @memberof google.datastore.admin.v1
|
3194 | * @interface IGetIndexRequest
|
3195 | * @property {string|null} [projectId] GetIndexRequest projectId
|
3196 | * @property {string|null} [indexId] GetIndexRequest indexId
|
3197 | */
|
3198 |
|
3199 | /**
|
3200 | * Constructs a new GetIndexRequest.
|
3201 | * @memberof google.datastore.admin.v1
|
3202 | * @classdesc Represents a GetIndexRequest.
|
3203 | * @implements IGetIndexRequest
|
3204 | * @constructor
|
3205 | * @param {google.datastore.admin.v1.IGetIndexRequest=} [properties] Properties to set
|
3206 | */
|
3207 | function GetIndexRequest(properties) {
|
3208 | if (properties)
|
3209 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
3210 | if (properties[keys[i]] != null)
|
3211 | this[keys[i]] = properties[keys[i]];
|
3212 | }
|
3213 |
|
3214 | /**
|
3215 | * GetIndexRequest projectId.
|
3216 | * @member {string} projectId
|
3217 | * @memberof google.datastore.admin.v1.GetIndexRequest
|
3218 | * @instance
|
3219 | */
|
3220 | GetIndexRequest.prototype.projectId = "";
|
3221 |
|
3222 | /**
|
3223 | * GetIndexRequest indexId.
|
3224 | * @member {string} indexId
|
3225 | * @memberof google.datastore.admin.v1.GetIndexRequest
|
3226 | * @instance
|
3227 | */
|
3228 | GetIndexRequest.prototype.indexId = "";
|
3229 |
|
3230 | /**
|
3231 | * Creates a new GetIndexRequest instance using the specified properties.
|
3232 | * @function create
|
3233 | * @memberof google.datastore.admin.v1.GetIndexRequest
|
3234 | * @static
|
3235 | * @param {google.datastore.admin.v1.IGetIndexRequest=} [properties] Properties to set
|
3236 | * @returns {google.datastore.admin.v1.GetIndexRequest} GetIndexRequest instance
|
3237 | */
|
3238 | GetIndexRequest.create = function create(properties) {
|
3239 | return new GetIndexRequest(properties);
|
3240 | };
|
3241 |
|
3242 | /**
|
3243 | * Encodes the specified GetIndexRequest message. Does not implicitly {@link google.datastore.admin.v1.GetIndexRequest.verify|verify} messages.
|
3244 | * @function encode
|
3245 | * @memberof google.datastore.admin.v1.GetIndexRequest
|
3246 | * @static
|
3247 | * @param {google.datastore.admin.v1.IGetIndexRequest} message GetIndexRequest message or plain object to encode
|
3248 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
3249 | * @returns {$protobuf.Writer} Writer
|
3250 | */
|
3251 | GetIndexRequest.encode = function encode(message, writer) {
|
3252 | if (!writer)
|
3253 | writer = $Writer.create();
|
3254 | if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
|
3255 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId);
|
3256 | if (message.indexId != null && Object.hasOwnProperty.call(message, "indexId"))
|
3257 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.indexId);
|
3258 | return writer;
|
3259 | };
|
3260 |
|
3261 | /**
|
3262 | * Encodes the specified GetIndexRequest message, length delimited. Does not implicitly {@link google.datastore.admin.v1.GetIndexRequest.verify|verify} messages.
|
3263 | * @function encodeDelimited
|
3264 | * @memberof google.datastore.admin.v1.GetIndexRequest
|
3265 | * @static
|
3266 | * @param {google.datastore.admin.v1.IGetIndexRequest} message GetIndexRequest message or plain object to encode
|
3267 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
3268 | * @returns {$protobuf.Writer} Writer
|
3269 | */
|
3270 | GetIndexRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
3271 | return this.encode(message, writer).ldelim();
|
3272 | };
|
3273 |
|
3274 | /**
|
3275 | * Decodes a GetIndexRequest message from the specified reader or buffer.
|
3276 | * @function decode
|
3277 | * @memberof google.datastore.admin.v1.GetIndexRequest
|
3278 | * @static
|
3279 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
3280 | * @param {number} [length] Message length if known beforehand
|
3281 | * @returns {google.datastore.admin.v1.GetIndexRequest} GetIndexRequest
|
3282 | * @throws {Error} If the payload is not a reader or valid buffer
|
3283 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
3284 | */
|
3285 | GetIndexRequest.decode = function decode(reader, length) {
|
3286 | if (!(reader instanceof $Reader))
|
3287 | reader = $Reader.create(reader);
|
3288 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.GetIndexRequest();
|
3289 | while (reader.pos < end) {
|
3290 | var tag = reader.uint32();
|
3291 | switch (tag >>> 3) {
|
3292 | case 1: {
|
3293 | message.projectId = reader.string();
|
3294 | break;
|
3295 | }
|
3296 | case 3: {
|
3297 | message.indexId = reader.string();
|
3298 | break;
|
3299 | }
|
3300 | default:
|
3301 | reader.skipType(tag & 7);
|
3302 | break;
|
3303 | }
|
3304 | }
|
3305 | return message;
|
3306 | };
|
3307 |
|
3308 | /**
|
3309 | * Decodes a GetIndexRequest message from the specified reader or buffer, length delimited.
|
3310 | * @function decodeDelimited
|
3311 | * @memberof google.datastore.admin.v1.GetIndexRequest
|
3312 | * @static
|
3313 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
3314 | * @returns {google.datastore.admin.v1.GetIndexRequest} GetIndexRequest
|
3315 | * @throws {Error} If the payload is not a reader or valid buffer
|
3316 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
3317 | */
|
3318 | GetIndexRequest.decodeDelimited = function decodeDelimited(reader) {
|
3319 | if (!(reader instanceof $Reader))
|
3320 | reader = new $Reader(reader);
|
3321 | return this.decode(reader, reader.uint32());
|
3322 | };
|
3323 |
|
3324 | /**
|
3325 | * Verifies a GetIndexRequest message.
|
3326 | * @function verify
|
3327 | * @memberof google.datastore.admin.v1.GetIndexRequest
|
3328 | * @static
|
3329 | * @param {Object.<string,*>} message Plain object to verify
|
3330 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
3331 | */
|
3332 | GetIndexRequest.verify = function verify(message) {
|
3333 | if (typeof message !== "object" || message === null)
|
3334 | return "object expected";
|
3335 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
3336 | if (!$util.isString(message.projectId))
|
3337 | return "projectId: string expected";
|
3338 | if (message.indexId != null && message.hasOwnProperty("indexId"))
|
3339 | if (!$util.isString(message.indexId))
|
3340 | return "indexId: string expected";
|
3341 | return null;
|
3342 | };
|
3343 |
|
3344 | /**
|
3345 | * Creates a GetIndexRequest message from a plain object. Also converts values to their respective internal types.
|
3346 | * @function fromObject
|
3347 | * @memberof google.datastore.admin.v1.GetIndexRequest
|
3348 | * @static
|
3349 | * @param {Object.<string,*>} object Plain object
|
3350 | * @returns {google.datastore.admin.v1.GetIndexRequest} GetIndexRequest
|
3351 | */
|
3352 | GetIndexRequest.fromObject = function fromObject(object) {
|
3353 | if (object instanceof $root.google.datastore.admin.v1.GetIndexRequest)
|
3354 | return object;
|
3355 | var message = new $root.google.datastore.admin.v1.GetIndexRequest();
|
3356 | if (object.projectId != null)
|
3357 | message.projectId = String(object.projectId);
|
3358 | if (object.indexId != null)
|
3359 | message.indexId = String(object.indexId);
|
3360 | return message;
|
3361 | };
|
3362 |
|
3363 | /**
|
3364 | * Creates a plain object from a GetIndexRequest message. Also converts values to other types if specified.
|
3365 | * @function toObject
|
3366 | * @memberof google.datastore.admin.v1.GetIndexRequest
|
3367 | * @static
|
3368 | * @param {google.datastore.admin.v1.GetIndexRequest} message GetIndexRequest
|
3369 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
3370 | * @returns {Object.<string,*>} Plain object
|
3371 | */
|
3372 | GetIndexRequest.toObject = function toObject(message, options) {
|
3373 | if (!options)
|
3374 | options = {};
|
3375 | var object = {};
|
3376 | if (options.defaults) {
|
3377 | object.projectId = "";
|
3378 | object.indexId = "";
|
3379 | }
|
3380 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
3381 | object.projectId = message.projectId;
|
3382 | if (message.indexId != null && message.hasOwnProperty("indexId"))
|
3383 | object.indexId = message.indexId;
|
3384 | return object;
|
3385 | };
|
3386 |
|
3387 | /**
|
3388 | * Converts this GetIndexRequest to JSON.
|
3389 | * @function toJSON
|
3390 | * @memberof google.datastore.admin.v1.GetIndexRequest
|
3391 | * @instance
|
3392 | * @returns {Object.<string,*>} JSON object
|
3393 | */
|
3394 | GetIndexRequest.prototype.toJSON = function toJSON() {
|
3395 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
3396 | };
|
3397 |
|
3398 | /**
|
3399 | * Gets the default type url for GetIndexRequest
|
3400 | * @function getTypeUrl
|
3401 | * @memberof google.datastore.admin.v1.GetIndexRequest
|
3402 | * @static
|
3403 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
3404 | * @returns {string} The default type url
|
3405 | */
|
3406 | GetIndexRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
3407 | if (typeUrlPrefix === undefined) {
|
3408 | typeUrlPrefix = "type.googleapis.com";
|
3409 | }
|
3410 | return typeUrlPrefix + "/google.datastore.admin.v1.GetIndexRequest";
|
3411 | };
|
3412 |
|
3413 | return GetIndexRequest;
|
3414 | })();
|
3415 |
|
3416 | v1.ListIndexesRequest = (function() {
|
3417 |
|
3418 | /**
|
3419 | * Properties of a ListIndexesRequest.
|
3420 | * @memberof google.datastore.admin.v1
|
3421 | * @interface IListIndexesRequest
|
3422 | * @property {string|null} [projectId] ListIndexesRequest projectId
|
3423 | * @property {string|null} [filter] ListIndexesRequest filter
|
3424 | * @property {number|null} [pageSize] ListIndexesRequest pageSize
|
3425 | * @property {string|null} [pageToken] ListIndexesRequest pageToken
|
3426 | */
|
3427 |
|
3428 | /**
|
3429 | * Constructs a new ListIndexesRequest.
|
3430 | * @memberof google.datastore.admin.v1
|
3431 | * @classdesc Represents a ListIndexesRequest.
|
3432 | * @implements IListIndexesRequest
|
3433 | * @constructor
|
3434 | * @param {google.datastore.admin.v1.IListIndexesRequest=} [properties] Properties to set
|
3435 | */
|
3436 | function ListIndexesRequest(properties) {
|
3437 | if (properties)
|
3438 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
3439 | if (properties[keys[i]] != null)
|
3440 | this[keys[i]] = properties[keys[i]];
|
3441 | }
|
3442 |
|
3443 | /**
|
3444 | * ListIndexesRequest projectId.
|
3445 | * @member {string} projectId
|
3446 | * @memberof google.datastore.admin.v1.ListIndexesRequest
|
3447 | * @instance
|
3448 | */
|
3449 | ListIndexesRequest.prototype.projectId = "";
|
3450 |
|
3451 | /**
|
3452 | * ListIndexesRequest filter.
|
3453 | * @member {string} filter
|
3454 | * @memberof google.datastore.admin.v1.ListIndexesRequest
|
3455 | * @instance
|
3456 | */
|
3457 | ListIndexesRequest.prototype.filter = "";
|
3458 |
|
3459 | /**
|
3460 | * ListIndexesRequest pageSize.
|
3461 | * @member {number} pageSize
|
3462 | * @memberof google.datastore.admin.v1.ListIndexesRequest
|
3463 | * @instance
|
3464 | */
|
3465 | ListIndexesRequest.prototype.pageSize = 0;
|
3466 |
|
3467 | /**
|
3468 | * ListIndexesRequest pageToken.
|
3469 | * @member {string} pageToken
|
3470 | * @memberof google.datastore.admin.v1.ListIndexesRequest
|
3471 | * @instance
|
3472 | */
|
3473 | ListIndexesRequest.prototype.pageToken = "";
|
3474 |
|
3475 | /**
|
3476 | * Creates a new ListIndexesRequest instance using the specified properties.
|
3477 | * @function create
|
3478 | * @memberof google.datastore.admin.v1.ListIndexesRequest
|
3479 | * @static
|
3480 | * @param {google.datastore.admin.v1.IListIndexesRequest=} [properties] Properties to set
|
3481 | * @returns {google.datastore.admin.v1.ListIndexesRequest} ListIndexesRequest instance
|
3482 | */
|
3483 | ListIndexesRequest.create = function create(properties) {
|
3484 | return new ListIndexesRequest(properties);
|
3485 | };
|
3486 |
|
3487 | /**
|
3488 | * Encodes the specified ListIndexesRequest message. Does not implicitly {@link google.datastore.admin.v1.ListIndexesRequest.verify|verify} messages.
|
3489 | * @function encode
|
3490 | * @memberof google.datastore.admin.v1.ListIndexesRequest
|
3491 | * @static
|
3492 | * @param {google.datastore.admin.v1.IListIndexesRequest} message ListIndexesRequest message or plain object to encode
|
3493 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
3494 | * @returns {$protobuf.Writer} Writer
|
3495 | */
|
3496 | ListIndexesRequest.encode = function encode(message, writer) {
|
3497 | if (!writer)
|
3498 | writer = $Writer.create();
|
3499 | if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
|
3500 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId);
|
3501 | if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
|
3502 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.filter);
|
3503 | if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
|
3504 | writer.uint32(/* id 4, wireType 0 =*/32).int32(message.pageSize);
|
3505 | if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
|
3506 | writer.uint32(/* id 5, wireType 2 =*/42).string(message.pageToken);
|
3507 | return writer;
|
3508 | };
|
3509 |
|
3510 | /**
|
3511 | * Encodes the specified ListIndexesRequest message, length delimited. Does not implicitly {@link google.datastore.admin.v1.ListIndexesRequest.verify|verify} messages.
|
3512 | * @function encodeDelimited
|
3513 | * @memberof google.datastore.admin.v1.ListIndexesRequest
|
3514 | * @static
|
3515 | * @param {google.datastore.admin.v1.IListIndexesRequest} message ListIndexesRequest message or plain object to encode
|
3516 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
3517 | * @returns {$protobuf.Writer} Writer
|
3518 | */
|
3519 | ListIndexesRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
3520 | return this.encode(message, writer).ldelim();
|
3521 | };
|
3522 |
|
3523 | /**
|
3524 | * Decodes a ListIndexesRequest message from the specified reader or buffer.
|
3525 | * @function decode
|
3526 | * @memberof google.datastore.admin.v1.ListIndexesRequest
|
3527 | * @static
|
3528 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
3529 | * @param {number} [length] Message length if known beforehand
|
3530 | * @returns {google.datastore.admin.v1.ListIndexesRequest} ListIndexesRequest
|
3531 | * @throws {Error} If the payload is not a reader or valid buffer
|
3532 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
3533 | */
|
3534 | ListIndexesRequest.decode = function decode(reader, length) {
|
3535 | if (!(reader instanceof $Reader))
|
3536 | reader = $Reader.create(reader);
|
3537 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.ListIndexesRequest();
|
3538 | while (reader.pos < end) {
|
3539 | var tag = reader.uint32();
|
3540 | switch (tag >>> 3) {
|
3541 | case 1: {
|
3542 | message.projectId = reader.string();
|
3543 | break;
|
3544 | }
|
3545 | case 3: {
|
3546 | message.filter = reader.string();
|
3547 | break;
|
3548 | }
|
3549 | case 4: {
|
3550 | message.pageSize = reader.int32();
|
3551 | break;
|
3552 | }
|
3553 | case 5: {
|
3554 | message.pageToken = reader.string();
|
3555 | break;
|
3556 | }
|
3557 | default:
|
3558 | reader.skipType(tag & 7);
|
3559 | break;
|
3560 | }
|
3561 | }
|
3562 | return message;
|
3563 | };
|
3564 |
|
3565 | /**
|
3566 | * Decodes a ListIndexesRequest message from the specified reader or buffer, length delimited.
|
3567 | * @function decodeDelimited
|
3568 | * @memberof google.datastore.admin.v1.ListIndexesRequest
|
3569 | * @static
|
3570 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
3571 | * @returns {google.datastore.admin.v1.ListIndexesRequest} ListIndexesRequest
|
3572 | * @throws {Error} If the payload is not a reader or valid buffer
|
3573 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
3574 | */
|
3575 | ListIndexesRequest.decodeDelimited = function decodeDelimited(reader) {
|
3576 | if (!(reader instanceof $Reader))
|
3577 | reader = new $Reader(reader);
|
3578 | return this.decode(reader, reader.uint32());
|
3579 | };
|
3580 |
|
3581 | /**
|
3582 | * Verifies a ListIndexesRequest message.
|
3583 | * @function verify
|
3584 | * @memberof google.datastore.admin.v1.ListIndexesRequest
|
3585 | * @static
|
3586 | * @param {Object.<string,*>} message Plain object to verify
|
3587 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
3588 | */
|
3589 | ListIndexesRequest.verify = function verify(message) {
|
3590 | if (typeof message !== "object" || message === null)
|
3591 | return "object expected";
|
3592 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
3593 | if (!$util.isString(message.projectId))
|
3594 | return "projectId: string expected";
|
3595 | if (message.filter != null && message.hasOwnProperty("filter"))
|
3596 | if (!$util.isString(message.filter))
|
3597 | return "filter: string expected";
|
3598 | if (message.pageSize != null && message.hasOwnProperty("pageSize"))
|
3599 | if (!$util.isInteger(message.pageSize))
|
3600 | return "pageSize: integer expected";
|
3601 | if (message.pageToken != null && message.hasOwnProperty("pageToken"))
|
3602 | if (!$util.isString(message.pageToken))
|
3603 | return "pageToken: string expected";
|
3604 | return null;
|
3605 | };
|
3606 |
|
3607 | /**
|
3608 | * Creates a ListIndexesRequest message from a plain object. Also converts values to their respective internal types.
|
3609 | * @function fromObject
|
3610 | * @memberof google.datastore.admin.v1.ListIndexesRequest
|
3611 | * @static
|
3612 | * @param {Object.<string,*>} object Plain object
|
3613 | * @returns {google.datastore.admin.v1.ListIndexesRequest} ListIndexesRequest
|
3614 | */
|
3615 | ListIndexesRequest.fromObject = function fromObject(object) {
|
3616 | if (object instanceof $root.google.datastore.admin.v1.ListIndexesRequest)
|
3617 | return object;
|
3618 | var message = new $root.google.datastore.admin.v1.ListIndexesRequest();
|
3619 | if (object.projectId != null)
|
3620 | message.projectId = String(object.projectId);
|
3621 | if (object.filter != null)
|
3622 | message.filter = String(object.filter);
|
3623 | if (object.pageSize != null)
|
3624 | message.pageSize = object.pageSize | 0;
|
3625 | if (object.pageToken != null)
|
3626 | message.pageToken = String(object.pageToken);
|
3627 | return message;
|
3628 | };
|
3629 |
|
3630 | /**
|
3631 | * Creates a plain object from a ListIndexesRequest message. Also converts values to other types if specified.
|
3632 | * @function toObject
|
3633 | * @memberof google.datastore.admin.v1.ListIndexesRequest
|
3634 | * @static
|
3635 | * @param {google.datastore.admin.v1.ListIndexesRequest} message ListIndexesRequest
|
3636 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
3637 | * @returns {Object.<string,*>} Plain object
|
3638 | */
|
3639 | ListIndexesRequest.toObject = function toObject(message, options) {
|
3640 | if (!options)
|
3641 | options = {};
|
3642 | var object = {};
|
3643 | if (options.defaults) {
|
3644 | object.projectId = "";
|
3645 | object.filter = "";
|
3646 | object.pageSize = 0;
|
3647 | object.pageToken = "";
|
3648 | }
|
3649 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
3650 | object.projectId = message.projectId;
|
3651 | if (message.filter != null && message.hasOwnProperty("filter"))
|
3652 | object.filter = message.filter;
|
3653 | if (message.pageSize != null && message.hasOwnProperty("pageSize"))
|
3654 | object.pageSize = message.pageSize;
|
3655 | if (message.pageToken != null && message.hasOwnProperty("pageToken"))
|
3656 | object.pageToken = message.pageToken;
|
3657 | return object;
|
3658 | };
|
3659 |
|
3660 | /**
|
3661 | * Converts this ListIndexesRequest to JSON.
|
3662 | * @function toJSON
|
3663 | * @memberof google.datastore.admin.v1.ListIndexesRequest
|
3664 | * @instance
|
3665 | * @returns {Object.<string,*>} JSON object
|
3666 | */
|
3667 | ListIndexesRequest.prototype.toJSON = function toJSON() {
|
3668 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
3669 | };
|
3670 |
|
3671 | /**
|
3672 | * Gets the default type url for ListIndexesRequest
|
3673 | * @function getTypeUrl
|
3674 | * @memberof google.datastore.admin.v1.ListIndexesRequest
|
3675 | * @static
|
3676 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
3677 | * @returns {string} The default type url
|
3678 | */
|
3679 | ListIndexesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
3680 | if (typeUrlPrefix === undefined) {
|
3681 | typeUrlPrefix = "type.googleapis.com";
|
3682 | }
|
3683 | return typeUrlPrefix + "/google.datastore.admin.v1.ListIndexesRequest";
|
3684 | };
|
3685 |
|
3686 | return ListIndexesRequest;
|
3687 | })();
|
3688 |
|
3689 | v1.ListIndexesResponse = (function() {
|
3690 |
|
3691 | /**
|
3692 | * Properties of a ListIndexesResponse.
|
3693 | * @memberof google.datastore.admin.v1
|
3694 | * @interface IListIndexesResponse
|
3695 | * @property {Array.<google.datastore.admin.v1.IIndex>|null} [indexes] ListIndexesResponse indexes
|
3696 | * @property {string|null} [nextPageToken] ListIndexesResponse nextPageToken
|
3697 | */
|
3698 |
|
3699 | /**
|
3700 | * Constructs a new ListIndexesResponse.
|
3701 | * @memberof google.datastore.admin.v1
|
3702 | * @classdesc Represents a ListIndexesResponse.
|
3703 | * @implements IListIndexesResponse
|
3704 | * @constructor
|
3705 | * @param {google.datastore.admin.v1.IListIndexesResponse=} [properties] Properties to set
|
3706 | */
|
3707 | function ListIndexesResponse(properties) {
|
3708 | this.indexes = [];
|
3709 | if (properties)
|
3710 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
3711 | if (properties[keys[i]] != null)
|
3712 | this[keys[i]] = properties[keys[i]];
|
3713 | }
|
3714 |
|
3715 | /**
|
3716 | * ListIndexesResponse indexes.
|
3717 | * @member {Array.<google.datastore.admin.v1.IIndex>} indexes
|
3718 | * @memberof google.datastore.admin.v1.ListIndexesResponse
|
3719 | * @instance
|
3720 | */
|
3721 | ListIndexesResponse.prototype.indexes = $util.emptyArray;
|
3722 |
|
3723 | /**
|
3724 | * ListIndexesResponse nextPageToken.
|
3725 | * @member {string} nextPageToken
|
3726 | * @memberof google.datastore.admin.v1.ListIndexesResponse
|
3727 | * @instance
|
3728 | */
|
3729 | ListIndexesResponse.prototype.nextPageToken = "";
|
3730 |
|
3731 | /**
|
3732 | * Creates a new ListIndexesResponse instance using the specified properties.
|
3733 | * @function create
|
3734 | * @memberof google.datastore.admin.v1.ListIndexesResponse
|
3735 | * @static
|
3736 | * @param {google.datastore.admin.v1.IListIndexesResponse=} [properties] Properties to set
|
3737 | * @returns {google.datastore.admin.v1.ListIndexesResponse} ListIndexesResponse instance
|
3738 | */
|
3739 | ListIndexesResponse.create = function create(properties) {
|
3740 | return new ListIndexesResponse(properties);
|
3741 | };
|
3742 |
|
3743 | /**
|
3744 | * Encodes the specified ListIndexesResponse message. Does not implicitly {@link google.datastore.admin.v1.ListIndexesResponse.verify|verify} messages.
|
3745 | * @function encode
|
3746 | * @memberof google.datastore.admin.v1.ListIndexesResponse
|
3747 | * @static
|
3748 | * @param {google.datastore.admin.v1.IListIndexesResponse} message ListIndexesResponse message or plain object to encode
|
3749 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
3750 | * @returns {$protobuf.Writer} Writer
|
3751 | */
|
3752 | ListIndexesResponse.encode = function encode(message, writer) {
|
3753 | if (!writer)
|
3754 | writer = $Writer.create();
|
3755 | if (message.indexes != null && message.indexes.length)
|
3756 | for (var i = 0; i < message.indexes.length; ++i)
|
3757 | $root.google.datastore.admin.v1.Index.encode(message.indexes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
3758 | if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
|
3759 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
|
3760 | return writer;
|
3761 | };
|
3762 |
|
3763 | /**
|
3764 | * Encodes the specified ListIndexesResponse message, length delimited. Does not implicitly {@link google.datastore.admin.v1.ListIndexesResponse.verify|verify} messages.
|
3765 | * @function encodeDelimited
|
3766 | * @memberof google.datastore.admin.v1.ListIndexesResponse
|
3767 | * @static
|
3768 | * @param {google.datastore.admin.v1.IListIndexesResponse} message ListIndexesResponse message or plain object to encode
|
3769 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
3770 | * @returns {$protobuf.Writer} Writer
|
3771 | */
|
3772 | ListIndexesResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
3773 | return this.encode(message, writer).ldelim();
|
3774 | };
|
3775 |
|
3776 | /**
|
3777 | * Decodes a ListIndexesResponse message from the specified reader or buffer.
|
3778 | * @function decode
|
3779 | * @memberof google.datastore.admin.v1.ListIndexesResponse
|
3780 | * @static
|
3781 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
3782 | * @param {number} [length] Message length if known beforehand
|
3783 | * @returns {google.datastore.admin.v1.ListIndexesResponse} ListIndexesResponse
|
3784 | * @throws {Error} If the payload is not a reader or valid buffer
|
3785 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
3786 | */
|
3787 | ListIndexesResponse.decode = function decode(reader, length) {
|
3788 | if (!(reader instanceof $Reader))
|
3789 | reader = $Reader.create(reader);
|
3790 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.ListIndexesResponse();
|
3791 | while (reader.pos < end) {
|
3792 | var tag = reader.uint32();
|
3793 | switch (tag >>> 3) {
|
3794 | case 1: {
|
3795 | if (!(message.indexes && message.indexes.length))
|
3796 | message.indexes = [];
|
3797 | message.indexes.push($root.google.datastore.admin.v1.Index.decode(reader, reader.uint32()));
|
3798 | break;
|
3799 | }
|
3800 | case 2: {
|
3801 | message.nextPageToken = reader.string();
|
3802 | break;
|
3803 | }
|
3804 | default:
|
3805 | reader.skipType(tag & 7);
|
3806 | break;
|
3807 | }
|
3808 | }
|
3809 | return message;
|
3810 | };
|
3811 |
|
3812 | /**
|
3813 | * Decodes a ListIndexesResponse message from the specified reader or buffer, length delimited.
|
3814 | * @function decodeDelimited
|
3815 | * @memberof google.datastore.admin.v1.ListIndexesResponse
|
3816 | * @static
|
3817 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
3818 | * @returns {google.datastore.admin.v1.ListIndexesResponse} ListIndexesResponse
|
3819 | * @throws {Error} If the payload is not a reader or valid buffer
|
3820 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
3821 | */
|
3822 | ListIndexesResponse.decodeDelimited = function decodeDelimited(reader) {
|
3823 | if (!(reader instanceof $Reader))
|
3824 | reader = new $Reader(reader);
|
3825 | return this.decode(reader, reader.uint32());
|
3826 | };
|
3827 |
|
3828 | /**
|
3829 | * Verifies a ListIndexesResponse message.
|
3830 | * @function verify
|
3831 | * @memberof google.datastore.admin.v1.ListIndexesResponse
|
3832 | * @static
|
3833 | * @param {Object.<string,*>} message Plain object to verify
|
3834 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
3835 | */
|
3836 | ListIndexesResponse.verify = function verify(message) {
|
3837 | if (typeof message !== "object" || message === null)
|
3838 | return "object expected";
|
3839 | if (message.indexes != null && message.hasOwnProperty("indexes")) {
|
3840 | if (!Array.isArray(message.indexes))
|
3841 | return "indexes: array expected";
|
3842 | for (var i = 0; i < message.indexes.length; ++i) {
|
3843 | var error = $root.google.datastore.admin.v1.Index.verify(message.indexes[i]);
|
3844 | if (error)
|
3845 | return "indexes." + error;
|
3846 | }
|
3847 | }
|
3848 | if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
|
3849 | if (!$util.isString(message.nextPageToken))
|
3850 | return "nextPageToken: string expected";
|
3851 | return null;
|
3852 | };
|
3853 |
|
3854 | /**
|
3855 | * Creates a ListIndexesResponse message from a plain object. Also converts values to their respective internal types.
|
3856 | * @function fromObject
|
3857 | * @memberof google.datastore.admin.v1.ListIndexesResponse
|
3858 | * @static
|
3859 | * @param {Object.<string,*>} object Plain object
|
3860 | * @returns {google.datastore.admin.v1.ListIndexesResponse} ListIndexesResponse
|
3861 | */
|
3862 | ListIndexesResponse.fromObject = function fromObject(object) {
|
3863 | if (object instanceof $root.google.datastore.admin.v1.ListIndexesResponse)
|
3864 | return object;
|
3865 | var message = new $root.google.datastore.admin.v1.ListIndexesResponse();
|
3866 | if (object.indexes) {
|
3867 | if (!Array.isArray(object.indexes))
|
3868 | throw TypeError(".google.datastore.admin.v1.ListIndexesResponse.indexes: array expected");
|
3869 | message.indexes = [];
|
3870 | for (var i = 0; i < object.indexes.length; ++i) {
|
3871 | if (typeof object.indexes[i] !== "object")
|
3872 | throw TypeError(".google.datastore.admin.v1.ListIndexesResponse.indexes: object expected");
|
3873 | message.indexes[i] = $root.google.datastore.admin.v1.Index.fromObject(object.indexes[i]);
|
3874 | }
|
3875 | }
|
3876 | if (object.nextPageToken != null)
|
3877 | message.nextPageToken = String(object.nextPageToken);
|
3878 | return message;
|
3879 | };
|
3880 |
|
3881 | /**
|
3882 | * Creates a plain object from a ListIndexesResponse message. Also converts values to other types if specified.
|
3883 | * @function toObject
|
3884 | * @memberof google.datastore.admin.v1.ListIndexesResponse
|
3885 | * @static
|
3886 | * @param {google.datastore.admin.v1.ListIndexesResponse} message ListIndexesResponse
|
3887 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
3888 | * @returns {Object.<string,*>} Plain object
|
3889 | */
|
3890 | ListIndexesResponse.toObject = function toObject(message, options) {
|
3891 | if (!options)
|
3892 | options = {};
|
3893 | var object = {};
|
3894 | if (options.arrays || options.defaults)
|
3895 | object.indexes = [];
|
3896 | if (options.defaults)
|
3897 | object.nextPageToken = "";
|
3898 | if (message.indexes && message.indexes.length) {
|
3899 | object.indexes = [];
|
3900 | for (var j = 0; j < message.indexes.length; ++j)
|
3901 | object.indexes[j] = $root.google.datastore.admin.v1.Index.toObject(message.indexes[j], options);
|
3902 | }
|
3903 | if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
|
3904 | object.nextPageToken = message.nextPageToken;
|
3905 | return object;
|
3906 | };
|
3907 |
|
3908 | /**
|
3909 | * Converts this ListIndexesResponse to JSON.
|
3910 | * @function toJSON
|
3911 | * @memberof google.datastore.admin.v1.ListIndexesResponse
|
3912 | * @instance
|
3913 | * @returns {Object.<string,*>} JSON object
|
3914 | */
|
3915 | ListIndexesResponse.prototype.toJSON = function toJSON() {
|
3916 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
3917 | };
|
3918 |
|
3919 | /**
|
3920 | * Gets the default type url for ListIndexesResponse
|
3921 | * @function getTypeUrl
|
3922 | * @memberof google.datastore.admin.v1.ListIndexesResponse
|
3923 | * @static
|
3924 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
3925 | * @returns {string} The default type url
|
3926 | */
|
3927 | ListIndexesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
3928 | if (typeUrlPrefix === undefined) {
|
3929 | typeUrlPrefix = "type.googleapis.com";
|
3930 | }
|
3931 | return typeUrlPrefix + "/google.datastore.admin.v1.ListIndexesResponse";
|
3932 | };
|
3933 |
|
3934 | return ListIndexesResponse;
|
3935 | })();
|
3936 |
|
3937 | v1.IndexOperationMetadata = (function() {
|
3938 |
|
3939 | /**
|
3940 | * Properties of an IndexOperationMetadata.
|
3941 | * @memberof google.datastore.admin.v1
|
3942 | * @interface IIndexOperationMetadata
|
3943 | * @property {google.datastore.admin.v1.ICommonMetadata|null} [common] IndexOperationMetadata common
|
3944 | * @property {google.datastore.admin.v1.IProgress|null} [progressEntities] IndexOperationMetadata progressEntities
|
3945 | * @property {string|null} [indexId] IndexOperationMetadata indexId
|
3946 | */
|
3947 |
|
3948 | /**
|
3949 | * Constructs a new IndexOperationMetadata.
|
3950 | * @memberof google.datastore.admin.v1
|
3951 | * @classdesc Represents an IndexOperationMetadata.
|
3952 | * @implements IIndexOperationMetadata
|
3953 | * @constructor
|
3954 | * @param {google.datastore.admin.v1.IIndexOperationMetadata=} [properties] Properties to set
|
3955 | */
|
3956 | function IndexOperationMetadata(properties) {
|
3957 | if (properties)
|
3958 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
3959 | if (properties[keys[i]] != null)
|
3960 | this[keys[i]] = properties[keys[i]];
|
3961 | }
|
3962 |
|
3963 | /**
|
3964 | * IndexOperationMetadata common.
|
3965 | * @member {google.datastore.admin.v1.ICommonMetadata|null|undefined} common
|
3966 | * @memberof google.datastore.admin.v1.IndexOperationMetadata
|
3967 | * @instance
|
3968 | */
|
3969 | IndexOperationMetadata.prototype.common = null;
|
3970 |
|
3971 | /**
|
3972 | * IndexOperationMetadata progressEntities.
|
3973 | * @member {google.datastore.admin.v1.IProgress|null|undefined} progressEntities
|
3974 | * @memberof google.datastore.admin.v1.IndexOperationMetadata
|
3975 | * @instance
|
3976 | */
|
3977 | IndexOperationMetadata.prototype.progressEntities = null;
|
3978 |
|
3979 | /**
|
3980 | * IndexOperationMetadata indexId.
|
3981 | * @member {string} indexId
|
3982 | * @memberof google.datastore.admin.v1.IndexOperationMetadata
|
3983 | * @instance
|
3984 | */
|
3985 | IndexOperationMetadata.prototype.indexId = "";
|
3986 |
|
3987 | /**
|
3988 | * Creates a new IndexOperationMetadata instance using the specified properties.
|
3989 | * @function create
|
3990 | * @memberof google.datastore.admin.v1.IndexOperationMetadata
|
3991 | * @static
|
3992 | * @param {google.datastore.admin.v1.IIndexOperationMetadata=} [properties] Properties to set
|
3993 | * @returns {google.datastore.admin.v1.IndexOperationMetadata} IndexOperationMetadata instance
|
3994 | */
|
3995 | IndexOperationMetadata.create = function create(properties) {
|
3996 | return new IndexOperationMetadata(properties);
|
3997 | };
|
3998 |
|
3999 | /**
|
4000 | * Encodes the specified IndexOperationMetadata message. Does not implicitly {@link google.datastore.admin.v1.IndexOperationMetadata.verify|verify} messages.
|
4001 | * @function encode
|
4002 | * @memberof google.datastore.admin.v1.IndexOperationMetadata
|
4003 | * @static
|
4004 | * @param {google.datastore.admin.v1.IIndexOperationMetadata} message IndexOperationMetadata message or plain object to encode
|
4005 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
4006 | * @returns {$protobuf.Writer} Writer
|
4007 | */
|
4008 | IndexOperationMetadata.encode = function encode(message, writer) {
|
4009 | if (!writer)
|
4010 | writer = $Writer.create();
|
4011 | if (message.common != null && Object.hasOwnProperty.call(message, "common"))
|
4012 | $root.google.datastore.admin.v1.CommonMetadata.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
4013 | if (message.progressEntities != null && Object.hasOwnProperty.call(message, "progressEntities"))
|
4014 | $root.google.datastore.admin.v1.Progress.encode(message.progressEntities, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
4015 | if (message.indexId != null && Object.hasOwnProperty.call(message, "indexId"))
|
4016 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.indexId);
|
4017 | return writer;
|
4018 | };
|
4019 |
|
4020 | /**
|
4021 | * Encodes the specified IndexOperationMetadata message, length delimited. Does not implicitly {@link google.datastore.admin.v1.IndexOperationMetadata.verify|verify} messages.
|
4022 | * @function encodeDelimited
|
4023 | * @memberof google.datastore.admin.v1.IndexOperationMetadata
|
4024 | * @static
|
4025 | * @param {google.datastore.admin.v1.IIndexOperationMetadata} message IndexOperationMetadata message or plain object to encode
|
4026 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
4027 | * @returns {$protobuf.Writer} Writer
|
4028 | */
|
4029 | IndexOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) {
|
4030 | return this.encode(message, writer).ldelim();
|
4031 | };
|
4032 |
|
4033 | /**
|
4034 | * Decodes an IndexOperationMetadata message from the specified reader or buffer.
|
4035 | * @function decode
|
4036 | * @memberof google.datastore.admin.v1.IndexOperationMetadata
|
4037 | * @static
|
4038 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
4039 | * @param {number} [length] Message length if known beforehand
|
4040 | * @returns {google.datastore.admin.v1.IndexOperationMetadata} IndexOperationMetadata
|
4041 | * @throws {Error} If the payload is not a reader or valid buffer
|
4042 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
4043 | */
|
4044 | IndexOperationMetadata.decode = function decode(reader, length) {
|
4045 | if (!(reader instanceof $Reader))
|
4046 | reader = $Reader.create(reader);
|
4047 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.IndexOperationMetadata();
|
4048 | while (reader.pos < end) {
|
4049 | var tag = reader.uint32();
|
4050 | switch (tag >>> 3) {
|
4051 | case 1: {
|
4052 | message.common = $root.google.datastore.admin.v1.CommonMetadata.decode(reader, reader.uint32());
|
4053 | break;
|
4054 | }
|
4055 | case 2: {
|
4056 | message.progressEntities = $root.google.datastore.admin.v1.Progress.decode(reader, reader.uint32());
|
4057 | break;
|
4058 | }
|
4059 | case 3: {
|
4060 | message.indexId = reader.string();
|
4061 | break;
|
4062 | }
|
4063 | default:
|
4064 | reader.skipType(tag & 7);
|
4065 | break;
|
4066 | }
|
4067 | }
|
4068 | return message;
|
4069 | };
|
4070 |
|
4071 | /**
|
4072 | * Decodes an IndexOperationMetadata message from the specified reader or buffer, length delimited.
|
4073 | * @function decodeDelimited
|
4074 | * @memberof google.datastore.admin.v1.IndexOperationMetadata
|
4075 | * @static
|
4076 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
4077 | * @returns {google.datastore.admin.v1.IndexOperationMetadata} IndexOperationMetadata
|
4078 | * @throws {Error} If the payload is not a reader or valid buffer
|
4079 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
4080 | */
|
4081 | IndexOperationMetadata.decodeDelimited = function decodeDelimited(reader) {
|
4082 | if (!(reader instanceof $Reader))
|
4083 | reader = new $Reader(reader);
|
4084 | return this.decode(reader, reader.uint32());
|
4085 | };
|
4086 |
|
4087 | /**
|
4088 | * Verifies an IndexOperationMetadata message.
|
4089 | * @function verify
|
4090 | * @memberof google.datastore.admin.v1.IndexOperationMetadata
|
4091 | * @static
|
4092 | * @param {Object.<string,*>} message Plain object to verify
|
4093 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
4094 | */
|
4095 | IndexOperationMetadata.verify = function verify(message) {
|
4096 | if (typeof message !== "object" || message === null)
|
4097 | return "object expected";
|
4098 | if (message.common != null && message.hasOwnProperty("common")) {
|
4099 | var error = $root.google.datastore.admin.v1.CommonMetadata.verify(message.common);
|
4100 | if (error)
|
4101 | return "common." + error;
|
4102 | }
|
4103 | if (message.progressEntities != null && message.hasOwnProperty("progressEntities")) {
|
4104 | var error = $root.google.datastore.admin.v1.Progress.verify(message.progressEntities);
|
4105 | if (error)
|
4106 | return "progressEntities." + error;
|
4107 | }
|
4108 | if (message.indexId != null && message.hasOwnProperty("indexId"))
|
4109 | if (!$util.isString(message.indexId))
|
4110 | return "indexId: string expected";
|
4111 | return null;
|
4112 | };
|
4113 |
|
4114 | /**
|
4115 | * Creates an IndexOperationMetadata message from a plain object. Also converts values to their respective internal types.
|
4116 | * @function fromObject
|
4117 | * @memberof google.datastore.admin.v1.IndexOperationMetadata
|
4118 | * @static
|
4119 | * @param {Object.<string,*>} object Plain object
|
4120 | * @returns {google.datastore.admin.v1.IndexOperationMetadata} IndexOperationMetadata
|
4121 | */
|
4122 | IndexOperationMetadata.fromObject = function fromObject(object) {
|
4123 | if (object instanceof $root.google.datastore.admin.v1.IndexOperationMetadata)
|
4124 | return object;
|
4125 | var message = new $root.google.datastore.admin.v1.IndexOperationMetadata();
|
4126 | if (object.common != null) {
|
4127 | if (typeof object.common !== "object")
|
4128 | throw TypeError(".google.datastore.admin.v1.IndexOperationMetadata.common: object expected");
|
4129 | message.common = $root.google.datastore.admin.v1.CommonMetadata.fromObject(object.common);
|
4130 | }
|
4131 | if (object.progressEntities != null) {
|
4132 | if (typeof object.progressEntities !== "object")
|
4133 | throw TypeError(".google.datastore.admin.v1.IndexOperationMetadata.progressEntities: object expected");
|
4134 | message.progressEntities = $root.google.datastore.admin.v1.Progress.fromObject(object.progressEntities);
|
4135 | }
|
4136 | if (object.indexId != null)
|
4137 | message.indexId = String(object.indexId);
|
4138 | return message;
|
4139 | };
|
4140 |
|
4141 | /**
|
4142 | * Creates a plain object from an IndexOperationMetadata message. Also converts values to other types if specified.
|
4143 | * @function toObject
|
4144 | * @memberof google.datastore.admin.v1.IndexOperationMetadata
|
4145 | * @static
|
4146 | * @param {google.datastore.admin.v1.IndexOperationMetadata} message IndexOperationMetadata
|
4147 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
4148 | * @returns {Object.<string,*>} Plain object
|
4149 | */
|
4150 | IndexOperationMetadata.toObject = function toObject(message, options) {
|
4151 | if (!options)
|
4152 | options = {};
|
4153 | var object = {};
|
4154 | if (options.defaults) {
|
4155 | object.common = null;
|
4156 | object.progressEntities = null;
|
4157 | object.indexId = "";
|
4158 | }
|
4159 | if (message.common != null && message.hasOwnProperty("common"))
|
4160 | object.common = $root.google.datastore.admin.v1.CommonMetadata.toObject(message.common, options);
|
4161 | if (message.progressEntities != null && message.hasOwnProperty("progressEntities"))
|
4162 | object.progressEntities = $root.google.datastore.admin.v1.Progress.toObject(message.progressEntities, options);
|
4163 | if (message.indexId != null && message.hasOwnProperty("indexId"))
|
4164 | object.indexId = message.indexId;
|
4165 | return object;
|
4166 | };
|
4167 |
|
4168 | /**
|
4169 | * Converts this IndexOperationMetadata to JSON.
|
4170 | * @function toJSON
|
4171 | * @memberof google.datastore.admin.v1.IndexOperationMetadata
|
4172 | * @instance
|
4173 | * @returns {Object.<string,*>} JSON object
|
4174 | */
|
4175 | IndexOperationMetadata.prototype.toJSON = function toJSON() {
|
4176 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
4177 | };
|
4178 |
|
4179 | /**
|
4180 | * Gets the default type url for IndexOperationMetadata
|
4181 | * @function getTypeUrl
|
4182 | * @memberof google.datastore.admin.v1.IndexOperationMetadata
|
4183 | * @static
|
4184 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
4185 | * @returns {string} The default type url
|
4186 | */
|
4187 | IndexOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
4188 | if (typeUrlPrefix === undefined) {
|
4189 | typeUrlPrefix = "type.googleapis.com";
|
4190 | }
|
4191 | return typeUrlPrefix + "/google.datastore.admin.v1.IndexOperationMetadata";
|
4192 | };
|
4193 |
|
4194 | return IndexOperationMetadata;
|
4195 | })();
|
4196 |
|
4197 | v1.DatastoreFirestoreMigrationMetadata = (function() {
|
4198 |
|
4199 | /**
|
4200 | * Properties of a DatastoreFirestoreMigrationMetadata.
|
4201 | * @memberof google.datastore.admin.v1
|
4202 | * @interface IDatastoreFirestoreMigrationMetadata
|
4203 | * @property {google.datastore.admin.v1.MigrationState|null} [migrationState] DatastoreFirestoreMigrationMetadata migrationState
|
4204 | * @property {google.datastore.admin.v1.MigrationStep|null} [migrationStep] DatastoreFirestoreMigrationMetadata migrationStep
|
4205 | */
|
4206 |
|
4207 | /**
|
4208 | * Constructs a new DatastoreFirestoreMigrationMetadata.
|
4209 | * @memberof google.datastore.admin.v1
|
4210 | * @classdesc Represents a DatastoreFirestoreMigrationMetadata.
|
4211 | * @implements IDatastoreFirestoreMigrationMetadata
|
4212 | * @constructor
|
4213 | * @param {google.datastore.admin.v1.IDatastoreFirestoreMigrationMetadata=} [properties] Properties to set
|
4214 | */
|
4215 | function DatastoreFirestoreMigrationMetadata(properties) {
|
4216 | if (properties)
|
4217 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
4218 | if (properties[keys[i]] != null)
|
4219 | this[keys[i]] = properties[keys[i]];
|
4220 | }
|
4221 |
|
4222 | /**
|
4223 | * DatastoreFirestoreMigrationMetadata migrationState.
|
4224 | * @member {google.datastore.admin.v1.MigrationState} migrationState
|
4225 | * @memberof google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata
|
4226 | * @instance
|
4227 | */
|
4228 | DatastoreFirestoreMigrationMetadata.prototype.migrationState = 0;
|
4229 |
|
4230 | /**
|
4231 | * DatastoreFirestoreMigrationMetadata migrationStep.
|
4232 | * @member {google.datastore.admin.v1.MigrationStep} migrationStep
|
4233 | * @memberof google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata
|
4234 | * @instance
|
4235 | */
|
4236 | DatastoreFirestoreMigrationMetadata.prototype.migrationStep = 0;
|
4237 |
|
4238 | /**
|
4239 | * Creates a new DatastoreFirestoreMigrationMetadata instance using the specified properties.
|
4240 | * @function create
|
4241 | * @memberof google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata
|
4242 | * @static
|
4243 | * @param {google.datastore.admin.v1.IDatastoreFirestoreMigrationMetadata=} [properties] Properties to set
|
4244 | * @returns {google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata} DatastoreFirestoreMigrationMetadata instance
|
4245 | */
|
4246 | DatastoreFirestoreMigrationMetadata.create = function create(properties) {
|
4247 | return new DatastoreFirestoreMigrationMetadata(properties);
|
4248 | };
|
4249 |
|
4250 | /**
|
4251 | * Encodes the specified DatastoreFirestoreMigrationMetadata message. Does not implicitly {@link google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata.verify|verify} messages.
|
4252 | * @function encode
|
4253 | * @memberof google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata
|
4254 | * @static
|
4255 | * @param {google.datastore.admin.v1.IDatastoreFirestoreMigrationMetadata} message DatastoreFirestoreMigrationMetadata message or plain object to encode
|
4256 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
4257 | * @returns {$protobuf.Writer} Writer
|
4258 | */
|
4259 | DatastoreFirestoreMigrationMetadata.encode = function encode(message, writer) {
|
4260 | if (!writer)
|
4261 | writer = $Writer.create();
|
4262 | if (message.migrationState != null && Object.hasOwnProperty.call(message, "migrationState"))
|
4263 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.migrationState);
|
4264 | if (message.migrationStep != null && Object.hasOwnProperty.call(message, "migrationStep"))
|
4265 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.migrationStep);
|
4266 | return writer;
|
4267 | };
|
4268 |
|
4269 | /**
|
4270 | * Encodes the specified DatastoreFirestoreMigrationMetadata message, length delimited. Does not implicitly {@link google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata.verify|verify} messages.
|
4271 | * @function encodeDelimited
|
4272 | * @memberof google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata
|
4273 | * @static
|
4274 | * @param {google.datastore.admin.v1.IDatastoreFirestoreMigrationMetadata} message DatastoreFirestoreMigrationMetadata message or plain object to encode
|
4275 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
4276 | * @returns {$protobuf.Writer} Writer
|
4277 | */
|
4278 | DatastoreFirestoreMigrationMetadata.encodeDelimited = function encodeDelimited(message, writer) {
|
4279 | return this.encode(message, writer).ldelim();
|
4280 | };
|
4281 |
|
4282 | /**
|
4283 | * Decodes a DatastoreFirestoreMigrationMetadata message from the specified reader or buffer.
|
4284 | * @function decode
|
4285 | * @memberof google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata
|
4286 | * @static
|
4287 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
4288 | * @param {number} [length] Message length if known beforehand
|
4289 | * @returns {google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata} DatastoreFirestoreMigrationMetadata
|
4290 | * @throws {Error} If the payload is not a reader or valid buffer
|
4291 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
4292 | */
|
4293 | DatastoreFirestoreMigrationMetadata.decode = function decode(reader, length) {
|
4294 | if (!(reader instanceof $Reader))
|
4295 | reader = $Reader.create(reader);
|
4296 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata();
|
4297 | while (reader.pos < end) {
|
4298 | var tag = reader.uint32();
|
4299 | switch (tag >>> 3) {
|
4300 | case 1: {
|
4301 | message.migrationState = reader.int32();
|
4302 | break;
|
4303 | }
|
4304 | case 2: {
|
4305 | message.migrationStep = reader.int32();
|
4306 | break;
|
4307 | }
|
4308 | default:
|
4309 | reader.skipType(tag & 7);
|
4310 | break;
|
4311 | }
|
4312 | }
|
4313 | return message;
|
4314 | };
|
4315 |
|
4316 | /**
|
4317 | * Decodes a DatastoreFirestoreMigrationMetadata message from the specified reader or buffer, length delimited.
|
4318 | * @function decodeDelimited
|
4319 | * @memberof google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata
|
4320 | * @static
|
4321 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
4322 | * @returns {google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata} DatastoreFirestoreMigrationMetadata
|
4323 | * @throws {Error} If the payload is not a reader or valid buffer
|
4324 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
4325 | */
|
4326 | DatastoreFirestoreMigrationMetadata.decodeDelimited = function decodeDelimited(reader) {
|
4327 | if (!(reader instanceof $Reader))
|
4328 | reader = new $Reader(reader);
|
4329 | return this.decode(reader, reader.uint32());
|
4330 | };
|
4331 |
|
4332 | /**
|
4333 | * Verifies a DatastoreFirestoreMigrationMetadata message.
|
4334 | * @function verify
|
4335 | * @memberof google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata
|
4336 | * @static
|
4337 | * @param {Object.<string,*>} message Plain object to verify
|
4338 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
4339 | */
|
4340 | DatastoreFirestoreMigrationMetadata.verify = function verify(message) {
|
4341 | if (typeof message !== "object" || message === null)
|
4342 | return "object expected";
|
4343 | if (message.migrationState != null && message.hasOwnProperty("migrationState"))
|
4344 | switch (message.migrationState) {
|
4345 | default:
|
4346 | return "migrationState: enum value expected";
|
4347 | case 0:
|
4348 | case 1:
|
4349 | case 2:
|
4350 | case 3:
|
4351 | break;
|
4352 | }
|
4353 | if (message.migrationStep != null && message.hasOwnProperty("migrationStep"))
|
4354 | switch (message.migrationStep) {
|
4355 | default:
|
4356 | return "migrationStep: enum value expected";
|
4357 | case 0:
|
4358 | case 6:
|
4359 | case 1:
|
4360 | case 7:
|
4361 | case 2:
|
4362 | case 3:
|
4363 | case 4:
|
4364 | case 5:
|
4365 | break;
|
4366 | }
|
4367 | return null;
|
4368 | };
|
4369 |
|
4370 | /**
|
4371 | * Creates a DatastoreFirestoreMigrationMetadata message from a plain object. Also converts values to their respective internal types.
|
4372 | * @function fromObject
|
4373 | * @memberof google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata
|
4374 | * @static
|
4375 | * @param {Object.<string,*>} object Plain object
|
4376 | * @returns {google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata} DatastoreFirestoreMigrationMetadata
|
4377 | */
|
4378 | DatastoreFirestoreMigrationMetadata.fromObject = function fromObject(object) {
|
4379 | if (object instanceof $root.google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata)
|
4380 | return object;
|
4381 | var message = new $root.google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata();
|
4382 | switch (object.migrationState) {
|
4383 | default:
|
4384 | if (typeof object.migrationState === "number") {
|
4385 | message.migrationState = object.migrationState;
|
4386 | break;
|
4387 | }
|
4388 | break;
|
4389 | case "MIGRATION_STATE_UNSPECIFIED":
|
4390 | case 0:
|
4391 | message.migrationState = 0;
|
4392 | break;
|
4393 | case "RUNNING":
|
4394 | case 1:
|
4395 | message.migrationState = 1;
|
4396 | break;
|
4397 | case "PAUSED":
|
4398 | case 2:
|
4399 | message.migrationState = 2;
|
4400 | break;
|
4401 | case "COMPLETE":
|
4402 | case 3:
|
4403 | message.migrationState = 3;
|
4404 | break;
|
4405 | }
|
4406 | switch (object.migrationStep) {
|
4407 | default:
|
4408 | if (typeof object.migrationStep === "number") {
|
4409 | message.migrationStep = object.migrationStep;
|
4410 | break;
|
4411 | }
|
4412 | break;
|
4413 | case "MIGRATION_STEP_UNSPECIFIED":
|
4414 | case 0:
|
4415 | message.migrationStep = 0;
|
4416 | break;
|
4417 | case "PREPARE":
|
4418 | case 6:
|
4419 | message.migrationStep = 6;
|
4420 | break;
|
4421 | case "START":
|
4422 | case 1:
|
4423 | message.migrationStep = 1;
|
4424 | break;
|
4425 | case "APPLY_WRITES_SYNCHRONOUSLY":
|
4426 | case 7:
|
4427 | message.migrationStep = 7;
|
4428 | break;
|
4429 | case "COPY_AND_VERIFY":
|
4430 | case 2:
|
4431 | message.migrationStep = 2;
|
4432 | break;
|
4433 | case "REDIRECT_EVENTUALLY_CONSISTENT_READS":
|
4434 | case 3:
|
4435 | message.migrationStep = 3;
|
4436 | break;
|
4437 | case "REDIRECT_STRONGLY_CONSISTENT_READS":
|
4438 | case 4:
|
4439 | message.migrationStep = 4;
|
4440 | break;
|
4441 | case "REDIRECT_WRITES":
|
4442 | case 5:
|
4443 | message.migrationStep = 5;
|
4444 | break;
|
4445 | }
|
4446 | return message;
|
4447 | };
|
4448 |
|
4449 | /**
|
4450 | * Creates a plain object from a DatastoreFirestoreMigrationMetadata message. Also converts values to other types if specified.
|
4451 | * @function toObject
|
4452 | * @memberof google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata
|
4453 | * @static
|
4454 | * @param {google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata} message DatastoreFirestoreMigrationMetadata
|
4455 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
4456 | * @returns {Object.<string,*>} Plain object
|
4457 | */
|
4458 | DatastoreFirestoreMigrationMetadata.toObject = function toObject(message, options) {
|
4459 | if (!options)
|
4460 | options = {};
|
4461 | var object = {};
|
4462 | if (options.defaults) {
|
4463 | object.migrationState = options.enums === String ? "MIGRATION_STATE_UNSPECIFIED" : 0;
|
4464 | object.migrationStep = options.enums === String ? "MIGRATION_STEP_UNSPECIFIED" : 0;
|
4465 | }
|
4466 | if (message.migrationState != null && message.hasOwnProperty("migrationState"))
|
4467 | object.migrationState = options.enums === String ? $root.google.datastore.admin.v1.MigrationState[message.migrationState] === undefined ? message.migrationState : $root.google.datastore.admin.v1.MigrationState[message.migrationState] : message.migrationState;
|
4468 | if (message.migrationStep != null && message.hasOwnProperty("migrationStep"))
|
4469 | object.migrationStep = options.enums === String ? $root.google.datastore.admin.v1.MigrationStep[message.migrationStep] === undefined ? message.migrationStep : $root.google.datastore.admin.v1.MigrationStep[message.migrationStep] : message.migrationStep;
|
4470 | return object;
|
4471 | };
|
4472 |
|
4473 | /**
|
4474 | * Converts this DatastoreFirestoreMigrationMetadata to JSON.
|
4475 | * @function toJSON
|
4476 | * @memberof google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata
|
4477 | * @instance
|
4478 | * @returns {Object.<string,*>} JSON object
|
4479 | */
|
4480 | DatastoreFirestoreMigrationMetadata.prototype.toJSON = function toJSON() {
|
4481 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
4482 | };
|
4483 |
|
4484 | /**
|
4485 | * Gets the default type url for DatastoreFirestoreMigrationMetadata
|
4486 | * @function getTypeUrl
|
4487 | * @memberof google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata
|
4488 | * @static
|
4489 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
4490 | * @returns {string} The default type url
|
4491 | */
|
4492 | DatastoreFirestoreMigrationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
4493 | if (typeUrlPrefix === undefined) {
|
4494 | typeUrlPrefix = "type.googleapis.com";
|
4495 | }
|
4496 | return typeUrlPrefix + "/google.datastore.admin.v1.DatastoreFirestoreMigrationMetadata";
|
4497 | };
|
4498 |
|
4499 | return DatastoreFirestoreMigrationMetadata;
|
4500 | })();
|
4501 |
|
4502 | /**
|
4503 | * OperationType enum.
|
4504 | * @name google.datastore.admin.v1.OperationType
|
4505 | * @enum {number}
|
4506 | * @property {number} OPERATION_TYPE_UNSPECIFIED=0 OPERATION_TYPE_UNSPECIFIED value
|
4507 | * @property {number} EXPORT_ENTITIES=1 EXPORT_ENTITIES value
|
4508 | * @property {number} IMPORT_ENTITIES=2 IMPORT_ENTITIES value
|
4509 | * @property {number} CREATE_INDEX=3 CREATE_INDEX value
|
4510 | * @property {number} DELETE_INDEX=4 DELETE_INDEX value
|
4511 | */
|
4512 | v1.OperationType = (function() {
|
4513 | var valuesById = {}, values = Object.create(valuesById);
|
4514 | values[valuesById[0] = "OPERATION_TYPE_UNSPECIFIED"] = 0;
|
4515 | values[valuesById[1] = "EXPORT_ENTITIES"] = 1;
|
4516 | values[valuesById[2] = "IMPORT_ENTITIES"] = 2;
|
4517 | values[valuesById[3] = "CREATE_INDEX"] = 3;
|
4518 | values[valuesById[4] = "DELETE_INDEX"] = 4;
|
4519 | return values;
|
4520 | })();
|
4521 |
|
4522 | v1.Index = (function() {
|
4523 |
|
4524 | /**
|
4525 | * Properties of an Index.
|
4526 | * @memberof google.datastore.admin.v1
|
4527 | * @interface IIndex
|
4528 | * @property {string|null} [projectId] Index projectId
|
4529 | * @property {string|null} [indexId] Index indexId
|
4530 | * @property {string|null} [kind] Index kind
|
4531 | * @property {google.datastore.admin.v1.Index.AncestorMode|null} [ancestor] Index ancestor
|
4532 | * @property {Array.<google.datastore.admin.v1.Index.IIndexedProperty>|null} [properties] Index properties
|
4533 | * @property {google.datastore.admin.v1.Index.State|null} [state] Index state
|
4534 | */
|
4535 |
|
4536 | /**
|
4537 | * Constructs a new Index.
|
4538 | * @memberof google.datastore.admin.v1
|
4539 | * @classdesc Represents an Index.
|
4540 | * @implements IIndex
|
4541 | * @constructor
|
4542 | * @param {google.datastore.admin.v1.IIndex=} [properties] Properties to set
|
4543 | */
|
4544 | function Index(properties) {
|
4545 | this.properties = [];
|
4546 | if (properties)
|
4547 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
4548 | if (properties[keys[i]] != null)
|
4549 | this[keys[i]] = properties[keys[i]];
|
4550 | }
|
4551 |
|
4552 | /**
|
4553 | * Index projectId.
|
4554 | * @member {string} projectId
|
4555 | * @memberof google.datastore.admin.v1.Index
|
4556 | * @instance
|
4557 | */
|
4558 | Index.prototype.projectId = "";
|
4559 |
|
4560 | /**
|
4561 | * Index indexId.
|
4562 | * @member {string} indexId
|
4563 | * @memberof google.datastore.admin.v1.Index
|
4564 | * @instance
|
4565 | */
|
4566 | Index.prototype.indexId = "";
|
4567 |
|
4568 | /**
|
4569 | * Index kind.
|
4570 | * @member {string} kind
|
4571 | * @memberof google.datastore.admin.v1.Index
|
4572 | * @instance
|
4573 | */
|
4574 | Index.prototype.kind = "";
|
4575 |
|
4576 | /**
|
4577 | * Index ancestor.
|
4578 | * @member {google.datastore.admin.v1.Index.AncestorMode} ancestor
|
4579 | * @memberof google.datastore.admin.v1.Index
|
4580 | * @instance
|
4581 | */
|
4582 | Index.prototype.ancestor = 0;
|
4583 |
|
4584 | /**
|
4585 | * Index properties.
|
4586 | * @member {Array.<google.datastore.admin.v1.Index.IIndexedProperty>} properties
|
4587 | * @memberof google.datastore.admin.v1.Index
|
4588 | * @instance
|
4589 | */
|
4590 | Index.prototype.properties = $util.emptyArray;
|
4591 |
|
4592 | /**
|
4593 | * Index state.
|
4594 | * @member {google.datastore.admin.v1.Index.State} state
|
4595 | * @memberof google.datastore.admin.v1.Index
|
4596 | * @instance
|
4597 | */
|
4598 | Index.prototype.state = 0;
|
4599 |
|
4600 | /**
|
4601 | * Creates a new Index instance using the specified properties.
|
4602 | * @function create
|
4603 | * @memberof google.datastore.admin.v1.Index
|
4604 | * @static
|
4605 | * @param {google.datastore.admin.v1.IIndex=} [properties] Properties to set
|
4606 | * @returns {google.datastore.admin.v1.Index} Index instance
|
4607 | */
|
4608 | Index.create = function create(properties) {
|
4609 | return new Index(properties);
|
4610 | };
|
4611 |
|
4612 | /**
|
4613 | * Encodes the specified Index message. Does not implicitly {@link google.datastore.admin.v1.Index.verify|verify} messages.
|
4614 | * @function encode
|
4615 | * @memberof google.datastore.admin.v1.Index
|
4616 | * @static
|
4617 | * @param {google.datastore.admin.v1.IIndex} message Index message or plain object to encode
|
4618 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
4619 | * @returns {$protobuf.Writer} Writer
|
4620 | */
|
4621 | Index.encode = function encode(message, writer) {
|
4622 | if (!writer)
|
4623 | writer = $Writer.create();
|
4624 | if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
|
4625 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId);
|
4626 | if (message.indexId != null && Object.hasOwnProperty.call(message, "indexId"))
|
4627 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.indexId);
|
4628 | if (message.kind != null && Object.hasOwnProperty.call(message, "kind"))
|
4629 | writer.uint32(/* id 4, wireType 2 =*/34).string(message.kind);
|
4630 | if (message.ancestor != null && Object.hasOwnProperty.call(message, "ancestor"))
|
4631 | writer.uint32(/* id 5, wireType 0 =*/40).int32(message.ancestor);
|
4632 | if (message.properties != null && message.properties.length)
|
4633 | for (var i = 0; i < message.properties.length; ++i)
|
4634 | $root.google.datastore.admin.v1.Index.IndexedProperty.encode(message.properties[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
4635 | if (message.state != null && Object.hasOwnProperty.call(message, "state"))
|
4636 | writer.uint32(/* id 7, wireType 0 =*/56).int32(message.state);
|
4637 | return writer;
|
4638 | };
|
4639 |
|
4640 | /**
|
4641 | * Encodes the specified Index message, length delimited. Does not implicitly {@link google.datastore.admin.v1.Index.verify|verify} messages.
|
4642 | * @function encodeDelimited
|
4643 | * @memberof google.datastore.admin.v1.Index
|
4644 | * @static
|
4645 | * @param {google.datastore.admin.v1.IIndex} message Index message or plain object to encode
|
4646 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
4647 | * @returns {$protobuf.Writer} Writer
|
4648 | */
|
4649 | Index.encodeDelimited = function encodeDelimited(message, writer) {
|
4650 | return this.encode(message, writer).ldelim();
|
4651 | };
|
4652 |
|
4653 | /**
|
4654 | * Decodes an Index message from the specified reader or buffer.
|
4655 | * @function decode
|
4656 | * @memberof google.datastore.admin.v1.Index
|
4657 | * @static
|
4658 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
4659 | * @param {number} [length] Message length if known beforehand
|
4660 | * @returns {google.datastore.admin.v1.Index} Index
|
4661 | * @throws {Error} If the payload is not a reader or valid buffer
|
4662 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
4663 | */
|
4664 | Index.decode = function decode(reader, length) {
|
4665 | if (!(reader instanceof $Reader))
|
4666 | reader = $Reader.create(reader);
|
4667 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.Index();
|
4668 | while (reader.pos < end) {
|
4669 | var tag = reader.uint32();
|
4670 | switch (tag >>> 3) {
|
4671 | case 1: {
|
4672 | message.projectId = reader.string();
|
4673 | break;
|
4674 | }
|
4675 | case 3: {
|
4676 | message.indexId = reader.string();
|
4677 | break;
|
4678 | }
|
4679 | case 4: {
|
4680 | message.kind = reader.string();
|
4681 | break;
|
4682 | }
|
4683 | case 5: {
|
4684 | message.ancestor = reader.int32();
|
4685 | break;
|
4686 | }
|
4687 | case 6: {
|
4688 | if (!(message.properties && message.properties.length))
|
4689 | message.properties = [];
|
4690 | message.properties.push($root.google.datastore.admin.v1.Index.IndexedProperty.decode(reader, reader.uint32()));
|
4691 | break;
|
4692 | }
|
4693 | case 7: {
|
4694 | message.state = reader.int32();
|
4695 | break;
|
4696 | }
|
4697 | default:
|
4698 | reader.skipType(tag & 7);
|
4699 | break;
|
4700 | }
|
4701 | }
|
4702 | return message;
|
4703 | };
|
4704 |
|
4705 | /**
|
4706 | * Decodes an Index message from the specified reader or buffer, length delimited.
|
4707 | * @function decodeDelimited
|
4708 | * @memberof google.datastore.admin.v1.Index
|
4709 | * @static
|
4710 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
4711 | * @returns {google.datastore.admin.v1.Index} Index
|
4712 | * @throws {Error} If the payload is not a reader or valid buffer
|
4713 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
4714 | */
|
4715 | Index.decodeDelimited = function decodeDelimited(reader) {
|
4716 | if (!(reader instanceof $Reader))
|
4717 | reader = new $Reader(reader);
|
4718 | return this.decode(reader, reader.uint32());
|
4719 | };
|
4720 |
|
4721 | /**
|
4722 | * Verifies an Index message.
|
4723 | * @function verify
|
4724 | * @memberof google.datastore.admin.v1.Index
|
4725 | * @static
|
4726 | * @param {Object.<string,*>} message Plain object to verify
|
4727 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
4728 | */
|
4729 | Index.verify = function verify(message) {
|
4730 | if (typeof message !== "object" || message === null)
|
4731 | return "object expected";
|
4732 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
4733 | if (!$util.isString(message.projectId))
|
4734 | return "projectId: string expected";
|
4735 | if (message.indexId != null && message.hasOwnProperty("indexId"))
|
4736 | if (!$util.isString(message.indexId))
|
4737 | return "indexId: string expected";
|
4738 | if (message.kind != null && message.hasOwnProperty("kind"))
|
4739 | if (!$util.isString(message.kind))
|
4740 | return "kind: string expected";
|
4741 | if (message.ancestor != null && message.hasOwnProperty("ancestor"))
|
4742 | switch (message.ancestor) {
|
4743 | default:
|
4744 | return "ancestor: enum value expected";
|
4745 | case 0:
|
4746 | case 1:
|
4747 | case 2:
|
4748 | break;
|
4749 | }
|
4750 | if (message.properties != null && message.hasOwnProperty("properties")) {
|
4751 | if (!Array.isArray(message.properties))
|
4752 | return "properties: array expected";
|
4753 | for (var i = 0; i < message.properties.length; ++i) {
|
4754 | var error = $root.google.datastore.admin.v1.Index.IndexedProperty.verify(message.properties[i]);
|
4755 | if (error)
|
4756 | return "properties." + error;
|
4757 | }
|
4758 | }
|
4759 | if (message.state != null && message.hasOwnProperty("state"))
|
4760 | switch (message.state) {
|
4761 | default:
|
4762 | return "state: enum value expected";
|
4763 | case 0:
|
4764 | case 1:
|
4765 | case 2:
|
4766 | case 3:
|
4767 | case 4:
|
4768 | break;
|
4769 | }
|
4770 | return null;
|
4771 | };
|
4772 |
|
4773 | /**
|
4774 | * Creates an Index message from a plain object. Also converts values to their respective internal types.
|
4775 | * @function fromObject
|
4776 | * @memberof google.datastore.admin.v1.Index
|
4777 | * @static
|
4778 | * @param {Object.<string,*>} object Plain object
|
4779 | * @returns {google.datastore.admin.v1.Index} Index
|
4780 | */
|
4781 | Index.fromObject = function fromObject(object) {
|
4782 | if (object instanceof $root.google.datastore.admin.v1.Index)
|
4783 | return object;
|
4784 | var message = new $root.google.datastore.admin.v1.Index();
|
4785 | if (object.projectId != null)
|
4786 | message.projectId = String(object.projectId);
|
4787 | if (object.indexId != null)
|
4788 | message.indexId = String(object.indexId);
|
4789 | if (object.kind != null)
|
4790 | message.kind = String(object.kind);
|
4791 | switch (object.ancestor) {
|
4792 | default:
|
4793 | if (typeof object.ancestor === "number") {
|
4794 | message.ancestor = object.ancestor;
|
4795 | break;
|
4796 | }
|
4797 | break;
|
4798 | case "ANCESTOR_MODE_UNSPECIFIED":
|
4799 | case 0:
|
4800 | message.ancestor = 0;
|
4801 | break;
|
4802 | case "NONE":
|
4803 | case 1:
|
4804 | message.ancestor = 1;
|
4805 | break;
|
4806 | case "ALL_ANCESTORS":
|
4807 | case 2:
|
4808 | message.ancestor = 2;
|
4809 | break;
|
4810 | }
|
4811 | if (object.properties) {
|
4812 | if (!Array.isArray(object.properties))
|
4813 | throw TypeError(".google.datastore.admin.v1.Index.properties: array expected");
|
4814 | message.properties = [];
|
4815 | for (var i = 0; i < object.properties.length; ++i) {
|
4816 | if (typeof object.properties[i] !== "object")
|
4817 | throw TypeError(".google.datastore.admin.v1.Index.properties: object expected");
|
4818 | message.properties[i] = $root.google.datastore.admin.v1.Index.IndexedProperty.fromObject(object.properties[i]);
|
4819 | }
|
4820 | }
|
4821 | switch (object.state) {
|
4822 | default:
|
4823 | if (typeof object.state === "number") {
|
4824 | message.state = object.state;
|
4825 | break;
|
4826 | }
|
4827 | break;
|
4828 | case "STATE_UNSPECIFIED":
|
4829 | case 0:
|
4830 | message.state = 0;
|
4831 | break;
|
4832 | case "CREATING":
|
4833 | case 1:
|
4834 | message.state = 1;
|
4835 | break;
|
4836 | case "READY":
|
4837 | case 2:
|
4838 | message.state = 2;
|
4839 | break;
|
4840 | case "DELETING":
|
4841 | case 3:
|
4842 | message.state = 3;
|
4843 | break;
|
4844 | case "ERROR":
|
4845 | case 4:
|
4846 | message.state = 4;
|
4847 | break;
|
4848 | }
|
4849 | return message;
|
4850 | };
|
4851 |
|
4852 | /**
|
4853 | * Creates a plain object from an Index message. Also converts values to other types if specified.
|
4854 | * @function toObject
|
4855 | * @memberof google.datastore.admin.v1.Index
|
4856 | * @static
|
4857 | * @param {google.datastore.admin.v1.Index} message Index
|
4858 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
4859 | * @returns {Object.<string,*>} Plain object
|
4860 | */
|
4861 | Index.toObject = function toObject(message, options) {
|
4862 | if (!options)
|
4863 | options = {};
|
4864 | var object = {};
|
4865 | if (options.arrays || options.defaults)
|
4866 | object.properties = [];
|
4867 | if (options.defaults) {
|
4868 | object.projectId = "";
|
4869 | object.indexId = "";
|
4870 | object.kind = "";
|
4871 | object.ancestor = options.enums === String ? "ANCESTOR_MODE_UNSPECIFIED" : 0;
|
4872 | object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
|
4873 | }
|
4874 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
4875 | object.projectId = message.projectId;
|
4876 | if (message.indexId != null && message.hasOwnProperty("indexId"))
|
4877 | object.indexId = message.indexId;
|
4878 | if (message.kind != null && message.hasOwnProperty("kind"))
|
4879 | object.kind = message.kind;
|
4880 | if (message.ancestor != null && message.hasOwnProperty("ancestor"))
|
4881 | object.ancestor = options.enums === String ? $root.google.datastore.admin.v1.Index.AncestorMode[message.ancestor] === undefined ? message.ancestor : $root.google.datastore.admin.v1.Index.AncestorMode[message.ancestor] : message.ancestor;
|
4882 | if (message.properties && message.properties.length) {
|
4883 | object.properties = [];
|
4884 | for (var j = 0; j < message.properties.length; ++j)
|
4885 | object.properties[j] = $root.google.datastore.admin.v1.Index.IndexedProperty.toObject(message.properties[j], options);
|
4886 | }
|
4887 | if (message.state != null && message.hasOwnProperty("state"))
|
4888 | object.state = options.enums === String ? $root.google.datastore.admin.v1.Index.State[message.state] === undefined ? message.state : $root.google.datastore.admin.v1.Index.State[message.state] : message.state;
|
4889 | return object;
|
4890 | };
|
4891 |
|
4892 | /**
|
4893 | * Converts this Index to JSON.
|
4894 | * @function toJSON
|
4895 | * @memberof google.datastore.admin.v1.Index
|
4896 | * @instance
|
4897 | * @returns {Object.<string,*>} JSON object
|
4898 | */
|
4899 | Index.prototype.toJSON = function toJSON() {
|
4900 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
4901 | };
|
4902 |
|
4903 | /**
|
4904 | * Gets the default type url for Index
|
4905 | * @function getTypeUrl
|
4906 | * @memberof google.datastore.admin.v1.Index
|
4907 | * @static
|
4908 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
4909 | * @returns {string} The default type url
|
4910 | */
|
4911 | Index.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
4912 | if (typeUrlPrefix === undefined) {
|
4913 | typeUrlPrefix = "type.googleapis.com";
|
4914 | }
|
4915 | return typeUrlPrefix + "/google.datastore.admin.v1.Index";
|
4916 | };
|
4917 |
|
4918 | /**
|
4919 | * AncestorMode enum.
|
4920 | * @name google.datastore.admin.v1.Index.AncestorMode
|
4921 | * @enum {number}
|
4922 | * @property {number} ANCESTOR_MODE_UNSPECIFIED=0 ANCESTOR_MODE_UNSPECIFIED value
|
4923 | * @property {number} NONE=1 NONE value
|
4924 | * @property {number} ALL_ANCESTORS=2 ALL_ANCESTORS value
|
4925 | */
|
4926 | Index.AncestorMode = (function() {
|
4927 | var valuesById = {}, values = Object.create(valuesById);
|
4928 | values[valuesById[0] = "ANCESTOR_MODE_UNSPECIFIED"] = 0;
|
4929 | values[valuesById[1] = "NONE"] = 1;
|
4930 | values[valuesById[2] = "ALL_ANCESTORS"] = 2;
|
4931 | return values;
|
4932 | })();
|
4933 |
|
4934 | /**
|
4935 | * Direction enum.
|
4936 | * @name google.datastore.admin.v1.Index.Direction
|
4937 | * @enum {number}
|
4938 | * @property {number} DIRECTION_UNSPECIFIED=0 DIRECTION_UNSPECIFIED value
|
4939 | * @property {number} ASCENDING=1 ASCENDING value
|
4940 | * @property {number} DESCENDING=2 DESCENDING value
|
4941 | */
|
4942 | Index.Direction = (function() {
|
4943 | var valuesById = {}, values = Object.create(valuesById);
|
4944 | values[valuesById[0] = "DIRECTION_UNSPECIFIED"] = 0;
|
4945 | values[valuesById[1] = "ASCENDING"] = 1;
|
4946 | values[valuesById[2] = "DESCENDING"] = 2;
|
4947 | return values;
|
4948 | })();
|
4949 |
|
4950 | Index.IndexedProperty = (function() {
|
4951 |
|
4952 | /**
|
4953 | * Properties of an IndexedProperty.
|
4954 | * @memberof google.datastore.admin.v1.Index
|
4955 | * @interface IIndexedProperty
|
4956 | * @property {string|null} [name] IndexedProperty name
|
4957 | * @property {google.datastore.admin.v1.Index.Direction|null} [direction] IndexedProperty direction
|
4958 | */
|
4959 |
|
4960 | /**
|
4961 | * Constructs a new IndexedProperty.
|
4962 | * @memberof google.datastore.admin.v1.Index
|
4963 | * @classdesc Represents an IndexedProperty.
|
4964 | * @implements IIndexedProperty
|
4965 | * @constructor
|
4966 | * @param {google.datastore.admin.v1.Index.IIndexedProperty=} [properties] Properties to set
|
4967 | */
|
4968 | function IndexedProperty(properties) {
|
4969 | if (properties)
|
4970 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
4971 | if (properties[keys[i]] != null)
|
4972 | this[keys[i]] = properties[keys[i]];
|
4973 | }
|
4974 |
|
4975 | /**
|
4976 | * IndexedProperty name.
|
4977 | * @member {string} name
|
4978 | * @memberof google.datastore.admin.v1.Index.IndexedProperty
|
4979 | * @instance
|
4980 | */
|
4981 | IndexedProperty.prototype.name = "";
|
4982 |
|
4983 | /**
|
4984 | * IndexedProperty direction.
|
4985 | * @member {google.datastore.admin.v1.Index.Direction} direction
|
4986 | * @memberof google.datastore.admin.v1.Index.IndexedProperty
|
4987 | * @instance
|
4988 | */
|
4989 | IndexedProperty.prototype.direction = 0;
|
4990 |
|
4991 | /**
|
4992 | * Creates a new IndexedProperty instance using the specified properties.
|
4993 | * @function create
|
4994 | * @memberof google.datastore.admin.v1.Index.IndexedProperty
|
4995 | * @static
|
4996 | * @param {google.datastore.admin.v1.Index.IIndexedProperty=} [properties] Properties to set
|
4997 | * @returns {google.datastore.admin.v1.Index.IndexedProperty} IndexedProperty instance
|
4998 | */
|
4999 | IndexedProperty.create = function create(properties) {
|
5000 | return new IndexedProperty(properties);
|
5001 | };
|
5002 |
|
5003 | /**
|
5004 | * Encodes the specified IndexedProperty message. Does not implicitly {@link google.datastore.admin.v1.Index.IndexedProperty.verify|verify} messages.
|
5005 | * @function encode
|
5006 | * @memberof google.datastore.admin.v1.Index.IndexedProperty
|
5007 | * @static
|
5008 | * @param {google.datastore.admin.v1.Index.IIndexedProperty} message IndexedProperty message or plain object to encode
|
5009 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
5010 | * @returns {$protobuf.Writer} Writer
|
5011 | */
|
5012 | IndexedProperty.encode = function encode(message, writer) {
|
5013 | if (!writer)
|
5014 | writer = $Writer.create();
|
5015 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
5016 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
5017 | if (message.direction != null && Object.hasOwnProperty.call(message, "direction"))
|
5018 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.direction);
|
5019 | return writer;
|
5020 | };
|
5021 |
|
5022 | /**
|
5023 | * Encodes the specified IndexedProperty message, length delimited. Does not implicitly {@link google.datastore.admin.v1.Index.IndexedProperty.verify|verify} messages.
|
5024 | * @function encodeDelimited
|
5025 | * @memberof google.datastore.admin.v1.Index.IndexedProperty
|
5026 | * @static
|
5027 | * @param {google.datastore.admin.v1.Index.IIndexedProperty} message IndexedProperty message or plain object to encode
|
5028 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
5029 | * @returns {$protobuf.Writer} Writer
|
5030 | */
|
5031 | IndexedProperty.encodeDelimited = function encodeDelimited(message, writer) {
|
5032 | return this.encode(message, writer).ldelim();
|
5033 | };
|
5034 |
|
5035 | /**
|
5036 | * Decodes an IndexedProperty message from the specified reader or buffer.
|
5037 | * @function decode
|
5038 | * @memberof google.datastore.admin.v1.Index.IndexedProperty
|
5039 | * @static
|
5040 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
5041 | * @param {number} [length] Message length if known beforehand
|
5042 | * @returns {google.datastore.admin.v1.Index.IndexedProperty} IndexedProperty
|
5043 | * @throws {Error} If the payload is not a reader or valid buffer
|
5044 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5045 | */
|
5046 | IndexedProperty.decode = function decode(reader, length) {
|
5047 | if (!(reader instanceof $Reader))
|
5048 | reader = $Reader.create(reader);
|
5049 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.Index.IndexedProperty();
|
5050 | while (reader.pos < end) {
|
5051 | var tag = reader.uint32();
|
5052 | switch (tag >>> 3) {
|
5053 | case 1: {
|
5054 | message.name = reader.string();
|
5055 | break;
|
5056 | }
|
5057 | case 2: {
|
5058 | message.direction = reader.int32();
|
5059 | break;
|
5060 | }
|
5061 | default:
|
5062 | reader.skipType(tag & 7);
|
5063 | break;
|
5064 | }
|
5065 | }
|
5066 | return message;
|
5067 | };
|
5068 |
|
5069 | /**
|
5070 | * Decodes an IndexedProperty message from the specified reader or buffer, length delimited.
|
5071 | * @function decodeDelimited
|
5072 | * @memberof google.datastore.admin.v1.Index.IndexedProperty
|
5073 | * @static
|
5074 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
5075 | * @returns {google.datastore.admin.v1.Index.IndexedProperty} IndexedProperty
|
5076 | * @throws {Error} If the payload is not a reader or valid buffer
|
5077 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5078 | */
|
5079 | IndexedProperty.decodeDelimited = function decodeDelimited(reader) {
|
5080 | if (!(reader instanceof $Reader))
|
5081 | reader = new $Reader(reader);
|
5082 | return this.decode(reader, reader.uint32());
|
5083 | };
|
5084 |
|
5085 | /**
|
5086 | * Verifies an IndexedProperty message.
|
5087 | * @function verify
|
5088 | * @memberof google.datastore.admin.v1.Index.IndexedProperty
|
5089 | * @static
|
5090 | * @param {Object.<string,*>} message Plain object to verify
|
5091 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
5092 | */
|
5093 | IndexedProperty.verify = function verify(message) {
|
5094 | if (typeof message !== "object" || message === null)
|
5095 | return "object expected";
|
5096 | if (message.name != null && message.hasOwnProperty("name"))
|
5097 | if (!$util.isString(message.name))
|
5098 | return "name: string expected";
|
5099 | if (message.direction != null && message.hasOwnProperty("direction"))
|
5100 | switch (message.direction) {
|
5101 | default:
|
5102 | return "direction: enum value expected";
|
5103 | case 0:
|
5104 | case 1:
|
5105 | case 2:
|
5106 | break;
|
5107 | }
|
5108 | return null;
|
5109 | };
|
5110 |
|
5111 | /**
|
5112 | * Creates an IndexedProperty message from a plain object. Also converts values to their respective internal types.
|
5113 | * @function fromObject
|
5114 | * @memberof google.datastore.admin.v1.Index.IndexedProperty
|
5115 | * @static
|
5116 | * @param {Object.<string,*>} object Plain object
|
5117 | * @returns {google.datastore.admin.v1.Index.IndexedProperty} IndexedProperty
|
5118 | */
|
5119 | IndexedProperty.fromObject = function fromObject(object) {
|
5120 | if (object instanceof $root.google.datastore.admin.v1.Index.IndexedProperty)
|
5121 | return object;
|
5122 | var message = new $root.google.datastore.admin.v1.Index.IndexedProperty();
|
5123 | if (object.name != null)
|
5124 | message.name = String(object.name);
|
5125 | switch (object.direction) {
|
5126 | default:
|
5127 | if (typeof object.direction === "number") {
|
5128 | message.direction = object.direction;
|
5129 | break;
|
5130 | }
|
5131 | break;
|
5132 | case "DIRECTION_UNSPECIFIED":
|
5133 | case 0:
|
5134 | message.direction = 0;
|
5135 | break;
|
5136 | case "ASCENDING":
|
5137 | case 1:
|
5138 | message.direction = 1;
|
5139 | break;
|
5140 | case "DESCENDING":
|
5141 | case 2:
|
5142 | message.direction = 2;
|
5143 | break;
|
5144 | }
|
5145 | return message;
|
5146 | };
|
5147 |
|
5148 | /**
|
5149 | * Creates a plain object from an IndexedProperty message. Also converts values to other types if specified.
|
5150 | * @function toObject
|
5151 | * @memberof google.datastore.admin.v1.Index.IndexedProperty
|
5152 | * @static
|
5153 | * @param {google.datastore.admin.v1.Index.IndexedProperty} message IndexedProperty
|
5154 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
5155 | * @returns {Object.<string,*>} Plain object
|
5156 | */
|
5157 | IndexedProperty.toObject = function toObject(message, options) {
|
5158 | if (!options)
|
5159 | options = {};
|
5160 | var object = {};
|
5161 | if (options.defaults) {
|
5162 | object.name = "";
|
5163 | object.direction = options.enums === String ? "DIRECTION_UNSPECIFIED" : 0;
|
5164 | }
|
5165 | if (message.name != null && message.hasOwnProperty("name"))
|
5166 | object.name = message.name;
|
5167 | if (message.direction != null && message.hasOwnProperty("direction"))
|
5168 | object.direction = options.enums === String ? $root.google.datastore.admin.v1.Index.Direction[message.direction] === undefined ? message.direction : $root.google.datastore.admin.v1.Index.Direction[message.direction] : message.direction;
|
5169 | return object;
|
5170 | };
|
5171 |
|
5172 | /**
|
5173 | * Converts this IndexedProperty to JSON.
|
5174 | * @function toJSON
|
5175 | * @memberof google.datastore.admin.v1.Index.IndexedProperty
|
5176 | * @instance
|
5177 | * @returns {Object.<string,*>} JSON object
|
5178 | */
|
5179 | IndexedProperty.prototype.toJSON = function toJSON() {
|
5180 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
5181 | };
|
5182 |
|
5183 | /**
|
5184 | * Gets the default type url for IndexedProperty
|
5185 | * @function getTypeUrl
|
5186 | * @memberof google.datastore.admin.v1.Index.IndexedProperty
|
5187 | * @static
|
5188 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
5189 | * @returns {string} The default type url
|
5190 | */
|
5191 | IndexedProperty.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
5192 | if (typeUrlPrefix === undefined) {
|
5193 | typeUrlPrefix = "type.googleapis.com";
|
5194 | }
|
5195 | return typeUrlPrefix + "/google.datastore.admin.v1.Index.IndexedProperty";
|
5196 | };
|
5197 |
|
5198 | return IndexedProperty;
|
5199 | })();
|
5200 |
|
5201 | /**
|
5202 | * State enum.
|
5203 | * @name google.datastore.admin.v1.Index.State
|
5204 | * @enum {number}
|
5205 | * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
|
5206 | * @property {number} CREATING=1 CREATING value
|
5207 | * @property {number} READY=2 READY value
|
5208 | * @property {number} DELETING=3 DELETING value
|
5209 | * @property {number} ERROR=4 ERROR value
|
5210 | */
|
5211 | Index.State = (function() {
|
5212 | var valuesById = {}, values = Object.create(valuesById);
|
5213 | values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
|
5214 | values[valuesById[1] = "CREATING"] = 1;
|
5215 | values[valuesById[2] = "READY"] = 2;
|
5216 | values[valuesById[3] = "DELETING"] = 3;
|
5217 | values[valuesById[4] = "ERROR"] = 4;
|
5218 | return values;
|
5219 | })();
|
5220 |
|
5221 | return Index;
|
5222 | })();
|
5223 |
|
5224 | v1.MigrationStateEvent = (function() {
|
5225 |
|
5226 | /**
|
5227 | * Properties of a MigrationStateEvent.
|
5228 | * @memberof google.datastore.admin.v1
|
5229 | * @interface IMigrationStateEvent
|
5230 | * @property {google.datastore.admin.v1.MigrationState|null} [state] MigrationStateEvent state
|
5231 | */
|
5232 |
|
5233 | /**
|
5234 | * Constructs a new MigrationStateEvent.
|
5235 | * @memberof google.datastore.admin.v1
|
5236 | * @classdesc Represents a MigrationStateEvent.
|
5237 | * @implements IMigrationStateEvent
|
5238 | * @constructor
|
5239 | * @param {google.datastore.admin.v1.IMigrationStateEvent=} [properties] Properties to set
|
5240 | */
|
5241 | function MigrationStateEvent(properties) {
|
5242 | if (properties)
|
5243 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
5244 | if (properties[keys[i]] != null)
|
5245 | this[keys[i]] = properties[keys[i]];
|
5246 | }
|
5247 |
|
5248 | /**
|
5249 | * MigrationStateEvent state.
|
5250 | * @member {google.datastore.admin.v1.MigrationState} state
|
5251 | * @memberof google.datastore.admin.v1.MigrationStateEvent
|
5252 | * @instance
|
5253 | */
|
5254 | MigrationStateEvent.prototype.state = 0;
|
5255 |
|
5256 | /**
|
5257 | * Creates a new MigrationStateEvent instance using the specified properties.
|
5258 | * @function create
|
5259 | * @memberof google.datastore.admin.v1.MigrationStateEvent
|
5260 | * @static
|
5261 | * @param {google.datastore.admin.v1.IMigrationStateEvent=} [properties] Properties to set
|
5262 | * @returns {google.datastore.admin.v1.MigrationStateEvent} MigrationStateEvent instance
|
5263 | */
|
5264 | MigrationStateEvent.create = function create(properties) {
|
5265 | return new MigrationStateEvent(properties);
|
5266 | };
|
5267 |
|
5268 | /**
|
5269 | * Encodes the specified MigrationStateEvent message. Does not implicitly {@link google.datastore.admin.v1.MigrationStateEvent.verify|verify} messages.
|
5270 | * @function encode
|
5271 | * @memberof google.datastore.admin.v1.MigrationStateEvent
|
5272 | * @static
|
5273 | * @param {google.datastore.admin.v1.IMigrationStateEvent} message MigrationStateEvent message or plain object to encode
|
5274 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
5275 | * @returns {$protobuf.Writer} Writer
|
5276 | */
|
5277 | MigrationStateEvent.encode = function encode(message, writer) {
|
5278 | if (!writer)
|
5279 | writer = $Writer.create();
|
5280 | if (message.state != null && Object.hasOwnProperty.call(message, "state"))
|
5281 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state);
|
5282 | return writer;
|
5283 | };
|
5284 |
|
5285 | /**
|
5286 | * Encodes the specified MigrationStateEvent message, length delimited. Does not implicitly {@link google.datastore.admin.v1.MigrationStateEvent.verify|verify} messages.
|
5287 | * @function encodeDelimited
|
5288 | * @memberof google.datastore.admin.v1.MigrationStateEvent
|
5289 | * @static
|
5290 | * @param {google.datastore.admin.v1.IMigrationStateEvent} message MigrationStateEvent message or plain object to encode
|
5291 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
5292 | * @returns {$protobuf.Writer} Writer
|
5293 | */
|
5294 | MigrationStateEvent.encodeDelimited = function encodeDelimited(message, writer) {
|
5295 | return this.encode(message, writer).ldelim();
|
5296 | };
|
5297 |
|
5298 | /**
|
5299 | * Decodes a MigrationStateEvent message from the specified reader or buffer.
|
5300 | * @function decode
|
5301 | * @memberof google.datastore.admin.v1.MigrationStateEvent
|
5302 | * @static
|
5303 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
5304 | * @param {number} [length] Message length if known beforehand
|
5305 | * @returns {google.datastore.admin.v1.MigrationStateEvent} MigrationStateEvent
|
5306 | * @throws {Error} If the payload is not a reader or valid buffer
|
5307 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5308 | */
|
5309 | MigrationStateEvent.decode = function decode(reader, length) {
|
5310 | if (!(reader instanceof $Reader))
|
5311 | reader = $Reader.create(reader);
|
5312 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.MigrationStateEvent();
|
5313 | while (reader.pos < end) {
|
5314 | var tag = reader.uint32();
|
5315 | switch (tag >>> 3) {
|
5316 | case 1: {
|
5317 | message.state = reader.int32();
|
5318 | break;
|
5319 | }
|
5320 | default:
|
5321 | reader.skipType(tag & 7);
|
5322 | break;
|
5323 | }
|
5324 | }
|
5325 | return message;
|
5326 | };
|
5327 |
|
5328 | /**
|
5329 | * Decodes a MigrationStateEvent message from the specified reader or buffer, length delimited.
|
5330 | * @function decodeDelimited
|
5331 | * @memberof google.datastore.admin.v1.MigrationStateEvent
|
5332 | * @static
|
5333 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
5334 | * @returns {google.datastore.admin.v1.MigrationStateEvent} MigrationStateEvent
|
5335 | * @throws {Error} If the payload is not a reader or valid buffer
|
5336 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5337 | */
|
5338 | MigrationStateEvent.decodeDelimited = function decodeDelimited(reader) {
|
5339 | if (!(reader instanceof $Reader))
|
5340 | reader = new $Reader(reader);
|
5341 | return this.decode(reader, reader.uint32());
|
5342 | };
|
5343 |
|
5344 | /**
|
5345 | * Verifies a MigrationStateEvent message.
|
5346 | * @function verify
|
5347 | * @memberof google.datastore.admin.v1.MigrationStateEvent
|
5348 | * @static
|
5349 | * @param {Object.<string,*>} message Plain object to verify
|
5350 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
5351 | */
|
5352 | MigrationStateEvent.verify = function verify(message) {
|
5353 | if (typeof message !== "object" || message === null)
|
5354 | return "object expected";
|
5355 | if (message.state != null && message.hasOwnProperty("state"))
|
5356 | switch (message.state) {
|
5357 | default:
|
5358 | return "state: enum value expected";
|
5359 | case 0:
|
5360 | case 1:
|
5361 | case 2:
|
5362 | case 3:
|
5363 | break;
|
5364 | }
|
5365 | return null;
|
5366 | };
|
5367 |
|
5368 | /**
|
5369 | * Creates a MigrationStateEvent message from a plain object. Also converts values to their respective internal types.
|
5370 | * @function fromObject
|
5371 | * @memberof google.datastore.admin.v1.MigrationStateEvent
|
5372 | * @static
|
5373 | * @param {Object.<string,*>} object Plain object
|
5374 | * @returns {google.datastore.admin.v1.MigrationStateEvent} MigrationStateEvent
|
5375 | */
|
5376 | MigrationStateEvent.fromObject = function fromObject(object) {
|
5377 | if (object instanceof $root.google.datastore.admin.v1.MigrationStateEvent)
|
5378 | return object;
|
5379 | var message = new $root.google.datastore.admin.v1.MigrationStateEvent();
|
5380 | switch (object.state) {
|
5381 | default:
|
5382 | if (typeof object.state === "number") {
|
5383 | message.state = object.state;
|
5384 | break;
|
5385 | }
|
5386 | break;
|
5387 | case "MIGRATION_STATE_UNSPECIFIED":
|
5388 | case 0:
|
5389 | message.state = 0;
|
5390 | break;
|
5391 | case "RUNNING":
|
5392 | case 1:
|
5393 | message.state = 1;
|
5394 | break;
|
5395 | case "PAUSED":
|
5396 | case 2:
|
5397 | message.state = 2;
|
5398 | break;
|
5399 | case "COMPLETE":
|
5400 | case 3:
|
5401 | message.state = 3;
|
5402 | break;
|
5403 | }
|
5404 | return message;
|
5405 | };
|
5406 |
|
5407 | /**
|
5408 | * Creates a plain object from a MigrationStateEvent message. Also converts values to other types if specified.
|
5409 | * @function toObject
|
5410 | * @memberof google.datastore.admin.v1.MigrationStateEvent
|
5411 | * @static
|
5412 | * @param {google.datastore.admin.v1.MigrationStateEvent} message MigrationStateEvent
|
5413 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
5414 | * @returns {Object.<string,*>} Plain object
|
5415 | */
|
5416 | MigrationStateEvent.toObject = function toObject(message, options) {
|
5417 | if (!options)
|
5418 | options = {};
|
5419 | var object = {};
|
5420 | if (options.defaults)
|
5421 | object.state = options.enums === String ? "MIGRATION_STATE_UNSPECIFIED" : 0;
|
5422 | if (message.state != null && message.hasOwnProperty("state"))
|
5423 | object.state = options.enums === String ? $root.google.datastore.admin.v1.MigrationState[message.state] === undefined ? message.state : $root.google.datastore.admin.v1.MigrationState[message.state] : message.state;
|
5424 | return object;
|
5425 | };
|
5426 |
|
5427 | /**
|
5428 | * Converts this MigrationStateEvent to JSON.
|
5429 | * @function toJSON
|
5430 | * @memberof google.datastore.admin.v1.MigrationStateEvent
|
5431 | * @instance
|
5432 | * @returns {Object.<string,*>} JSON object
|
5433 | */
|
5434 | MigrationStateEvent.prototype.toJSON = function toJSON() {
|
5435 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
5436 | };
|
5437 |
|
5438 | /**
|
5439 | * Gets the default type url for MigrationStateEvent
|
5440 | * @function getTypeUrl
|
5441 | * @memberof google.datastore.admin.v1.MigrationStateEvent
|
5442 | * @static
|
5443 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
5444 | * @returns {string} The default type url
|
5445 | */
|
5446 | MigrationStateEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
5447 | if (typeUrlPrefix === undefined) {
|
5448 | typeUrlPrefix = "type.googleapis.com";
|
5449 | }
|
5450 | return typeUrlPrefix + "/google.datastore.admin.v1.MigrationStateEvent";
|
5451 | };
|
5452 |
|
5453 | return MigrationStateEvent;
|
5454 | })();
|
5455 |
|
5456 | v1.MigrationProgressEvent = (function() {
|
5457 |
|
5458 | /**
|
5459 | * Properties of a MigrationProgressEvent.
|
5460 | * @memberof google.datastore.admin.v1
|
5461 | * @interface IMigrationProgressEvent
|
5462 | * @property {google.datastore.admin.v1.MigrationStep|null} [step] MigrationProgressEvent step
|
5463 | * @property {google.datastore.admin.v1.MigrationProgressEvent.IPrepareStepDetails|null} [prepareStepDetails] MigrationProgressEvent prepareStepDetails
|
5464 | * @property {google.datastore.admin.v1.MigrationProgressEvent.IRedirectWritesStepDetails|null} [redirectWritesStepDetails] MigrationProgressEvent redirectWritesStepDetails
|
5465 | */
|
5466 |
|
5467 | /**
|
5468 | * Constructs a new MigrationProgressEvent.
|
5469 | * @memberof google.datastore.admin.v1
|
5470 | * @classdesc Represents a MigrationProgressEvent.
|
5471 | * @implements IMigrationProgressEvent
|
5472 | * @constructor
|
5473 | * @param {google.datastore.admin.v1.IMigrationProgressEvent=} [properties] Properties to set
|
5474 | */
|
5475 | function MigrationProgressEvent(properties) {
|
5476 | if (properties)
|
5477 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
5478 | if (properties[keys[i]] != null)
|
5479 | this[keys[i]] = properties[keys[i]];
|
5480 | }
|
5481 |
|
5482 | /**
|
5483 | * MigrationProgressEvent step.
|
5484 | * @member {google.datastore.admin.v1.MigrationStep} step
|
5485 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
5486 | * @instance
|
5487 | */
|
5488 | MigrationProgressEvent.prototype.step = 0;
|
5489 |
|
5490 | /**
|
5491 | * MigrationProgressEvent prepareStepDetails.
|
5492 | * @member {google.datastore.admin.v1.MigrationProgressEvent.IPrepareStepDetails|null|undefined} prepareStepDetails
|
5493 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
5494 | * @instance
|
5495 | */
|
5496 | MigrationProgressEvent.prototype.prepareStepDetails = null;
|
5497 |
|
5498 | /**
|
5499 | * MigrationProgressEvent redirectWritesStepDetails.
|
5500 | * @member {google.datastore.admin.v1.MigrationProgressEvent.IRedirectWritesStepDetails|null|undefined} redirectWritesStepDetails
|
5501 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
5502 | * @instance
|
5503 | */
|
5504 | MigrationProgressEvent.prototype.redirectWritesStepDetails = null;
|
5505 |
|
5506 | // OneOf field names bound to virtual getters and setters
|
5507 | var $oneOfFields;
|
5508 |
|
5509 | /**
|
5510 | * MigrationProgressEvent stepDetails.
|
5511 | * @member {"prepareStepDetails"|"redirectWritesStepDetails"|undefined} stepDetails
|
5512 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
5513 | * @instance
|
5514 | */
|
5515 | Object.defineProperty(MigrationProgressEvent.prototype, "stepDetails", {
|
5516 | get: $util.oneOfGetter($oneOfFields = ["prepareStepDetails", "redirectWritesStepDetails"]),
|
5517 | set: $util.oneOfSetter($oneOfFields)
|
5518 | });
|
5519 |
|
5520 | /**
|
5521 | * Creates a new MigrationProgressEvent instance using the specified properties.
|
5522 | * @function create
|
5523 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
5524 | * @static
|
5525 | * @param {google.datastore.admin.v1.IMigrationProgressEvent=} [properties] Properties to set
|
5526 | * @returns {google.datastore.admin.v1.MigrationProgressEvent} MigrationProgressEvent instance
|
5527 | */
|
5528 | MigrationProgressEvent.create = function create(properties) {
|
5529 | return new MigrationProgressEvent(properties);
|
5530 | };
|
5531 |
|
5532 | /**
|
5533 | * Encodes the specified MigrationProgressEvent message. Does not implicitly {@link google.datastore.admin.v1.MigrationProgressEvent.verify|verify} messages.
|
5534 | * @function encode
|
5535 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
5536 | * @static
|
5537 | * @param {google.datastore.admin.v1.IMigrationProgressEvent} message MigrationProgressEvent message or plain object to encode
|
5538 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
5539 | * @returns {$protobuf.Writer} Writer
|
5540 | */
|
5541 | MigrationProgressEvent.encode = function encode(message, writer) {
|
5542 | if (!writer)
|
5543 | writer = $Writer.create();
|
5544 | if (message.step != null && Object.hasOwnProperty.call(message, "step"))
|
5545 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.step);
|
5546 | if (message.prepareStepDetails != null && Object.hasOwnProperty.call(message, "prepareStepDetails"))
|
5547 | $root.google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails.encode(message.prepareStepDetails, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
5548 | if (message.redirectWritesStepDetails != null && Object.hasOwnProperty.call(message, "redirectWritesStepDetails"))
|
5549 | $root.google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails.encode(message.redirectWritesStepDetails, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
5550 | return writer;
|
5551 | };
|
5552 |
|
5553 | /**
|
5554 | * Encodes the specified MigrationProgressEvent message, length delimited. Does not implicitly {@link google.datastore.admin.v1.MigrationProgressEvent.verify|verify} messages.
|
5555 | * @function encodeDelimited
|
5556 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
5557 | * @static
|
5558 | * @param {google.datastore.admin.v1.IMigrationProgressEvent} message MigrationProgressEvent message or plain object to encode
|
5559 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
5560 | * @returns {$protobuf.Writer} Writer
|
5561 | */
|
5562 | MigrationProgressEvent.encodeDelimited = function encodeDelimited(message, writer) {
|
5563 | return this.encode(message, writer).ldelim();
|
5564 | };
|
5565 |
|
5566 | /**
|
5567 | * Decodes a MigrationProgressEvent message from the specified reader or buffer.
|
5568 | * @function decode
|
5569 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
5570 | * @static
|
5571 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
5572 | * @param {number} [length] Message length if known beforehand
|
5573 | * @returns {google.datastore.admin.v1.MigrationProgressEvent} MigrationProgressEvent
|
5574 | * @throws {Error} If the payload is not a reader or valid buffer
|
5575 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5576 | */
|
5577 | MigrationProgressEvent.decode = function decode(reader, length) {
|
5578 | if (!(reader instanceof $Reader))
|
5579 | reader = $Reader.create(reader);
|
5580 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.MigrationProgressEvent();
|
5581 | while (reader.pos < end) {
|
5582 | var tag = reader.uint32();
|
5583 | switch (tag >>> 3) {
|
5584 | case 1: {
|
5585 | message.step = reader.int32();
|
5586 | break;
|
5587 | }
|
5588 | case 2: {
|
5589 | message.prepareStepDetails = $root.google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails.decode(reader, reader.uint32());
|
5590 | break;
|
5591 | }
|
5592 | case 3: {
|
5593 | message.redirectWritesStepDetails = $root.google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails.decode(reader, reader.uint32());
|
5594 | break;
|
5595 | }
|
5596 | default:
|
5597 | reader.skipType(tag & 7);
|
5598 | break;
|
5599 | }
|
5600 | }
|
5601 | return message;
|
5602 | };
|
5603 |
|
5604 | /**
|
5605 | * Decodes a MigrationProgressEvent message from the specified reader or buffer, length delimited.
|
5606 | * @function decodeDelimited
|
5607 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
5608 | * @static
|
5609 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
5610 | * @returns {google.datastore.admin.v1.MigrationProgressEvent} MigrationProgressEvent
|
5611 | * @throws {Error} If the payload is not a reader or valid buffer
|
5612 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5613 | */
|
5614 | MigrationProgressEvent.decodeDelimited = function decodeDelimited(reader) {
|
5615 | if (!(reader instanceof $Reader))
|
5616 | reader = new $Reader(reader);
|
5617 | return this.decode(reader, reader.uint32());
|
5618 | };
|
5619 |
|
5620 | /**
|
5621 | * Verifies a MigrationProgressEvent message.
|
5622 | * @function verify
|
5623 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
5624 | * @static
|
5625 | * @param {Object.<string,*>} message Plain object to verify
|
5626 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
5627 | */
|
5628 | MigrationProgressEvent.verify = function verify(message) {
|
5629 | if (typeof message !== "object" || message === null)
|
5630 | return "object expected";
|
5631 | var properties = {};
|
5632 | if (message.step != null && message.hasOwnProperty("step"))
|
5633 | switch (message.step) {
|
5634 | default:
|
5635 | return "step: enum value expected";
|
5636 | case 0:
|
5637 | case 6:
|
5638 | case 1:
|
5639 | case 7:
|
5640 | case 2:
|
5641 | case 3:
|
5642 | case 4:
|
5643 | case 5:
|
5644 | break;
|
5645 | }
|
5646 | if (message.prepareStepDetails != null && message.hasOwnProperty("prepareStepDetails")) {
|
5647 | properties.stepDetails = 1;
|
5648 | {
|
5649 | var error = $root.google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails.verify(message.prepareStepDetails);
|
5650 | if (error)
|
5651 | return "prepareStepDetails." + error;
|
5652 | }
|
5653 | }
|
5654 | if (message.redirectWritesStepDetails != null && message.hasOwnProperty("redirectWritesStepDetails")) {
|
5655 | if (properties.stepDetails === 1)
|
5656 | return "stepDetails: multiple values";
|
5657 | properties.stepDetails = 1;
|
5658 | {
|
5659 | var error = $root.google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails.verify(message.redirectWritesStepDetails);
|
5660 | if (error)
|
5661 | return "redirectWritesStepDetails." + error;
|
5662 | }
|
5663 | }
|
5664 | return null;
|
5665 | };
|
5666 |
|
5667 | /**
|
5668 | * Creates a MigrationProgressEvent message from a plain object. Also converts values to their respective internal types.
|
5669 | * @function fromObject
|
5670 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
5671 | * @static
|
5672 | * @param {Object.<string,*>} object Plain object
|
5673 | * @returns {google.datastore.admin.v1.MigrationProgressEvent} MigrationProgressEvent
|
5674 | */
|
5675 | MigrationProgressEvent.fromObject = function fromObject(object) {
|
5676 | if (object instanceof $root.google.datastore.admin.v1.MigrationProgressEvent)
|
5677 | return object;
|
5678 | var message = new $root.google.datastore.admin.v1.MigrationProgressEvent();
|
5679 | switch (object.step) {
|
5680 | default:
|
5681 | if (typeof object.step === "number") {
|
5682 | message.step = object.step;
|
5683 | break;
|
5684 | }
|
5685 | break;
|
5686 | case "MIGRATION_STEP_UNSPECIFIED":
|
5687 | case 0:
|
5688 | message.step = 0;
|
5689 | break;
|
5690 | case "PREPARE":
|
5691 | case 6:
|
5692 | message.step = 6;
|
5693 | break;
|
5694 | case "START":
|
5695 | case 1:
|
5696 | message.step = 1;
|
5697 | break;
|
5698 | case "APPLY_WRITES_SYNCHRONOUSLY":
|
5699 | case 7:
|
5700 | message.step = 7;
|
5701 | break;
|
5702 | case "COPY_AND_VERIFY":
|
5703 | case 2:
|
5704 | message.step = 2;
|
5705 | break;
|
5706 | case "REDIRECT_EVENTUALLY_CONSISTENT_READS":
|
5707 | case 3:
|
5708 | message.step = 3;
|
5709 | break;
|
5710 | case "REDIRECT_STRONGLY_CONSISTENT_READS":
|
5711 | case 4:
|
5712 | message.step = 4;
|
5713 | break;
|
5714 | case "REDIRECT_WRITES":
|
5715 | case 5:
|
5716 | message.step = 5;
|
5717 | break;
|
5718 | }
|
5719 | if (object.prepareStepDetails != null) {
|
5720 | if (typeof object.prepareStepDetails !== "object")
|
5721 | throw TypeError(".google.datastore.admin.v1.MigrationProgressEvent.prepareStepDetails: object expected");
|
5722 | message.prepareStepDetails = $root.google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails.fromObject(object.prepareStepDetails);
|
5723 | }
|
5724 | if (object.redirectWritesStepDetails != null) {
|
5725 | if (typeof object.redirectWritesStepDetails !== "object")
|
5726 | throw TypeError(".google.datastore.admin.v1.MigrationProgressEvent.redirectWritesStepDetails: object expected");
|
5727 | message.redirectWritesStepDetails = $root.google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails.fromObject(object.redirectWritesStepDetails);
|
5728 | }
|
5729 | return message;
|
5730 | };
|
5731 |
|
5732 | /**
|
5733 | * Creates a plain object from a MigrationProgressEvent message. Also converts values to other types if specified.
|
5734 | * @function toObject
|
5735 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
5736 | * @static
|
5737 | * @param {google.datastore.admin.v1.MigrationProgressEvent} message MigrationProgressEvent
|
5738 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
5739 | * @returns {Object.<string,*>} Plain object
|
5740 | */
|
5741 | MigrationProgressEvent.toObject = function toObject(message, options) {
|
5742 | if (!options)
|
5743 | options = {};
|
5744 | var object = {};
|
5745 | if (options.defaults)
|
5746 | object.step = options.enums === String ? "MIGRATION_STEP_UNSPECIFIED" : 0;
|
5747 | if (message.step != null && message.hasOwnProperty("step"))
|
5748 | object.step = options.enums === String ? $root.google.datastore.admin.v1.MigrationStep[message.step] === undefined ? message.step : $root.google.datastore.admin.v1.MigrationStep[message.step] : message.step;
|
5749 | if (message.prepareStepDetails != null && message.hasOwnProperty("prepareStepDetails")) {
|
5750 | object.prepareStepDetails = $root.google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails.toObject(message.prepareStepDetails, options);
|
5751 | if (options.oneofs)
|
5752 | object.stepDetails = "prepareStepDetails";
|
5753 | }
|
5754 | if (message.redirectWritesStepDetails != null && message.hasOwnProperty("redirectWritesStepDetails")) {
|
5755 | object.redirectWritesStepDetails = $root.google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails.toObject(message.redirectWritesStepDetails, options);
|
5756 | if (options.oneofs)
|
5757 | object.stepDetails = "redirectWritesStepDetails";
|
5758 | }
|
5759 | return object;
|
5760 | };
|
5761 |
|
5762 | /**
|
5763 | * Converts this MigrationProgressEvent to JSON.
|
5764 | * @function toJSON
|
5765 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
5766 | * @instance
|
5767 | * @returns {Object.<string,*>} JSON object
|
5768 | */
|
5769 | MigrationProgressEvent.prototype.toJSON = function toJSON() {
|
5770 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
5771 | };
|
5772 |
|
5773 | /**
|
5774 | * Gets the default type url for MigrationProgressEvent
|
5775 | * @function getTypeUrl
|
5776 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
5777 | * @static
|
5778 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
5779 | * @returns {string} The default type url
|
5780 | */
|
5781 | MigrationProgressEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
5782 | if (typeUrlPrefix === undefined) {
|
5783 | typeUrlPrefix = "type.googleapis.com";
|
5784 | }
|
5785 | return typeUrlPrefix + "/google.datastore.admin.v1.MigrationProgressEvent";
|
5786 | };
|
5787 |
|
5788 | /**
|
5789 | * ConcurrencyMode enum.
|
5790 | * @name google.datastore.admin.v1.MigrationProgressEvent.ConcurrencyMode
|
5791 | * @enum {number}
|
5792 | * @property {number} CONCURRENCY_MODE_UNSPECIFIED=0 CONCURRENCY_MODE_UNSPECIFIED value
|
5793 | * @property {number} PESSIMISTIC=1 PESSIMISTIC value
|
5794 | * @property {number} OPTIMISTIC=2 OPTIMISTIC value
|
5795 | * @property {number} OPTIMISTIC_WITH_ENTITY_GROUPS=3 OPTIMISTIC_WITH_ENTITY_GROUPS value
|
5796 | */
|
5797 | MigrationProgressEvent.ConcurrencyMode = (function() {
|
5798 | var valuesById = {}, values = Object.create(valuesById);
|
5799 | values[valuesById[0] = "CONCURRENCY_MODE_UNSPECIFIED"] = 0;
|
5800 | values[valuesById[1] = "PESSIMISTIC"] = 1;
|
5801 | values[valuesById[2] = "OPTIMISTIC"] = 2;
|
5802 | values[valuesById[3] = "OPTIMISTIC_WITH_ENTITY_GROUPS"] = 3;
|
5803 | return values;
|
5804 | })();
|
5805 |
|
5806 | MigrationProgressEvent.PrepareStepDetails = (function() {
|
5807 |
|
5808 | /**
|
5809 | * Properties of a PrepareStepDetails.
|
5810 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
5811 | * @interface IPrepareStepDetails
|
5812 | * @property {google.datastore.admin.v1.MigrationProgressEvent.ConcurrencyMode|null} [concurrencyMode] PrepareStepDetails concurrencyMode
|
5813 | */
|
5814 |
|
5815 | /**
|
5816 | * Constructs a new PrepareStepDetails.
|
5817 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
5818 | * @classdesc Represents a PrepareStepDetails.
|
5819 | * @implements IPrepareStepDetails
|
5820 | * @constructor
|
5821 | * @param {google.datastore.admin.v1.MigrationProgressEvent.IPrepareStepDetails=} [properties] Properties to set
|
5822 | */
|
5823 | function PrepareStepDetails(properties) {
|
5824 | if (properties)
|
5825 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
5826 | if (properties[keys[i]] != null)
|
5827 | this[keys[i]] = properties[keys[i]];
|
5828 | }
|
5829 |
|
5830 | /**
|
5831 | * PrepareStepDetails concurrencyMode.
|
5832 | * @member {google.datastore.admin.v1.MigrationProgressEvent.ConcurrencyMode} concurrencyMode
|
5833 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails
|
5834 | * @instance
|
5835 | */
|
5836 | PrepareStepDetails.prototype.concurrencyMode = 0;
|
5837 |
|
5838 | /**
|
5839 | * Creates a new PrepareStepDetails instance using the specified properties.
|
5840 | * @function create
|
5841 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails
|
5842 | * @static
|
5843 | * @param {google.datastore.admin.v1.MigrationProgressEvent.IPrepareStepDetails=} [properties] Properties to set
|
5844 | * @returns {google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails} PrepareStepDetails instance
|
5845 | */
|
5846 | PrepareStepDetails.create = function create(properties) {
|
5847 | return new PrepareStepDetails(properties);
|
5848 | };
|
5849 |
|
5850 | /**
|
5851 | * Encodes the specified PrepareStepDetails message. Does not implicitly {@link google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails.verify|verify} messages.
|
5852 | * @function encode
|
5853 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails
|
5854 | * @static
|
5855 | * @param {google.datastore.admin.v1.MigrationProgressEvent.IPrepareStepDetails} message PrepareStepDetails message or plain object to encode
|
5856 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
5857 | * @returns {$protobuf.Writer} Writer
|
5858 | */
|
5859 | PrepareStepDetails.encode = function encode(message, writer) {
|
5860 | if (!writer)
|
5861 | writer = $Writer.create();
|
5862 | if (message.concurrencyMode != null && Object.hasOwnProperty.call(message, "concurrencyMode"))
|
5863 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.concurrencyMode);
|
5864 | return writer;
|
5865 | };
|
5866 |
|
5867 | /**
|
5868 | * Encodes the specified PrepareStepDetails message, length delimited. Does not implicitly {@link google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails.verify|verify} messages.
|
5869 | * @function encodeDelimited
|
5870 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails
|
5871 | * @static
|
5872 | * @param {google.datastore.admin.v1.MigrationProgressEvent.IPrepareStepDetails} message PrepareStepDetails message or plain object to encode
|
5873 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
5874 | * @returns {$protobuf.Writer} Writer
|
5875 | */
|
5876 | PrepareStepDetails.encodeDelimited = function encodeDelimited(message, writer) {
|
5877 | return this.encode(message, writer).ldelim();
|
5878 | };
|
5879 |
|
5880 | /**
|
5881 | * Decodes a PrepareStepDetails message from the specified reader or buffer.
|
5882 | * @function decode
|
5883 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails
|
5884 | * @static
|
5885 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
5886 | * @param {number} [length] Message length if known beforehand
|
5887 | * @returns {google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails} PrepareStepDetails
|
5888 | * @throws {Error} If the payload is not a reader or valid buffer
|
5889 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5890 | */
|
5891 | PrepareStepDetails.decode = function decode(reader, length) {
|
5892 | if (!(reader instanceof $Reader))
|
5893 | reader = $Reader.create(reader);
|
5894 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails();
|
5895 | while (reader.pos < end) {
|
5896 | var tag = reader.uint32();
|
5897 | switch (tag >>> 3) {
|
5898 | case 1: {
|
5899 | message.concurrencyMode = reader.int32();
|
5900 | break;
|
5901 | }
|
5902 | default:
|
5903 | reader.skipType(tag & 7);
|
5904 | break;
|
5905 | }
|
5906 | }
|
5907 | return message;
|
5908 | };
|
5909 |
|
5910 | /**
|
5911 | * Decodes a PrepareStepDetails message from the specified reader or buffer, length delimited.
|
5912 | * @function decodeDelimited
|
5913 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails
|
5914 | * @static
|
5915 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
5916 | * @returns {google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails} PrepareStepDetails
|
5917 | * @throws {Error} If the payload is not a reader or valid buffer
|
5918 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
5919 | */
|
5920 | PrepareStepDetails.decodeDelimited = function decodeDelimited(reader) {
|
5921 | if (!(reader instanceof $Reader))
|
5922 | reader = new $Reader(reader);
|
5923 | return this.decode(reader, reader.uint32());
|
5924 | };
|
5925 |
|
5926 | /**
|
5927 | * Verifies a PrepareStepDetails message.
|
5928 | * @function verify
|
5929 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails
|
5930 | * @static
|
5931 | * @param {Object.<string,*>} message Plain object to verify
|
5932 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
5933 | */
|
5934 | PrepareStepDetails.verify = function verify(message) {
|
5935 | if (typeof message !== "object" || message === null)
|
5936 | return "object expected";
|
5937 | if (message.concurrencyMode != null && message.hasOwnProperty("concurrencyMode"))
|
5938 | switch (message.concurrencyMode) {
|
5939 | default:
|
5940 | return "concurrencyMode: enum value expected";
|
5941 | case 0:
|
5942 | case 1:
|
5943 | case 2:
|
5944 | case 3:
|
5945 | break;
|
5946 | }
|
5947 | return null;
|
5948 | };
|
5949 |
|
5950 | /**
|
5951 | * Creates a PrepareStepDetails message from a plain object. Also converts values to their respective internal types.
|
5952 | * @function fromObject
|
5953 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails
|
5954 | * @static
|
5955 | * @param {Object.<string,*>} object Plain object
|
5956 | * @returns {google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails} PrepareStepDetails
|
5957 | */
|
5958 | PrepareStepDetails.fromObject = function fromObject(object) {
|
5959 | if (object instanceof $root.google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails)
|
5960 | return object;
|
5961 | var message = new $root.google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails();
|
5962 | switch (object.concurrencyMode) {
|
5963 | default:
|
5964 | if (typeof object.concurrencyMode === "number") {
|
5965 | message.concurrencyMode = object.concurrencyMode;
|
5966 | break;
|
5967 | }
|
5968 | break;
|
5969 | case "CONCURRENCY_MODE_UNSPECIFIED":
|
5970 | case 0:
|
5971 | message.concurrencyMode = 0;
|
5972 | break;
|
5973 | case "PESSIMISTIC":
|
5974 | case 1:
|
5975 | message.concurrencyMode = 1;
|
5976 | break;
|
5977 | case "OPTIMISTIC":
|
5978 | case 2:
|
5979 | message.concurrencyMode = 2;
|
5980 | break;
|
5981 | case "OPTIMISTIC_WITH_ENTITY_GROUPS":
|
5982 | case 3:
|
5983 | message.concurrencyMode = 3;
|
5984 | break;
|
5985 | }
|
5986 | return message;
|
5987 | };
|
5988 |
|
5989 | /**
|
5990 | * Creates a plain object from a PrepareStepDetails message. Also converts values to other types if specified.
|
5991 | * @function toObject
|
5992 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails
|
5993 | * @static
|
5994 | * @param {google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails} message PrepareStepDetails
|
5995 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
5996 | * @returns {Object.<string,*>} Plain object
|
5997 | */
|
5998 | PrepareStepDetails.toObject = function toObject(message, options) {
|
5999 | if (!options)
|
6000 | options = {};
|
6001 | var object = {};
|
6002 | if (options.defaults)
|
6003 | object.concurrencyMode = options.enums === String ? "CONCURRENCY_MODE_UNSPECIFIED" : 0;
|
6004 | if (message.concurrencyMode != null && message.hasOwnProperty("concurrencyMode"))
|
6005 | object.concurrencyMode = options.enums === String ? $root.google.datastore.admin.v1.MigrationProgressEvent.ConcurrencyMode[message.concurrencyMode] === undefined ? message.concurrencyMode : $root.google.datastore.admin.v1.MigrationProgressEvent.ConcurrencyMode[message.concurrencyMode] : message.concurrencyMode;
|
6006 | return object;
|
6007 | };
|
6008 |
|
6009 | /**
|
6010 | * Converts this PrepareStepDetails to JSON.
|
6011 | * @function toJSON
|
6012 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails
|
6013 | * @instance
|
6014 | * @returns {Object.<string,*>} JSON object
|
6015 | */
|
6016 | PrepareStepDetails.prototype.toJSON = function toJSON() {
|
6017 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
6018 | };
|
6019 |
|
6020 | /**
|
6021 | * Gets the default type url for PrepareStepDetails
|
6022 | * @function getTypeUrl
|
6023 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails
|
6024 | * @static
|
6025 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
6026 | * @returns {string} The default type url
|
6027 | */
|
6028 | PrepareStepDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
6029 | if (typeUrlPrefix === undefined) {
|
6030 | typeUrlPrefix = "type.googleapis.com";
|
6031 | }
|
6032 | return typeUrlPrefix + "/google.datastore.admin.v1.MigrationProgressEvent.PrepareStepDetails";
|
6033 | };
|
6034 |
|
6035 | return PrepareStepDetails;
|
6036 | })();
|
6037 |
|
6038 | MigrationProgressEvent.RedirectWritesStepDetails = (function() {
|
6039 |
|
6040 | /**
|
6041 | * Properties of a RedirectWritesStepDetails.
|
6042 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
6043 | * @interface IRedirectWritesStepDetails
|
6044 | * @property {google.datastore.admin.v1.MigrationProgressEvent.ConcurrencyMode|null} [concurrencyMode] RedirectWritesStepDetails concurrencyMode
|
6045 | */
|
6046 |
|
6047 | /**
|
6048 | * Constructs a new RedirectWritesStepDetails.
|
6049 | * @memberof google.datastore.admin.v1.MigrationProgressEvent
|
6050 | * @classdesc Represents a RedirectWritesStepDetails.
|
6051 | * @implements IRedirectWritesStepDetails
|
6052 | * @constructor
|
6053 | * @param {google.datastore.admin.v1.MigrationProgressEvent.IRedirectWritesStepDetails=} [properties] Properties to set
|
6054 | */
|
6055 | function RedirectWritesStepDetails(properties) {
|
6056 | if (properties)
|
6057 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
6058 | if (properties[keys[i]] != null)
|
6059 | this[keys[i]] = properties[keys[i]];
|
6060 | }
|
6061 |
|
6062 | /**
|
6063 | * RedirectWritesStepDetails concurrencyMode.
|
6064 | * @member {google.datastore.admin.v1.MigrationProgressEvent.ConcurrencyMode} concurrencyMode
|
6065 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails
|
6066 | * @instance
|
6067 | */
|
6068 | RedirectWritesStepDetails.prototype.concurrencyMode = 0;
|
6069 |
|
6070 | /**
|
6071 | * Creates a new RedirectWritesStepDetails instance using the specified properties.
|
6072 | * @function create
|
6073 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails
|
6074 | * @static
|
6075 | * @param {google.datastore.admin.v1.MigrationProgressEvent.IRedirectWritesStepDetails=} [properties] Properties to set
|
6076 | * @returns {google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails} RedirectWritesStepDetails instance
|
6077 | */
|
6078 | RedirectWritesStepDetails.create = function create(properties) {
|
6079 | return new RedirectWritesStepDetails(properties);
|
6080 | };
|
6081 |
|
6082 | /**
|
6083 | * Encodes the specified RedirectWritesStepDetails message. Does not implicitly {@link google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails.verify|verify} messages.
|
6084 | * @function encode
|
6085 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails
|
6086 | * @static
|
6087 | * @param {google.datastore.admin.v1.MigrationProgressEvent.IRedirectWritesStepDetails} message RedirectWritesStepDetails message or plain object to encode
|
6088 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
6089 | * @returns {$protobuf.Writer} Writer
|
6090 | */
|
6091 | RedirectWritesStepDetails.encode = function encode(message, writer) {
|
6092 | if (!writer)
|
6093 | writer = $Writer.create();
|
6094 | if (message.concurrencyMode != null && Object.hasOwnProperty.call(message, "concurrencyMode"))
|
6095 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.concurrencyMode);
|
6096 | return writer;
|
6097 | };
|
6098 |
|
6099 | /**
|
6100 | * Encodes the specified RedirectWritesStepDetails message, length delimited. Does not implicitly {@link google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails.verify|verify} messages.
|
6101 | * @function encodeDelimited
|
6102 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails
|
6103 | * @static
|
6104 | * @param {google.datastore.admin.v1.MigrationProgressEvent.IRedirectWritesStepDetails} message RedirectWritesStepDetails message or plain object to encode
|
6105 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
6106 | * @returns {$protobuf.Writer} Writer
|
6107 | */
|
6108 | RedirectWritesStepDetails.encodeDelimited = function encodeDelimited(message, writer) {
|
6109 | return this.encode(message, writer).ldelim();
|
6110 | };
|
6111 |
|
6112 | /**
|
6113 | * Decodes a RedirectWritesStepDetails message from the specified reader or buffer.
|
6114 | * @function decode
|
6115 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails
|
6116 | * @static
|
6117 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6118 | * @param {number} [length] Message length if known beforehand
|
6119 | * @returns {google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails} RedirectWritesStepDetails
|
6120 | * @throws {Error} If the payload is not a reader or valid buffer
|
6121 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6122 | */
|
6123 | RedirectWritesStepDetails.decode = function decode(reader, length) {
|
6124 | if (!(reader instanceof $Reader))
|
6125 | reader = $Reader.create(reader);
|
6126 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails();
|
6127 | while (reader.pos < end) {
|
6128 | var tag = reader.uint32();
|
6129 | switch (tag >>> 3) {
|
6130 | case 1: {
|
6131 | message.concurrencyMode = reader.int32();
|
6132 | break;
|
6133 | }
|
6134 | default:
|
6135 | reader.skipType(tag & 7);
|
6136 | break;
|
6137 | }
|
6138 | }
|
6139 | return message;
|
6140 | };
|
6141 |
|
6142 | /**
|
6143 | * Decodes a RedirectWritesStepDetails message from the specified reader or buffer, length delimited.
|
6144 | * @function decodeDelimited
|
6145 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails
|
6146 | * @static
|
6147 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6148 | * @returns {google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails} RedirectWritesStepDetails
|
6149 | * @throws {Error} If the payload is not a reader or valid buffer
|
6150 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6151 | */
|
6152 | RedirectWritesStepDetails.decodeDelimited = function decodeDelimited(reader) {
|
6153 | if (!(reader instanceof $Reader))
|
6154 | reader = new $Reader(reader);
|
6155 | return this.decode(reader, reader.uint32());
|
6156 | };
|
6157 |
|
6158 | /**
|
6159 | * Verifies a RedirectWritesStepDetails message.
|
6160 | * @function verify
|
6161 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails
|
6162 | * @static
|
6163 | * @param {Object.<string,*>} message Plain object to verify
|
6164 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
6165 | */
|
6166 | RedirectWritesStepDetails.verify = function verify(message) {
|
6167 | if (typeof message !== "object" || message === null)
|
6168 | return "object expected";
|
6169 | if (message.concurrencyMode != null && message.hasOwnProperty("concurrencyMode"))
|
6170 | switch (message.concurrencyMode) {
|
6171 | default:
|
6172 | return "concurrencyMode: enum value expected";
|
6173 | case 0:
|
6174 | case 1:
|
6175 | case 2:
|
6176 | case 3:
|
6177 | break;
|
6178 | }
|
6179 | return null;
|
6180 | };
|
6181 |
|
6182 | /**
|
6183 | * Creates a RedirectWritesStepDetails message from a plain object. Also converts values to their respective internal types.
|
6184 | * @function fromObject
|
6185 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails
|
6186 | * @static
|
6187 | * @param {Object.<string,*>} object Plain object
|
6188 | * @returns {google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails} RedirectWritesStepDetails
|
6189 | */
|
6190 | RedirectWritesStepDetails.fromObject = function fromObject(object) {
|
6191 | if (object instanceof $root.google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails)
|
6192 | return object;
|
6193 | var message = new $root.google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails();
|
6194 | switch (object.concurrencyMode) {
|
6195 | default:
|
6196 | if (typeof object.concurrencyMode === "number") {
|
6197 | message.concurrencyMode = object.concurrencyMode;
|
6198 | break;
|
6199 | }
|
6200 | break;
|
6201 | case "CONCURRENCY_MODE_UNSPECIFIED":
|
6202 | case 0:
|
6203 | message.concurrencyMode = 0;
|
6204 | break;
|
6205 | case "PESSIMISTIC":
|
6206 | case 1:
|
6207 | message.concurrencyMode = 1;
|
6208 | break;
|
6209 | case "OPTIMISTIC":
|
6210 | case 2:
|
6211 | message.concurrencyMode = 2;
|
6212 | break;
|
6213 | case "OPTIMISTIC_WITH_ENTITY_GROUPS":
|
6214 | case 3:
|
6215 | message.concurrencyMode = 3;
|
6216 | break;
|
6217 | }
|
6218 | return message;
|
6219 | };
|
6220 |
|
6221 | /**
|
6222 | * Creates a plain object from a RedirectWritesStepDetails message. Also converts values to other types if specified.
|
6223 | * @function toObject
|
6224 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails
|
6225 | * @static
|
6226 | * @param {google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails} message RedirectWritesStepDetails
|
6227 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
6228 | * @returns {Object.<string,*>} Plain object
|
6229 | */
|
6230 | RedirectWritesStepDetails.toObject = function toObject(message, options) {
|
6231 | if (!options)
|
6232 | options = {};
|
6233 | var object = {};
|
6234 | if (options.defaults)
|
6235 | object.concurrencyMode = options.enums === String ? "CONCURRENCY_MODE_UNSPECIFIED" : 0;
|
6236 | if (message.concurrencyMode != null && message.hasOwnProperty("concurrencyMode"))
|
6237 | object.concurrencyMode = options.enums === String ? $root.google.datastore.admin.v1.MigrationProgressEvent.ConcurrencyMode[message.concurrencyMode] === undefined ? message.concurrencyMode : $root.google.datastore.admin.v1.MigrationProgressEvent.ConcurrencyMode[message.concurrencyMode] : message.concurrencyMode;
|
6238 | return object;
|
6239 | };
|
6240 |
|
6241 | /**
|
6242 | * Converts this RedirectWritesStepDetails to JSON.
|
6243 | * @function toJSON
|
6244 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails
|
6245 | * @instance
|
6246 | * @returns {Object.<string,*>} JSON object
|
6247 | */
|
6248 | RedirectWritesStepDetails.prototype.toJSON = function toJSON() {
|
6249 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
6250 | };
|
6251 |
|
6252 | /**
|
6253 | * Gets the default type url for RedirectWritesStepDetails
|
6254 | * @function getTypeUrl
|
6255 | * @memberof google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails
|
6256 | * @static
|
6257 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
6258 | * @returns {string} The default type url
|
6259 | */
|
6260 | RedirectWritesStepDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
6261 | if (typeUrlPrefix === undefined) {
|
6262 | typeUrlPrefix = "type.googleapis.com";
|
6263 | }
|
6264 | return typeUrlPrefix + "/google.datastore.admin.v1.MigrationProgressEvent.RedirectWritesStepDetails";
|
6265 | };
|
6266 |
|
6267 | return RedirectWritesStepDetails;
|
6268 | })();
|
6269 |
|
6270 | return MigrationProgressEvent;
|
6271 | })();
|
6272 |
|
6273 | /**
|
6274 | * MigrationState enum.
|
6275 | * @name google.datastore.admin.v1.MigrationState
|
6276 | * @enum {number}
|
6277 | * @property {number} MIGRATION_STATE_UNSPECIFIED=0 MIGRATION_STATE_UNSPECIFIED value
|
6278 | * @property {number} RUNNING=1 RUNNING value
|
6279 | * @property {number} PAUSED=2 PAUSED value
|
6280 | * @property {number} COMPLETE=3 COMPLETE value
|
6281 | */
|
6282 | v1.MigrationState = (function() {
|
6283 | var valuesById = {}, values = Object.create(valuesById);
|
6284 | values[valuesById[0] = "MIGRATION_STATE_UNSPECIFIED"] = 0;
|
6285 | values[valuesById[1] = "RUNNING"] = 1;
|
6286 | values[valuesById[2] = "PAUSED"] = 2;
|
6287 | values[valuesById[3] = "COMPLETE"] = 3;
|
6288 | return values;
|
6289 | })();
|
6290 |
|
6291 | /**
|
6292 | * MigrationStep enum.
|
6293 | * @name google.datastore.admin.v1.MigrationStep
|
6294 | * @enum {number}
|
6295 | * @property {number} MIGRATION_STEP_UNSPECIFIED=0 MIGRATION_STEP_UNSPECIFIED value
|
6296 | * @property {number} PREPARE=6 PREPARE value
|
6297 | * @property {number} START=1 START value
|
6298 | * @property {number} APPLY_WRITES_SYNCHRONOUSLY=7 APPLY_WRITES_SYNCHRONOUSLY value
|
6299 | * @property {number} COPY_AND_VERIFY=2 COPY_AND_VERIFY value
|
6300 | * @property {number} REDIRECT_EVENTUALLY_CONSISTENT_READS=3 REDIRECT_EVENTUALLY_CONSISTENT_READS value
|
6301 | * @property {number} REDIRECT_STRONGLY_CONSISTENT_READS=4 REDIRECT_STRONGLY_CONSISTENT_READS value
|
6302 | * @property {number} REDIRECT_WRITES=5 REDIRECT_WRITES value
|
6303 | */
|
6304 | v1.MigrationStep = (function() {
|
6305 | var valuesById = {}, values = Object.create(valuesById);
|
6306 | values[valuesById[0] = "MIGRATION_STEP_UNSPECIFIED"] = 0;
|
6307 | values[valuesById[6] = "PREPARE"] = 6;
|
6308 | values[valuesById[1] = "START"] = 1;
|
6309 | values[valuesById[7] = "APPLY_WRITES_SYNCHRONOUSLY"] = 7;
|
6310 | values[valuesById[2] = "COPY_AND_VERIFY"] = 2;
|
6311 | values[valuesById[3] = "REDIRECT_EVENTUALLY_CONSISTENT_READS"] = 3;
|
6312 | values[valuesById[4] = "REDIRECT_STRONGLY_CONSISTENT_READS"] = 4;
|
6313 | values[valuesById[5] = "REDIRECT_WRITES"] = 5;
|
6314 | return values;
|
6315 | })();
|
6316 |
|
6317 | return v1;
|
6318 | })();
|
6319 |
|
6320 | return admin;
|
6321 | })();
|
6322 |
|
6323 | datastore.v1 = (function() {
|
6324 |
|
6325 | /**
|
6326 | * Namespace v1.
|
6327 | * @memberof google.datastore
|
6328 | * @namespace
|
6329 | */
|
6330 | var v1 = {};
|
6331 |
|
6332 | v1.AggregationResult = (function() {
|
6333 |
|
6334 | /**
|
6335 | * Properties of an AggregationResult.
|
6336 | * @memberof google.datastore.v1
|
6337 | * @interface IAggregationResult
|
6338 | * @property {Object.<string,google.datastore.v1.IValue>|null} [aggregateProperties] AggregationResult aggregateProperties
|
6339 | */
|
6340 |
|
6341 | /**
|
6342 | * Constructs a new AggregationResult.
|
6343 | * @memberof google.datastore.v1
|
6344 | * @classdesc Represents an AggregationResult.
|
6345 | * @implements IAggregationResult
|
6346 | * @constructor
|
6347 | * @param {google.datastore.v1.IAggregationResult=} [properties] Properties to set
|
6348 | */
|
6349 | function AggregationResult(properties) {
|
6350 | this.aggregateProperties = {};
|
6351 | if (properties)
|
6352 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
6353 | if (properties[keys[i]] != null)
|
6354 | this[keys[i]] = properties[keys[i]];
|
6355 | }
|
6356 |
|
6357 | /**
|
6358 | * AggregationResult aggregateProperties.
|
6359 | * @member {Object.<string,google.datastore.v1.IValue>} aggregateProperties
|
6360 | * @memberof google.datastore.v1.AggregationResult
|
6361 | * @instance
|
6362 | */
|
6363 | AggregationResult.prototype.aggregateProperties = $util.emptyObject;
|
6364 |
|
6365 | /**
|
6366 | * Creates a new AggregationResult instance using the specified properties.
|
6367 | * @function create
|
6368 | * @memberof google.datastore.v1.AggregationResult
|
6369 | * @static
|
6370 | * @param {google.datastore.v1.IAggregationResult=} [properties] Properties to set
|
6371 | * @returns {google.datastore.v1.AggregationResult} AggregationResult instance
|
6372 | */
|
6373 | AggregationResult.create = function create(properties) {
|
6374 | return new AggregationResult(properties);
|
6375 | };
|
6376 |
|
6377 | /**
|
6378 | * Encodes the specified AggregationResult message. Does not implicitly {@link google.datastore.v1.AggregationResult.verify|verify} messages.
|
6379 | * @function encode
|
6380 | * @memberof google.datastore.v1.AggregationResult
|
6381 | * @static
|
6382 | * @param {google.datastore.v1.IAggregationResult} message AggregationResult message or plain object to encode
|
6383 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
6384 | * @returns {$protobuf.Writer} Writer
|
6385 | */
|
6386 | AggregationResult.encode = function encode(message, writer) {
|
6387 | if (!writer)
|
6388 | writer = $Writer.create();
|
6389 | if (message.aggregateProperties != null && Object.hasOwnProperty.call(message, "aggregateProperties"))
|
6390 | for (var keys = Object.keys(message.aggregateProperties), i = 0; i < keys.length; ++i) {
|
6391 | writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
|
6392 | $root.google.datastore.v1.Value.encode(message.aggregateProperties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
6393 | }
|
6394 | return writer;
|
6395 | };
|
6396 |
|
6397 | /**
|
6398 | * Encodes the specified AggregationResult message, length delimited. Does not implicitly {@link google.datastore.v1.AggregationResult.verify|verify} messages.
|
6399 | * @function encodeDelimited
|
6400 | * @memberof google.datastore.v1.AggregationResult
|
6401 | * @static
|
6402 | * @param {google.datastore.v1.IAggregationResult} message AggregationResult message or plain object to encode
|
6403 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
6404 | * @returns {$protobuf.Writer} Writer
|
6405 | */
|
6406 | AggregationResult.encodeDelimited = function encodeDelimited(message, writer) {
|
6407 | return this.encode(message, writer).ldelim();
|
6408 | };
|
6409 |
|
6410 | /**
|
6411 | * Decodes an AggregationResult message from the specified reader or buffer.
|
6412 | * @function decode
|
6413 | * @memberof google.datastore.v1.AggregationResult
|
6414 | * @static
|
6415 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6416 | * @param {number} [length] Message length if known beforehand
|
6417 | * @returns {google.datastore.v1.AggregationResult} AggregationResult
|
6418 | * @throws {Error} If the payload is not a reader or valid buffer
|
6419 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6420 | */
|
6421 | AggregationResult.decode = function decode(reader, length) {
|
6422 | if (!(reader instanceof $Reader))
|
6423 | reader = $Reader.create(reader);
|
6424 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.AggregationResult(), key, value;
|
6425 | while (reader.pos < end) {
|
6426 | var tag = reader.uint32();
|
6427 | switch (tag >>> 3) {
|
6428 | case 2: {
|
6429 | if (message.aggregateProperties === $util.emptyObject)
|
6430 | message.aggregateProperties = {};
|
6431 | var end2 = reader.uint32() + reader.pos;
|
6432 | key = "";
|
6433 | value = null;
|
6434 | while (reader.pos < end2) {
|
6435 | var tag2 = reader.uint32();
|
6436 | switch (tag2 >>> 3) {
|
6437 | case 1:
|
6438 | key = reader.string();
|
6439 | break;
|
6440 | case 2:
|
6441 | value = $root.google.datastore.v1.Value.decode(reader, reader.uint32());
|
6442 | break;
|
6443 | default:
|
6444 | reader.skipType(tag2 & 7);
|
6445 | break;
|
6446 | }
|
6447 | }
|
6448 | message.aggregateProperties[key] = value;
|
6449 | break;
|
6450 | }
|
6451 | default:
|
6452 | reader.skipType(tag & 7);
|
6453 | break;
|
6454 | }
|
6455 | }
|
6456 | return message;
|
6457 | };
|
6458 |
|
6459 | /**
|
6460 | * Decodes an AggregationResult message from the specified reader or buffer, length delimited.
|
6461 | * @function decodeDelimited
|
6462 | * @memberof google.datastore.v1.AggregationResult
|
6463 | * @static
|
6464 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6465 | * @returns {google.datastore.v1.AggregationResult} AggregationResult
|
6466 | * @throws {Error} If the payload is not a reader or valid buffer
|
6467 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6468 | */
|
6469 | AggregationResult.decodeDelimited = function decodeDelimited(reader) {
|
6470 | if (!(reader instanceof $Reader))
|
6471 | reader = new $Reader(reader);
|
6472 | return this.decode(reader, reader.uint32());
|
6473 | };
|
6474 |
|
6475 | /**
|
6476 | * Verifies an AggregationResult message.
|
6477 | * @function verify
|
6478 | * @memberof google.datastore.v1.AggregationResult
|
6479 | * @static
|
6480 | * @param {Object.<string,*>} message Plain object to verify
|
6481 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
6482 | */
|
6483 | AggregationResult.verify = function verify(message) {
|
6484 | if (typeof message !== "object" || message === null)
|
6485 | return "object expected";
|
6486 | if (message.aggregateProperties != null && message.hasOwnProperty("aggregateProperties")) {
|
6487 | if (!$util.isObject(message.aggregateProperties))
|
6488 | return "aggregateProperties: object expected";
|
6489 | var key = Object.keys(message.aggregateProperties);
|
6490 | for (var i = 0; i < key.length; ++i) {
|
6491 | var error = $root.google.datastore.v1.Value.verify(message.aggregateProperties[key[i]]);
|
6492 | if (error)
|
6493 | return "aggregateProperties." + error;
|
6494 | }
|
6495 | }
|
6496 | return null;
|
6497 | };
|
6498 |
|
6499 | /**
|
6500 | * Creates an AggregationResult message from a plain object. Also converts values to their respective internal types.
|
6501 | * @function fromObject
|
6502 | * @memberof google.datastore.v1.AggregationResult
|
6503 | * @static
|
6504 | * @param {Object.<string,*>} object Plain object
|
6505 | * @returns {google.datastore.v1.AggregationResult} AggregationResult
|
6506 | */
|
6507 | AggregationResult.fromObject = function fromObject(object) {
|
6508 | if (object instanceof $root.google.datastore.v1.AggregationResult)
|
6509 | return object;
|
6510 | var message = new $root.google.datastore.v1.AggregationResult();
|
6511 | if (object.aggregateProperties) {
|
6512 | if (typeof object.aggregateProperties !== "object")
|
6513 | throw TypeError(".google.datastore.v1.AggregationResult.aggregateProperties: object expected");
|
6514 | message.aggregateProperties = {};
|
6515 | for (var keys = Object.keys(object.aggregateProperties), i = 0; i < keys.length; ++i) {
|
6516 | if (typeof object.aggregateProperties[keys[i]] !== "object")
|
6517 | throw TypeError(".google.datastore.v1.AggregationResult.aggregateProperties: object expected");
|
6518 | message.aggregateProperties[keys[i]] = $root.google.datastore.v1.Value.fromObject(object.aggregateProperties[keys[i]]);
|
6519 | }
|
6520 | }
|
6521 | return message;
|
6522 | };
|
6523 |
|
6524 | /**
|
6525 | * Creates a plain object from an AggregationResult message. Also converts values to other types if specified.
|
6526 | * @function toObject
|
6527 | * @memberof google.datastore.v1.AggregationResult
|
6528 | * @static
|
6529 | * @param {google.datastore.v1.AggregationResult} message AggregationResult
|
6530 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
6531 | * @returns {Object.<string,*>} Plain object
|
6532 | */
|
6533 | AggregationResult.toObject = function toObject(message, options) {
|
6534 | if (!options)
|
6535 | options = {};
|
6536 | var object = {};
|
6537 | if (options.objects || options.defaults)
|
6538 | object.aggregateProperties = {};
|
6539 | var keys2;
|
6540 | if (message.aggregateProperties && (keys2 = Object.keys(message.aggregateProperties)).length) {
|
6541 | object.aggregateProperties = {};
|
6542 | for (var j = 0; j < keys2.length; ++j)
|
6543 | object.aggregateProperties[keys2[j]] = $root.google.datastore.v1.Value.toObject(message.aggregateProperties[keys2[j]], options);
|
6544 | }
|
6545 | return object;
|
6546 | };
|
6547 |
|
6548 | /**
|
6549 | * Converts this AggregationResult to JSON.
|
6550 | * @function toJSON
|
6551 | * @memberof google.datastore.v1.AggregationResult
|
6552 | * @instance
|
6553 | * @returns {Object.<string,*>} JSON object
|
6554 | */
|
6555 | AggregationResult.prototype.toJSON = function toJSON() {
|
6556 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
6557 | };
|
6558 |
|
6559 | /**
|
6560 | * Gets the default type url for AggregationResult
|
6561 | * @function getTypeUrl
|
6562 | * @memberof google.datastore.v1.AggregationResult
|
6563 | * @static
|
6564 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
6565 | * @returns {string} The default type url
|
6566 | */
|
6567 | AggregationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
6568 | if (typeUrlPrefix === undefined) {
|
6569 | typeUrlPrefix = "type.googleapis.com";
|
6570 | }
|
6571 | return typeUrlPrefix + "/google.datastore.v1.AggregationResult";
|
6572 | };
|
6573 |
|
6574 | return AggregationResult;
|
6575 | })();
|
6576 |
|
6577 | v1.AggregationResultBatch = (function() {
|
6578 |
|
6579 | /**
|
6580 | * Properties of an AggregationResultBatch.
|
6581 | * @memberof google.datastore.v1
|
6582 | * @interface IAggregationResultBatch
|
6583 | * @property {Array.<google.datastore.v1.IAggregationResult>|null} [aggregationResults] AggregationResultBatch aggregationResults
|
6584 | * @property {google.datastore.v1.QueryResultBatch.MoreResultsType|null} [moreResults] AggregationResultBatch moreResults
|
6585 | * @property {google.protobuf.ITimestamp|null} [readTime] AggregationResultBatch readTime
|
6586 | */
|
6587 |
|
6588 | /**
|
6589 | * Constructs a new AggregationResultBatch.
|
6590 | * @memberof google.datastore.v1
|
6591 | * @classdesc Represents an AggregationResultBatch.
|
6592 | * @implements IAggregationResultBatch
|
6593 | * @constructor
|
6594 | * @param {google.datastore.v1.IAggregationResultBatch=} [properties] Properties to set
|
6595 | */
|
6596 | function AggregationResultBatch(properties) {
|
6597 | this.aggregationResults = [];
|
6598 | if (properties)
|
6599 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
6600 | if (properties[keys[i]] != null)
|
6601 | this[keys[i]] = properties[keys[i]];
|
6602 | }
|
6603 |
|
6604 | /**
|
6605 | * AggregationResultBatch aggregationResults.
|
6606 | * @member {Array.<google.datastore.v1.IAggregationResult>} aggregationResults
|
6607 | * @memberof google.datastore.v1.AggregationResultBatch
|
6608 | * @instance
|
6609 | */
|
6610 | AggregationResultBatch.prototype.aggregationResults = $util.emptyArray;
|
6611 |
|
6612 | /**
|
6613 | * AggregationResultBatch moreResults.
|
6614 | * @member {google.datastore.v1.QueryResultBatch.MoreResultsType} moreResults
|
6615 | * @memberof google.datastore.v1.AggregationResultBatch
|
6616 | * @instance
|
6617 | */
|
6618 | AggregationResultBatch.prototype.moreResults = 0;
|
6619 |
|
6620 | /**
|
6621 | * AggregationResultBatch readTime.
|
6622 | * @member {google.protobuf.ITimestamp|null|undefined} readTime
|
6623 | * @memberof google.datastore.v1.AggregationResultBatch
|
6624 | * @instance
|
6625 | */
|
6626 | AggregationResultBatch.prototype.readTime = null;
|
6627 |
|
6628 | /**
|
6629 | * Creates a new AggregationResultBatch instance using the specified properties.
|
6630 | * @function create
|
6631 | * @memberof google.datastore.v1.AggregationResultBatch
|
6632 | * @static
|
6633 | * @param {google.datastore.v1.IAggregationResultBatch=} [properties] Properties to set
|
6634 | * @returns {google.datastore.v1.AggregationResultBatch} AggregationResultBatch instance
|
6635 | */
|
6636 | AggregationResultBatch.create = function create(properties) {
|
6637 | return new AggregationResultBatch(properties);
|
6638 | };
|
6639 |
|
6640 | /**
|
6641 | * Encodes the specified AggregationResultBatch message. Does not implicitly {@link google.datastore.v1.AggregationResultBatch.verify|verify} messages.
|
6642 | * @function encode
|
6643 | * @memberof google.datastore.v1.AggregationResultBatch
|
6644 | * @static
|
6645 | * @param {google.datastore.v1.IAggregationResultBatch} message AggregationResultBatch message or plain object to encode
|
6646 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
6647 | * @returns {$protobuf.Writer} Writer
|
6648 | */
|
6649 | AggregationResultBatch.encode = function encode(message, writer) {
|
6650 | if (!writer)
|
6651 | writer = $Writer.create();
|
6652 | if (message.aggregationResults != null && message.aggregationResults.length)
|
6653 | for (var i = 0; i < message.aggregationResults.length; ++i)
|
6654 | $root.google.datastore.v1.AggregationResult.encode(message.aggregationResults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
6655 | if (message.moreResults != null && Object.hasOwnProperty.call(message, "moreResults"))
|
6656 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.moreResults);
|
6657 | if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime"))
|
6658 | $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
6659 | return writer;
|
6660 | };
|
6661 |
|
6662 | /**
|
6663 | * Encodes the specified AggregationResultBatch message, length delimited. Does not implicitly {@link google.datastore.v1.AggregationResultBatch.verify|verify} messages.
|
6664 | * @function encodeDelimited
|
6665 | * @memberof google.datastore.v1.AggregationResultBatch
|
6666 | * @static
|
6667 | * @param {google.datastore.v1.IAggregationResultBatch} message AggregationResultBatch message or plain object to encode
|
6668 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
6669 | * @returns {$protobuf.Writer} Writer
|
6670 | */
|
6671 | AggregationResultBatch.encodeDelimited = function encodeDelimited(message, writer) {
|
6672 | return this.encode(message, writer).ldelim();
|
6673 | };
|
6674 |
|
6675 | /**
|
6676 | * Decodes an AggregationResultBatch message from the specified reader or buffer.
|
6677 | * @function decode
|
6678 | * @memberof google.datastore.v1.AggregationResultBatch
|
6679 | * @static
|
6680 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6681 | * @param {number} [length] Message length if known beforehand
|
6682 | * @returns {google.datastore.v1.AggregationResultBatch} AggregationResultBatch
|
6683 | * @throws {Error} If the payload is not a reader or valid buffer
|
6684 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6685 | */
|
6686 | AggregationResultBatch.decode = function decode(reader, length) {
|
6687 | if (!(reader instanceof $Reader))
|
6688 | reader = $Reader.create(reader);
|
6689 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.AggregationResultBatch();
|
6690 | while (reader.pos < end) {
|
6691 | var tag = reader.uint32();
|
6692 | switch (tag >>> 3) {
|
6693 | case 1: {
|
6694 | if (!(message.aggregationResults && message.aggregationResults.length))
|
6695 | message.aggregationResults = [];
|
6696 | message.aggregationResults.push($root.google.datastore.v1.AggregationResult.decode(reader, reader.uint32()));
|
6697 | break;
|
6698 | }
|
6699 | case 2: {
|
6700 | message.moreResults = reader.int32();
|
6701 | break;
|
6702 | }
|
6703 | case 3: {
|
6704 | message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
6705 | break;
|
6706 | }
|
6707 | default:
|
6708 | reader.skipType(tag & 7);
|
6709 | break;
|
6710 | }
|
6711 | }
|
6712 | return message;
|
6713 | };
|
6714 |
|
6715 | /**
|
6716 | * Decodes an AggregationResultBatch message from the specified reader or buffer, length delimited.
|
6717 | * @function decodeDelimited
|
6718 | * @memberof google.datastore.v1.AggregationResultBatch
|
6719 | * @static
|
6720 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6721 | * @returns {google.datastore.v1.AggregationResultBatch} AggregationResultBatch
|
6722 | * @throws {Error} If the payload is not a reader or valid buffer
|
6723 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6724 | */
|
6725 | AggregationResultBatch.decodeDelimited = function decodeDelimited(reader) {
|
6726 | if (!(reader instanceof $Reader))
|
6727 | reader = new $Reader(reader);
|
6728 | return this.decode(reader, reader.uint32());
|
6729 | };
|
6730 |
|
6731 | /**
|
6732 | * Verifies an AggregationResultBatch message.
|
6733 | * @function verify
|
6734 | * @memberof google.datastore.v1.AggregationResultBatch
|
6735 | * @static
|
6736 | * @param {Object.<string,*>} message Plain object to verify
|
6737 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
6738 | */
|
6739 | AggregationResultBatch.verify = function verify(message) {
|
6740 | if (typeof message !== "object" || message === null)
|
6741 | return "object expected";
|
6742 | if (message.aggregationResults != null && message.hasOwnProperty("aggregationResults")) {
|
6743 | if (!Array.isArray(message.aggregationResults))
|
6744 | return "aggregationResults: array expected";
|
6745 | for (var i = 0; i < message.aggregationResults.length; ++i) {
|
6746 | var error = $root.google.datastore.v1.AggregationResult.verify(message.aggregationResults[i]);
|
6747 | if (error)
|
6748 | return "aggregationResults." + error;
|
6749 | }
|
6750 | }
|
6751 | if (message.moreResults != null && message.hasOwnProperty("moreResults"))
|
6752 | switch (message.moreResults) {
|
6753 | default:
|
6754 | return "moreResults: enum value expected";
|
6755 | case 0:
|
6756 | case 1:
|
6757 | case 2:
|
6758 | case 4:
|
6759 | case 3:
|
6760 | break;
|
6761 | }
|
6762 | if (message.readTime != null && message.hasOwnProperty("readTime")) {
|
6763 | var error = $root.google.protobuf.Timestamp.verify(message.readTime);
|
6764 | if (error)
|
6765 | return "readTime." + error;
|
6766 | }
|
6767 | return null;
|
6768 | };
|
6769 |
|
6770 | /**
|
6771 | * Creates an AggregationResultBatch message from a plain object. Also converts values to their respective internal types.
|
6772 | * @function fromObject
|
6773 | * @memberof google.datastore.v1.AggregationResultBatch
|
6774 | * @static
|
6775 | * @param {Object.<string,*>} object Plain object
|
6776 | * @returns {google.datastore.v1.AggregationResultBatch} AggregationResultBatch
|
6777 | */
|
6778 | AggregationResultBatch.fromObject = function fromObject(object) {
|
6779 | if (object instanceof $root.google.datastore.v1.AggregationResultBatch)
|
6780 | return object;
|
6781 | var message = new $root.google.datastore.v1.AggregationResultBatch();
|
6782 | if (object.aggregationResults) {
|
6783 | if (!Array.isArray(object.aggregationResults))
|
6784 | throw TypeError(".google.datastore.v1.AggregationResultBatch.aggregationResults: array expected");
|
6785 | message.aggregationResults = [];
|
6786 | for (var i = 0; i < object.aggregationResults.length; ++i) {
|
6787 | if (typeof object.aggregationResults[i] !== "object")
|
6788 | throw TypeError(".google.datastore.v1.AggregationResultBatch.aggregationResults: object expected");
|
6789 | message.aggregationResults[i] = $root.google.datastore.v1.AggregationResult.fromObject(object.aggregationResults[i]);
|
6790 | }
|
6791 | }
|
6792 | switch (object.moreResults) {
|
6793 | default:
|
6794 | if (typeof object.moreResults === "number") {
|
6795 | message.moreResults = object.moreResults;
|
6796 | break;
|
6797 | }
|
6798 | break;
|
6799 | case "MORE_RESULTS_TYPE_UNSPECIFIED":
|
6800 | case 0:
|
6801 | message.moreResults = 0;
|
6802 | break;
|
6803 | case "NOT_FINISHED":
|
6804 | case 1:
|
6805 | message.moreResults = 1;
|
6806 | break;
|
6807 | case "MORE_RESULTS_AFTER_LIMIT":
|
6808 | case 2:
|
6809 | message.moreResults = 2;
|
6810 | break;
|
6811 | case "MORE_RESULTS_AFTER_CURSOR":
|
6812 | case 4:
|
6813 | message.moreResults = 4;
|
6814 | break;
|
6815 | case "NO_MORE_RESULTS":
|
6816 | case 3:
|
6817 | message.moreResults = 3;
|
6818 | break;
|
6819 | }
|
6820 | if (object.readTime != null) {
|
6821 | if (typeof object.readTime !== "object")
|
6822 | throw TypeError(".google.datastore.v1.AggregationResultBatch.readTime: object expected");
|
6823 | message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime);
|
6824 | }
|
6825 | return message;
|
6826 | };
|
6827 |
|
6828 | /**
|
6829 | * Creates a plain object from an AggregationResultBatch message. Also converts values to other types if specified.
|
6830 | * @function toObject
|
6831 | * @memberof google.datastore.v1.AggregationResultBatch
|
6832 | * @static
|
6833 | * @param {google.datastore.v1.AggregationResultBatch} message AggregationResultBatch
|
6834 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
6835 | * @returns {Object.<string,*>} Plain object
|
6836 | */
|
6837 | AggregationResultBatch.toObject = function toObject(message, options) {
|
6838 | if (!options)
|
6839 | options = {};
|
6840 | var object = {};
|
6841 | if (options.arrays || options.defaults)
|
6842 | object.aggregationResults = [];
|
6843 | if (options.defaults) {
|
6844 | object.moreResults = options.enums === String ? "MORE_RESULTS_TYPE_UNSPECIFIED" : 0;
|
6845 | object.readTime = null;
|
6846 | }
|
6847 | if (message.aggregationResults && message.aggregationResults.length) {
|
6848 | object.aggregationResults = [];
|
6849 | for (var j = 0; j < message.aggregationResults.length; ++j)
|
6850 | object.aggregationResults[j] = $root.google.datastore.v1.AggregationResult.toObject(message.aggregationResults[j], options);
|
6851 | }
|
6852 | if (message.moreResults != null && message.hasOwnProperty("moreResults"))
|
6853 | object.moreResults = options.enums === String ? $root.google.datastore.v1.QueryResultBatch.MoreResultsType[message.moreResults] === undefined ? message.moreResults : $root.google.datastore.v1.QueryResultBatch.MoreResultsType[message.moreResults] : message.moreResults;
|
6854 | if (message.readTime != null && message.hasOwnProperty("readTime"))
|
6855 | object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options);
|
6856 | return object;
|
6857 | };
|
6858 |
|
6859 | /**
|
6860 | * Converts this AggregationResultBatch to JSON.
|
6861 | * @function toJSON
|
6862 | * @memberof google.datastore.v1.AggregationResultBatch
|
6863 | * @instance
|
6864 | * @returns {Object.<string,*>} JSON object
|
6865 | */
|
6866 | AggregationResultBatch.prototype.toJSON = function toJSON() {
|
6867 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
6868 | };
|
6869 |
|
6870 | /**
|
6871 | * Gets the default type url for AggregationResultBatch
|
6872 | * @function getTypeUrl
|
6873 | * @memberof google.datastore.v1.AggregationResultBatch
|
6874 | * @static
|
6875 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
6876 | * @returns {string} The default type url
|
6877 | */
|
6878 | AggregationResultBatch.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
6879 | if (typeUrlPrefix === undefined) {
|
6880 | typeUrlPrefix = "type.googleapis.com";
|
6881 | }
|
6882 | return typeUrlPrefix + "/google.datastore.v1.AggregationResultBatch";
|
6883 | };
|
6884 |
|
6885 | return AggregationResultBatch;
|
6886 | })();
|
6887 |
|
6888 | v1.PartitionId = (function() {
|
6889 |
|
6890 | /**
|
6891 | * Properties of a PartitionId.
|
6892 | * @memberof google.datastore.v1
|
6893 | * @interface IPartitionId
|
6894 | * @property {string|null} [projectId] PartitionId projectId
|
6895 | * @property {string|null} [databaseId] PartitionId databaseId
|
6896 | * @property {string|null} [namespaceId] PartitionId namespaceId
|
6897 | */
|
6898 |
|
6899 | /**
|
6900 | * Constructs a new PartitionId.
|
6901 | * @memberof google.datastore.v1
|
6902 | * @classdesc Represents a PartitionId.
|
6903 | * @implements IPartitionId
|
6904 | * @constructor
|
6905 | * @param {google.datastore.v1.IPartitionId=} [properties] Properties to set
|
6906 | */
|
6907 | function PartitionId(properties) {
|
6908 | if (properties)
|
6909 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
6910 | if (properties[keys[i]] != null)
|
6911 | this[keys[i]] = properties[keys[i]];
|
6912 | }
|
6913 |
|
6914 | /**
|
6915 | * PartitionId projectId.
|
6916 | * @member {string} projectId
|
6917 | * @memberof google.datastore.v1.PartitionId
|
6918 | * @instance
|
6919 | */
|
6920 | PartitionId.prototype.projectId = "";
|
6921 |
|
6922 | /**
|
6923 | * PartitionId databaseId.
|
6924 | * @member {string} databaseId
|
6925 | * @memberof google.datastore.v1.PartitionId
|
6926 | * @instance
|
6927 | */
|
6928 | PartitionId.prototype.databaseId = "";
|
6929 |
|
6930 | /**
|
6931 | * PartitionId namespaceId.
|
6932 | * @member {string} namespaceId
|
6933 | * @memberof google.datastore.v1.PartitionId
|
6934 | * @instance
|
6935 | */
|
6936 | PartitionId.prototype.namespaceId = "";
|
6937 |
|
6938 | /**
|
6939 | * Creates a new PartitionId instance using the specified properties.
|
6940 | * @function create
|
6941 | * @memberof google.datastore.v1.PartitionId
|
6942 | * @static
|
6943 | * @param {google.datastore.v1.IPartitionId=} [properties] Properties to set
|
6944 | * @returns {google.datastore.v1.PartitionId} PartitionId instance
|
6945 | */
|
6946 | PartitionId.create = function create(properties) {
|
6947 | return new PartitionId(properties);
|
6948 | };
|
6949 |
|
6950 | /**
|
6951 | * Encodes the specified PartitionId message. Does not implicitly {@link google.datastore.v1.PartitionId.verify|verify} messages.
|
6952 | * @function encode
|
6953 | * @memberof google.datastore.v1.PartitionId
|
6954 | * @static
|
6955 | * @param {google.datastore.v1.IPartitionId} message PartitionId message or plain object to encode
|
6956 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
6957 | * @returns {$protobuf.Writer} Writer
|
6958 | */
|
6959 | PartitionId.encode = function encode(message, writer) {
|
6960 | if (!writer)
|
6961 | writer = $Writer.create();
|
6962 | if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
|
6963 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId);
|
6964 | if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId"))
|
6965 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.databaseId);
|
6966 | if (message.namespaceId != null && Object.hasOwnProperty.call(message, "namespaceId"))
|
6967 | writer.uint32(/* id 4, wireType 2 =*/34).string(message.namespaceId);
|
6968 | return writer;
|
6969 | };
|
6970 |
|
6971 | /**
|
6972 | * Encodes the specified PartitionId message, length delimited. Does not implicitly {@link google.datastore.v1.PartitionId.verify|verify} messages.
|
6973 | * @function encodeDelimited
|
6974 | * @memberof google.datastore.v1.PartitionId
|
6975 | * @static
|
6976 | * @param {google.datastore.v1.IPartitionId} message PartitionId message or plain object to encode
|
6977 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
6978 | * @returns {$protobuf.Writer} Writer
|
6979 | */
|
6980 | PartitionId.encodeDelimited = function encodeDelimited(message, writer) {
|
6981 | return this.encode(message, writer).ldelim();
|
6982 | };
|
6983 |
|
6984 | /**
|
6985 | * Decodes a PartitionId message from the specified reader or buffer.
|
6986 | * @function decode
|
6987 | * @memberof google.datastore.v1.PartitionId
|
6988 | * @static
|
6989 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
6990 | * @param {number} [length] Message length if known beforehand
|
6991 | * @returns {google.datastore.v1.PartitionId} PartitionId
|
6992 | * @throws {Error} If the payload is not a reader or valid buffer
|
6993 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
6994 | */
|
6995 | PartitionId.decode = function decode(reader, length) {
|
6996 | if (!(reader instanceof $Reader))
|
6997 | reader = $Reader.create(reader);
|
6998 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.PartitionId();
|
6999 | while (reader.pos < end) {
|
7000 | var tag = reader.uint32();
|
7001 | switch (tag >>> 3) {
|
7002 | case 2: {
|
7003 | message.projectId = reader.string();
|
7004 | break;
|
7005 | }
|
7006 | case 3: {
|
7007 | message.databaseId = reader.string();
|
7008 | break;
|
7009 | }
|
7010 | case 4: {
|
7011 | message.namespaceId = reader.string();
|
7012 | break;
|
7013 | }
|
7014 | default:
|
7015 | reader.skipType(tag & 7);
|
7016 | break;
|
7017 | }
|
7018 | }
|
7019 | return message;
|
7020 | };
|
7021 |
|
7022 | /**
|
7023 | * Decodes a PartitionId message from the specified reader or buffer, length delimited.
|
7024 | * @function decodeDelimited
|
7025 | * @memberof google.datastore.v1.PartitionId
|
7026 | * @static
|
7027 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
7028 | * @returns {google.datastore.v1.PartitionId} PartitionId
|
7029 | * @throws {Error} If the payload is not a reader or valid buffer
|
7030 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7031 | */
|
7032 | PartitionId.decodeDelimited = function decodeDelimited(reader) {
|
7033 | if (!(reader instanceof $Reader))
|
7034 | reader = new $Reader(reader);
|
7035 | return this.decode(reader, reader.uint32());
|
7036 | };
|
7037 |
|
7038 | /**
|
7039 | * Verifies a PartitionId message.
|
7040 | * @function verify
|
7041 | * @memberof google.datastore.v1.PartitionId
|
7042 | * @static
|
7043 | * @param {Object.<string,*>} message Plain object to verify
|
7044 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
7045 | */
|
7046 | PartitionId.verify = function verify(message) {
|
7047 | if (typeof message !== "object" || message === null)
|
7048 | return "object expected";
|
7049 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
7050 | if (!$util.isString(message.projectId))
|
7051 | return "projectId: string expected";
|
7052 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
7053 | if (!$util.isString(message.databaseId))
|
7054 | return "databaseId: string expected";
|
7055 | if (message.namespaceId != null && message.hasOwnProperty("namespaceId"))
|
7056 | if (!$util.isString(message.namespaceId))
|
7057 | return "namespaceId: string expected";
|
7058 | return null;
|
7059 | };
|
7060 |
|
7061 | /**
|
7062 | * Creates a PartitionId message from a plain object. Also converts values to their respective internal types.
|
7063 | * @function fromObject
|
7064 | * @memberof google.datastore.v1.PartitionId
|
7065 | * @static
|
7066 | * @param {Object.<string,*>} object Plain object
|
7067 | * @returns {google.datastore.v1.PartitionId} PartitionId
|
7068 | */
|
7069 | PartitionId.fromObject = function fromObject(object) {
|
7070 | if (object instanceof $root.google.datastore.v1.PartitionId)
|
7071 | return object;
|
7072 | var message = new $root.google.datastore.v1.PartitionId();
|
7073 | if (object.projectId != null)
|
7074 | message.projectId = String(object.projectId);
|
7075 | if (object.databaseId != null)
|
7076 | message.databaseId = String(object.databaseId);
|
7077 | if (object.namespaceId != null)
|
7078 | message.namespaceId = String(object.namespaceId);
|
7079 | return message;
|
7080 | };
|
7081 |
|
7082 | /**
|
7083 | * Creates a plain object from a PartitionId message. Also converts values to other types if specified.
|
7084 | * @function toObject
|
7085 | * @memberof google.datastore.v1.PartitionId
|
7086 | * @static
|
7087 | * @param {google.datastore.v1.PartitionId} message PartitionId
|
7088 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
7089 | * @returns {Object.<string,*>} Plain object
|
7090 | */
|
7091 | PartitionId.toObject = function toObject(message, options) {
|
7092 | if (!options)
|
7093 | options = {};
|
7094 | var object = {};
|
7095 | if (options.defaults) {
|
7096 | object.projectId = "";
|
7097 | object.databaseId = "";
|
7098 | object.namespaceId = "";
|
7099 | }
|
7100 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
7101 | object.projectId = message.projectId;
|
7102 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
7103 | object.databaseId = message.databaseId;
|
7104 | if (message.namespaceId != null && message.hasOwnProperty("namespaceId"))
|
7105 | object.namespaceId = message.namespaceId;
|
7106 | return object;
|
7107 | };
|
7108 |
|
7109 | /**
|
7110 | * Converts this PartitionId to JSON.
|
7111 | * @function toJSON
|
7112 | * @memberof google.datastore.v1.PartitionId
|
7113 | * @instance
|
7114 | * @returns {Object.<string,*>} JSON object
|
7115 | */
|
7116 | PartitionId.prototype.toJSON = function toJSON() {
|
7117 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
7118 | };
|
7119 |
|
7120 | /**
|
7121 | * Gets the default type url for PartitionId
|
7122 | * @function getTypeUrl
|
7123 | * @memberof google.datastore.v1.PartitionId
|
7124 | * @static
|
7125 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
7126 | * @returns {string} The default type url
|
7127 | */
|
7128 | PartitionId.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
7129 | if (typeUrlPrefix === undefined) {
|
7130 | typeUrlPrefix = "type.googleapis.com";
|
7131 | }
|
7132 | return typeUrlPrefix + "/google.datastore.v1.PartitionId";
|
7133 | };
|
7134 |
|
7135 | return PartitionId;
|
7136 | })();
|
7137 |
|
7138 | v1.Key = (function() {
|
7139 |
|
7140 | /**
|
7141 | * Properties of a Key.
|
7142 | * @memberof google.datastore.v1
|
7143 | * @interface IKey
|
7144 | * @property {google.datastore.v1.IPartitionId|null} [partitionId] Key partitionId
|
7145 | * @property {Array.<google.datastore.v1.Key.IPathElement>|null} [path] Key path
|
7146 | */
|
7147 |
|
7148 | /**
|
7149 | * Constructs a new Key.
|
7150 | * @memberof google.datastore.v1
|
7151 | * @classdesc Represents a Key.
|
7152 | * @implements IKey
|
7153 | * @constructor
|
7154 | * @param {google.datastore.v1.IKey=} [properties] Properties to set
|
7155 | */
|
7156 | function Key(properties) {
|
7157 | this.path = [];
|
7158 | if (properties)
|
7159 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
7160 | if (properties[keys[i]] != null)
|
7161 | this[keys[i]] = properties[keys[i]];
|
7162 | }
|
7163 |
|
7164 | /**
|
7165 | * Key partitionId.
|
7166 | * @member {google.datastore.v1.IPartitionId|null|undefined} partitionId
|
7167 | * @memberof google.datastore.v1.Key
|
7168 | * @instance
|
7169 | */
|
7170 | Key.prototype.partitionId = null;
|
7171 |
|
7172 | /**
|
7173 | * Key path.
|
7174 | * @member {Array.<google.datastore.v1.Key.IPathElement>} path
|
7175 | * @memberof google.datastore.v1.Key
|
7176 | * @instance
|
7177 | */
|
7178 | Key.prototype.path = $util.emptyArray;
|
7179 |
|
7180 | /**
|
7181 | * Creates a new Key instance using the specified properties.
|
7182 | * @function create
|
7183 | * @memberof google.datastore.v1.Key
|
7184 | * @static
|
7185 | * @param {google.datastore.v1.IKey=} [properties] Properties to set
|
7186 | * @returns {google.datastore.v1.Key} Key instance
|
7187 | */
|
7188 | Key.create = function create(properties) {
|
7189 | return new Key(properties);
|
7190 | };
|
7191 |
|
7192 | /**
|
7193 | * Encodes the specified Key message. Does not implicitly {@link google.datastore.v1.Key.verify|verify} messages.
|
7194 | * @function encode
|
7195 | * @memberof google.datastore.v1.Key
|
7196 | * @static
|
7197 | * @param {google.datastore.v1.IKey} message Key message or plain object to encode
|
7198 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
7199 | * @returns {$protobuf.Writer} Writer
|
7200 | */
|
7201 | Key.encode = function encode(message, writer) {
|
7202 | if (!writer)
|
7203 | writer = $Writer.create();
|
7204 | if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId"))
|
7205 | $root.google.datastore.v1.PartitionId.encode(message.partitionId, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
7206 | if (message.path != null && message.path.length)
|
7207 | for (var i = 0; i < message.path.length; ++i)
|
7208 | $root.google.datastore.v1.Key.PathElement.encode(message.path[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
7209 | return writer;
|
7210 | };
|
7211 |
|
7212 | /**
|
7213 | * Encodes the specified Key message, length delimited. Does not implicitly {@link google.datastore.v1.Key.verify|verify} messages.
|
7214 | * @function encodeDelimited
|
7215 | * @memberof google.datastore.v1.Key
|
7216 | * @static
|
7217 | * @param {google.datastore.v1.IKey} message Key message or plain object to encode
|
7218 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
7219 | * @returns {$protobuf.Writer} Writer
|
7220 | */
|
7221 | Key.encodeDelimited = function encodeDelimited(message, writer) {
|
7222 | return this.encode(message, writer).ldelim();
|
7223 | };
|
7224 |
|
7225 | /**
|
7226 | * Decodes a Key message from the specified reader or buffer.
|
7227 | * @function decode
|
7228 | * @memberof google.datastore.v1.Key
|
7229 | * @static
|
7230 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
7231 | * @param {number} [length] Message length if known beforehand
|
7232 | * @returns {google.datastore.v1.Key} Key
|
7233 | * @throws {Error} If the payload is not a reader or valid buffer
|
7234 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7235 | */
|
7236 | Key.decode = function decode(reader, length) {
|
7237 | if (!(reader instanceof $Reader))
|
7238 | reader = $Reader.create(reader);
|
7239 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.Key();
|
7240 | while (reader.pos < end) {
|
7241 | var tag = reader.uint32();
|
7242 | switch (tag >>> 3) {
|
7243 | case 1: {
|
7244 | message.partitionId = $root.google.datastore.v1.PartitionId.decode(reader, reader.uint32());
|
7245 | break;
|
7246 | }
|
7247 | case 2: {
|
7248 | if (!(message.path && message.path.length))
|
7249 | message.path = [];
|
7250 | message.path.push($root.google.datastore.v1.Key.PathElement.decode(reader, reader.uint32()));
|
7251 | break;
|
7252 | }
|
7253 | default:
|
7254 | reader.skipType(tag & 7);
|
7255 | break;
|
7256 | }
|
7257 | }
|
7258 | return message;
|
7259 | };
|
7260 |
|
7261 | /**
|
7262 | * Decodes a Key message from the specified reader or buffer, length delimited.
|
7263 | * @function decodeDelimited
|
7264 | * @memberof google.datastore.v1.Key
|
7265 | * @static
|
7266 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
7267 | * @returns {google.datastore.v1.Key} Key
|
7268 | * @throws {Error} If the payload is not a reader or valid buffer
|
7269 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7270 | */
|
7271 | Key.decodeDelimited = function decodeDelimited(reader) {
|
7272 | if (!(reader instanceof $Reader))
|
7273 | reader = new $Reader(reader);
|
7274 | return this.decode(reader, reader.uint32());
|
7275 | };
|
7276 |
|
7277 | /**
|
7278 | * Verifies a Key message.
|
7279 | * @function verify
|
7280 | * @memberof google.datastore.v1.Key
|
7281 | * @static
|
7282 | * @param {Object.<string,*>} message Plain object to verify
|
7283 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
7284 | */
|
7285 | Key.verify = function verify(message) {
|
7286 | if (typeof message !== "object" || message === null)
|
7287 | return "object expected";
|
7288 | if (message.partitionId != null && message.hasOwnProperty("partitionId")) {
|
7289 | var error = $root.google.datastore.v1.PartitionId.verify(message.partitionId);
|
7290 | if (error)
|
7291 | return "partitionId." + error;
|
7292 | }
|
7293 | if (message.path != null && message.hasOwnProperty("path")) {
|
7294 | if (!Array.isArray(message.path))
|
7295 | return "path: array expected";
|
7296 | for (var i = 0; i < message.path.length; ++i) {
|
7297 | var error = $root.google.datastore.v1.Key.PathElement.verify(message.path[i]);
|
7298 | if (error)
|
7299 | return "path." + error;
|
7300 | }
|
7301 | }
|
7302 | return null;
|
7303 | };
|
7304 |
|
7305 | /**
|
7306 | * Creates a Key message from a plain object. Also converts values to their respective internal types.
|
7307 | * @function fromObject
|
7308 | * @memberof google.datastore.v1.Key
|
7309 | * @static
|
7310 | * @param {Object.<string,*>} object Plain object
|
7311 | * @returns {google.datastore.v1.Key} Key
|
7312 | */
|
7313 | Key.fromObject = function fromObject(object) {
|
7314 | if (object instanceof $root.google.datastore.v1.Key)
|
7315 | return object;
|
7316 | var message = new $root.google.datastore.v1.Key();
|
7317 | if (object.partitionId != null) {
|
7318 | if (typeof object.partitionId !== "object")
|
7319 | throw TypeError(".google.datastore.v1.Key.partitionId: object expected");
|
7320 | message.partitionId = $root.google.datastore.v1.PartitionId.fromObject(object.partitionId);
|
7321 | }
|
7322 | if (object.path) {
|
7323 | if (!Array.isArray(object.path))
|
7324 | throw TypeError(".google.datastore.v1.Key.path: array expected");
|
7325 | message.path = [];
|
7326 | for (var i = 0; i < object.path.length; ++i) {
|
7327 | if (typeof object.path[i] !== "object")
|
7328 | throw TypeError(".google.datastore.v1.Key.path: object expected");
|
7329 | message.path[i] = $root.google.datastore.v1.Key.PathElement.fromObject(object.path[i]);
|
7330 | }
|
7331 | }
|
7332 | return message;
|
7333 | };
|
7334 |
|
7335 | /**
|
7336 | * Creates a plain object from a Key message. Also converts values to other types if specified.
|
7337 | * @function toObject
|
7338 | * @memberof google.datastore.v1.Key
|
7339 | * @static
|
7340 | * @param {google.datastore.v1.Key} message Key
|
7341 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
7342 | * @returns {Object.<string,*>} Plain object
|
7343 | */
|
7344 | Key.toObject = function toObject(message, options) {
|
7345 | if (!options)
|
7346 | options = {};
|
7347 | var object = {};
|
7348 | if (options.arrays || options.defaults)
|
7349 | object.path = [];
|
7350 | if (options.defaults)
|
7351 | object.partitionId = null;
|
7352 | if (message.partitionId != null && message.hasOwnProperty("partitionId"))
|
7353 | object.partitionId = $root.google.datastore.v1.PartitionId.toObject(message.partitionId, options);
|
7354 | if (message.path && message.path.length) {
|
7355 | object.path = [];
|
7356 | for (var j = 0; j < message.path.length; ++j)
|
7357 | object.path[j] = $root.google.datastore.v1.Key.PathElement.toObject(message.path[j], options);
|
7358 | }
|
7359 | return object;
|
7360 | };
|
7361 |
|
7362 | /**
|
7363 | * Converts this Key to JSON.
|
7364 | * @function toJSON
|
7365 | * @memberof google.datastore.v1.Key
|
7366 | * @instance
|
7367 | * @returns {Object.<string,*>} JSON object
|
7368 | */
|
7369 | Key.prototype.toJSON = function toJSON() {
|
7370 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
7371 | };
|
7372 |
|
7373 | /**
|
7374 | * Gets the default type url for Key
|
7375 | * @function getTypeUrl
|
7376 | * @memberof google.datastore.v1.Key
|
7377 | * @static
|
7378 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
7379 | * @returns {string} The default type url
|
7380 | */
|
7381 | Key.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
7382 | if (typeUrlPrefix === undefined) {
|
7383 | typeUrlPrefix = "type.googleapis.com";
|
7384 | }
|
7385 | return typeUrlPrefix + "/google.datastore.v1.Key";
|
7386 | };
|
7387 |
|
7388 | Key.PathElement = (function() {
|
7389 |
|
7390 | /**
|
7391 | * Properties of a PathElement.
|
7392 | * @memberof google.datastore.v1.Key
|
7393 | * @interface IPathElement
|
7394 | * @property {string|null} [kind] PathElement kind
|
7395 | * @property {number|Long|null} [id] PathElement id
|
7396 | * @property {string|null} [name] PathElement name
|
7397 | */
|
7398 |
|
7399 | /**
|
7400 | * Constructs a new PathElement.
|
7401 | * @memberof google.datastore.v1.Key
|
7402 | * @classdesc Represents a PathElement.
|
7403 | * @implements IPathElement
|
7404 | * @constructor
|
7405 | * @param {google.datastore.v1.Key.IPathElement=} [properties] Properties to set
|
7406 | */
|
7407 | function PathElement(properties) {
|
7408 | if (properties)
|
7409 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
7410 | if (properties[keys[i]] != null)
|
7411 | this[keys[i]] = properties[keys[i]];
|
7412 | }
|
7413 |
|
7414 | /**
|
7415 | * PathElement kind.
|
7416 | * @member {string} kind
|
7417 | * @memberof google.datastore.v1.Key.PathElement
|
7418 | * @instance
|
7419 | */
|
7420 | PathElement.prototype.kind = "";
|
7421 |
|
7422 | /**
|
7423 | * PathElement id.
|
7424 | * @member {number|Long|null|undefined} id
|
7425 | * @memberof google.datastore.v1.Key.PathElement
|
7426 | * @instance
|
7427 | */
|
7428 | PathElement.prototype.id = null;
|
7429 |
|
7430 | /**
|
7431 | * PathElement name.
|
7432 | * @member {string|null|undefined} name
|
7433 | * @memberof google.datastore.v1.Key.PathElement
|
7434 | * @instance
|
7435 | */
|
7436 | PathElement.prototype.name = null;
|
7437 |
|
7438 | // OneOf field names bound to virtual getters and setters
|
7439 | var $oneOfFields;
|
7440 |
|
7441 | /**
|
7442 | * PathElement idType.
|
7443 | * @member {"id"|"name"|undefined} idType
|
7444 | * @memberof google.datastore.v1.Key.PathElement
|
7445 | * @instance
|
7446 | */
|
7447 | Object.defineProperty(PathElement.prototype, "idType", {
|
7448 | get: $util.oneOfGetter($oneOfFields = ["id", "name"]),
|
7449 | set: $util.oneOfSetter($oneOfFields)
|
7450 | });
|
7451 |
|
7452 | /**
|
7453 | * Creates a new PathElement instance using the specified properties.
|
7454 | * @function create
|
7455 | * @memberof google.datastore.v1.Key.PathElement
|
7456 | * @static
|
7457 | * @param {google.datastore.v1.Key.IPathElement=} [properties] Properties to set
|
7458 | * @returns {google.datastore.v1.Key.PathElement} PathElement instance
|
7459 | */
|
7460 | PathElement.create = function create(properties) {
|
7461 | return new PathElement(properties);
|
7462 | };
|
7463 |
|
7464 | /**
|
7465 | * Encodes the specified PathElement message. Does not implicitly {@link google.datastore.v1.Key.PathElement.verify|verify} messages.
|
7466 | * @function encode
|
7467 | * @memberof google.datastore.v1.Key.PathElement
|
7468 | * @static
|
7469 | * @param {google.datastore.v1.Key.IPathElement} message PathElement message or plain object to encode
|
7470 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
7471 | * @returns {$protobuf.Writer} Writer
|
7472 | */
|
7473 | PathElement.encode = function encode(message, writer) {
|
7474 | if (!writer)
|
7475 | writer = $Writer.create();
|
7476 | if (message.kind != null && Object.hasOwnProperty.call(message, "kind"))
|
7477 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind);
|
7478 | if (message.id != null && Object.hasOwnProperty.call(message, "id"))
|
7479 | writer.uint32(/* id 2, wireType 0 =*/16).int64(message.id);
|
7480 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
7481 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.name);
|
7482 | return writer;
|
7483 | };
|
7484 |
|
7485 | /**
|
7486 | * Encodes the specified PathElement message, length delimited. Does not implicitly {@link google.datastore.v1.Key.PathElement.verify|verify} messages.
|
7487 | * @function encodeDelimited
|
7488 | * @memberof google.datastore.v1.Key.PathElement
|
7489 | * @static
|
7490 | * @param {google.datastore.v1.Key.IPathElement} message PathElement message or plain object to encode
|
7491 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
7492 | * @returns {$protobuf.Writer} Writer
|
7493 | */
|
7494 | PathElement.encodeDelimited = function encodeDelimited(message, writer) {
|
7495 | return this.encode(message, writer).ldelim();
|
7496 | };
|
7497 |
|
7498 | /**
|
7499 | * Decodes a PathElement message from the specified reader or buffer.
|
7500 | * @function decode
|
7501 | * @memberof google.datastore.v1.Key.PathElement
|
7502 | * @static
|
7503 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
7504 | * @param {number} [length] Message length if known beforehand
|
7505 | * @returns {google.datastore.v1.Key.PathElement} PathElement
|
7506 | * @throws {Error} If the payload is not a reader or valid buffer
|
7507 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7508 | */
|
7509 | PathElement.decode = function decode(reader, length) {
|
7510 | if (!(reader instanceof $Reader))
|
7511 | reader = $Reader.create(reader);
|
7512 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.Key.PathElement();
|
7513 | while (reader.pos < end) {
|
7514 | var tag = reader.uint32();
|
7515 | switch (tag >>> 3) {
|
7516 | case 1: {
|
7517 | message.kind = reader.string();
|
7518 | break;
|
7519 | }
|
7520 | case 2: {
|
7521 | message.id = reader.int64();
|
7522 | break;
|
7523 | }
|
7524 | case 3: {
|
7525 | message.name = reader.string();
|
7526 | break;
|
7527 | }
|
7528 | default:
|
7529 | reader.skipType(tag & 7);
|
7530 | break;
|
7531 | }
|
7532 | }
|
7533 | return message;
|
7534 | };
|
7535 |
|
7536 | /**
|
7537 | * Decodes a PathElement message from the specified reader or buffer, length delimited.
|
7538 | * @function decodeDelimited
|
7539 | * @memberof google.datastore.v1.Key.PathElement
|
7540 | * @static
|
7541 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
7542 | * @returns {google.datastore.v1.Key.PathElement} PathElement
|
7543 | * @throws {Error} If the payload is not a reader or valid buffer
|
7544 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7545 | */
|
7546 | PathElement.decodeDelimited = function decodeDelimited(reader) {
|
7547 | if (!(reader instanceof $Reader))
|
7548 | reader = new $Reader(reader);
|
7549 | return this.decode(reader, reader.uint32());
|
7550 | };
|
7551 |
|
7552 | /**
|
7553 | * Verifies a PathElement message.
|
7554 | * @function verify
|
7555 | * @memberof google.datastore.v1.Key.PathElement
|
7556 | * @static
|
7557 | * @param {Object.<string,*>} message Plain object to verify
|
7558 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
7559 | */
|
7560 | PathElement.verify = function verify(message) {
|
7561 | if (typeof message !== "object" || message === null)
|
7562 | return "object expected";
|
7563 | var properties = {};
|
7564 | if (message.kind != null && message.hasOwnProperty("kind"))
|
7565 | if (!$util.isString(message.kind))
|
7566 | return "kind: string expected";
|
7567 | if (message.id != null && message.hasOwnProperty("id")) {
|
7568 | properties.idType = 1;
|
7569 | if (!$util.isInteger(message.id) && !(message.id && $util.isInteger(message.id.low) && $util.isInteger(message.id.high)))
|
7570 | return "id: integer|Long expected";
|
7571 | }
|
7572 | if (message.name != null && message.hasOwnProperty("name")) {
|
7573 | if (properties.idType === 1)
|
7574 | return "idType: multiple values";
|
7575 | properties.idType = 1;
|
7576 | if (!$util.isString(message.name))
|
7577 | return "name: string expected";
|
7578 | }
|
7579 | return null;
|
7580 | };
|
7581 |
|
7582 | /**
|
7583 | * Creates a PathElement message from a plain object. Also converts values to their respective internal types.
|
7584 | * @function fromObject
|
7585 | * @memberof google.datastore.v1.Key.PathElement
|
7586 | * @static
|
7587 | * @param {Object.<string,*>} object Plain object
|
7588 | * @returns {google.datastore.v1.Key.PathElement} PathElement
|
7589 | */
|
7590 | PathElement.fromObject = function fromObject(object) {
|
7591 | if (object instanceof $root.google.datastore.v1.Key.PathElement)
|
7592 | return object;
|
7593 | var message = new $root.google.datastore.v1.Key.PathElement();
|
7594 | if (object.kind != null)
|
7595 | message.kind = String(object.kind);
|
7596 | if (object.id != null)
|
7597 | if ($util.Long)
|
7598 | (message.id = $util.Long.fromValue(object.id)).unsigned = false;
|
7599 | else if (typeof object.id === "string")
|
7600 | message.id = parseInt(object.id, 10);
|
7601 | else if (typeof object.id === "number")
|
7602 | message.id = object.id;
|
7603 | else if (typeof object.id === "object")
|
7604 | message.id = new $util.LongBits(object.id.low >>> 0, object.id.high >>> 0).toNumber();
|
7605 | if (object.name != null)
|
7606 | message.name = String(object.name);
|
7607 | return message;
|
7608 | };
|
7609 |
|
7610 | /**
|
7611 | * Creates a plain object from a PathElement message. Also converts values to other types if specified.
|
7612 | * @function toObject
|
7613 | * @memberof google.datastore.v1.Key.PathElement
|
7614 | * @static
|
7615 | * @param {google.datastore.v1.Key.PathElement} message PathElement
|
7616 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
7617 | * @returns {Object.<string,*>} Plain object
|
7618 | */
|
7619 | PathElement.toObject = function toObject(message, options) {
|
7620 | if (!options)
|
7621 | options = {};
|
7622 | var object = {};
|
7623 | if (options.defaults)
|
7624 | object.kind = "";
|
7625 | if (message.kind != null && message.hasOwnProperty("kind"))
|
7626 | object.kind = message.kind;
|
7627 | if (message.id != null && message.hasOwnProperty("id")) {
|
7628 | if (typeof message.id === "number")
|
7629 | object.id = options.longs === String ? String(message.id) : message.id;
|
7630 | else
|
7631 | object.id = options.longs === String ? $util.Long.prototype.toString.call(message.id) : options.longs === Number ? new $util.LongBits(message.id.low >>> 0, message.id.high >>> 0).toNumber() : message.id;
|
7632 | if (options.oneofs)
|
7633 | object.idType = "id";
|
7634 | }
|
7635 | if (message.name != null && message.hasOwnProperty("name")) {
|
7636 | object.name = message.name;
|
7637 | if (options.oneofs)
|
7638 | object.idType = "name";
|
7639 | }
|
7640 | return object;
|
7641 | };
|
7642 |
|
7643 | /**
|
7644 | * Converts this PathElement to JSON.
|
7645 | * @function toJSON
|
7646 | * @memberof google.datastore.v1.Key.PathElement
|
7647 | * @instance
|
7648 | * @returns {Object.<string,*>} JSON object
|
7649 | */
|
7650 | PathElement.prototype.toJSON = function toJSON() {
|
7651 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
7652 | };
|
7653 |
|
7654 | /**
|
7655 | * Gets the default type url for PathElement
|
7656 | * @function getTypeUrl
|
7657 | * @memberof google.datastore.v1.Key.PathElement
|
7658 | * @static
|
7659 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
7660 | * @returns {string} The default type url
|
7661 | */
|
7662 | PathElement.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
7663 | if (typeUrlPrefix === undefined) {
|
7664 | typeUrlPrefix = "type.googleapis.com";
|
7665 | }
|
7666 | return typeUrlPrefix + "/google.datastore.v1.Key.PathElement";
|
7667 | };
|
7668 |
|
7669 | return PathElement;
|
7670 | })();
|
7671 |
|
7672 | return Key;
|
7673 | })();
|
7674 |
|
7675 | v1.ArrayValue = (function() {
|
7676 |
|
7677 | /**
|
7678 | * Properties of an ArrayValue.
|
7679 | * @memberof google.datastore.v1
|
7680 | * @interface IArrayValue
|
7681 | * @property {Array.<google.datastore.v1.IValue>|null} [values] ArrayValue values
|
7682 | */
|
7683 |
|
7684 | /**
|
7685 | * Constructs a new ArrayValue.
|
7686 | * @memberof google.datastore.v1
|
7687 | * @classdesc Represents an ArrayValue.
|
7688 | * @implements IArrayValue
|
7689 | * @constructor
|
7690 | * @param {google.datastore.v1.IArrayValue=} [properties] Properties to set
|
7691 | */
|
7692 | function ArrayValue(properties) {
|
7693 | this.values = [];
|
7694 | if (properties)
|
7695 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
7696 | if (properties[keys[i]] != null)
|
7697 | this[keys[i]] = properties[keys[i]];
|
7698 | }
|
7699 |
|
7700 | /**
|
7701 | * ArrayValue values.
|
7702 | * @member {Array.<google.datastore.v1.IValue>} values
|
7703 | * @memberof google.datastore.v1.ArrayValue
|
7704 | * @instance
|
7705 | */
|
7706 | ArrayValue.prototype.values = $util.emptyArray;
|
7707 |
|
7708 | /**
|
7709 | * Creates a new ArrayValue instance using the specified properties.
|
7710 | * @function create
|
7711 | * @memberof google.datastore.v1.ArrayValue
|
7712 | * @static
|
7713 | * @param {google.datastore.v1.IArrayValue=} [properties] Properties to set
|
7714 | * @returns {google.datastore.v1.ArrayValue} ArrayValue instance
|
7715 | */
|
7716 | ArrayValue.create = function create(properties) {
|
7717 | return new ArrayValue(properties);
|
7718 | };
|
7719 |
|
7720 | /**
|
7721 | * Encodes the specified ArrayValue message. Does not implicitly {@link google.datastore.v1.ArrayValue.verify|verify} messages.
|
7722 | * @function encode
|
7723 | * @memberof google.datastore.v1.ArrayValue
|
7724 | * @static
|
7725 | * @param {google.datastore.v1.IArrayValue} message ArrayValue message or plain object to encode
|
7726 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
7727 | * @returns {$protobuf.Writer} Writer
|
7728 | */
|
7729 | ArrayValue.encode = function encode(message, writer) {
|
7730 | if (!writer)
|
7731 | writer = $Writer.create();
|
7732 | if (message.values != null && message.values.length)
|
7733 | for (var i = 0; i < message.values.length; ++i)
|
7734 | $root.google.datastore.v1.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
7735 | return writer;
|
7736 | };
|
7737 |
|
7738 | /**
|
7739 | * Encodes the specified ArrayValue message, length delimited. Does not implicitly {@link google.datastore.v1.ArrayValue.verify|verify} messages.
|
7740 | * @function encodeDelimited
|
7741 | * @memberof google.datastore.v1.ArrayValue
|
7742 | * @static
|
7743 | * @param {google.datastore.v1.IArrayValue} message ArrayValue message or plain object to encode
|
7744 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
7745 | * @returns {$protobuf.Writer} Writer
|
7746 | */
|
7747 | ArrayValue.encodeDelimited = function encodeDelimited(message, writer) {
|
7748 | return this.encode(message, writer).ldelim();
|
7749 | };
|
7750 |
|
7751 | /**
|
7752 | * Decodes an ArrayValue message from the specified reader or buffer.
|
7753 | * @function decode
|
7754 | * @memberof google.datastore.v1.ArrayValue
|
7755 | * @static
|
7756 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
7757 | * @param {number} [length] Message length if known beforehand
|
7758 | * @returns {google.datastore.v1.ArrayValue} ArrayValue
|
7759 | * @throws {Error} If the payload is not a reader or valid buffer
|
7760 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7761 | */
|
7762 | ArrayValue.decode = function decode(reader, length) {
|
7763 | if (!(reader instanceof $Reader))
|
7764 | reader = $Reader.create(reader);
|
7765 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.ArrayValue();
|
7766 | while (reader.pos < end) {
|
7767 | var tag = reader.uint32();
|
7768 | switch (tag >>> 3) {
|
7769 | case 1: {
|
7770 | if (!(message.values && message.values.length))
|
7771 | message.values = [];
|
7772 | message.values.push($root.google.datastore.v1.Value.decode(reader, reader.uint32()));
|
7773 | break;
|
7774 | }
|
7775 | default:
|
7776 | reader.skipType(tag & 7);
|
7777 | break;
|
7778 | }
|
7779 | }
|
7780 | return message;
|
7781 | };
|
7782 |
|
7783 | /**
|
7784 | * Decodes an ArrayValue message from the specified reader or buffer, length delimited.
|
7785 | * @function decodeDelimited
|
7786 | * @memberof google.datastore.v1.ArrayValue
|
7787 | * @static
|
7788 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
7789 | * @returns {google.datastore.v1.ArrayValue} ArrayValue
|
7790 | * @throws {Error} If the payload is not a reader or valid buffer
|
7791 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
7792 | */
|
7793 | ArrayValue.decodeDelimited = function decodeDelimited(reader) {
|
7794 | if (!(reader instanceof $Reader))
|
7795 | reader = new $Reader(reader);
|
7796 | return this.decode(reader, reader.uint32());
|
7797 | };
|
7798 |
|
7799 | /**
|
7800 | * Verifies an ArrayValue message.
|
7801 | * @function verify
|
7802 | * @memberof google.datastore.v1.ArrayValue
|
7803 | * @static
|
7804 | * @param {Object.<string,*>} message Plain object to verify
|
7805 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
7806 | */
|
7807 | ArrayValue.verify = function verify(message) {
|
7808 | if (typeof message !== "object" || message === null)
|
7809 | return "object expected";
|
7810 | if (message.values != null && message.hasOwnProperty("values")) {
|
7811 | if (!Array.isArray(message.values))
|
7812 | return "values: array expected";
|
7813 | for (var i = 0; i < message.values.length; ++i) {
|
7814 | var error = $root.google.datastore.v1.Value.verify(message.values[i]);
|
7815 | if (error)
|
7816 | return "values." + error;
|
7817 | }
|
7818 | }
|
7819 | return null;
|
7820 | };
|
7821 |
|
7822 | /**
|
7823 | * Creates an ArrayValue message from a plain object. Also converts values to their respective internal types.
|
7824 | * @function fromObject
|
7825 | * @memberof google.datastore.v1.ArrayValue
|
7826 | * @static
|
7827 | * @param {Object.<string,*>} object Plain object
|
7828 | * @returns {google.datastore.v1.ArrayValue} ArrayValue
|
7829 | */
|
7830 | ArrayValue.fromObject = function fromObject(object) {
|
7831 | if (object instanceof $root.google.datastore.v1.ArrayValue)
|
7832 | return object;
|
7833 | var message = new $root.google.datastore.v1.ArrayValue();
|
7834 | if (object.values) {
|
7835 | if (!Array.isArray(object.values))
|
7836 | throw TypeError(".google.datastore.v1.ArrayValue.values: array expected");
|
7837 | message.values = [];
|
7838 | for (var i = 0; i < object.values.length; ++i) {
|
7839 | if (typeof object.values[i] !== "object")
|
7840 | throw TypeError(".google.datastore.v1.ArrayValue.values: object expected");
|
7841 | message.values[i] = $root.google.datastore.v1.Value.fromObject(object.values[i]);
|
7842 | }
|
7843 | }
|
7844 | return message;
|
7845 | };
|
7846 |
|
7847 | /**
|
7848 | * Creates a plain object from an ArrayValue message. Also converts values to other types if specified.
|
7849 | * @function toObject
|
7850 | * @memberof google.datastore.v1.ArrayValue
|
7851 | * @static
|
7852 | * @param {google.datastore.v1.ArrayValue} message ArrayValue
|
7853 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
7854 | * @returns {Object.<string,*>} Plain object
|
7855 | */
|
7856 | ArrayValue.toObject = function toObject(message, options) {
|
7857 | if (!options)
|
7858 | options = {};
|
7859 | var object = {};
|
7860 | if (options.arrays || options.defaults)
|
7861 | object.values = [];
|
7862 | if (message.values && message.values.length) {
|
7863 | object.values = [];
|
7864 | for (var j = 0; j < message.values.length; ++j)
|
7865 | object.values[j] = $root.google.datastore.v1.Value.toObject(message.values[j], options);
|
7866 | }
|
7867 | return object;
|
7868 | };
|
7869 |
|
7870 | /**
|
7871 | * Converts this ArrayValue to JSON.
|
7872 | * @function toJSON
|
7873 | * @memberof google.datastore.v1.ArrayValue
|
7874 | * @instance
|
7875 | * @returns {Object.<string,*>} JSON object
|
7876 | */
|
7877 | ArrayValue.prototype.toJSON = function toJSON() {
|
7878 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
7879 | };
|
7880 |
|
7881 | /**
|
7882 | * Gets the default type url for ArrayValue
|
7883 | * @function getTypeUrl
|
7884 | * @memberof google.datastore.v1.ArrayValue
|
7885 | * @static
|
7886 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
7887 | * @returns {string} The default type url
|
7888 | */
|
7889 | ArrayValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
7890 | if (typeUrlPrefix === undefined) {
|
7891 | typeUrlPrefix = "type.googleapis.com";
|
7892 | }
|
7893 | return typeUrlPrefix + "/google.datastore.v1.ArrayValue";
|
7894 | };
|
7895 |
|
7896 | return ArrayValue;
|
7897 | })();
|
7898 |
|
7899 | v1.Value = (function() {
|
7900 |
|
7901 | /**
|
7902 | * Properties of a Value.
|
7903 | * @memberof google.datastore.v1
|
7904 | * @interface IValue
|
7905 | * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue
|
7906 | * @property {boolean|null} [booleanValue] Value booleanValue
|
7907 | * @property {number|Long|null} [integerValue] Value integerValue
|
7908 | * @property {number|null} [doubleValue] Value doubleValue
|
7909 | * @property {google.protobuf.ITimestamp|null} [timestampValue] Value timestampValue
|
7910 | * @property {google.datastore.v1.IKey|null} [keyValue] Value keyValue
|
7911 | * @property {string|null} [stringValue] Value stringValue
|
7912 | * @property {Uint8Array|null} [blobValue] Value blobValue
|
7913 | * @property {google.type.ILatLng|null} [geoPointValue] Value geoPointValue
|
7914 | * @property {google.datastore.v1.IEntity|null} [entityValue] Value entityValue
|
7915 | * @property {google.datastore.v1.IArrayValue|null} [arrayValue] Value arrayValue
|
7916 | * @property {number|null} [meaning] Value meaning
|
7917 | * @property {boolean|null} [excludeFromIndexes] Value excludeFromIndexes
|
7918 | */
|
7919 |
|
7920 | /**
|
7921 | * Constructs a new Value.
|
7922 | * @memberof google.datastore.v1
|
7923 | * @classdesc Represents a Value.
|
7924 | * @implements IValue
|
7925 | * @constructor
|
7926 | * @param {google.datastore.v1.IValue=} [properties] Properties to set
|
7927 | */
|
7928 | function Value(properties) {
|
7929 | if (properties)
|
7930 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
7931 | if (properties[keys[i]] != null)
|
7932 | this[keys[i]] = properties[keys[i]];
|
7933 | }
|
7934 |
|
7935 | /**
|
7936 | * Value nullValue.
|
7937 | * @member {google.protobuf.NullValue|null|undefined} nullValue
|
7938 | * @memberof google.datastore.v1.Value
|
7939 | * @instance
|
7940 | */
|
7941 | Value.prototype.nullValue = null;
|
7942 |
|
7943 | /**
|
7944 | * Value booleanValue.
|
7945 | * @member {boolean|null|undefined} booleanValue
|
7946 | * @memberof google.datastore.v1.Value
|
7947 | * @instance
|
7948 | */
|
7949 | Value.prototype.booleanValue = null;
|
7950 |
|
7951 | /**
|
7952 | * Value integerValue.
|
7953 | * @member {number|Long|null|undefined} integerValue
|
7954 | * @memberof google.datastore.v1.Value
|
7955 | * @instance
|
7956 | */
|
7957 | Value.prototype.integerValue = null;
|
7958 |
|
7959 | /**
|
7960 | * Value doubleValue.
|
7961 | * @member {number|null|undefined} doubleValue
|
7962 | * @memberof google.datastore.v1.Value
|
7963 | * @instance
|
7964 | */
|
7965 | Value.prototype.doubleValue = null;
|
7966 |
|
7967 | /**
|
7968 | * Value timestampValue.
|
7969 | * @member {google.protobuf.ITimestamp|null|undefined} timestampValue
|
7970 | * @memberof google.datastore.v1.Value
|
7971 | * @instance
|
7972 | */
|
7973 | Value.prototype.timestampValue = null;
|
7974 |
|
7975 | /**
|
7976 | * Value keyValue.
|
7977 | * @member {google.datastore.v1.IKey|null|undefined} keyValue
|
7978 | * @memberof google.datastore.v1.Value
|
7979 | * @instance
|
7980 | */
|
7981 | Value.prototype.keyValue = null;
|
7982 |
|
7983 | /**
|
7984 | * Value stringValue.
|
7985 | * @member {string|null|undefined} stringValue
|
7986 | * @memberof google.datastore.v1.Value
|
7987 | * @instance
|
7988 | */
|
7989 | Value.prototype.stringValue = null;
|
7990 |
|
7991 | /**
|
7992 | * Value blobValue.
|
7993 | * @member {Uint8Array|null|undefined} blobValue
|
7994 | * @memberof google.datastore.v1.Value
|
7995 | * @instance
|
7996 | */
|
7997 | Value.prototype.blobValue = null;
|
7998 |
|
7999 | /**
|
8000 | * Value geoPointValue.
|
8001 | * @member {google.type.ILatLng|null|undefined} geoPointValue
|
8002 | * @memberof google.datastore.v1.Value
|
8003 | * @instance
|
8004 | */
|
8005 | Value.prototype.geoPointValue = null;
|
8006 |
|
8007 | /**
|
8008 | * Value entityValue.
|
8009 | * @member {google.datastore.v1.IEntity|null|undefined} entityValue
|
8010 | * @memberof google.datastore.v1.Value
|
8011 | * @instance
|
8012 | */
|
8013 | Value.prototype.entityValue = null;
|
8014 |
|
8015 | /**
|
8016 | * Value arrayValue.
|
8017 | * @member {google.datastore.v1.IArrayValue|null|undefined} arrayValue
|
8018 | * @memberof google.datastore.v1.Value
|
8019 | * @instance
|
8020 | */
|
8021 | Value.prototype.arrayValue = null;
|
8022 |
|
8023 | /**
|
8024 | * Value meaning.
|
8025 | * @member {number} meaning
|
8026 | * @memberof google.datastore.v1.Value
|
8027 | * @instance
|
8028 | */
|
8029 | Value.prototype.meaning = 0;
|
8030 |
|
8031 | /**
|
8032 | * Value excludeFromIndexes.
|
8033 | * @member {boolean} excludeFromIndexes
|
8034 | * @memberof google.datastore.v1.Value
|
8035 | * @instance
|
8036 | */
|
8037 | Value.prototype.excludeFromIndexes = false;
|
8038 |
|
8039 | // OneOf field names bound to virtual getters and setters
|
8040 | var $oneOfFields;
|
8041 |
|
8042 | /**
|
8043 | * Value valueType.
|
8044 | * @member {"nullValue"|"booleanValue"|"integerValue"|"doubleValue"|"timestampValue"|"keyValue"|"stringValue"|"blobValue"|"geoPointValue"|"entityValue"|"arrayValue"|undefined} valueType
|
8045 | * @memberof google.datastore.v1.Value
|
8046 | * @instance
|
8047 | */
|
8048 | Object.defineProperty(Value.prototype, "valueType", {
|
8049 | get: $util.oneOfGetter($oneOfFields = ["nullValue", "booleanValue", "integerValue", "doubleValue", "timestampValue", "keyValue", "stringValue", "blobValue", "geoPointValue", "entityValue", "arrayValue"]),
|
8050 | set: $util.oneOfSetter($oneOfFields)
|
8051 | });
|
8052 |
|
8053 | /**
|
8054 | * Creates a new Value instance using the specified properties.
|
8055 | * @function create
|
8056 | * @memberof google.datastore.v1.Value
|
8057 | * @static
|
8058 | * @param {google.datastore.v1.IValue=} [properties] Properties to set
|
8059 | * @returns {google.datastore.v1.Value} Value instance
|
8060 | */
|
8061 | Value.create = function create(properties) {
|
8062 | return new Value(properties);
|
8063 | };
|
8064 |
|
8065 | /**
|
8066 | * Encodes the specified Value message. Does not implicitly {@link google.datastore.v1.Value.verify|verify} messages.
|
8067 | * @function encode
|
8068 | * @memberof google.datastore.v1.Value
|
8069 | * @static
|
8070 | * @param {google.datastore.v1.IValue} message Value message or plain object to encode
|
8071 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
8072 | * @returns {$protobuf.Writer} Writer
|
8073 | */
|
8074 | Value.encode = function encode(message, writer) {
|
8075 | if (!writer)
|
8076 | writer = $Writer.create();
|
8077 | if (message.booleanValue != null && Object.hasOwnProperty.call(message, "booleanValue"))
|
8078 | writer.uint32(/* id 1, wireType 0 =*/8).bool(message.booleanValue);
|
8079 | if (message.integerValue != null && Object.hasOwnProperty.call(message, "integerValue"))
|
8080 | writer.uint32(/* id 2, wireType 0 =*/16).int64(message.integerValue);
|
8081 | if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue"))
|
8082 | writer.uint32(/* id 3, wireType 1 =*/25).double(message.doubleValue);
|
8083 | if (message.keyValue != null && Object.hasOwnProperty.call(message, "keyValue"))
|
8084 | $root.google.datastore.v1.Key.encode(message.keyValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
8085 | if (message.entityValue != null && Object.hasOwnProperty.call(message, "entityValue"))
|
8086 | $root.google.datastore.v1.Entity.encode(message.entityValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
8087 | if (message.geoPointValue != null && Object.hasOwnProperty.call(message, "geoPointValue"))
|
8088 | $root.google.type.LatLng.encode(message.geoPointValue, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
8089 | if (message.arrayValue != null && Object.hasOwnProperty.call(message, "arrayValue"))
|
8090 | $root.google.datastore.v1.ArrayValue.encode(message.arrayValue, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
8091 | if (message.timestampValue != null && Object.hasOwnProperty.call(message, "timestampValue"))
|
8092 | $root.google.protobuf.Timestamp.encode(message.timestampValue, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
8093 | if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue"))
|
8094 | writer.uint32(/* id 11, wireType 0 =*/88).int32(message.nullValue);
|
8095 | if (message.meaning != null && Object.hasOwnProperty.call(message, "meaning"))
|
8096 | writer.uint32(/* id 14, wireType 0 =*/112).int32(message.meaning);
|
8097 | if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue"))
|
8098 | writer.uint32(/* id 17, wireType 2 =*/138).string(message.stringValue);
|
8099 | if (message.blobValue != null && Object.hasOwnProperty.call(message, "blobValue"))
|
8100 | writer.uint32(/* id 18, wireType 2 =*/146).bytes(message.blobValue);
|
8101 | if (message.excludeFromIndexes != null && Object.hasOwnProperty.call(message, "excludeFromIndexes"))
|
8102 | writer.uint32(/* id 19, wireType 0 =*/152).bool(message.excludeFromIndexes);
|
8103 | return writer;
|
8104 | };
|
8105 |
|
8106 | /**
|
8107 | * Encodes the specified Value message, length delimited. Does not implicitly {@link google.datastore.v1.Value.verify|verify} messages.
|
8108 | * @function encodeDelimited
|
8109 | * @memberof google.datastore.v1.Value
|
8110 | * @static
|
8111 | * @param {google.datastore.v1.IValue} message Value message or plain object to encode
|
8112 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
8113 | * @returns {$protobuf.Writer} Writer
|
8114 | */
|
8115 | Value.encodeDelimited = function encodeDelimited(message, writer) {
|
8116 | return this.encode(message, writer).ldelim();
|
8117 | };
|
8118 |
|
8119 | /**
|
8120 | * Decodes a Value message from the specified reader or buffer.
|
8121 | * @function decode
|
8122 | * @memberof google.datastore.v1.Value
|
8123 | * @static
|
8124 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8125 | * @param {number} [length] Message length if known beforehand
|
8126 | * @returns {google.datastore.v1.Value} Value
|
8127 | * @throws {Error} If the payload is not a reader or valid buffer
|
8128 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8129 | */
|
8130 | Value.decode = function decode(reader, length) {
|
8131 | if (!(reader instanceof $Reader))
|
8132 | reader = $Reader.create(reader);
|
8133 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.Value();
|
8134 | while (reader.pos < end) {
|
8135 | var tag = reader.uint32();
|
8136 | switch (tag >>> 3) {
|
8137 | case 11: {
|
8138 | message.nullValue = reader.int32();
|
8139 | break;
|
8140 | }
|
8141 | case 1: {
|
8142 | message.booleanValue = reader.bool();
|
8143 | break;
|
8144 | }
|
8145 | case 2: {
|
8146 | message.integerValue = reader.int64();
|
8147 | break;
|
8148 | }
|
8149 | case 3: {
|
8150 | message.doubleValue = reader.double();
|
8151 | break;
|
8152 | }
|
8153 | case 10: {
|
8154 | message.timestampValue = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
8155 | break;
|
8156 | }
|
8157 | case 5: {
|
8158 | message.keyValue = $root.google.datastore.v1.Key.decode(reader, reader.uint32());
|
8159 | break;
|
8160 | }
|
8161 | case 17: {
|
8162 | message.stringValue = reader.string();
|
8163 | break;
|
8164 | }
|
8165 | case 18: {
|
8166 | message.blobValue = reader.bytes();
|
8167 | break;
|
8168 | }
|
8169 | case 8: {
|
8170 | message.geoPointValue = $root.google.type.LatLng.decode(reader, reader.uint32());
|
8171 | break;
|
8172 | }
|
8173 | case 6: {
|
8174 | message.entityValue = $root.google.datastore.v1.Entity.decode(reader, reader.uint32());
|
8175 | break;
|
8176 | }
|
8177 | case 9: {
|
8178 | message.arrayValue = $root.google.datastore.v1.ArrayValue.decode(reader, reader.uint32());
|
8179 | break;
|
8180 | }
|
8181 | case 14: {
|
8182 | message.meaning = reader.int32();
|
8183 | break;
|
8184 | }
|
8185 | case 19: {
|
8186 | message.excludeFromIndexes = reader.bool();
|
8187 | break;
|
8188 | }
|
8189 | default:
|
8190 | reader.skipType(tag & 7);
|
8191 | break;
|
8192 | }
|
8193 | }
|
8194 | return message;
|
8195 | };
|
8196 |
|
8197 | /**
|
8198 | * Decodes a Value message from the specified reader or buffer, length delimited.
|
8199 | * @function decodeDelimited
|
8200 | * @memberof google.datastore.v1.Value
|
8201 | * @static
|
8202 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8203 | * @returns {google.datastore.v1.Value} Value
|
8204 | * @throws {Error} If the payload is not a reader or valid buffer
|
8205 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8206 | */
|
8207 | Value.decodeDelimited = function decodeDelimited(reader) {
|
8208 | if (!(reader instanceof $Reader))
|
8209 | reader = new $Reader(reader);
|
8210 | return this.decode(reader, reader.uint32());
|
8211 | };
|
8212 |
|
8213 | /**
|
8214 | * Verifies a Value message.
|
8215 | * @function verify
|
8216 | * @memberof google.datastore.v1.Value
|
8217 | * @static
|
8218 | * @param {Object.<string,*>} message Plain object to verify
|
8219 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
8220 | */
|
8221 | Value.verify = function verify(message) {
|
8222 | if (typeof message !== "object" || message === null)
|
8223 | return "object expected";
|
8224 | var properties = {};
|
8225 | if (message.nullValue != null && message.hasOwnProperty("nullValue")) {
|
8226 | properties.valueType = 1;
|
8227 | switch (message.nullValue) {
|
8228 | default:
|
8229 | return "nullValue: enum value expected";
|
8230 | case 0:
|
8231 | break;
|
8232 | }
|
8233 | }
|
8234 | if (message.booleanValue != null && message.hasOwnProperty("booleanValue")) {
|
8235 | if (properties.valueType === 1)
|
8236 | return "valueType: multiple values";
|
8237 | properties.valueType = 1;
|
8238 | if (typeof message.booleanValue !== "boolean")
|
8239 | return "booleanValue: boolean expected";
|
8240 | }
|
8241 | if (message.integerValue != null && message.hasOwnProperty("integerValue")) {
|
8242 | if (properties.valueType === 1)
|
8243 | return "valueType: multiple values";
|
8244 | properties.valueType = 1;
|
8245 | if (!$util.isInteger(message.integerValue) && !(message.integerValue && $util.isInteger(message.integerValue.low) && $util.isInteger(message.integerValue.high)))
|
8246 | return "integerValue: integer|Long expected";
|
8247 | }
|
8248 | if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) {
|
8249 | if (properties.valueType === 1)
|
8250 | return "valueType: multiple values";
|
8251 | properties.valueType = 1;
|
8252 | if (typeof message.doubleValue !== "number")
|
8253 | return "doubleValue: number expected";
|
8254 | }
|
8255 | if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) {
|
8256 | if (properties.valueType === 1)
|
8257 | return "valueType: multiple values";
|
8258 | properties.valueType = 1;
|
8259 | {
|
8260 | var error = $root.google.protobuf.Timestamp.verify(message.timestampValue);
|
8261 | if (error)
|
8262 | return "timestampValue." + error;
|
8263 | }
|
8264 | }
|
8265 | if (message.keyValue != null && message.hasOwnProperty("keyValue")) {
|
8266 | if (properties.valueType === 1)
|
8267 | return "valueType: multiple values";
|
8268 | properties.valueType = 1;
|
8269 | {
|
8270 | var error = $root.google.datastore.v1.Key.verify(message.keyValue);
|
8271 | if (error)
|
8272 | return "keyValue." + error;
|
8273 | }
|
8274 | }
|
8275 | if (message.stringValue != null && message.hasOwnProperty("stringValue")) {
|
8276 | if (properties.valueType === 1)
|
8277 | return "valueType: multiple values";
|
8278 | properties.valueType = 1;
|
8279 | if (!$util.isString(message.stringValue))
|
8280 | return "stringValue: string expected";
|
8281 | }
|
8282 | if (message.blobValue != null && message.hasOwnProperty("blobValue")) {
|
8283 | if (properties.valueType === 1)
|
8284 | return "valueType: multiple values";
|
8285 | properties.valueType = 1;
|
8286 | if (!(message.blobValue && typeof message.blobValue.length === "number" || $util.isString(message.blobValue)))
|
8287 | return "blobValue: buffer expected";
|
8288 | }
|
8289 | if (message.geoPointValue != null && message.hasOwnProperty("geoPointValue")) {
|
8290 | if (properties.valueType === 1)
|
8291 | return "valueType: multiple values";
|
8292 | properties.valueType = 1;
|
8293 | {
|
8294 | var error = $root.google.type.LatLng.verify(message.geoPointValue);
|
8295 | if (error)
|
8296 | return "geoPointValue." + error;
|
8297 | }
|
8298 | }
|
8299 | if (message.entityValue != null && message.hasOwnProperty("entityValue")) {
|
8300 | if (properties.valueType === 1)
|
8301 | return "valueType: multiple values";
|
8302 | properties.valueType = 1;
|
8303 | {
|
8304 | var error = $root.google.datastore.v1.Entity.verify(message.entityValue);
|
8305 | if (error)
|
8306 | return "entityValue." + error;
|
8307 | }
|
8308 | }
|
8309 | if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) {
|
8310 | if (properties.valueType === 1)
|
8311 | return "valueType: multiple values";
|
8312 | properties.valueType = 1;
|
8313 | {
|
8314 | var error = $root.google.datastore.v1.ArrayValue.verify(message.arrayValue);
|
8315 | if (error)
|
8316 | return "arrayValue." + error;
|
8317 | }
|
8318 | }
|
8319 | if (message.meaning != null && message.hasOwnProperty("meaning"))
|
8320 | if (!$util.isInteger(message.meaning))
|
8321 | return "meaning: integer expected";
|
8322 | if (message.excludeFromIndexes != null && message.hasOwnProperty("excludeFromIndexes"))
|
8323 | if (typeof message.excludeFromIndexes !== "boolean")
|
8324 | return "excludeFromIndexes: boolean expected";
|
8325 | return null;
|
8326 | };
|
8327 |
|
8328 | /**
|
8329 | * Creates a Value message from a plain object. Also converts values to their respective internal types.
|
8330 | * @function fromObject
|
8331 | * @memberof google.datastore.v1.Value
|
8332 | * @static
|
8333 | * @param {Object.<string,*>} object Plain object
|
8334 | * @returns {google.datastore.v1.Value} Value
|
8335 | */
|
8336 | Value.fromObject = function fromObject(object) {
|
8337 | if (object instanceof $root.google.datastore.v1.Value)
|
8338 | return object;
|
8339 | var message = new $root.google.datastore.v1.Value();
|
8340 | switch (object.nullValue) {
|
8341 | default:
|
8342 | if (typeof object.nullValue === "number") {
|
8343 | message.nullValue = object.nullValue;
|
8344 | break;
|
8345 | }
|
8346 | break;
|
8347 | case "NULL_VALUE":
|
8348 | case 0:
|
8349 | message.nullValue = 0;
|
8350 | break;
|
8351 | }
|
8352 | if (object.booleanValue != null)
|
8353 | message.booleanValue = Boolean(object.booleanValue);
|
8354 | if (object.integerValue != null)
|
8355 | if ($util.Long)
|
8356 | (message.integerValue = $util.Long.fromValue(object.integerValue)).unsigned = false;
|
8357 | else if (typeof object.integerValue === "string")
|
8358 | message.integerValue = parseInt(object.integerValue, 10);
|
8359 | else if (typeof object.integerValue === "number")
|
8360 | message.integerValue = object.integerValue;
|
8361 | else if (typeof object.integerValue === "object")
|
8362 | message.integerValue = new $util.LongBits(object.integerValue.low >>> 0, object.integerValue.high >>> 0).toNumber();
|
8363 | if (object.doubleValue != null)
|
8364 | message.doubleValue = Number(object.doubleValue);
|
8365 | if (object.timestampValue != null) {
|
8366 | if (typeof object.timestampValue !== "object")
|
8367 | throw TypeError(".google.datastore.v1.Value.timestampValue: object expected");
|
8368 | message.timestampValue = $root.google.protobuf.Timestamp.fromObject(object.timestampValue);
|
8369 | }
|
8370 | if (object.keyValue != null) {
|
8371 | if (typeof object.keyValue !== "object")
|
8372 | throw TypeError(".google.datastore.v1.Value.keyValue: object expected");
|
8373 | message.keyValue = $root.google.datastore.v1.Key.fromObject(object.keyValue);
|
8374 | }
|
8375 | if (object.stringValue != null)
|
8376 | message.stringValue = String(object.stringValue);
|
8377 | if (object.blobValue != null)
|
8378 | if (typeof object.blobValue === "string")
|
8379 | $util.base64.decode(object.blobValue, message.blobValue = $util.newBuffer($util.base64.length(object.blobValue)), 0);
|
8380 | else if (object.blobValue.length >= 0)
|
8381 | message.blobValue = object.blobValue;
|
8382 | if (object.geoPointValue != null) {
|
8383 | if (typeof object.geoPointValue !== "object")
|
8384 | throw TypeError(".google.datastore.v1.Value.geoPointValue: object expected");
|
8385 | message.geoPointValue = $root.google.type.LatLng.fromObject(object.geoPointValue);
|
8386 | }
|
8387 | if (object.entityValue != null) {
|
8388 | if (typeof object.entityValue !== "object")
|
8389 | throw TypeError(".google.datastore.v1.Value.entityValue: object expected");
|
8390 | message.entityValue = $root.google.datastore.v1.Entity.fromObject(object.entityValue);
|
8391 | }
|
8392 | if (object.arrayValue != null) {
|
8393 | if (typeof object.arrayValue !== "object")
|
8394 | throw TypeError(".google.datastore.v1.Value.arrayValue: object expected");
|
8395 | message.arrayValue = $root.google.datastore.v1.ArrayValue.fromObject(object.arrayValue);
|
8396 | }
|
8397 | if (object.meaning != null)
|
8398 | message.meaning = object.meaning | 0;
|
8399 | if (object.excludeFromIndexes != null)
|
8400 | message.excludeFromIndexes = Boolean(object.excludeFromIndexes);
|
8401 | return message;
|
8402 | };
|
8403 |
|
8404 | /**
|
8405 | * Creates a plain object from a Value message. Also converts values to other types if specified.
|
8406 | * @function toObject
|
8407 | * @memberof google.datastore.v1.Value
|
8408 | * @static
|
8409 | * @param {google.datastore.v1.Value} message Value
|
8410 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
8411 | * @returns {Object.<string,*>} Plain object
|
8412 | */
|
8413 | Value.toObject = function toObject(message, options) {
|
8414 | if (!options)
|
8415 | options = {};
|
8416 | var object = {};
|
8417 | if (options.defaults) {
|
8418 | object.meaning = 0;
|
8419 | object.excludeFromIndexes = false;
|
8420 | }
|
8421 | if (message.booleanValue != null && message.hasOwnProperty("booleanValue")) {
|
8422 | object.booleanValue = message.booleanValue;
|
8423 | if (options.oneofs)
|
8424 | object.valueType = "booleanValue";
|
8425 | }
|
8426 | if (message.integerValue != null && message.hasOwnProperty("integerValue")) {
|
8427 | if (typeof message.integerValue === "number")
|
8428 | object.integerValue = options.longs === String ? String(message.integerValue) : message.integerValue;
|
8429 | else
|
8430 | object.integerValue = options.longs === String ? $util.Long.prototype.toString.call(message.integerValue) : options.longs === Number ? new $util.LongBits(message.integerValue.low >>> 0, message.integerValue.high >>> 0).toNumber() : message.integerValue;
|
8431 | if (options.oneofs)
|
8432 | object.valueType = "integerValue";
|
8433 | }
|
8434 | if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) {
|
8435 | object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue;
|
8436 | if (options.oneofs)
|
8437 | object.valueType = "doubleValue";
|
8438 | }
|
8439 | if (message.keyValue != null && message.hasOwnProperty("keyValue")) {
|
8440 | object.keyValue = $root.google.datastore.v1.Key.toObject(message.keyValue, options);
|
8441 | if (options.oneofs)
|
8442 | object.valueType = "keyValue";
|
8443 | }
|
8444 | if (message.entityValue != null && message.hasOwnProperty("entityValue")) {
|
8445 | object.entityValue = $root.google.datastore.v1.Entity.toObject(message.entityValue, options);
|
8446 | if (options.oneofs)
|
8447 | object.valueType = "entityValue";
|
8448 | }
|
8449 | if (message.geoPointValue != null && message.hasOwnProperty("geoPointValue")) {
|
8450 | object.geoPointValue = $root.google.type.LatLng.toObject(message.geoPointValue, options);
|
8451 | if (options.oneofs)
|
8452 | object.valueType = "geoPointValue";
|
8453 | }
|
8454 | if (message.arrayValue != null && message.hasOwnProperty("arrayValue")) {
|
8455 | object.arrayValue = $root.google.datastore.v1.ArrayValue.toObject(message.arrayValue, options);
|
8456 | if (options.oneofs)
|
8457 | object.valueType = "arrayValue";
|
8458 | }
|
8459 | if (message.timestampValue != null && message.hasOwnProperty("timestampValue")) {
|
8460 | object.timestampValue = $root.google.protobuf.Timestamp.toObject(message.timestampValue, options);
|
8461 | if (options.oneofs)
|
8462 | object.valueType = "timestampValue";
|
8463 | }
|
8464 | if (message.nullValue != null && message.hasOwnProperty("nullValue")) {
|
8465 | object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue;
|
8466 | if (options.oneofs)
|
8467 | object.valueType = "nullValue";
|
8468 | }
|
8469 | if (message.meaning != null && message.hasOwnProperty("meaning"))
|
8470 | object.meaning = message.meaning;
|
8471 | if (message.stringValue != null && message.hasOwnProperty("stringValue")) {
|
8472 | object.stringValue = message.stringValue;
|
8473 | if (options.oneofs)
|
8474 | object.valueType = "stringValue";
|
8475 | }
|
8476 | if (message.blobValue != null && message.hasOwnProperty("blobValue")) {
|
8477 | object.blobValue = options.bytes === String ? $util.base64.encode(message.blobValue, 0, message.blobValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.blobValue) : message.blobValue;
|
8478 | if (options.oneofs)
|
8479 | object.valueType = "blobValue";
|
8480 | }
|
8481 | if (message.excludeFromIndexes != null && message.hasOwnProperty("excludeFromIndexes"))
|
8482 | object.excludeFromIndexes = message.excludeFromIndexes;
|
8483 | return object;
|
8484 | };
|
8485 |
|
8486 | /**
|
8487 | * Converts this Value to JSON.
|
8488 | * @function toJSON
|
8489 | * @memberof google.datastore.v1.Value
|
8490 | * @instance
|
8491 | * @returns {Object.<string,*>} JSON object
|
8492 | */
|
8493 | Value.prototype.toJSON = function toJSON() {
|
8494 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
8495 | };
|
8496 |
|
8497 | /**
|
8498 | * Gets the default type url for Value
|
8499 | * @function getTypeUrl
|
8500 | * @memberof google.datastore.v1.Value
|
8501 | * @static
|
8502 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
8503 | * @returns {string} The default type url
|
8504 | */
|
8505 | Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
8506 | if (typeUrlPrefix === undefined) {
|
8507 | typeUrlPrefix = "type.googleapis.com";
|
8508 | }
|
8509 | return typeUrlPrefix + "/google.datastore.v1.Value";
|
8510 | };
|
8511 |
|
8512 | return Value;
|
8513 | })();
|
8514 |
|
8515 | v1.Entity = (function() {
|
8516 |
|
8517 | /**
|
8518 | * Properties of an Entity.
|
8519 | * @memberof google.datastore.v1
|
8520 | * @interface IEntity
|
8521 | * @property {google.datastore.v1.IKey|null} [key] Entity key
|
8522 | * @property {Object.<string,google.datastore.v1.IValue>|null} [properties] Entity properties
|
8523 | */
|
8524 |
|
8525 | /**
|
8526 | * Constructs a new Entity.
|
8527 | * @memberof google.datastore.v1
|
8528 | * @classdesc Represents an Entity.
|
8529 | * @implements IEntity
|
8530 | * @constructor
|
8531 | * @param {google.datastore.v1.IEntity=} [properties] Properties to set
|
8532 | */
|
8533 | function Entity(properties) {
|
8534 | this.properties = {};
|
8535 | if (properties)
|
8536 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
8537 | if (properties[keys[i]] != null)
|
8538 | this[keys[i]] = properties[keys[i]];
|
8539 | }
|
8540 |
|
8541 | /**
|
8542 | * Entity key.
|
8543 | * @member {google.datastore.v1.IKey|null|undefined} key
|
8544 | * @memberof google.datastore.v1.Entity
|
8545 | * @instance
|
8546 | */
|
8547 | Entity.prototype.key = null;
|
8548 |
|
8549 | /**
|
8550 | * Entity properties.
|
8551 | * @member {Object.<string,google.datastore.v1.IValue>} properties
|
8552 | * @memberof google.datastore.v1.Entity
|
8553 | * @instance
|
8554 | */
|
8555 | Entity.prototype.properties = $util.emptyObject;
|
8556 |
|
8557 | /**
|
8558 | * Creates a new Entity instance using the specified properties.
|
8559 | * @function create
|
8560 | * @memberof google.datastore.v1.Entity
|
8561 | * @static
|
8562 | * @param {google.datastore.v1.IEntity=} [properties] Properties to set
|
8563 | * @returns {google.datastore.v1.Entity} Entity instance
|
8564 | */
|
8565 | Entity.create = function create(properties) {
|
8566 | return new Entity(properties);
|
8567 | };
|
8568 |
|
8569 | /**
|
8570 | * Encodes the specified Entity message. Does not implicitly {@link google.datastore.v1.Entity.verify|verify} messages.
|
8571 | * @function encode
|
8572 | * @memberof google.datastore.v1.Entity
|
8573 | * @static
|
8574 | * @param {google.datastore.v1.IEntity} message Entity message or plain object to encode
|
8575 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
8576 | * @returns {$protobuf.Writer} Writer
|
8577 | */
|
8578 | Entity.encode = function encode(message, writer) {
|
8579 | if (!writer)
|
8580 | writer = $Writer.create();
|
8581 | if (message.key != null && Object.hasOwnProperty.call(message, "key"))
|
8582 | $root.google.datastore.v1.Key.encode(message.key, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
8583 | if (message.properties != null && Object.hasOwnProperty.call(message, "properties"))
|
8584 | for (var keys = Object.keys(message.properties), i = 0; i < keys.length; ++i) {
|
8585 | writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
|
8586 | $root.google.datastore.v1.Value.encode(message.properties[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
8587 | }
|
8588 | return writer;
|
8589 | };
|
8590 |
|
8591 | /**
|
8592 | * Encodes the specified Entity message, length delimited. Does not implicitly {@link google.datastore.v1.Entity.verify|verify} messages.
|
8593 | * @function encodeDelimited
|
8594 | * @memberof google.datastore.v1.Entity
|
8595 | * @static
|
8596 | * @param {google.datastore.v1.IEntity} message Entity message or plain object to encode
|
8597 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
8598 | * @returns {$protobuf.Writer} Writer
|
8599 | */
|
8600 | Entity.encodeDelimited = function encodeDelimited(message, writer) {
|
8601 | return this.encode(message, writer).ldelim();
|
8602 | };
|
8603 |
|
8604 | /**
|
8605 | * Decodes an Entity message from the specified reader or buffer.
|
8606 | * @function decode
|
8607 | * @memberof google.datastore.v1.Entity
|
8608 | * @static
|
8609 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8610 | * @param {number} [length] Message length if known beforehand
|
8611 | * @returns {google.datastore.v1.Entity} Entity
|
8612 | * @throws {Error} If the payload is not a reader or valid buffer
|
8613 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8614 | */
|
8615 | Entity.decode = function decode(reader, length) {
|
8616 | if (!(reader instanceof $Reader))
|
8617 | reader = $Reader.create(reader);
|
8618 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.Entity(), key, value;
|
8619 | while (reader.pos < end) {
|
8620 | var tag = reader.uint32();
|
8621 | switch (tag >>> 3) {
|
8622 | case 1: {
|
8623 | message.key = $root.google.datastore.v1.Key.decode(reader, reader.uint32());
|
8624 | break;
|
8625 | }
|
8626 | case 3: {
|
8627 | if (message.properties === $util.emptyObject)
|
8628 | message.properties = {};
|
8629 | var end2 = reader.uint32() + reader.pos;
|
8630 | key = "";
|
8631 | value = null;
|
8632 | while (reader.pos < end2) {
|
8633 | var tag2 = reader.uint32();
|
8634 | switch (tag2 >>> 3) {
|
8635 | case 1:
|
8636 | key = reader.string();
|
8637 | break;
|
8638 | case 2:
|
8639 | value = $root.google.datastore.v1.Value.decode(reader, reader.uint32());
|
8640 | break;
|
8641 | default:
|
8642 | reader.skipType(tag2 & 7);
|
8643 | break;
|
8644 | }
|
8645 | }
|
8646 | message.properties[key] = value;
|
8647 | break;
|
8648 | }
|
8649 | default:
|
8650 | reader.skipType(tag & 7);
|
8651 | break;
|
8652 | }
|
8653 | }
|
8654 | return message;
|
8655 | };
|
8656 |
|
8657 | /**
|
8658 | * Decodes an Entity message from the specified reader or buffer, length delimited.
|
8659 | * @function decodeDelimited
|
8660 | * @memberof google.datastore.v1.Entity
|
8661 | * @static
|
8662 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8663 | * @returns {google.datastore.v1.Entity} Entity
|
8664 | * @throws {Error} If the payload is not a reader or valid buffer
|
8665 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8666 | */
|
8667 | Entity.decodeDelimited = function decodeDelimited(reader) {
|
8668 | if (!(reader instanceof $Reader))
|
8669 | reader = new $Reader(reader);
|
8670 | return this.decode(reader, reader.uint32());
|
8671 | };
|
8672 |
|
8673 | /**
|
8674 | * Verifies an Entity message.
|
8675 | * @function verify
|
8676 | * @memberof google.datastore.v1.Entity
|
8677 | * @static
|
8678 | * @param {Object.<string,*>} message Plain object to verify
|
8679 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
8680 | */
|
8681 | Entity.verify = function verify(message) {
|
8682 | if (typeof message !== "object" || message === null)
|
8683 | return "object expected";
|
8684 | if (message.key != null && message.hasOwnProperty("key")) {
|
8685 | var error = $root.google.datastore.v1.Key.verify(message.key);
|
8686 | if (error)
|
8687 | return "key." + error;
|
8688 | }
|
8689 | if (message.properties != null && message.hasOwnProperty("properties")) {
|
8690 | if (!$util.isObject(message.properties))
|
8691 | return "properties: object expected";
|
8692 | var key = Object.keys(message.properties);
|
8693 | for (var i = 0; i < key.length; ++i) {
|
8694 | var error = $root.google.datastore.v1.Value.verify(message.properties[key[i]]);
|
8695 | if (error)
|
8696 | return "properties." + error;
|
8697 | }
|
8698 | }
|
8699 | return null;
|
8700 | };
|
8701 |
|
8702 | /**
|
8703 | * Creates an Entity message from a plain object. Also converts values to their respective internal types.
|
8704 | * @function fromObject
|
8705 | * @memberof google.datastore.v1.Entity
|
8706 | * @static
|
8707 | * @param {Object.<string,*>} object Plain object
|
8708 | * @returns {google.datastore.v1.Entity} Entity
|
8709 | */
|
8710 | Entity.fromObject = function fromObject(object) {
|
8711 | if (object instanceof $root.google.datastore.v1.Entity)
|
8712 | return object;
|
8713 | var message = new $root.google.datastore.v1.Entity();
|
8714 | if (object.key != null) {
|
8715 | if (typeof object.key !== "object")
|
8716 | throw TypeError(".google.datastore.v1.Entity.key: object expected");
|
8717 | message.key = $root.google.datastore.v1.Key.fromObject(object.key);
|
8718 | }
|
8719 | if (object.properties) {
|
8720 | if (typeof object.properties !== "object")
|
8721 | throw TypeError(".google.datastore.v1.Entity.properties: object expected");
|
8722 | message.properties = {};
|
8723 | for (var keys = Object.keys(object.properties), i = 0; i < keys.length; ++i) {
|
8724 | if (typeof object.properties[keys[i]] !== "object")
|
8725 | throw TypeError(".google.datastore.v1.Entity.properties: object expected");
|
8726 | message.properties[keys[i]] = $root.google.datastore.v1.Value.fromObject(object.properties[keys[i]]);
|
8727 | }
|
8728 | }
|
8729 | return message;
|
8730 | };
|
8731 |
|
8732 | /**
|
8733 | * Creates a plain object from an Entity message. Also converts values to other types if specified.
|
8734 | * @function toObject
|
8735 | * @memberof google.datastore.v1.Entity
|
8736 | * @static
|
8737 | * @param {google.datastore.v1.Entity} message Entity
|
8738 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
8739 | * @returns {Object.<string,*>} Plain object
|
8740 | */
|
8741 | Entity.toObject = function toObject(message, options) {
|
8742 | if (!options)
|
8743 | options = {};
|
8744 | var object = {};
|
8745 | if (options.objects || options.defaults)
|
8746 | object.properties = {};
|
8747 | if (options.defaults)
|
8748 | object.key = null;
|
8749 | if (message.key != null && message.hasOwnProperty("key"))
|
8750 | object.key = $root.google.datastore.v1.Key.toObject(message.key, options);
|
8751 | var keys2;
|
8752 | if (message.properties && (keys2 = Object.keys(message.properties)).length) {
|
8753 | object.properties = {};
|
8754 | for (var j = 0; j < keys2.length; ++j)
|
8755 | object.properties[keys2[j]] = $root.google.datastore.v1.Value.toObject(message.properties[keys2[j]], options);
|
8756 | }
|
8757 | return object;
|
8758 | };
|
8759 |
|
8760 | /**
|
8761 | * Converts this Entity to JSON.
|
8762 | * @function toJSON
|
8763 | * @memberof google.datastore.v1.Entity
|
8764 | * @instance
|
8765 | * @returns {Object.<string,*>} JSON object
|
8766 | */
|
8767 | Entity.prototype.toJSON = function toJSON() {
|
8768 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
8769 | };
|
8770 |
|
8771 | /**
|
8772 | * Gets the default type url for Entity
|
8773 | * @function getTypeUrl
|
8774 | * @memberof google.datastore.v1.Entity
|
8775 | * @static
|
8776 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
8777 | * @returns {string} The default type url
|
8778 | */
|
8779 | Entity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
8780 | if (typeUrlPrefix === undefined) {
|
8781 | typeUrlPrefix = "type.googleapis.com";
|
8782 | }
|
8783 | return typeUrlPrefix + "/google.datastore.v1.Entity";
|
8784 | };
|
8785 |
|
8786 | return Entity;
|
8787 | })();
|
8788 |
|
8789 | v1.EntityResult = (function() {
|
8790 |
|
8791 | /**
|
8792 | * Properties of an EntityResult.
|
8793 | * @memberof google.datastore.v1
|
8794 | * @interface IEntityResult
|
8795 | * @property {google.datastore.v1.IEntity|null} [entity] EntityResult entity
|
8796 | * @property {number|Long|null} [version] EntityResult version
|
8797 | * @property {google.protobuf.ITimestamp|null} [createTime] EntityResult createTime
|
8798 | * @property {google.protobuf.ITimestamp|null} [updateTime] EntityResult updateTime
|
8799 | * @property {Uint8Array|null} [cursor] EntityResult cursor
|
8800 | */
|
8801 |
|
8802 | /**
|
8803 | * Constructs a new EntityResult.
|
8804 | * @memberof google.datastore.v1
|
8805 | * @classdesc Represents an EntityResult.
|
8806 | * @implements IEntityResult
|
8807 | * @constructor
|
8808 | * @param {google.datastore.v1.IEntityResult=} [properties] Properties to set
|
8809 | */
|
8810 | function EntityResult(properties) {
|
8811 | if (properties)
|
8812 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
8813 | if (properties[keys[i]] != null)
|
8814 | this[keys[i]] = properties[keys[i]];
|
8815 | }
|
8816 |
|
8817 | /**
|
8818 | * EntityResult entity.
|
8819 | * @member {google.datastore.v1.IEntity|null|undefined} entity
|
8820 | * @memberof google.datastore.v1.EntityResult
|
8821 | * @instance
|
8822 | */
|
8823 | EntityResult.prototype.entity = null;
|
8824 |
|
8825 | /**
|
8826 | * EntityResult version.
|
8827 | * @member {number|Long} version
|
8828 | * @memberof google.datastore.v1.EntityResult
|
8829 | * @instance
|
8830 | */
|
8831 | EntityResult.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
8832 |
|
8833 | /**
|
8834 | * EntityResult createTime.
|
8835 | * @member {google.protobuf.ITimestamp|null|undefined} createTime
|
8836 | * @memberof google.datastore.v1.EntityResult
|
8837 | * @instance
|
8838 | */
|
8839 | EntityResult.prototype.createTime = null;
|
8840 |
|
8841 | /**
|
8842 | * EntityResult updateTime.
|
8843 | * @member {google.protobuf.ITimestamp|null|undefined} updateTime
|
8844 | * @memberof google.datastore.v1.EntityResult
|
8845 | * @instance
|
8846 | */
|
8847 | EntityResult.prototype.updateTime = null;
|
8848 |
|
8849 | /**
|
8850 | * EntityResult cursor.
|
8851 | * @member {Uint8Array} cursor
|
8852 | * @memberof google.datastore.v1.EntityResult
|
8853 | * @instance
|
8854 | */
|
8855 | EntityResult.prototype.cursor = $util.newBuffer([]);
|
8856 |
|
8857 | /**
|
8858 | * Creates a new EntityResult instance using the specified properties.
|
8859 | * @function create
|
8860 | * @memberof google.datastore.v1.EntityResult
|
8861 | * @static
|
8862 | * @param {google.datastore.v1.IEntityResult=} [properties] Properties to set
|
8863 | * @returns {google.datastore.v1.EntityResult} EntityResult instance
|
8864 | */
|
8865 | EntityResult.create = function create(properties) {
|
8866 | return new EntityResult(properties);
|
8867 | };
|
8868 |
|
8869 | /**
|
8870 | * Encodes the specified EntityResult message. Does not implicitly {@link google.datastore.v1.EntityResult.verify|verify} messages.
|
8871 | * @function encode
|
8872 | * @memberof google.datastore.v1.EntityResult
|
8873 | * @static
|
8874 | * @param {google.datastore.v1.IEntityResult} message EntityResult message or plain object to encode
|
8875 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
8876 | * @returns {$protobuf.Writer} Writer
|
8877 | */
|
8878 | EntityResult.encode = function encode(message, writer) {
|
8879 | if (!writer)
|
8880 | writer = $Writer.create();
|
8881 | if (message.entity != null && Object.hasOwnProperty.call(message, "entity"))
|
8882 | $root.google.datastore.v1.Entity.encode(message.entity, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
8883 | if (message.cursor != null && Object.hasOwnProperty.call(message, "cursor"))
|
8884 | writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.cursor);
|
8885 | if (message.version != null && Object.hasOwnProperty.call(message, "version"))
|
8886 | writer.uint32(/* id 4, wireType 0 =*/32).int64(message.version);
|
8887 | if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime"))
|
8888 | $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
8889 | if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
|
8890 | $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
8891 | return writer;
|
8892 | };
|
8893 |
|
8894 | /**
|
8895 | * Encodes the specified EntityResult message, length delimited. Does not implicitly {@link google.datastore.v1.EntityResult.verify|verify} messages.
|
8896 | * @function encodeDelimited
|
8897 | * @memberof google.datastore.v1.EntityResult
|
8898 | * @static
|
8899 | * @param {google.datastore.v1.IEntityResult} message EntityResult message or plain object to encode
|
8900 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
8901 | * @returns {$protobuf.Writer} Writer
|
8902 | */
|
8903 | EntityResult.encodeDelimited = function encodeDelimited(message, writer) {
|
8904 | return this.encode(message, writer).ldelim();
|
8905 | };
|
8906 |
|
8907 | /**
|
8908 | * Decodes an EntityResult message from the specified reader or buffer.
|
8909 | * @function decode
|
8910 | * @memberof google.datastore.v1.EntityResult
|
8911 | * @static
|
8912 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8913 | * @param {number} [length] Message length if known beforehand
|
8914 | * @returns {google.datastore.v1.EntityResult} EntityResult
|
8915 | * @throws {Error} If the payload is not a reader or valid buffer
|
8916 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8917 | */
|
8918 | EntityResult.decode = function decode(reader, length) {
|
8919 | if (!(reader instanceof $Reader))
|
8920 | reader = $Reader.create(reader);
|
8921 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.EntityResult();
|
8922 | while (reader.pos < end) {
|
8923 | var tag = reader.uint32();
|
8924 | switch (tag >>> 3) {
|
8925 | case 1: {
|
8926 | message.entity = $root.google.datastore.v1.Entity.decode(reader, reader.uint32());
|
8927 | break;
|
8928 | }
|
8929 | case 4: {
|
8930 | message.version = reader.int64();
|
8931 | break;
|
8932 | }
|
8933 | case 6: {
|
8934 | message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
8935 | break;
|
8936 | }
|
8937 | case 5: {
|
8938 | message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
8939 | break;
|
8940 | }
|
8941 | case 3: {
|
8942 | message.cursor = reader.bytes();
|
8943 | break;
|
8944 | }
|
8945 | default:
|
8946 | reader.skipType(tag & 7);
|
8947 | break;
|
8948 | }
|
8949 | }
|
8950 | return message;
|
8951 | };
|
8952 |
|
8953 | /**
|
8954 | * Decodes an EntityResult message from the specified reader or buffer, length delimited.
|
8955 | * @function decodeDelimited
|
8956 | * @memberof google.datastore.v1.EntityResult
|
8957 | * @static
|
8958 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
8959 | * @returns {google.datastore.v1.EntityResult} EntityResult
|
8960 | * @throws {Error} If the payload is not a reader or valid buffer
|
8961 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
8962 | */
|
8963 | EntityResult.decodeDelimited = function decodeDelimited(reader) {
|
8964 | if (!(reader instanceof $Reader))
|
8965 | reader = new $Reader(reader);
|
8966 | return this.decode(reader, reader.uint32());
|
8967 | };
|
8968 |
|
8969 | /**
|
8970 | * Verifies an EntityResult message.
|
8971 | * @function verify
|
8972 | * @memberof google.datastore.v1.EntityResult
|
8973 | * @static
|
8974 | * @param {Object.<string,*>} message Plain object to verify
|
8975 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
8976 | */
|
8977 | EntityResult.verify = function verify(message) {
|
8978 | if (typeof message !== "object" || message === null)
|
8979 | return "object expected";
|
8980 | if (message.entity != null && message.hasOwnProperty("entity")) {
|
8981 | var error = $root.google.datastore.v1.Entity.verify(message.entity);
|
8982 | if (error)
|
8983 | return "entity." + error;
|
8984 | }
|
8985 | if (message.version != null && message.hasOwnProperty("version"))
|
8986 | if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high)))
|
8987 | return "version: integer|Long expected";
|
8988 | if (message.createTime != null && message.hasOwnProperty("createTime")) {
|
8989 | var error = $root.google.protobuf.Timestamp.verify(message.createTime);
|
8990 | if (error)
|
8991 | return "createTime." + error;
|
8992 | }
|
8993 | if (message.updateTime != null && message.hasOwnProperty("updateTime")) {
|
8994 | var error = $root.google.protobuf.Timestamp.verify(message.updateTime);
|
8995 | if (error)
|
8996 | return "updateTime." + error;
|
8997 | }
|
8998 | if (message.cursor != null && message.hasOwnProperty("cursor"))
|
8999 | if (!(message.cursor && typeof message.cursor.length === "number" || $util.isString(message.cursor)))
|
9000 | return "cursor: buffer expected";
|
9001 | return null;
|
9002 | };
|
9003 |
|
9004 | /**
|
9005 | * Creates an EntityResult message from a plain object. Also converts values to their respective internal types.
|
9006 | * @function fromObject
|
9007 | * @memberof google.datastore.v1.EntityResult
|
9008 | * @static
|
9009 | * @param {Object.<string,*>} object Plain object
|
9010 | * @returns {google.datastore.v1.EntityResult} EntityResult
|
9011 | */
|
9012 | EntityResult.fromObject = function fromObject(object) {
|
9013 | if (object instanceof $root.google.datastore.v1.EntityResult)
|
9014 | return object;
|
9015 | var message = new $root.google.datastore.v1.EntityResult();
|
9016 | if (object.entity != null) {
|
9017 | if (typeof object.entity !== "object")
|
9018 | throw TypeError(".google.datastore.v1.EntityResult.entity: object expected");
|
9019 | message.entity = $root.google.datastore.v1.Entity.fromObject(object.entity);
|
9020 | }
|
9021 | if (object.version != null)
|
9022 | if ($util.Long)
|
9023 | (message.version = $util.Long.fromValue(object.version)).unsigned = false;
|
9024 | else if (typeof object.version === "string")
|
9025 | message.version = parseInt(object.version, 10);
|
9026 | else if (typeof object.version === "number")
|
9027 | message.version = object.version;
|
9028 | else if (typeof object.version === "object")
|
9029 | message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber();
|
9030 | if (object.createTime != null) {
|
9031 | if (typeof object.createTime !== "object")
|
9032 | throw TypeError(".google.datastore.v1.EntityResult.createTime: object expected");
|
9033 | message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
|
9034 | }
|
9035 | if (object.updateTime != null) {
|
9036 | if (typeof object.updateTime !== "object")
|
9037 | throw TypeError(".google.datastore.v1.EntityResult.updateTime: object expected");
|
9038 | message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime);
|
9039 | }
|
9040 | if (object.cursor != null)
|
9041 | if (typeof object.cursor === "string")
|
9042 | $util.base64.decode(object.cursor, message.cursor = $util.newBuffer($util.base64.length(object.cursor)), 0);
|
9043 | else if (object.cursor.length >= 0)
|
9044 | message.cursor = object.cursor;
|
9045 | return message;
|
9046 | };
|
9047 |
|
9048 | /**
|
9049 | * Creates a plain object from an EntityResult message. Also converts values to other types if specified.
|
9050 | * @function toObject
|
9051 | * @memberof google.datastore.v1.EntityResult
|
9052 | * @static
|
9053 | * @param {google.datastore.v1.EntityResult} message EntityResult
|
9054 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
9055 | * @returns {Object.<string,*>} Plain object
|
9056 | */
|
9057 | EntityResult.toObject = function toObject(message, options) {
|
9058 | if (!options)
|
9059 | options = {};
|
9060 | var object = {};
|
9061 | if (options.defaults) {
|
9062 | object.entity = null;
|
9063 | if (options.bytes === String)
|
9064 | object.cursor = "";
|
9065 | else {
|
9066 | object.cursor = [];
|
9067 | if (options.bytes !== Array)
|
9068 | object.cursor = $util.newBuffer(object.cursor);
|
9069 | }
|
9070 | if ($util.Long) {
|
9071 | var long = new $util.Long(0, 0, false);
|
9072 | object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
9073 | } else
|
9074 | object.version = options.longs === String ? "0" : 0;
|
9075 | object.updateTime = null;
|
9076 | object.createTime = null;
|
9077 | }
|
9078 | if (message.entity != null && message.hasOwnProperty("entity"))
|
9079 | object.entity = $root.google.datastore.v1.Entity.toObject(message.entity, options);
|
9080 | if (message.cursor != null && message.hasOwnProperty("cursor"))
|
9081 | object.cursor = options.bytes === String ? $util.base64.encode(message.cursor, 0, message.cursor.length) : options.bytes === Array ? Array.prototype.slice.call(message.cursor) : message.cursor;
|
9082 | if (message.version != null && message.hasOwnProperty("version"))
|
9083 | if (typeof message.version === "number")
|
9084 | object.version = options.longs === String ? String(message.version) : message.version;
|
9085 | else
|
9086 | object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version;
|
9087 | if (message.updateTime != null && message.hasOwnProperty("updateTime"))
|
9088 | object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options);
|
9089 | if (message.createTime != null && message.hasOwnProperty("createTime"))
|
9090 | object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
|
9091 | return object;
|
9092 | };
|
9093 |
|
9094 | /**
|
9095 | * Converts this EntityResult to JSON.
|
9096 | * @function toJSON
|
9097 | * @memberof google.datastore.v1.EntityResult
|
9098 | * @instance
|
9099 | * @returns {Object.<string,*>} JSON object
|
9100 | */
|
9101 | EntityResult.prototype.toJSON = function toJSON() {
|
9102 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
9103 | };
|
9104 |
|
9105 | /**
|
9106 | * Gets the default type url for EntityResult
|
9107 | * @function getTypeUrl
|
9108 | * @memberof google.datastore.v1.EntityResult
|
9109 | * @static
|
9110 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
9111 | * @returns {string} The default type url
|
9112 | */
|
9113 | EntityResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
9114 | if (typeUrlPrefix === undefined) {
|
9115 | typeUrlPrefix = "type.googleapis.com";
|
9116 | }
|
9117 | return typeUrlPrefix + "/google.datastore.v1.EntityResult";
|
9118 | };
|
9119 |
|
9120 | /**
|
9121 | * ResultType enum.
|
9122 | * @name google.datastore.v1.EntityResult.ResultType
|
9123 | * @enum {number}
|
9124 | * @property {number} RESULT_TYPE_UNSPECIFIED=0 RESULT_TYPE_UNSPECIFIED value
|
9125 | * @property {number} FULL=1 FULL value
|
9126 | * @property {number} PROJECTION=2 PROJECTION value
|
9127 | * @property {number} KEY_ONLY=3 KEY_ONLY value
|
9128 | */
|
9129 | EntityResult.ResultType = (function() {
|
9130 | var valuesById = {}, values = Object.create(valuesById);
|
9131 | values[valuesById[0] = "RESULT_TYPE_UNSPECIFIED"] = 0;
|
9132 | values[valuesById[1] = "FULL"] = 1;
|
9133 | values[valuesById[2] = "PROJECTION"] = 2;
|
9134 | values[valuesById[3] = "KEY_ONLY"] = 3;
|
9135 | return values;
|
9136 | })();
|
9137 |
|
9138 | return EntityResult;
|
9139 | })();
|
9140 |
|
9141 | v1.Query = (function() {
|
9142 |
|
9143 | /**
|
9144 | * Properties of a Query.
|
9145 | * @memberof google.datastore.v1
|
9146 | * @interface IQuery
|
9147 | * @property {Array.<google.datastore.v1.IProjection>|null} [projection] Query projection
|
9148 | * @property {Array.<google.datastore.v1.IKindExpression>|null} [kind] Query kind
|
9149 | * @property {google.datastore.v1.IFilter|null} [filter] Query filter
|
9150 | * @property {Array.<google.datastore.v1.IPropertyOrder>|null} [order] Query order
|
9151 | * @property {Array.<google.datastore.v1.IPropertyReference>|null} [distinctOn] Query distinctOn
|
9152 | * @property {Uint8Array|null} [startCursor] Query startCursor
|
9153 | * @property {Uint8Array|null} [endCursor] Query endCursor
|
9154 | * @property {number|null} [offset] Query offset
|
9155 | * @property {google.protobuf.IInt32Value|null} [limit] Query limit
|
9156 | */
|
9157 |
|
9158 | /**
|
9159 | * Constructs a new Query.
|
9160 | * @memberof google.datastore.v1
|
9161 | * @classdesc Represents a Query.
|
9162 | * @implements IQuery
|
9163 | * @constructor
|
9164 | * @param {google.datastore.v1.IQuery=} [properties] Properties to set
|
9165 | */
|
9166 | function Query(properties) {
|
9167 | this.projection = [];
|
9168 | this.kind = [];
|
9169 | this.order = [];
|
9170 | this.distinctOn = [];
|
9171 | if (properties)
|
9172 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
9173 | if (properties[keys[i]] != null)
|
9174 | this[keys[i]] = properties[keys[i]];
|
9175 | }
|
9176 |
|
9177 | /**
|
9178 | * Query projection.
|
9179 | * @member {Array.<google.datastore.v1.IProjection>} projection
|
9180 | * @memberof google.datastore.v1.Query
|
9181 | * @instance
|
9182 | */
|
9183 | Query.prototype.projection = $util.emptyArray;
|
9184 |
|
9185 | /**
|
9186 | * Query kind.
|
9187 | * @member {Array.<google.datastore.v1.IKindExpression>} kind
|
9188 | * @memberof google.datastore.v1.Query
|
9189 | * @instance
|
9190 | */
|
9191 | Query.prototype.kind = $util.emptyArray;
|
9192 |
|
9193 | /**
|
9194 | * Query filter.
|
9195 | * @member {google.datastore.v1.IFilter|null|undefined} filter
|
9196 | * @memberof google.datastore.v1.Query
|
9197 | * @instance
|
9198 | */
|
9199 | Query.prototype.filter = null;
|
9200 |
|
9201 | /**
|
9202 | * Query order.
|
9203 | * @member {Array.<google.datastore.v1.IPropertyOrder>} order
|
9204 | * @memberof google.datastore.v1.Query
|
9205 | * @instance
|
9206 | */
|
9207 | Query.prototype.order = $util.emptyArray;
|
9208 |
|
9209 | /**
|
9210 | * Query distinctOn.
|
9211 | * @member {Array.<google.datastore.v1.IPropertyReference>} distinctOn
|
9212 | * @memberof google.datastore.v1.Query
|
9213 | * @instance
|
9214 | */
|
9215 | Query.prototype.distinctOn = $util.emptyArray;
|
9216 |
|
9217 | /**
|
9218 | * Query startCursor.
|
9219 | * @member {Uint8Array} startCursor
|
9220 | * @memberof google.datastore.v1.Query
|
9221 | * @instance
|
9222 | */
|
9223 | Query.prototype.startCursor = $util.newBuffer([]);
|
9224 |
|
9225 | /**
|
9226 | * Query endCursor.
|
9227 | * @member {Uint8Array} endCursor
|
9228 | * @memberof google.datastore.v1.Query
|
9229 | * @instance
|
9230 | */
|
9231 | Query.prototype.endCursor = $util.newBuffer([]);
|
9232 |
|
9233 | /**
|
9234 | * Query offset.
|
9235 | * @member {number} offset
|
9236 | * @memberof google.datastore.v1.Query
|
9237 | * @instance
|
9238 | */
|
9239 | Query.prototype.offset = 0;
|
9240 |
|
9241 | /**
|
9242 | * Query limit.
|
9243 | * @member {google.protobuf.IInt32Value|null|undefined} limit
|
9244 | * @memberof google.datastore.v1.Query
|
9245 | * @instance
|
9246 | */
|
9247 | Query.prototype.limit = null;
|
9248 |
|
9249 | /**
|
9250 | * Creates a new Query instance using the specified properties.
|
9251 | * @function create
|
9252 | * @memberof google.datastore.v1.Query
|
9253 | * @static
|
9254 | * @param {google.datastore.v1.IQuery=} [properties] Properties to set
|
9255 | * @returns {google.datastore.v1.Query} Query instance
|
9256 | */
|
9257 | Query.create = function create(properties) {
|
9258 | return new Query(properties);
|
9259 | };
|
9260 |
|
9261 | /**
|
9262 | * Encodes the specified Query message. Does not implicitly {@link google.datastore.v1.Query.verify|verify} messages.
|
9263 | * @function encode
|
9264 | * @memberof google.datastore.v1.Query
|
9265 | * @static
|
9266 | * @param {google.datastore.v1.IQuery} message Query message or plain object to encode
|
9267 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
9268 | * @returns {$protobuf.Writer} Writer
|
9269 | */
|
9270 | Query.encode = function encode(message, writer) {
|
9271 | if (!writer)
|
9272 | writer = $Writer.create();
|
9273 | if (message.projection != null && message.projection.length)
|
9274 | for (var i = 0; i < message.projection.length; ++i)
|
9275 | $root.google.datastore.v1.Projection.encode(message.projection[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
9276 | if (message.kind != null && message.kind.length)
|
9277 | for (var i = 0; i < message.kind.length; ++i)
|
9278 | $root.google.datastore.v1.KindExpression.encode(message.kind[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
9279 | if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
|
9280 | $root.google.datastore.v1.Filter.encode(message.filter, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
9281 | if (message.order != null && message.order.length)
|
9282 | for (var i = 0; i < message.order.length; ++i)
|
9283 | $root.google.datastore.v1.PropertyOrder.encode(message.order[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
9284 | if (message.distinctOn != null && message.distinctOn.length)
|
9285 | for (var i = 0; i < message.distinctOn.length; ++i)
|
9286 | $root.google.datastore.v1.PropertyReference.encode(message.distinctOn[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
9287 | if (message.startCursor != null && Object.hasOwnProperty.call(message, "startCursor"))
|
9288 | writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.startCursor);
|
9289 | if (message.endCursor != null && Object.hasOwnProperty.call(message, "endCursor"))
|
9290 | writer.uint32(/* id 8, wireType 2 =*/66).bytes(message.endCursor);
|
9291 | if (message.offset != null && Object.hasOwnProperty.call(message, "offset"))
|
9292 | writer.uint32(/* id 10, wireType 0 =*/80).int32(message.offset);
|
9293 | if (message.limit != null && Object.hasOwnProperty.call(message, "limit"))
|
9294 | $root.google.protobuf.Int32Value.encode(message.limit, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
|
9295 | return writer;
|
9296 | };
|
9297 |
|
9298 | /**
|
9299 | * Encodes the specified Query message, length delimited. Does not implicitly {@link google.datastore.v1.Query.verify|verify} messages.
|
9300 | * @function encodeDelimited
|
9301 | * @memberof google.datastore.v1.Query
|
9302 | * @static
|
9303 | * @param {google.datastore.v1.IQuery} message Query message or plain object to encode
|
9304 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
9305 | * @returns {$protobuf.Writer} Writer
|
9306 | */
|
9307 | Query.encodeDelimited = function encodeDelimited(message, writer) {
|
9308 | return this.encode(message, writer).ldelim();
|
9309 | };
|
9310 |
|
9311 | /**
|
9312 | * Decodes a Query message from the specified reader or buffer.
|
9313 | * @function decode
|
9314 | * @memberof google.datastore.v1.Query
|
9315 | * @static
|
9316 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
9317 | * @param {number} [length] Message length if known beforehand
|
9318 | * @returns {google.datastore.v1.Query} Query
|
9319 | * @throws {Error} If the payload is not a reader or valid buffer
|
9320 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
9321 | */
|
9322 | Query.decode = function decode(reader, length) {
|
9323 | if (!(reader instanceof $Reader))
|
9324 | reader = $Reader.create(reader);
|
9325 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.Query();
|
9326 | while (reader.pos < end) {
|
9327 | var tag = reader.uint32();
|
9328 | switch (tag >>> 3) {
|
9329 | case 2: {
|
9330 | if (!(message.projection && message.projection.length))
|
9331 | message.projection = [];
|
9332 | message.projection.push($root.google.datastore.v1.Projection.decode(reader, reader.uint32()));
|
9333 | break;
|
9334 | }
|
9335 | case 3: {
|
9336 | if (!(message.kind && message.kind.length))
|
9337 | message.kind = [];
|
9338 | message.kind.push($root.google.datastore.v1.KindExpression.decode(reader, reader.uint32()));
|
9339 | break;
|
9340 | }
|
9341 | case 4: {
|
9342 | message.filter = $root.google.datastore.v1.Filter.decode(reader, reader.uint32());
|
9343 | break;
|
9344 | }
|
9345 | case 5: {
|
9346 | if (!(message.order && message.order.length))
|
9347 | message.order = [];
|
9348 | message.order.push($root.google.datastore.v1.PropertyOrder.decode(reader, reader.uint32()));
|
9349 | break;
|
9350 | }
|
9351 | case 6: {
|
9352 | if (!(message.distinctOn && message.distinctOn.length))
|
9353 | message.distinctOn = [];
|
9354 | message.distinctOn.push($root.google.datastore.v1.PropertyReference.decode(reader, reader.uint32()));
|
9355 | break;
|
9356 | }
|
9357 | case 7: {
|
9358 | message.startCursor = reader.bytes();
|
9359 | break;
|
9360 | }
|
9361 | case 8: {
|
9362 | message.endCursor = reader.bytes();
|
9363 | break;
|
9364 | }
|
9365 | case 10: {
|
9366 | message.offset = reader.int32();
|
9367 | break;
|
9368 | }
|
9369 | case 12: {
|
9370 | message.limit = $root.google.protobuf.Int32Value.decode(reader, reader.uint32());
|
9371 | break;
|
9372 | }
|
9373 | default:
|
9374 | reader.skipType(tag & 7);
|
9375 | break;
|
9376 | }
|
9377 | }
|
9378 | return message;
|
9379 | };
|
9380 |
|
9381 | /**
|
9382 | * Decodes a Query message from the specified reader or buffer, length delimited.
|
9383 | * @function decodeDelimited
|
9384 | * @memberof google.datastore.v1.Query
|
9385 | * @static
|
9386 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
9387 | * @returns {google.datastore.v1.Query} Query
|
9388 | * @throws {Error} If the payload is not a reader or valid buffer
|
9389 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
9390 | */
|
9391 | Query.decodeDelimited = function decodeDelimited(reader) {
|
9392 | if (!(reader instanceof $Reader))
|
9393 | reader = new $Reader(reader);
|
9394 | return this.decode(reader, reader.uint32());
|
9395 | };
|
9396 |
|
9397 | /**
|
9398 | * Verifies a Query message.
|
9399 | * @function verify
|
9400 | * @memberof google.datastore.v1.Query
|
9401 | * @static
|
9402 | * @param {Object.<string,*>} message Plain object to verify
|
9403 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
9404 | */
|
9405 | Query.verify = function verify(message) {
|
9406 | if (typeof message !== "object" || message === null)
|
9407 | return "object expected";
|
9408 | if (message.projection != null && message.hasOwnProperty("projection")) {
|
9409 | if (!Array.isArray(message.projection))
|
9410 | return "projection: array expected";
|
9411 | for (var i = 0; i < message.projection.length; ++i) {
|
9412 | var error = $root.google.datastore.v1.Projection.verify(message.projection[i]);
|
9413 | if (error)
|
9414 | return "projection." + error;
|
9415 | }
|
9416 | }
|
9417 | if (message.kind != null && message.hasOwnProperty("kind")) {
|
9418 | if (!Array.isArray(message.kind))
|
9419 | return "kind: array expected";
|
9420 | for (var i = 0; i < message.kind.length; ++i) {
|
9421 | var error = $root.google.datastore.v1.KindExpression.verify(message.kind[i]);
|
9422 | if (error)
|
9423 | return "kind." + error;
|
9424 | }
|
9425 | }
|
9426 | if (message.filter != null && message.hasOwnProperty("filter")) {
|
9427 | var error = $root.google.datastore.v1.Filter.verify(message.filter);
|
9428 | if (error)
|
9429 | return "filter." + error;
|
9430 | }
|
9431 | if (message.order != null && message.hasOwnProperty("order")) {
|
9432 | if (!Array.isArray(message.order))
|
9433 | return "order: array expected";
|
9434 | for (var i = 0; i < message.order.length; ++i) {
|
9435 | var error = $root.google.datastore.v1.PropertyOrder.verify(message.order[i]);
|
9436 | if (error)
|
9437 | return "order." + error;
|
9438 | }
|
9439 | }
|
9440 | if (message.distinctOn != null && message.hasOwnProperty("distinctOn")) {
|
9441 | if (!Array.isArray(message.distinctOn))
|
9442 | return "distinctOn: array expected";
|
9443 | for (var i = 0; i < message.distinctOn.length; ++i) {
|
9444 | var error = $root.google.datastore.v1.PropertyReference.verify(message.distinctOn[i]);
|
9445 | if (error)
|
9446 | return "distinctOn." + error;
|
9447 | }
|
9448 | }
|
9449 | if (message.startCursor != null && message.hasOwnProperty("startCursor"))
|
9450 | if (!(message.startCursor && typeof message.startCursor.length === "number" || $util.isString(message.startCursor)))
|
9451 | return "startCursor: buffer expected";
|
9452 | if (message.endCursor != null && message.hasOwnProperty("endCursor"))
|
9453 | if (!(message.endCursor && typeof message.endCursor.length === "number" || $util.isString(message.endCursor)))
|
9454 | return "endCursor: buffer expected";
|
9455 | if (message.offset != null && message.hasOwnProperty("offset"))
|
9456 | if (!$util.isInteger(message.offset))
|
9457 | return "offset: integer expected";
|
9458 | if (message.limit != null && message.hasOwnProperty("limit")) {
|
9459 | var error = $root.google.protobuf.Int32Value.verify(message.limit);
|
9460 | if (error)
|
9461 | return "limit." + error;
|
9462 | }
|
9463 | return null;
|
9464 | };
|
9465 |
|
9466 | /**
|
9467 | * Creates a Query message from a plain object. Also converts values to their respective internal types.
|
9468 | * @function fromObject
|
9469 | * @memberof google.datastore.v1.Query
|
9470 | * @static
|
9471 | * @param {Object.<string,*>} object Plain object
|
9472 | * @returns {google.datastore.v1.Query} Query
|
9473 | */
|
9474 | Query.fromObject = function fromObject(object) {
|
9475 | if (object instanceof $root.google.datastore.v1.Query)
|
9476 | return object;
|
9477 | var message = new $root.google.datastore.v1.Query();
|
9478 | if (object.projection) {
|
9479 | if (!Array.isArray(object.projection))
|
9480 | throw TypeError(".google.datastore.v1.Query.projection: array expected");
|
9481 | message.projection = [];
|
9482 | for (var i = 0; i < object.projection.length; ++i) {
|
9483 | if (typeof object.projection[i] !== "object")
|
9484 | throw TypeError(".google.datastore.v1.Query.projection: object expected");
|
9485 | message.projection[i] = $root.google.datastore.v1.Projection.fromObject(object.projection[i]);
|
9486 | }
|
9487 | }
|
9488 | if (object.kind) {
|
9489 | if (!Array.isArray(object.kind))
|
9490 | throw TypeError(".google.datastore.v1.Query.kind: array expected");
|
9491 | message.kind = [];
|
9492 | for (var i = 0; i < object.kind.length; ++i) {
|
9493 | if (typeof object.kind[i] !== "object")
|
9494 | throw TypeError(".google.datastore.v1.Query.kind: object expected");
|
9495 | message.kind[i] = $root.google.datastore.v1.KindExpression.fromObject(object.kind[i]);
|
9496 | }
|
9497 | }
|
9498 | if (object.filter != null) {
|
9499 | if (typeof object.filter !== "object")
|
9500 | throw TypeError(".google.datastore.v1.Query.filter: object expected");
|
9501 | message.filter = $root.google.datastore.v1.Filter.fromObject(object.filter);
|
9502 | }
|
9503 | if (object.order) {
|
9504 | if (!Array.isArray(object.order))
|
9505 | throw TypeError(".google.datastore.v1.Query.order: array expected");
|
9506 | message.order = [];
|
9507 | for (var i = 0; i < object.order.length; ++i) {
|
9508 | if (typeof object.order[i] !== "object")
|
9509 | throw TypeError(".google.datastore.v1.Query.order: object expected");
|
9510 | message.order[i] = $root.google.datastore.v1.PropertyOrder.fromObject(object.order[i]);
|
9511 | }
|
9512 | }
|
9513 | if (object.distinctOn) {
|
9514 | if (!Array.isArray(object.distinctOn))
|
9515 | throw TypeError(".google.datastore.v1.Query.distinctOn: array expected");
|
9516 | message.distinctOn = [];
|
9517 | for (var i = 0; i < object.distinctOn.length; ++i) {
|
9518 | if (typeof object.distinctOn[i] !== "object")
|
9519 | throw TypeError(".google.datastore.v1.Query.distinctOn: object expected");
|
9520 | message.distinctOn[i] = $root.google.datastore.v1.PropertyReference.fromObject(object.distinctOn[i]);
|
9521 | }
|
9522 | }
|
9523 | if (object.startCursor != null)
|
9524 | if (typeof object.startCursor === "string")
|
9525 | $util.base64.decode(object.startCursor, message.startCursor = $util.newBuffer($util.base64.length(object.startCursor)), 0);
|
9526 | else if (object.startCursor.length >= 0)
|
9527 | message.startCursor = object.startCursor;
|
9528 | if (object.endCursor != null)
|
9529 | if (typeof object.endCursor === "string")
|
9530 | $util.base64.decode(object.endCursor, message.endCursor = $util.newBuffer($util.base64.length(object.endCursor)), 0);
|
9531 | else if (object.endCursor.length >= 0)
|
9532 | message.endCursor = object.endCursor;
|
9533 | if (object.offset != null)
|
9534 | message.offset = object.offset | 0;
|
9535 | if (object.limit != null) {
|
9536 | if (typeof object.limit !== "object")
|
9537 | throw TypeError(".google.datastore.v1.Query.limit: object expected");
|
9538 | message.limit = $root.google.protobuf.Int32Value.fromObject(object.limit);
|
9539 | }
|
9540 | return message;
|
9541 | };
|
9542 |
|
9543 | /**
|
9544 | * Creates a plain object from a Query message. Also converts values to other types if specified.
|
9545 | * @function toObject
|
9546 | * @memberof google.datastore.v1.Query
|
9547 | * @static
|
9548 | * @param {google.datastore.v1.Query} message Query
|
9549 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
9550 | * @returns {Object.<string,*>} Plain object
|
9551 | */
|
9552 | Query.toObject = function toObject(message, options) {
|
9553 | if (!options)
|
9554 | options = {};
|
9555 | var object = {};
|
9556 | if (options.arrays || options.defaults) {
|
9557 | object.projection = [];
|
9558 | object.kind = [];
|
9559 | object.order = [];
|
9560 | object.distinctOn = [];
|
9561 | }
|
9562 | if (options.defaults) {
|
9563 | object.filter = null;
|
9564 | if (options.bytes === String)
|
9565 | object.startCursor = "";
|
9566 | else {
|
9567 | object.startCursor = [];
|
9568 | if (options.bytes !== Array)
|
9569 | object.startCursor = $util.newBuffer(object.startCursor);
|
9570 | }
|
9571 | if (options.bytes === String)
|
9572 | object.endCursor = "";
|
9573 | else {
|
9574 | object.endCursor = [];
|
9575 | if (options.bytes !== Array)
|
9576 | object.endCursor = $util.newBuffer(object.endCursor);
|
9577 | }
|
9578 | object.offset = 0;
|
9579 | object.limit = null;
|
9580 | }
|
9581 | if (message.projection && message.projection.length) {
|
9582 | object.projection = [];
|
9583 | for (var j = 0; j < message.projection.length; ++j)
|
9584 | object.projection[j] = $root.google.datastore.v1.Projection.toObject(message.projection[j], options);
|
9585 | }
|
9586 | if (message.kind && message.kind.length) {
|
9587 | object.kind = [];
|
9588 | for (var j = 0; j < message.kind.length; ++j)
|
9589 | object.kind[j] = $root.google.datastore.v1.KindExpression.toObject(message.kind[j], options);
|
9590 | }
|
9591 | if (message.filter != null && message.hasOwnProperty("filter"))
|
9592 | object.filter = $root.google.datastore.v1.Filter.toObject(message.filter, options);
|
9593 | if (message.order && message.order.length) {
|
9594 | object.order = [];
|
9595 | for (var j = 0; j < message.order.length; ++j)
|
9596 | object.order[j] = $root.google.datastore.v1.PropertyOrder.toObject(message.order[j], options);
|
9597 | }
|
9598 | if (message.distinctOn && message.distinctOn.length) {
|
9599 | object.distinctOn = [];
|
9600 | for (var j = 0; j < message.distinctOn.length; ++j)
|
9601 | object.distinctOn[j] = $root.google.datastore.v1.PropertyReference.toObject(message.distinctOn[j], options);
|
9602 | }
|
9603 | if (message.startCursor != null && message.hasOwnProperty("startCursor"))
|
9604 | object.startCursor = options.bytes === String ? $util.base64.encode(message.startCursor, 0, message.startCursor.length) : options.bytes === Array ? Array.prototype.slice.call(message.startCursor) : message.startCursor;
|
9605 | if (message.endCursor != null && message.hasOwnProperty("endCursor"))
|
9606 | object.endCursor = options.bytes === String ? $util.base64.encode(message.endCursor, 0, message.endCursor.length) : options.bytes === Array ? Array.prototype.slice.call(message.endCursor) : message.endCursor;
|
9607 | if (message.offset != null && message.hasOwnProperty("offset"))
|
9608 | object.offset = message.offset;
|
9609 | if (message.limit != null && message.hasOwnProperty("limit"))
|
9610 | object.limit = $root.google.protobuf.Int32Value.toObject(message.limit, options);
|
9611 | return object;
|
9612 | };
|
9613 |
|
9614 | /**
|
9615 | * Converts this Query to JSON.
|
9616 | * @function toJSON
|
9617 | * @memberof google.datastore.v1.Query
|
9618 | * @instance
|
9619 | * @returns {Object.<string,*>} JSON object
|
9620 | */
|
9621 | Query.prototype.toJSON = function toJSON() {
|
9622 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
9623 | };
|
9624 |
|
9625 | /**
|
9626 | * Gets the default type url for Query
|
9627 | * @function getTypeUrl
|
9628 | * @memberof google.datastore.v1.Query
|
9629 | * @static
|
9630 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
9631 | * @returns {string} The default type url
|
9632 | */
|
9633 | Query.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
9634 | if (typeUrlPrefix === undefined) {
|
9635 | typeUrlPrefix = "type.googleapis.com";
|
9636 | }
|
9637 | return typeUrlPrefix + "/google.datastore.v1.Query";
|
9638 | };
|
9639 |
|
9640 | return Query;
|
9641 | })();
|
9642 |
|
9643 | v1.AggregationQuery = (function() {
|
9644 |
|
9645 | /**
|
9646 | * Properties of an AggregationQuery.
|
9647 | * @memberof google.datastore.v1
|
9648 | * @interface IAggregationQuery
|
9649 | * @property {google.datastore.v1.IQuery|null} [nestedQuery] AggregationQuery nestedQuery
|
9650 | * @property {Array.<google.datastore.v1.AggregationQuery.IAggregation>|null} [aggregations] AggregationQuery aggregations
|
9651 | */
|
9652 |
|
9653 | /**
|
9654 | * Constructs a new AggregationQuery.
|
9655 | * @memberof google.datastore.v1
|
9656 | * @classdesc Represents an AggregationQuery.
|
9657 | * @implements IAggregationQuery
|
9658 | * @constructor
|
9659 | * @param {google.datastore.v1.IAggregationQuery=} [properties] Properties to set
|
9660 | */
|
9661 | function AggregationQuery(properties) {
|
9662 | this.aggregations = [];
|
9663 | if (properties)
|
9664 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
9665 | if (properties[keys[i]] != null)
|
9666 | this[keys[i]] = properties[keys[i]];
|
9667 | }
|
9668 |
|
9669 | /**
|
9670 | * AggregationQuery nestedQuery.
|
9671 | * @member {google.datastore.v1.IQuery|null|undefined} nestedQuery
|
9672 | * @memberof google.datastore.v1.AggregationQuery
|
9673 | * @instance
|
9674 | */
|
9675 | AggregationQuery.prototype.nestedQuery = null;
|
9676 |
|
9677 | /**
|
9678 | * AggregationQuery aggregations.
|
9679 | * @member {Array.<google.datastore.v1.AggregationQuery.IAggregation>} aggregations
|
9680 | * @memberof google.datastore.v1.AggregationQuery
|
9681 | * @instance
|
9682 | */
|
9683 | AggregationQuery.prototype.aggregations = $util.emptyArray;
|
9684 |
|
9685 | // OneOf field names bound to virtual getters and setters
|
9686 | var $oneOfFields;
|
9687 |
|
9688 | /**
|
9689 | * AggregationQuery queryType.
|
9690 | * @member {"nestedQuery"|undefined} queryType
|
9691 | * @memberof google.datastore.v1.AggregationQuery
|
9692 | * @instance
|
9693 | */
|
9694 | Object.defineProperty(AggregationQuery.prototype, "queryType", {
|
9695 | get: $util.oneOfGetter($oneOfFields = ["nestedQuery"]),
|
9696 | set: $util.oneOfSetter($oneOfFields)
|
9697 | });
|
9698 |
|
9699 | /**
|
9700 | * Creates a new AggregationQuery instance using the specified properties.
|
9701 | * @function create
|
9702 | * @memberof google.datastore.v1.AggregationQuery
|
9703 | * @static
|
9704 | * @param {google.datastore.v1.IAggregationQuery=} [properties] Properties to set
|
9705 | * @returns {google.datastore.v1.AggregationQuery} AggregationQuery instance
|
9706 | */
|
9707 | AggregationQuery.create = function create(properties) {
|
9708 | return new AggregationQuery(properties);
|
9709 | };
|
9710 |
|
9711 | /**
|
9712 | * Encodes the specified AggregationQuery message. Does not implicitly {@link google.datastore.v1.AggregationQuery.verify|verify} messages.
|
9713 | * @function encode
|
9714 | * @memberof google.datastore.v1.AggregationQuery
|
9715 | * @static
|
9716 | * @param {google.datastore.v1.IAggregationQuery} message AggregationQuery message or plain object to encode
|
9717 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
9718 | * @returns {$protobuf.Writer} Writer
|
9719 | */
|
9720 | AggregationQuery.encode = function encode(message, writer) {
|
9721 | if (!writer)
|
9722 | writer = $Writer.create();
|
9723 | if (message.nestedQuery != null && Object.hasOwnProperty.call(message, "nestedQuery"))
|
9724 | $root.google.datastore.v1.Query.encode(message.nestedQuery, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
9725 | if (message.aggregations != null && message.aggregations.length)
|
9726 | for (var i = 0; i < message.aggregations.length; ++i)
|
9727 | $root.google.datastore.v1.AggregationQuery.Aggregation.encode(message.aggregations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
9728 | return writer;
|
9729 | };
|
9730 |
|
9731 | /**
|
9732 | * Encodes the specified AggregationQuery message, length delimited. Does not implicitly {@link google.datastore.v1.AggregationQuery.verify|verify} messages.
|
9733 | * @function encodeDelimited
|
9734 | * @memberof google.datastore.v1.AggregationQuery
|
9735 | * @static
|
9736 | * @param {google.datastore.v1.IAggregationQuery} message AggregationQuery message or plain object to encode
|
9737 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
9738 | * @returns {$protobuf.Writer} Writer
|
9739 | */
|
9740 | AggregationQuery.encodeDelimited = function encodeDelimited(message, writer) {
|
9741 | return this.encode(message, writer).ldelim();
|
9742 | };
|
9743 |
|
9744 | /**
|
9745 | * Decodes an AggregationQuery message from the specified reader or buffer.
|
9746 | * @function decode
|
9747 | * @memberof google.datastore.v1.AggregationQuery
|
9748 | * @static
|
9749 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
9750 | * @param {number} [length] Message length if known beforehand
|
9751 | * @returns {google.datastore.v1.AggregationQuery} AggregationQuery
|
9752 | * @throws {Error} If the payload is not a reader or valid buffer
|
9753 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
9754 | */
|
9755 | AggregationQuery.decode = function decode(reader, length) {
|
9756 | if (!(reader instanceof $Reader))
|
9757 | reader = $Reader.create(reader);
|
9758 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.AggregationQuery();
|
9759 | while (reader.pos < end) {
|
9760 | var tag = reader.uint32();
|
9761 | switch (tag >>> 3) {
|
9762 | case 1: {
|
9763 | message.nestedQuery = $root.google.datastore.v1.Query.decode(reader, reader.uint32());
|
9764 | break;
|
9765 | }
|
9766 | case 3: {
|
9767 | if (!(message.aggregations && message.aggregations.length))
|
9768 | message.aggregations = [];
|
9769 | message.aggregations.push($root.google.datastore.v1.AggregationQuery.Aggregation.decode(reader, reader.uint32()));
|
9770 | break;
|
9771 | }
|
9772 | default:
|
9773 | reader.skipType(tag & 7);
|
9774 | break;
|
9775 | }
|
9776 | }
|
9777 | return message;
|
9778 | };
|
9779 |
|
9780 | /**
|
9781 | * Decodes an AggregationQuery message from the specified reader or buffer, length delimited.
|
9782 | * @function decodeDelimited
|
9783 | * @memberof google.datastore.v1.AggregationQuery
|
9784 | * @static
|
9785 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
9786 | * @returns {google.datastore.v1.AggregationQuery} AggregationQuery
|
9787 | * @throws {Error} If the payload is not a reader or valid buffer
|
9788 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
9789 | */
|
9790 | AggregationQuery.decodeDelimited = function decodeDelimited(reader) {
|
9791 | if (!(reader instanceof $Reader))
|
9792 | reader = new $Reader(reader);
|
9793 | return this.decode(reader, reader.uint32());
|
9794 | };
|
9795 |
|
9796 | /**
|
9797 | * Verifies an AggregationQuery message.
|
9798 | * @function verify
|
9799 | * @memberof google.datastore.v1.AggregationQuery
|
9800 | * @static
|
9801 | * @param {Object.<string,*>} message Plain object to verify
|
9802 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
9803 | */
|
9804 | AggregationQuery.verify = function verify(message) {
|
9805 | if (typeof message !== "object" || message === null)
|
9806 | return "object expected";
|
9807 | var properties = {};
|
9808 | if (message.nestedQuery != null && message.hasOwnProperty("nestedQuery")) {
|
9809 | properties.queryType = 1;
|
9810 | {
|
9811 | var error = $root.google.datastore.v1.Query.verify(message.nestedQuery);
|
9812 | if (error)
|
9813 | return "nestedQuery." + error;
|
9814 | }
|
9815 | }
|
9816 | if (message.aggregations != null && message.hasOwnProperty("aggregations")) {
|
9817 | if (!Array.isArray(message.aggregations))
|
9818 | return "aggregations: array expected";
|
9819 | for (var i = 0; i < message.aggregations.length; ++i) {
|
9820 | var error = $root.google.datastore.v1.AggregationQuery.Aggregation.verify(message.aggregations[i]);
|
9821 | if (error)
|
9822 | return "aggregations." + error;
|
9823 | }
|
9824 | }
|
9825 | return null;
|
9826 | };
|
9827 |
|
9828 | /**
|
9829 | * Creates an AggregationQuery message from a plain object. Also converts values to their respective internal types.
|
9830 | * @function fromObject
|
9831 | * @memberof google.datastore.v1.AggregationQuery
|
9832 | * @static
|
9833 | * @param {Object.<string,*>} object Plain object
|
9834 | * @returns {google.datastore.v1.AggregationQuery} AggregationQuery
|
9835 | */
|
9836 | AggregationQuery.fromObject = function fromObject(object) {
|
9837 | if (object instanceof $root.google.datastore.v1.AggregationQuery)
|
9838 | return object;
|
9839 | var message = new $root.google.datastore.v1.AggregationQuery();
|
9840 | if (object.nestedQuery != null) {
|
9841 | if (typeof object.nestedQuery !== "object")
|
9842 | throw TypeError(".google.datastore.v1.AggregationQuery.nestedQuery: object expected");
|
9843 | message.nestedQuery = $root.google.datastore.v1.Query.fromObject(object.nestedQuery);
|
9844 | }
|
9845 | if (object.aggregations) {
|
9846 | if (!Array.isArray(object.aggregations))
|
9847 | throw TypeError(".google.datastore.v1.AggregationQuery.aggregations: array expected");
|
9848 | message.aggregations = [];
|
9849 | for (var i = 0; i < object.aggregations.length; ++i) {
|
9850 | if (typeof object.aggregations[i] !== "object")
|
9851 | throw TypeError(".google.datastore.v1.AggregationQuery.aggregations: object expected");
|
9852 | message.aggregations[i] = $root.google.datastore.v1.AggregationQuery.Aggregation.fromObject(object.aggregations[i]);
|
9853 | }
|
9854 | }
|
9855 | return message;
|
9856 | };
|
9857 |
|
9858 | /**
|
9859 | * Creates a plain object from an AggregationQuery message. Also converts values to other types if specified.
|
9860 | * @function toObject
|
9861 | * @memberof google.datastore.v1.AggregationQuery
|
9862 | * @static
|
9863 | * @param {google.datastore.v1.AggregationQuery} message AggregationQuery
|
9864 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
9865 | * @returns {Object.<string,*>} Plain object
|
9866 | */
|
9867 | AggregationQuery.toObject = function toObject(message, options) {
|
9868 | if (!options)
|
9869 | options = {};
|
9870 | var object = {};
|
9871 | if (options.arrays || options.defaults)
|
9872 | object.aggregations = [];
|
9873 | if (message.nestedQuery != null && message.hasOwnProperty("nestedQuery")) {
|
9874 | object.nestedQuery = $root.google.datastore.v1.Query.toObject(message.nestedQuery, options);
|
9875 | if (options.oneofs)
|
9876 | object.queryType = "nestedQuery";
|
9877 | }
|
9878 | if (message.aggregations && message.aggregations.length) {
|
9879 | object.aggregations = [];
|
9880 | for (var j = 0; j < message.aggregations.length; ++j)
|
9881 | object.aggregations[j] = $root.google.datastore.v1.AggregationQuery.Aggregation.toObject(message.aggregations[j], options);
|
9882 | }
|
9883 | return object;
|
9884 | };
|
9885 |
|
9886 | /**
|
9887 | * Converts this AggregationQuery to JSON.
|
9888 | * @function toJSON
|
9889 | * @memberof google.datastore.v1.AggregationQuery
|
9890 | * @instance
|
9891 | * @returns {Object.<string,*>} JSON object
|
9892 | */
|
9893 | AggregationQuery.prototype.toJSON = function toJSON() {
|
9894 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
9895 | };
|
9896 |
|
9897 | /**
|
9898 | * Gets the default type url for AggregationQuery
|
9899 | * @function getTypeUrl
|
9900 | * @memberof google.datastore.v1.AggregationQuery
|
9901 | * @static
|
9902 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
9903 | * @returns {string} The default type url
|
9904 | */
|
9905 | AggregationQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
9906 | if (typeUrlPrefix === undefined) {
|
9907 | typeUrlPrefix = "type.googleapis.com";
|
9908 | }
|
9909 | return typeUrlPrefix + "/google.datastore.v1.AggregationQuery";
|
9910 | };
|
9911 |
|
9912 | AggregationQuery.Aggregation = (function() {
|
9913 |
|
9914 | /**
|
9915 | * Properties of an Aggregation.
|
9916 | * @memberof google.datastore.v1.AggregationQuery
|
9917 | * @interface IAggregation
|
9918 | * @property {google.datastore.v1.AggregationQuery.Aggregation.ICount|null} [count] Aggregation count
|
9919 | * @property {google.datastore.v1.AggregationQuery.Aggregation.ISum|null} [sum] Aggregation sum
|
9920 | * @property {google.datastore.v1.AggregationQuery.Aggregation.IAvg|null} [avg] Aggregation avg
|
9921 | * @property {string|null} [alias] Aggregation alias
|
9922 | */
|
9923 |
|
9924 | /**
|
9925 | * Constructs a new Aggregation.
|
9926 | * @memberof google.datastore.v1.AggregationQuery
|
9927 | * @classdesc Represents an Aggregation.
|
9928 | * @implements IAggregation
|
9929 | * @constructor
|
9930 | * @param {google.datastore.v1.AggregationQuery.IAggregation=} [properties] Properties to set
|
9931 | */
|
9932 | function Aggregation(properties) {
|
9933 | if (properties)
|
9934 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
9935 | if (properties[keys[i]] != null)
|
9936 | this[keys[i]] = properties[keys[i]];
|
9937 | }
|
9938 |
|
9939 | /**
|
9940 | * Aggregation count.
|
9941 | * @member {google.datastore.v1.AggregationQuery.Aggregation.ICount|null|undefined} count
|
9942 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
9943 | * @instance
|
9944 | */
|
9945 | Aggregation.prototype.count = null;
|
9946 |
|
9947 | /**
|
9948 | * Aggregation sum.
|
9949 | * @member {google.datastore.v1.AggregationQuery.Aggregation.ISum|null|undefined} sum
|
9950 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
9951 | * @instance
|
9952 | */
|
9953 | Aggregation.prototype.sum = null;
|
9954 |
|
9955 | /**
|
9956 | * Aggregation avg.
|
9957 | * @member {google.datastore.v1.AggregationQuery.Aggregation.IAvg|null|undefined} avg
|
9958 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
9959 | * @instance
|
9960 | */
|
9961 | Aggregation.prototype.avg = null;
|
9962 |
|
9963 | /**
|
9964 | * Aggregation alias.
|
9965 | * @member {string} alias
|
9966 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
9967 | * @instance
|
9968 | */
|
9969 | Aggregation.prototype.alias = "";
|
9970 |
|
9971 | // OneOf field names bound to virtual getters and setters
|
9972 | var $oneOfFields;
|
9973 |
|
9974 | /**
|
9975 | * Aggregation operator.
|
9976 | * @member {"count"|"sum"|"avg"|undefined} operator
|
9977 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
9978 | * @instance
|
9979 | */
|
9980 | Object.defineProperty(Aggregation.prototype, "operator", {
|
9981 | get: $util.oneOfGetter($oneOfFields = ["count", "sum", "avg"]),
|
9982 | set: $util.oneOfSetter($oneOfFields)
|
9983 | });
|
9984 |
|
9985 | /**
|
9986 | * Creates a new Aggregation instance using the specified properties.
|
9987 | * @function create
|
9988 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
9989 | * @static
|
9990 | * @param {google.datastore.v1.AggregationQuery.IAggregation=} [properties] Properties to set
|
9991 | * @returns {google.datastore.v1.AggregationQuery.Aggregation} Aggregation instance
|
9992 | */
|
9993 | Aggregation.create = function create(properties) {
|
9994 | return new Aggregation(properties);
|
9995 | };
|
9996 |
|
9997 | /**
|
9998 | * Encodes the specified Aggregation message. Does not implicitly {@link google.datastore.v1.AggregationQuery.Aggregation.verify|verify} messages.
|
9999 | * @function encode
|
10000 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
10001 | * @static
|
10002 | * @param {google.datastore.v1.AggregationQuery.IAggregation} message Aggregation message or plain object to encode
|
10003 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
10004 | * @returns {$protobuf.Writer} Writer
|
10005 | */
|
10006 | Aggregation.encode = function encode(message, writer) {
|
10007 | if (!writer)
|
10008 | writer = $Writer.create();
|
10009 | if (message.count != null && Object.hasOwnProperty.call(message, "count"))
|
10010 | $root.google.datastore.v1.AggregationQuery.Aggregation.Count.encode(message.count, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
10011 | if (message.sum != null && Object.hasOwnProperty.call(message, "sum"))
|
10012 | $root.google.datastore.v1.AggregationQuery.Aggregation.Sum.encode(message.sum, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
10013 | if (message.avg != null && Object.hasOwnProperty.call(message, "avg"))
|
10014 | $root.google.datastore.v1.AggregationQuery.Aggregation.Avg.encode(message.avg, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
10015 | if (message.alias != null && Object.hasOwnProperty.call(message, "alias"))
|
10016 | writer.uint32(/* id 7, wireType 2 =*/58).string(message.alias);
|
10017 | return writer;
|
10018 | };
|
10019 |
|
10020 | /**
|
10021 | * Encodes the specified Aggregation message, length delimited. Does not implicitly {@link google.datastore.v1.AggregationQuery.Aggregation.verify|verify} messages.
|
10022 | * @function encodeDelimited
|
10023 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
10024 | * @static
|
10025 | * @param {google.datastore.v1.AggregationQuery.IAggregation} message Aggregation message or plain object to encode
|
10026 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
10027 | * @returns {$protobuf.Writer} Writer
|
10028 | */
|
10029 | Aggregation.encodeDelimited = function encodeDelimited(message, writer) {
|
10030 | return this.encode(message, writer).ldelim();
|
10031 | };
|
10032 |
|
10033 | /**
|
10034 | * Decodes an Aggregation message from the specified reader or buffer.
|
10035 | * @function decode
|
10036 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
10037 | * @static
|
10038 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10039 | * @param {number} [length] Message length if known beforehand
|
10040 | * @returns {google.datastore.v1.AggregationQuery.Aggregation} Aggregation
|
10041 | * @throws {Error} If the payload is not a reader or valid buffer
|
10042 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10043 | */
|
10044 | Aggregation.decode = function decode(reader, length) {
|
10045 | if (!(reader instanceof $Reader))
|
10046 | reader = $Reader.create(reader);
|
10047 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.AggregationQuery.Aggregation();
|
10048 | while (reader.pos < end) {
|
10049 | var tag = reader.uint32();
|
10050 | switch (tag >>> 3) {
|
10051 | case 1: {
|
10052 | message.count = $root.google.datastore.v1.AggregationQuery.Aggregation.Count.decode(reader, reader.uint32());
|
10053 | break;
|
10054 | }
|
10055 | case 2: {
|
10056 | message.sum = $root.google.datastore.v1.AggregationQuery.Aggregation.Sum.decode(reader, reader.uint32());
|
10057 | break;
|
10058 | }
|
10059 | case 3: {
|
10060 | message.avg = $root.google.datastore.v1.AggregationQuery.Aggregation.Avg.decode(reader, reader.uint32());
|
10061 | break;
|
10062 | }
|
10063 | case 7: {
|
10064 | message.alias = reader.string();
|
10065 | break;
|
10066 | }
|
10067 | default:
|
10068 | reader.skipType(tag & 7);
|
10069 | break;
|
10070 | }
|
10071 | }
|
10072 | return message;
|
10073 | };
|
10074 |
|
10075 | /**
|
10076 | * Decodes an Aggregation message from the specified reader or buffer, length delimited.
|
10077 | * @function decodeDelimited
|
10078 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
10079 | * @static
|
10080 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10081 | * @returns {google.datastore.v1.AggregationQuery.Aggregation} Aggregation
|
10082 | * @throws {Error} If the payload is not a reader or valid buffer
|
10083 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10084 | */
|
10085 | Aggregation.decodeDelimited = function decodeDelimited(reader) {
|
10086 | if (!(reader instanceof $Reader))
|
10087 | reader = new $Reader(reader);
|
10088 | return this.decode(reader, reader.uint32());
|
10089 | };
|
10090 |
|
10091 | /**
|
10092 | * Verifies an Aggregation message.
|
10093 | * @function verify
|
10094 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
10095 | * @static
|
10096 | * @param {Object.<string,*>} message Plain object to verify
|
10097 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
10098 | */
|
10099 | Aggregation.verify = function verify(message) {
|
10100 | if (typeof message !== "object" || message === null)
|
10101 | return "object expected";
|
10102 | var properties = {};
|
10103 | if (message.count != null && message.hasOwnProperty("count")) {
|
10104 | properties.operator = 1;
|
10105 | {
|
10106 | var error = $root.google.datastore.v1.AggregationQuery.Aggregation.Count.verify(message.count);
|
10107 | if (error)
|
10108 | return "count." + error;
|
10109 | }
|
10110 | }
|
10111 | if (message.sum != null && message.hasOwnProperty("sum")) {
|
10112 | if (properties.operator === 1)
|
10113 | return "operator: multiple values";
|
10114 | properties.operator = 1;
|
10115 | {
|
10116 | var error = $root.google.datastore.v1.AggregationQuery.Aggregation.Sum.verify(message.sum);
|
10117 | if (error)
|
10118 | return "sum." + error;
|
10119 | }
|
10120 | }
|
10121 | if (message.avg != null && message.hasOwnProperty("avg")) {
|
10122 | if (properties.operator === 1)
|
10123 | return "operator: multiple values";
|
10124 | properties.operator = 1;
|
10125 | {
|
10126 | var error = $root.google.datastore.v1.AggregationQuery.Aggregation.Avg.verify(message.avg);
|
10127 | if (error)
|
10128 | return "avg." + error;
|
10129 | }
|
10130 | }
|
10131 | if (message.alias != null && message.hasOwnProperty("alias"))
|
10132 | if (!$util.isString(message.alias))
|
10133 | return "alias: string expected";
|
10134 | return null;
|
10135 | };
|
10136 |
|
10137 | /**
|
10138 | * Creates an Aggregation message from a plain object. Also converts values to their respective internal types.
|
10139 | * @function fromObject
|
10140 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
10141 | * @static
|
10142 | * @param {Object.<string,*>} object Plain object
|
10143 | * @returns {google.datastore.v1.AggregationQuery.Aggregation} Aggregation
|
10144 | */
|
10145 | Aggregation.fromObject = function fromObject(object) {
|
10146 | if (object instanceof $root.google.datastore.v1.AggregationQuery.Aggregation)
|
10147 | return object;
|
10148 | var message = new $root.google.datastore.v1.AggregationQuery.Aggregation();
|
10149 | if (object.count != null) {
|
10150 | if (typeof object.count !== "object")
|
10151 | throw TypeError(".google.datastore.v1.AggregationQuery.Aggregation.count: object expected");
|
10152 | message.count = $root.google.datastore.v1.AggregationQuery.Aggregation.Count.fromObject(object.count);
|
10153 | }
|
10154 | if (object.sum != null) {
|
10155 | if (typeof object.sum !== "object")
|
10156 | throw TypeError(".google.datastore.v1.AggregationQuery.Aggregation.sum: object expected");
|
10157 | message.sum = $root.google.datastore.v1.AggregationQuery.Aggregation.Sum.fromObject(object.sum);
|
10158 | }
|
10159 | if (object.avg != null) {
|
10160 | if (typeof object.avg !== "object")
|
10161 | throw TypeError(".google.datastore.v1.AggregationQuery.Aggregation.avg: object expected");
|
10162 | message.avg = $root.google.datastore.v1.AggregationQuery.Aggregation.Avg.fromObject(object.avg);
|
10163 | }
|
10164 | if (object.alias != null)
|
10165 | message.alias = String(object.alias);
|
10166 | return message;
|
10167 | };
|
10168 |
|
10169 | /**
|
10170 | * Creates a plain object from an Aggregation message. Also converts values to other types if specified.
|
10171 | * @function toObject
|
10172 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
10173 | * @static
|
10174 | * @param {google.datastore.v1.AggregationQuery.Aggregation} message Aggregation
|
10175 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
10176 | * @returns {Object.<string,*>} Plain object
|
10177 | */
|
10178 | Aggregation.toObject = function toObject(message, options) {
|
10179 | if (!options)
|
10180 | options = {};
|
10181 | var object = {};
|
10182 | if (options.defaults)
|
10183 | object.alias = "";
|
10184 | if (message.count != null && message.hasOwnProperty("count")) {
|
10185 | object.count = $root.google.datastore.v1.AggregationQuery.Aggregation.Count.toObject(message.count, options);
|
10186 | if (options.oneofs)
|
10187 | object.operator = "count";
|
10188 | }
|
10189 | if (message.sum != null && message.hasOwnProperty("sum")) {
|
10190 | object.sum = $root.google.datastore.v1.AggregationQuery.Aggregation.Sum.toObject(message.sum, options);
|
10191 | if (options.oneofs)
|
10192 | object.operator = "sum";
|
10193 | }
|
10194 | if (message.avg != null && message.hasOwnProperty("avg")) {
|
10195 | object.avg = $root.google.datastore.v1.AggregationQuery.Aggregation.Avg.toObject(message.avg, options);
|
10196 | if (options.oneofs)
|
10197 | object.operator = "avg";
|
10198 | }
|
10199 | if (message.alias != null && message.hasOwnProperty("alias"))
|
10200 | object.alias = message.alias;
|
10201 | return object;
|
10202 | };
|
10203 |
|
10204 | /**
|
10205 | * Converts this Aggregation to JSON.
|
10206 | * @function toJSON
|
10207 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
10208 | * @instance
|
10209 | * @returns {Object.<string,*>} JSON object
|
10210 | */
|
10211 | Aggregation.prototype.toJSON = function toJSON() {
|
10212 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
10213 | };
|
10214 |
|
10215 | /**
|
10216 | * Gets the default type url for Aggregation
|
10217 | * @function getTypeUrl
|
10218 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
10219 | * @static
|
10220 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
10221 | * @returns {string} The default type url
|
10222 | */
|
10223 | Aggregation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
10224 | if (typeUrlPrefix === undefined) {
|
10225 | typeUrlPrefix = "type.googleapis.com";
|
10226 | }
|
10227 | return typeUrlPrefix + "/google.datastore.v1.AggregationQuery.Aggregation";
|
10228 | };
|
10229 |
|
10230 | Aggregation.Count = (function() {
|
10231 |
|
10232 | /**
|
10233 | * Properties of a Count.
|
10234 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
10235 | * @interface ICount
|
10236 | * @property {google.protobuf.IInt64Value|null} [upTo] Count upTo
|
10237 | */
|
10238 |
|
10239 | /**
|
10240 | * Constructs a new Count.
|
10241 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
10242 | * @classdesc Represents a Count.
|
10243 | * @implements ICount
|
10244 | * @constructor
|
10245 | * @param {google.datastore.v1.AggregationQuery.Aggregation.ICount=} [properties] Properties to set
|
10246 | */
|
10247 | function Count(properties) {
|
10248 | if (properties)
|
10249 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
10250 | if (properties[keys[i]] != null)
|
10251 | this[keys[i]] = properties[keys[i]];
|
10252 | }
|
10253 |
|
10254 | /**
|
10255 | * Count upTo.
|
10256 | * @member {google.protobuf.IInt64Value|null|undefined} upTo
|
10257 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Count
|
10258 | * @instance
|
10259 | */
|
10260 | Count.prototype.upTo = null;
|
10261 |
|
10262 | /**
|
10263 | * Creates a new Count instance using the specified properties.
|
10264 | * @function create
|
10265 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Count
|
10266 | * @static
|
10267 | * @param {google.datastore.v1.AggregationQuery.Aggregation.ICount=} [properties] Properties to set
|
10268 | * @returns {google.datastore.v1.AggregationQuery.Aggregation.Count} Count instance
|
10269 | */
|
10270 | Count.create = function create(properties) {
|
10271 | return new Count(properties);
|
10272 | };
|
10273 |
|
10274 | /**
|
10275 | * Encodes the specified Count message. Does not implicitly {@link google.datastore.v1.AggregationQuery.Aggregation.Count.verify|verify} messages.
|
10276 | * @function encode
|
10277 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Count
|
10278 | * @static
|
10279 | * @param {google.datastore.v1.AggregationQuery.Aggregation.ICount} message Count message or plain object to encode
|
10280 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
10281 | * @returns {$protobuf.Writer} Writer
|
10282 | */
|
10283 | Count.encode = function encode(message, writer) {
|
10284 | if (!writer)
|
10285 | writer = $Writer.create();
|
10286 | if (message.upTo != null && Object.hasOwnProperty.call(message, "upTo"))
|
10287 | $root.google.protobuf.Int64Value.encode(message.upTo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
10288 | return writer;
|
10289 | };
|
10290 |
|
10291 | /**
|
10292 | * Encodes the specified Count message, length delimited. Does not implicitly {@link google.datastore.v1.AggregationQuery.Aggregation.Count.verify|verify} messages.
|
10293 | * @function encodeDelimited
|
10294 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Count
|
10295 | * @static
|
10296 | * @param {google.datastore.v1.AggregationQuery.Aggregation.ICount} message Count message or plain object to encode
|
10297 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
10298 | * @returns {$protobuf.Writer} Writer
|
10299 | */
|
10300 | Count.encodeDelimited = function encodeDelimited(message, writer) {
|
10301 | return this.encode(message, writer).ldelim();
|
10302 | };
|
10303 |
|
10304 | /**
|
10305 | * Decodes a Count message from the specified reader or buffer.
|
10306 | * @function decode
|
10307 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Count
|
10308 | * @static
|
10309 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10310 | * @param {number} [length] Message length if known beforehand
|
10311 | * @returns {google.datastore.v1.AggregationQuery.Aggregation.Count} Count
|
10312 | * @throws {Error} If the payload is not a reader or valid buffer
|
10313 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10314 | */
|
10315 | Count.decode = function decode(reader, length) {
|
10316 | if (!(reader instanceof $Reader))
|
10317 | reader = $Reader.create(reader);
|
10318 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.AggregationQuery.Aggregation.Count();
|
10319 | while (reader.pos < end) {
|
10320 | var tag = reader.uint32();
|
10321 | switch (tag >>> 3) {
|
10322 | case 1: {
|
10323 | message.upTo = $root.google.protobuf.Int64Value.decode(reader, reader.uint32());
|
10324 | break;
|
10325 | }
|
10326 | default:
|
10327 | reader.skipType(tag & 7);
|
10328 | break;
|
10329 | }
|
10330 | }
|
10331 | return message;
|
10332 | };
|
10333 |
|
10334 | /**
|
10335 | * Decodes a Count message from the specified reader or buffer, length delimited.
|
10336 | * @function decodeDelimited
|
10337 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Count
|
10338 | * @static
|
10339 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10340 | * @returns {google.datastore.v1.AggregationQuery.Aggregation.Count} Count
|
10341 | * @throws {Error} If the payload is not a reader or valid buffer
|
10342 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10343 | */
|
10344 | Count.decodeDelimited = function decodeDelimited(reader) {
|
10345 | if (!(reader instanceof $Reader))
|
10346 | reader = new $Reader(reader);
|
10347 | return this.decode(reader, reader.uint32());
|
10348 | };
|
10349 |
|
10350 | /**
|
10351 | * Verifies a Count message.
|
10352 | * @function verify
|
10353 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Count
|
10354 | * @static
|
10355 | * @param {Object.<string,*>} message Plain object to verify
|
10356 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
10357 | */
|
10358 | Count.verify = function verify(message) {
|
10359 | if (typeof message !== "object" || message === null)
|
10360 | return "object expected";
|
10361 | if (message.upTo != null && message.hasOwnProperty("upTo")) {
|
10362 | var error = $root.google.protobuf.Int64Value.verify(message.upTo);
|
10363 | if (error)
|
10364 | return "upTo." + error;
|
10365 | }
|
10366 | return null;
|
10367 | };
|
10368 |
|
10369 | /**
|
10370 | * Creates a Count message from a plain object. Also converts values to their respective internal types.
|
10371 | * @function fromObject
|
10372 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Count
|
10373 | * @static
|
10374 | * @param {Object.<string,*>} object Plain object
|
10375 | * @returns {google.datastore.v1.AggregationQuery.Aggregation.Count} Count
|
10376 | */
|
10377 | Count.fromObject = function fromObject(object) {
|
10378 | if (object instanceof $root.google.datastore.v1.AggregationQuery.Aggregation.Count)
|
10379 | return object;
|
10380 | var message = new $root.google.datastore.v1.AggregationQuery.Aggregation.Count();
|
10381 | if (object.upTo != null) {
|
10382 | if (typeof object.upTo !== "object")
|
10383 | throw TypeError(".google.datastore.v1.AggregationQuery.Aggregation.Count.upTo: object expected");
|
10384 | message.upTo = $root.google.protobuf.Int64Value.fromObject(object.upTo);
|
10385 | }
|
10386 | return message;
|
10387 | };
|
10388 |
|
10389 | /**
|
10390 | * Creates a plain object from a Count message. Also converts values to other types if specified.
|
10391 | * @function toObject
|
10392 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Count
|
10393 | * @static
|
10394 | * @param {google.datastore.v1.AggregationQuery.Aggregation.Count} message Count
|
10395 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
10396 | * @returns {Object.<string,*>} Plain object
|
10397 | */
|
10398 | Count.toObject = function toObject(message, options) {
|
10399 | if (!options)
|
10400 | options = {};
|
10401 | var object = {};
|
10402 | if (options.defaults)
|
10403 | object.upTo = null;
|
10404 | if (message.upTo != null && message.hasOwnProperty("upTo"))
|
10405 | object.upTo = $root.google.protobuf.Int64Value.toObject(message.upTo, options);
|
10406 | return object;
|
10407 | };
|
10408 |
|
10409 | /**
|
10410 | * Converts this Count to JSON.
|
10411 | * @function toJSON
|
10412 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Count
|
10413 | * @instance
|
10414 | * @returns {Object.<string,*>} JSON object
|
10415 | */
|
10416 | Count.prototype.toJSON = function toJSON() {
|
10417 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
10418 | };
|
10419 |
|
10420 | /**
|
10421 | * Gets the default type url for Count
|
10422 | * @function getTypeUrl
|
10423 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Count
|
10424 | * @static
|
10425 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
10426 | * @returns {string} The default type url
|
10427 | */
|
10428 | Count.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
10429 | if (typeUrlPrefix === undefined) {
|
10430 | typeUrlPrefix = "type.googleapis.com";
|
10431 | }
|
10432 | return typeUrlPrefix + "/google.datastore.v1.AggregationQuery.Aggregation.Count";
|
10433 | };
|
10434 |
|
10435 | return Count;
|
10436 | })();
|
10437 |
|
10438 | Aggregation.Sum = (function() {
|
10439 |
|
10440 | /**
|
10441 | * Properties of a Sum.
|
10442 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
10443 | * @interface ISum
|
10444 | * @property {google.datastore.v1.IPropertyReference|null} [property] Sum property
|
10445 | */
|
10446 |
|
10447 | /**
|
10448 | * Constructs a new Sum.
|
10449 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
10450 | * @classdesc Represents a Sum.
|
10451 | * @implements ISum
|
10452 | * @constructor
|
10453 | * @param {google.datastore.v1.AggregationQuery.Aggregation.ISum=} [properties] Properties to set
|
10454 | */
|
10455 | function Sum(properties) {
|
10456 | if (properties)
|
10457 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
10458 | if (properties[keys[i]] != null)
|
10459 | this[keys[i]] = properties[keys[i]];
|
10460 | }
|
10461 |
|
10462 | /**
|
10463 | * Sum property.
|
10464 | * @member {google.datastore.v1.IPropertyReference|null|undefined} property
|
10465 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Sum
|
10466 | * @instance
|
10467 | */
|
10468 | Sum.prototype.property = null;
|
10469 |
|
10470 | /**
|
10471 | * Creates a new Sum instance using the specified properties.
|
10472 | * @function create
|
10473 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Sum
|
10474 | * @static
|
10475 | * @param {google.datastore.v1.AggregationQuery.Aggregation.ISum=} [properties] Properties to set
|
10476 | * @returns {google.datastore.v1.AggregationQuery.Aggregation.Sum} Sum instance
|
10477 | */
|
10478 | Sum.create = function create(properties) {
|
10479 | return new Sum(properties);
|
10480 | };
|
10481 |
|
10482 | /**
|
10483 | * Encodes the specified Sum message. Does not implicitly {@link google.datastore.v1.AggregationQuery.Aggregation.Sum.verify|verify} messages.
|
10484 | * @function encode
|
10485 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Sum
|
10486 | * @static
|
10487 | * @param {google.datastore.v1.AggregationQuery.Aggregation.ISum} message Sum message or plain object to encode
|
10488 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
10489 | * @returns {$protobuf.Writer} Writer
|
10490 | */
|
10491 | Sum.encode = function encode(message, writer) {
|
10492 | if (!writer)
|
10493 | writer = $Writer.create();
|
10494 | if (message.property != null && Object.hasOwnProperty.call(message, "property"))
|
10495 | $root.google.datastore.v1.PropertyReference.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
10496 | return writer;
|
10497 | };
|
10498 |
|
10499 | /**
|
10500 | * Encodes the specified Sum message, length delimited. Does not implicitly {@link google.datastore.v1.AggregationQuery.Aggregation.Sum.verify|verify} messages.
|
10501 | * @function encodeDelimited
|
10502 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Sum
|
10503 | * @static
|
10504 | * @param {google.datastore.v1.AggregationQuery.Aggregation.ISum} message Sum message or plain object to encode
|
10505 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
10506 | * @returns {$protobuf.Writer} Writer
|
10507 | */
|
10508 | Sum.encodeDelimited = function encodeDelimited(message, writer) {
|
10509 | return this.encode(message, writer).ldelim();
|
10510 | };
|
10511 |
|
10512 | /**
|
10513 | * Decodes a Sum message from the specified reader or buffer.
|
10514 | * @function decode
|
10515 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Sum
|
10516 | * @static
|
10517 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10518 | * @param {number} [length] Message length if known beforehand
|
10519 | * @returns {google.datastore.v1.AggregationQuery.Aggregation.Sum} Sum
|
10520 | * @throws {Error} If the payload is not a reader or valid buffer
|
10521 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10522 | */
|
10523 | Sum.decode = function decode(reader, length) {
|
10524 | if (!(reader instanceof $Reader))
|
10525 | reader = $Reader.create(reader);
|
10526 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.AggregationQuery.Aggregation.Sum();
|
10527 | while (reader.pos < end) {
|
10528 | var tag = reader.uint32();
|
10529 | switch (tag >>> 3) {
|
10530 | case 1: {
|
10531 | message.property = $root.google.datastore.v1.PropertyReference.decode(reader, reader.uint32());
|
10532 | break;
|
10533 | }
|
10534 | default:
|
10535 | reader.skipType(tag & 7);
|
10536 | break;
|
10537 | }
|
10538 | }
|
10539 | return message;
|
10540 | };
|
10541 |
|
10542 | /**
|
10543 | * Decodes a Sum message from the specified reader or buffer, length delimited.
|
10544 | * @function decodeDelimited
|
10545 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Sum
|
10546 | * @static
|
10547 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10548 | * @returns {google.datastore.v1.AggregationQuery.Aggregation.Sum} Sum
|
10549 | * @throws {Error} If the payload is not a reader or valid buffer
|
10550 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10551 | */
|
10552 | Sum.decodeDelimited = function decodeDelimited(reader) {
|
10553 | if (!(reader instanceof $Reader))
|
10554 | reader = new $Reader(reader);
|
10555 | return this.decode(reader, reader.uint32());
|
10556 | };
|
10557 |
|
10558 | /**
|
10559 | * Verifies a Sum message.
|
10560 | * @function verify
|
10561 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Sum
|
10562 | * @static
|
10563 | * @param {Object.<string,*>} message Plain object to verify
|
10564 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
10565 | */
|
10566 | Sum.verify = function verify(message) {
|
10567 | if (typeof message !== "object" || message === null)
|
10568 | return "object expected";
|
10569 | if (message.property != null && message.hasOwnProperty("property")) {
|
10570 | var error = $root.google.datastore.v1.PropertyReference.verify(message.property);
|
10571 | if (error)
|
10572 | return "property." + error;
|
10573 | }
|
10574 | return null;
|
10575 | };
|
10576 |
|
10577 | /**
|
10578 | * Creates a Sum message from a plain object. Also converts values to their respective internal types.
|
10579 | * @function fromObject
|
10580 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Sum
|
10581 | * @static
|
10582 | * @param {Object.<string,*>} object Plain object
|
10583 | * @returns {google.datastore.v1.AggregationQuery.Aggregation.Sum} Sum
|
10584 | */
|
10585 | Sum.fromObject = function fromObject(object) {
|
10586 | if (object instanceof $root.google.datastore.v1.AggregationQuery.Aggregation.Sum)
|
10587 | return object;
|
10588 | var message = new $root.google.datastore.v1.AggregationQuery.Aggregation.Sum();
|
10589 | if (object.property != null) {
|
10590 | if (typeof object.property !== "object")
|
10591 | throw TypeError(".google.datastore.v1.AggregationQuery.Aggregation.Sum.property: object expected");
|
10592 | message.property = $root.google.datastore.v1.PropertyReference.fromObject(object.property);
|
10593 | }
|
10594 | return message;
|
10595 | };
|
10596 |
|
10597 | /**
|
10598 | * Creates a plain object from a Sum message. Also converts values to other types if specified.
|
10599 | * @function toObject
|
10600 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Sum
|
10601 | * @static
|
10602 | * @param {google.datastore.v1.AggregationQuery.Aggregation.Sum} message Sum
|
10603 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
10604 | * @returns {Object.<string,*>} Plain object
|
10605 | */
|
10606 | Sum.toObject = function toObject(message, options) {
|
10607 | if (!options)
|
10608 | options = {};
|
10609 | var object = {};
|
10610 | if (options.defaults)
|
10611 | object.property = null;
|
10612 | if (message.property != null && message.hasOwnProperty("property"))
|
10613 | object.property = $root.google.datastore.v1.PropertyReference.toObject(message.property, options);
|
10614 | return object;
|
10615 | };
|
10616 |
|
10617 | /**
|
10618 | * Converts this Sum to JSON.
|
10619 | * @function toJSON
|
10620 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Sum
|
10621 | * @instance
|
10622 | * @returns {Object.<string,*>} JSON object
|
10623 | */
|
10624 | Sum.prototype.toJSON = function toJSON() {
|
10625 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
10626 | };
|
10627 |
|
10628 | /**
|
10629 | * Gets the default type url for Sum
|
10630 | * @function getTypeUrl
|
10631 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Sum
|
10632 | * @static
|
10633 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
10634 | * @returns {string} The default type url
|
10635 | */
|
10636 | Sum.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
10637 | if (typeUrlPrefix === undefined) {
|
10638 | typeUrlPrefix = "type.googleapis.com";
|
10639 | }
|
10640 | return typeUrlPrefix + "/google.datastore.v1.AggregationQuery.Aggregation.Sum";
|
10641 | };
|
10642 |
|
10643 | return Sum;
|
10644 | })();
|
10645 |
|
10646 | Aggregation.Avg = (function() {
|
10647 |
|
10648 | /**
|
10649 | * Properties of an Avg.
|
10650 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
10651 | * @interface IAvg
|
10652 | * @property {google.datastore.v1.IPropertyReference|null} [property] Avg property
|
10653 | */
|
10654 |
|
10655 | /**
|
10656 | * Constructs a new Avg.
|
10657 | * @memberof google.datastore.v1.AggregationQuery.Aggregation
|
10658 | * @classdesc Represents an Avg.
|
10659 | * @implements IAvg
|
10660 | * @constructor
|
10661 | * @param {google.datastore.v1.AggregationQuery.Aggregation.IAvg=} [properties] Properties to set
|
10662 | */
|
10663 | function Avg(properties) {
|
10664 | if (properties)
|
10665 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
10666 | if (properties[keys[i]] != null)
|
10667 | this[keys[i]] = properties[keys[i]];
|
10668 | }
|
10669 |
|
10670 | /**
|
10671 | * Avg property.
|
10672 | * @member {google.datastore.v1.IPropertyReference|null|undefined} property
|
10673 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Avg
|
10674 | * @instance
|
10675 | */
|
10676 | Avg.prototype.property = null;
|
10677 |
|
10678 | /**
|
10679 | * Creates a new Avg instance using the specified properties.
|
10680 | * @function create
|
10681 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Avg
|
10682 | * @static
|
10683 | * @param {google.datastore.v1.AggregationQuery.Aggregation.IAvg=} [properties] Properties to set
|
10684 | * @returns {google.datastore.v1.AggregationQuery.Aggregation.Avg} Avg instance
|
10685 | */
|
10686 | Avg.create = function create(properties) {
|
10687 | return new Avg(properties);
|
10688 | };
|
10689 |
|
10690 | /**
|
10691 | * Encodes the specified Avg message. Does not implicitly {@link google.datastore.v1.AggregationQuery.Aggregation.Avg.verify|verify} messages.
|
10692 | * @function encode
|
10693 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Avg
|
10694 | * @static
|
10695 | * @param {google.datastore.v1.AggregationQuery.Aggregation.IAvg} message Avg message or plain object to encode
|
10696 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
10697 | * @returns {$protobuf.Writer} Writer
|
10698 | */
|
10699 | Avg.encode = function encode(message, writer) {
|
10700 | if (!writer)
|
10701 | writer = $Writer.create();
|
10702 | if (message.property != null && Object.hasOwnProperty.call(message, "property"))
|
10703 | $root.google.datastore.v1.PropertyReference.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
10704 | return writer;
|
10705 | };
|
10706 |
|
10707 | /**
|
10708 | * Encodes the specified Avg message, length delimited. Does not implicitly {@link google.datastore.v1.AggregationQuery.Aggregation.Avg.verify|verify} messages.
|
10709 | * @function encodeDelimited
|
10710 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Avg
|
10711 | * @static
|
10712 | * @param {google.datastore.v1.AggregationQuery.Aggregation.IAvg} message Avg message or plain object to encode
|
10713 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
10714 | * @returns {$protobuf.Writer} Writer
|
10715 | */
|
10716 | Avg.encodeDelimited = function encodeDelimited(message, writer) {
|
10717 | return this.encode(message, writer).ldelim();
|
10718 | };
|
10719 |
|
10720 | /**
|
10721 | * Decodes an Avg message from the specified reader or buffer.
|
10722 | * @function decode
|
10723 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Avg
|
10724 | * @static
|
10725 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10726 | * @param {number} [length] Message length if known beforehand
|
10727 | * @returns {google.datastore.v1.AggregationQuery.Aggregation.Avg} Avg
|
10728 | * @throws {Error} If the payload is not a reader or valid buffer
|
10729 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10730 | */
|
10731 | Avg.decode = function decode(reader, length) {
|
10732 | if (!(reader instanceof $Reader))
|
10733 | reader = $Reader.create(reader);
|
10734 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.AggregationQuery.Aggregation.Avg();
|
10735 | while (reader.pos < end) {
|
10736 | var tag = reader.uint32();
|
10737 | switch (tag >>> 3) {
|
10738 | case 1: {
|
10739 | message.property = $root.google.datastore.v1.PropertyReference.decode(reader, reader.uint32());
|
10740 | break;
|
10741 | }
|
10742 | default:
|
10743 | reader.skipType(tag & 7);
|
10744 | break;
|
10745 | }
|
10746 | }
|
10747 | return message;
|
10748 | };
|
10749 |
|
10750 | /**
|
10751 | * Decodes an Avg message from the specified reader or buffer, length delimited.
|
10752 | * @function decodeDelimited
|
10753 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Avg
|
10754 | * @static
|
10755 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10756 | * @returns {google.datastore.v1.AggregationQuery.Aggregation.Avg} Avg
|
10757 | * @throws {Error} If the payload is not a reader or valid buffer
|
10758 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10759 | */
|
10760 | Avg.decodeDelimited = function decodeDelimited(reader) {
|
10761 | if (!(reader instanceof $Reader))
|
10762 | reader = new $Reader(reader);
|
10763 | return this.decode(reader, reader.uint32());
|
10764 | };
|
10765 |
|
10766 | /**
|
10767 | * Verifies an Avg message.
|
10768 | * @function verify
|
10769 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Avg
|
10770 | * @static
|
10771 | * @param {Object.<string,*>} message Plain object to verify
|
10772 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
10773 | */
|
10774 | Avg.verify = function verify(message) {
|
10775 | if (typeof message !== "object" || message === null)
|
10776 | return "object expected";
|
10777 | if (message.property != null && message.hasOwnProperty("property")) {
|
10778 | var error = $root.google.datastore.v1.PropertyReference.verify(message.property);
|
10779 | if (error)
|
10780 | return "property." + error;
|
10781 | }
|
10782 | return null;
|
10783 | };
|
10784 |
|
10785 | /**
|
10786 | * Creates an Avg message from a plain object. Also converts values to their respective internal types.
|
10787 | * @function fromObject
|
10788 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Avg
|
10789 | * @static
|
10790 | * @param {Object.<string,*>} object Plain object
|
10791 | * @returns {google.datastore.v1.AggregationQuery.Aggregation.Avg} Avg
|
10792 | */
|
10793 | Avg.fromObject = function fromObject(object) {
|
10794 | if (object instanceof $root.google.datastore.v1.AggregationQuery.Aggregation.Avg)
|
10795 | return object;
|
10796 | var message = new $root.google.datastore.v1.AggregationQuery.Aggregation.Avg();
|
10797 | if (object.property != null) {
|
10798 | if (typeof object.property !== "object")
|
10799 | throw TypeError(".google.datastore.v1.AggregationQuery.Aggregation.Avg.property: object expected");
|
10800 | message.property = $root.google.datastore.v1.PropertyReference.fromObject(object.property);
|
10801 | }
|
10802 | return message;
|
10803 | };
|
10804 |
|
10805 | /**
|
10806 | * Creates a plain object from an Avg message. Also converts values to other types if specified.
|
10807 | * @function toObject
|
10808 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Avg
|
10809 | * @static
|
10810 | * @param {google.datastore.v1.AggregationQuery.Aggregation.Avg} message Avg
|
10811 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
10812 | * @returns {Object.<string,*>} Plain object
|
10813 | */
|
10814 | Avg.toObject = function toObject(message, options) {
|
10815 | if (!options)
|
10816 | options = {};
|
10817 | var object = {};
|
10818 | if (options.defaults)
|
10819 | object.property = null;
|
10820 | if (message.property != null && message.hasOwnProperty("property"))
|
10821 | object.property = $root.google.datastore.v1.PropertyReference.toObject(message.property, options);
|
10822 | return object;
|
10823 | };
|
10824 |
|
10825 | /**
|
10826 | * Converts this Avg to JSON.
|
10827 | * @function toJSON
|
10828 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Avg
|
10829 | * @instance
|
10830 | * @returns {Object.<string,*>} JSON object
|
10831 | */
|
10832 | Avg.prototype.toJSON = function toJSON() {
|
10833 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
10834 | };
|
10835 |
|
10836 | /**
|
10837 | * Gets the default type url for Avg
|
10838 | * @function getTypeUrl
|
10839 | * @memberof google.datastore.v1.AggregationQuery.Aggregation.Avg
|
10840 | * @static
|
10841 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
10842 | * @returns {string} The default type url
|
10843 | */
|
10844 | Avg.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
10845 | if (typeUrlPrefix === undefined) {
|
10846 | typeUrlPrefix = "type.googleapis.com";
|
10847 | }
|
10848 | return typeUrlPrefix + "/google.datastore.v1.AggregationQuery.Aggregation.Avg";
|
10849 | };
|
10850 |
|
10851 | return Avg;
|
10852 | })();
|
10853 |
|
10854 | return Aggregation;
|
10855 | })();
|
10856 |
|
10857 | return AggregationQuery;
|
10858 | })();
|
10859 |
|
10860 | v1.KindExpression = (function() {
|
10861 |
|
10862 | /**
|
10863 | * Properties of a KindExpression.
|
10864 | * @memberof google.datastore.v1
|
10865 | * @interface IKindExpression
|
10866 | * @property {string|null} [name] KindExpression name
|
10867 | */
|
10868 |
|
10869 | /**
|
10870 | * Constructs a new KindExpression.
|
10871 | * @memberof google.datastore.v1
|
10872 | * @classdesc Represents a KindExpression.
|
10873 | * @implements IKindExpression
|
10874 | * @constructor
|
10875 | * @param {google.datastore.v1.IKindExpression=} [properties] Properties to set
|
10876 | */
|
10877 | function KindExpression(properties) {
|
10878 | if (properties)
|
10879 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
10880 | if (properties[keys[i]] != null)
|
10881 | this[keys[i]] = properties[keys[i]];
|
10882 | }
|
10883 |
|
10884 | /**
|
10885 | * KindExpression name.
|
10886 | * @member {string} name
|
10887 | * @memberof google.datastore.v1.KindExpression
|
10888 | * @instance
|
10889 | */
|
10890 | KindExpression.prototype.name = "";
|
10891 |
|
10892 | /**
|
10893 | * Creates a new KindExpression instance using the specified properties.
|
10894 | * @function create
|
10895 | * @memberof google.datastore.v1.KindExpression
|
10896 | * @static
|
10897 | * @param {google.datastore.v1.IKindExpression=} [properties] Properties to set
|
10898 | * @returns {google.datastore.v1.KindExpression} KindExpression instance
|
10899 | */
|
10900 | KindExpression.create = function create(properties) {
|
10901 | return new KindExpression(properties);
|
10902 | };
|
10903 |
|
10904 | /**
|
10905 | * Encodes the specified KindExpression message. Does not implicitly {@link google.datastore.v1.KindExpression.verify|verify} messages.
|
10906 | * @function encode
|
10907 | * @memberof google.datastore.v1.KindExpression
|
10908 | * @static
|
10909 | * @param {google.datastore.v1.IKindExpression} message KindExpression message or plain object to encode
|
10910 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
10911 | * @returns {$protobuf.Writer} Writer
|
10912 | */
|
10913 | KindExpression.encode = function encode(message, writer) {
|
10914 | if (!writer)
|
10915 | writer = $Writer.create();
|
10916 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
10917 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
10918 | return writer;
|
10919 | };
|
10920 |
|
10921 | /**
|
10922 | * Encodes the specified KindExpression message, length delimited. Does not implicitly {@link google.datastore.v1.KindExpression.verify|verify} messages.
|
10923 | * @function encodeDelimited
|
10924 | * @memberof google.datastore.v1.KindExpression
|
10925 | * @static
|
10926 | * @param {google.datastore.v1.IKindExpression} message KindExpression message or plain object to encode
|
10927 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
10928 | * @returns {$protobuf.Writer} Writer
|
10929 | */
|
10930 | KindExpression.encodeDelimited = function encodeDelimited(message, writer) {
|
10931 | return this.encode(message, writer).ldelim();
|
10932 | };
|
10933 |
|
10934 | /**
|
10935 | * Decodes a KindExpression message from the specified reader or buffer.
|
10936 | * @function decode
|
10937 | * @memberof google.datastore.v1.KindExpression
|
10938 | * @static
|
10939 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10940 | * @param {number} [length] Message length if known beforehand
|
10941 | * @returns {google.datastore.v1.KindExpression} KindExpression
|
10942 | * @throws {Error} If the payload is not a reader or valid buffer
|
10943 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10944 | */
|
10945 | KindExpression.decode = function decode(reader, length) {
|
10946 | if (!(reader instanceof $Reader))
|
10947 | reader = $Reader.create(reader);
|
10948 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.KindExpression();
|
10949 | while (reader.pos < end) {
|
10950 | var tag = reader.uint32();
|
10951 | switch (tag >>> 3) {
|
10952 | case 1: {
|
10953 | message.name = reader.string();
|
10954 | break;
|
10955 | }
|
10956 | default:
|
10957 | reader.skipType(tag & 7);
|
10958 | break;
|
10959 | }
|
10960 | }
|
10961 | return message;
|
10962 | };
|
10963 |
|
10964 | /**
|
10965 | * Decodes a KindExpression message from the specified reader or buffer, length delimited.
|
10966 | * @function decodeDelimited
|
10967 | * @memberof google.datastore.v1.KindExpression
|
10968 | * @static
|
10969 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
10970 | * @returns {google.datastore.v1.KindExpression} KindExpression
|
10971 | * @throws {Error} If the payload is not a reader or valid buffer
|
10972 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
10973 | */
|
10974 | KindExpression.decodeDelimited = function decodeDelimited(reader) {
|
10975 | if (!(reader instanceof $Reader))
|
10976 | reader = new $Reader(reader);
|
10977 | return this.decode(reader, reader.uint32());
|
10978 | };
|
10979 |
|
10980 | /**
|
10981 | * Verifies a KindExpression message.
|
10982 | * @function verify
|
10983 | * @memberof google.datastore.v1.KindExpression
|
10984 | * @static
|
10985 | * @param {Object.<string,*>} message Plain object to verify
|
10986 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
10987 | */
|
10988 | KindExpression.verify = function verify(message) {
|
10989 | if (typeof message !== "object" || message === null)
|
10990 | return "object expected";
|
10991 | if (message.name != null && message.hasOwnProperty("name"))
|
10992 | if (!$util.isString(message.name))
|
10993 | return "name: string expected";
|
10994 | return null;
|
10995 | };
|
10996 |
|
10997 | /**
|
10998 | * Creates a KindExpression message from a plain object. Also converts values to their respective internal types.
|
10999 | * @function fromObject
|
11000 | * @memberof google.datastore.v1.KindExpression
|
11001 | * @static
|
11002 | * @param {Object.<string,*>} object Plain object
|
11003 | * @returns {google.datastore.v1.KindExpression} KindExpression
|
11004 | */
|
11005 | KindExpression.fromObject = function fromObject(object) {
|
11006 | if (object instanceof $root.google.datastore.v1.KindExpression)
|
11007 | return object;
|
11008 | var message = new $root.google.datastore.v1.KindExpression();
|
11009 | if (object.name != null)
|
11010 | message.name = String(object.name);
|
11011 | return message;
|
11012 | };
|
11013 |
|
11014 | /**
|
11015 | * Creates a plain object from a KindExpression message. Also converts values to other types if specified.
|
11016 | * @function toObject
|
11017 | * @memberof google.datastore.v1.KindExpression
|
11018 | * @static
|
11019 | * @param {google.datastore.v1.KindExpression} message KindExpression
|
11020 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
11021 | * @returns {Object.<string,*>} Plain object
|
11022 | */
|
11023 | KindExpression.toObject = function toObject(message, options) {
|
11024 | if (!options)
|
11025 | options = {};
|
11026 | var object = {};
|
11027 | if (options.defaults)
|
11028 | object.name = "";
|
11029 | if (message.name != null && message.hasOwnProperty("name"))
|
11030 | object.name = message.name;
|
11031 | return object;
|
11032 | };
|
11033 |
|
11034 | /**
|
11035 | * Converts this KindExpression to JSON.
|
11036 | * @function toJSON
|
11037 | * @memberof google.datastore.v1.KindExpression
|
11038 | * @instance
|
11039 | * @returns {Object.<string,*>} JSON object
|
11040 | */
|
11041 | KindExpression.prototype.toJSON = function toJSON() {
|
11042 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
11043 | };
|
11044 |
|
11045 | /**
|
11046 | * Gets the default type url for KindExpression
|
11047 | * @function getTypeUrl
|
11048 | * @memberof google.datastore.v1.KindExpression
|
11049 | * @static
|
11050 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
11051 | * @returns {string} The default type url
|
11052 | */
|
11053 | KindExpression.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
11054 | if (typeUrlPrefix === undefined) {
|
11055 | typeUrlPrefix = "type.googleapis.com";
|
11056 | }
|
11057 | return typeUrlPrefix + "/google.datastore.v1.KindExpression";
|
11058 | };
|
11059 |
|
11060 | return KindExpression;
|
11061 | })();
|
11062 |
|
11063 | v1.PropertyReference = (function() {
|
11064 |
|
11065 | /**
|
11066 | * Properties of a PropertyReference.
|
11067 | * @memberof google.datastore.v1
|
11068 | * @interface IPropertyReference
|
11069 | * @property {string|null} [name] PropertyReference name
|
11070 | */
|
11071 |
|
11072 | /**
|
11073 | * Constructs a new PropertyReference.
|
11074 | * @memberof google.datastore.v1
|
11075 | * @classdesc Represents a PropertyReference.
|
11076 | * @implements IPropertyReference
|
11077 | * @constructor
|
11078 | * @param {google.datastore.v1.IPropertyReference=} [properties] Properties to set
|
11079 | */
|
11080 | function PropertyReference(properties) {
|
11081 | if (properties)
|
11082 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
11083 | if (properties[keys[i]] != null)
|
11084 | this[keys[i]] = properties[keys[i]];
|
11085 | }
|
11086 |
|
11087 | /**
|
11088 | * PropertyReference name.
|
11089 | * @member {string} name
|
11090 | * @memberof google.datastore.v1.PropertyReference
|
11091 | * @instance
|
11092 | */
|
11093 | PropertyReference.prototype.name = "";
|
11094 |
|
11095 | /**
|
11096 | * Creates a new PropertyReference instance using the specified properties.
|
11097 | * @function create
|
11098 | * @memberof google.datastore.v1.PropertyReference
|
11099 | * @static
|
11100 | * @param {google.datastore.v1.IPropertyReference=} [properties] Properties to set
|
11101 | * @returns {google.datastore.v1.PropertyReference} PropertyReference instance
|
11102 | */
|
11103 | PropertyReference.create = function create(properties) {
|
11104 | return new PropertyReference(properties);
|
11105 | };
|
11106 |
|
11107 | /**
|
11108 | * Encodes the specified PropertyReference message. Does not implicitly {@link google.datastore.v1.PropertyReference.verify|verify} messages.
|
11109 | * @function encode
|
11110 | * @memberof google.datastore.v1.PropertyReference
|
11111 | * @static
|
11112 | * @param {google.datastore.v1.IPropertyReference} message PropertyReference message or plain object to encode
|
11113 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11114 | * @returns {$protobuf.Writer} Writer
|
11115 | */
|
11116 | PropertyReference.encode = function encode(message, writer) {
|
11117 | if (!writer)
|
11118 | writer = $Writer.create();
|
11119 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
11120 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.name);
|
11121 | return writer;
|
11122 | };
|
11123 |
|
11124 | /**
|
11125 | * Encodes the specified PropertyReference message, length delimited. Does not implicitly {@link google.datastore.v1.PropertyReference.verify|verify} messages.
|
11126 | * @function encodeDelimited
|
11127 | * @memberof google.datastore.v1.PropertyReference
|
11128 | * @static
|
11129 | * @param {google.datastore.v1.IPropertyReference} message PropertyReference message or plain object to encode
|
11130 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11131 | * @returns {$protobuf.Writer} Writer
|
11132 | */
|
11133 | PropertyReference.encodeDelimited = function encodeDelimited(message, writer) {
|
11134 | return this.encode(message, writer).ldelim();
|
11135 | };
|
11136 |
|
11137 | /**
|
11138 | * Decodes a PropertyReference message from the specified reader or buffer.
|
11139 | * @function decode
|
11140 | * @memberof google.datastore.v1.PropertyReference
|
11141 | * @static
|
11142 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11143 | * @param {number} [length] Message length if known beforehand
|
11144 | * @returns {google.datastore.v1.PropertyReference} PropertyReference
|
11145 | * @throws {Error} If the payload is not a reader or valid buffer
|
11146 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11147 | */
|
11148 | PropertyReference.decode = function decode(reader, length) {
|
11149 | if (!(reader instanceof $Reader))
|
11150 | reader = $Reader.create(reader);
|
11151 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.PropertyReference();
|
11152 | while (reader.pos < end) {
|
11153 | var tag = reader.uint32();
|
11154 | switch (tag >>> 3) {
|
11155 | case 2: {
|
11156 | message.name = reader.string();
|
11157 | break;
|
11158 | }
|
11159 | default:
|
11160 | reader.skipType(tag & 7);
|
11161 | break;
|
11162 | }
|
11163 | }
|
11164 | return message;
|
11165 | };
|
11166 |
|
11167 | /**
|
11168 | * Decodes a PropertyReference message from the specified reader or buffer, length delimited.
|
11169 | * @function decodeDelimited
|
11170 | * @memberof google.datastore.v1.PropertyReference
|
11171 | * @static
|
11172 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11173 | * @returns {google.datastore.v1.PropertyReference} PropertyReference
|
11174 | * @throws {Error} If the payload is not a reader or valid buffer
|
11175 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11176 | */
|
11177 | PropertyReference.decodeDelimited = function decodeDelimited(reader) {
|
11178 | if (!(reader instanceof $Reader))
|
11179 | reader = new $Reader(reader);
|
11180 | return this.decode(reader, reader.uint32());
|
11181 | };
|
11182 |
|
11183 | /**
|
11184 | * Verifies a PropertyReference message.
|
11185 | * @function verify
|
11186 | * @memberof google.datastore.v1.PropertyReference
|
11187 | * @static
|
11188 | * @param {Object.<string,*>} message Plain object to verify
|
11189 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
11190 | */
|
11191 | PropertyReference.verify = function verify(message) {
|
11192 | if (typeof message !== "object" || message === null)
|
11193 | return "object expected";
|
11194 | if (message.name != null && message.hasOwnProperty("name"))
|
11195 | if (!$util.isString(message.name))
|
11196 | return "name: string expected";
|
11197 | return null;
|
11198 | };
|
11199 |
|
11200 | /**
|
11201 | * Creates a PropertyReference message from a plain object. Also converts values to their respective internal types.
|
11202 | * @function fromObject
|
11203 | * @memberof google.datastore.v1.PropertyReference
|
11204 | * @static
|
11205 | * @param {Object.<string,*>} object Plain object
|
11206 | * @returns {google.datastore.v1.PropertyReference} PropertyReference
|
11207 | */
|
11208 | PropertyReference.fromObject = function fromObject(object) {
|
11209 | if (object instanceof $root.google.datastore.v1.PropertyReference)
|
11210 | return object;
|
11211 | var message = new $root.google.datastore.v1.PropertyReference();
|
11212 | if (object.name != null)
|
11213 | message.name = String(object.name);
|
11214 | return message;
|
11215 | };
|
11216 |
|
11217 | /**
|
11218 | * Creates a plain object from a PropertyReference message. Also converts values to other types if specified.
|
11219 | * @function toObject
|
11220 | * @memberof google.datastore.v1.PropertyReference
|
11221 | * @static
|
11222 | * @param {google.datastore.v1.PropertyReference} message PropertyReference
|
11223 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
11224 | * @returns {Object.<string,*>} Plain object
|
11225 | */
|
11226 | PropertyReference.toObject = function toObject(message, options) {
|
11227 | if (!options)
|
11228 | options = {};
|
11229 | var object = {};
|
11230 | if (options.defaults)
|
11231 | object.name = "";
|
11232 | if (message.name != null && message.hasOwnProperty("name"))
|
11233 | object.name = message.name;
|
11234 | return object;
|
11235 | };
|
11236 |
|
11237 | /**
|
11238 | * Converts this PropertyReference to JSON.
|
11239 | * @function toJSON
|
11240 | * @memberof google.datastore.v1.PropertyReference
|
11241 | * @instance
|
11242 | * @returns {Object.<string,*>} JSON object
|
11243 | */
|
11244 | PropertyReference.prototype.toJSON = function toJSON() {
|
11245 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
11246 | };
|
11247 |
|
11248 | /**
|
11249 | * Gets the default type url for PropertyReference
|
11250 | * @function getTypeUrl
|
11251 | * @memberof google.datastore.v1.PropertyReference
|
11252 | * @static
|
11253 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
11254 | * @returns {string} The default type url
|
11255 | */
|
11256 | PropertyReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
11257 | if (typeUrlPrefix === undefined) {
|
11258 | typeUrlPrefix = "type.googleapis.com";
|
11259 | }
|
11260 | return typeUrlPrefix + "/google.datastore.v1.PropertyReference";
|
11261 | };
|
11262 |
|
11263 | return PropertyReference;
|
11264 | })();
|
11265 |
|
11266 | v1.Projection = (function() {
|
11267 |
|
11268 | /**
|
11269 | * Properties of a Projection.
|
11270 | * @memberof google.datastore.v1
|
11271 | * @interface IProjection
|
11272 | * @property {google.datastore.v1.IPropertyReference|null} [property] Projection property
|
11273 | */
|
11274 |
|
11275 | /**
|
11276 | * Constructs a new Projection.
|
11277 | * @memberof google.datastore.v1
|
11278 | * @classdesc Represents a Projection.
|
11279 | * @implements IProjection
|
11280 | * @constructor
|
11281 | * @param {google.datastore.v1.IProjection=} [properties] Properties to set
|
11282 | */
|
11283 | function Projection(properties) {
|
11284 | if (properties)
|
11285 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
11286 | if (properties[keys[i]] != null)
|
11287 | this[keys[i]] = properties[keys[i]];
|
11288 | }
|
11289 |
|
11290 | /**
|
11291 | * Projection property.
|
11292 | * @member {google.datastore.v1.IPropertyReference|null|undefined} property
|
11293 | * @memberof google.datastore.v1.Projection
|
11294 | * @instance
|
11295 | */
|
11296 | Projection.prototype.property = null;
|
11297 |
|
11298 | /**
|
11299 | * Creates a new Projection instance using the specified properties.
|
11300 | * @function create
|
11301 | * @memberof google.datastore.v1.Projection
|
11302 | * @static
|
11303 | * @param {google.datastore.v1.IProjection=} [properties] Properties to set
|
11304 | * @returns {google.datastore.v1.Projection} Projection instance
|
11305 | */
|
11306 | Projection.create = function create(properties) {
|
11307 | return new Projection(properties);
|
11308 | };
|
11309 |
|
11310 | /**
|
11311 | * Encodes the specified Projection message. Does not implicitly {@link google.datastore.v1.Projection.verify|verify} messages.
|
11312 | * @function encode
|
11313 | * @memberof google.datastore.v1.Projection
|
11314 | * @static
|
11315 | * @param {google.datastore.v1.IProjection} message Projection message or plain object to encode
|
11316 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11317 | * @returns {$protobuf.Writer} Writer
|
11318 | */
|
11319 | Projection.encode = function encode(message, writer) {
|
11320 | if (!writer)
|
11321 | writer = $Writer.create();
|
11322 | if (message.property != null && Object.hasOwnProperty.call(message, "property"))
|
11323 | $root.google.datastore.v1.PropertyReference.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
11324 | return writer;
|
11325 | };
|
11326 |
|
11327 | /**
|
11328 | * Encodes the specified Projection message, length delimited. Does not implicitly {@link google.datastore.v1.Projection.verify|verify} messages.
|
11329 | * @function encodeDelimited
|
11330 | * @memberof google.datastore.v1.Projection
|
11331 | * @static
|
11332 | * @param {google.datastore.v1.IProjection} message Projection message or plain object to encode
|
11333 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11334 | * @returns {$protobuf.Writer} Writer
|
11335 | */
|
11336 | Projection.encodeDelimited = function encodeDelimited(message, writer) {
|
11337 | return this.encode(message, writer).ldelim();
|
11338 | };
|
11339 |
|
11340 | /**
|
11341 | * Decodes a Projection message from the specified reader or buffer.
|
11342 | * @function decode
|
11343 | * @memberof google.datastore.v1.Projection
|
11344 | * @static
|
11345 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11346 | * @param {number} [length] Message length if known beforehand
|
11347 | * @returns {google.datastore.v1.Projection} Projection
|
11348 | * @throws {Error} If the payload is not a reader or valid buffer
|
11349 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11350 | */
|
11351 | Projection.decode = function decode(reader, length) {
|
11352 | if (!(reader instanceof $Reader))
|
11353 | reader = $Reader.create(reader);
|
11354 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.Projection();
|
11355 | while (reader.pos < end) {
|
11356 | var tag = reader.uint32();
|
11357 | switch (tag >>> 3) {
|
11358 | case 1: {
|
11359 | message.property = $root.google.datastore.v1.PropertyReference.decode(reader, reader.uint32());
|
11360 | break;
|
11361 | }
|
11362 | default:
|
11363 | reader.skipType(tag & 7);
|
11364 | break;
|
11365 | }
|
11366 | }
|
11367 | return message;
|
11368 | };
|
11369 |
|
11370 | /**
|
11371 | * Decodes a Projection message from the specified reader or buffer, length delimited.
|
11372 | * @function decodeDelimited
|
11373 | * @memberof google.datastore.v1.Projection
|
11374 | * @static
|
11375 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11376 | * @returns {google.datastore.v1.Projection} Projection
|
11377 | * @throws {Error} If the payload is not a reader or valid buffer
|
11378 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11379 | */
|
11380 | Projection.decodeDelimited = function decodeDelimited(reader) {
|
11381 | if (!(reader instanceof $Reader))
|
11382 | reader = new $Reader(reader);
|
11383 | return this.decode(reader, reader.uint32());
|
11384 | };
|
11385 |
|
11386 | /**
|
11387 | * Verifies a Projection message.
|
11388 | * @function verify
|
11389 | * @memberof google.datastore.v1.Projection
|
11390 | * @static
|
11391 | * @param {Object.<string,*>} message Plain object to verify
|
11392 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
11393 | */
|
11394 | Projection.verify = function verify(message) {
|
11395 | if (typeof message !== "object" || message === null)
|
11396 | return "object expected";
|
11397 | if (message.property != null && message.hasOwnProperty("property")) {
|
11398 | var error = $root.google.datastore.v1.PropertyReference.verify(message.property);
|
11399 | if (error)
|
11400 | return "property." + error;
|
11401 | }
|
11402 | return null;
|
11403 | };
|
11404 |
|
11405 | /**
|
11406 | * Creates a Projection message from a plain object. Also converts values to their respective internal types.
|
11407 | * @function fromObject
|
11408 | * @memberof google.datastore.v1.Projection
|
11409 | * @static
|
11410 | * @param {Object.<string,*>} object Plain object
|
11411 | * @returns {google.datastore.v1.Projection} Projection
|
11412 | */
|
11413 | Projection.fromObject = function fromObject(object) {
|
11414 | if (object instanceof $root.google.datastore.v1.Projection)
|
11415 | return object;
|
11416 | var message = new $root.google.datastore.v1.Projection();
|
11417 | if (object.property != null) {
|
11418 | if (typeof object.property !== "object")
|
11419 | throw TypeError(".google.datastore.v1.Projection.property: object expected");
|
11420 | message.property = $root.google.datastore.v1.PropertyReference.fromObject(object.property);
|
11421 | }
|
11422 | return message;
|
11423 | };
|
11424 |
|
11425 | /**
|
11426 | * Creates a plain object from a Projection message. Also converts values to other types if specified.
|
11427 | * @function toObject
|
11428 | * @memberof google.datastore.v1.Projection
|
11429 | * @static
|
11430 | * @param {google.datastore.v1.Projection} message Projection
|
11431 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
11432 | * @returns {Object.<string,*>} Plain object
|
11433 | */
|
11434 | Projection.toObject = function toObject(message, options) {
|
11435 | if (!options)
|
11436 | options = {};
|
11437 | var object = {};
|
11438 | if (options.defaults)
|
11439 | object.property = null;
|
11440 | if (message.property != null && message.hasOwnProperty("property"))
|
11441 | object.property = $root.google.datastore.v1.PropertyReference.toObject(message.property, options);
|
11442 | return object;
|
11443 | };
|
11444 |
|
11445 | /**
|
11446 | * Converts this Projection to JSON.
|
11447 | * @function toJSON
|
11448 | * @memberof google.datastore.v1.Projection
|
11449 | * @instance
|
11450 | * @returns {Object.<string,*>} JSON object
|
11451 | */
|
11452 | Projection.prototype.toJSON = function toJSON() {
|
11453 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
11454 | };
|
11455 |
|
11456 | /**
|
11457 | * Gets the default type url for Projection
|
11458 | * @function getTypeUrl
|
11459 | * @memberof google.datastore.v1.Projection
|
11460 | * @static
|
11461 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
11462 | * @returns {string} The default type url
|
11463 | */
|
11464 | Projection.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
11465 | if (typeUrlPrefix === undefined) {
|
11466 | typeUrlPrefix = "type.googleapis.com";
|
11467 | }
|
11468 | return typeUrlPrefix + "/google.datastore.v1.Projection";
|
11469 | };
|
11470 |
|
11471 | return Projection;
|
11472 | })();
|
11473 |
|
11474 | v1.PropertyOrder = (function() {
|
11475 |
|
11476 | /**
|
11477 | * Properties of a PropertyOrder.
|
11478 | * @memberof google.datastore.v1
|
11479 | * @interface IPropertyOrder
|
11480 | * @property {google.datastore.v1.IPropertyReference|null} [property] PropertyOrder property
|
11481 | * @property {google.datastore.v1.PropertyOrder.Direction|null} [direction] PropertyOrder direction
|
11482 | */
|
11483 |
|
11484 | /**
|
11485 | * Constructs a new PropertyOrder.
|
11486 | * @memberof google.datastore.v1
|
11487 | * @classdesc Represents a PropertyOrder.
|
11488 | * @implements IPropertyOrder
|
11489 | * @constructor
|
11490 | * @param {google.datastore.v1.IPropertyOrder=} [properties] Properties to set
|
11491 | */
|
11492 | function PropertyOrder(properties) {
|
11493 | if (properties)
|
11494 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
11495 | if (properties[keys[i]] != null)
|
11496 | this[keys[i]] = properties[keys[i]];
|
11497 | }
|
11498 |
|
11499 | /**
|
11500 | * PropertyOrder property.
|
11501 | * @member {google.datastore.v1.IPropertyReference|null|undefined} property
|
11502 | * @memberof google.datastore.v1.PropertyOrder
|
11503 | * @instance
|
11504 | */
|
11505 | PropertyOrder.prototype.property = null;
|
11506 |
|
11507 | /**
|
11508 | * PropertyOrder direction.
|
11509 | * @member {google.datastore.v1.PropertyOrder.Direction} direction
|
11510 | * @memberof google.datastore.v1.PropertyOrder
|
11511 | * @instance
|
11512 | */
|
11513 | PropertyOrder.prototype.direction = 0;
|
11514 |
|
11515 | /**
|
11516 | * Creates a new PropertyOrder instance using the specified properties.
|
11517 | * @function create
|
11518 | * @memberof google.datastore.v1.PropertyOrder
|
11519 | * @static
|
11520 | * @param {google.datastore.v1.IPropertyOrder=} [properties] Properties to set
|
11521 | * @returns {google.datastore.v1.PropertyOrder} PropertyOrder instance
|
11522 | */
|
11523 | PropertyOrder.create = function create(properties) {
|
11524 | return new PropertyOrder(properties);
|
11525 | };
|
11526 |
|
11527 | /**
|
11528 | * Encodes the specified PropertyOrder message. Does not implicitly {@link google.datastore.v1.PropertyOrder.verify|verify} messages.
|
11529 | * @function encode
|
11530 | * @memberof google.datastore.v1.PropertyOrder
|
11531 | * @static
|
11532 | * @param {google.datastore.v1.IPropertyOrder} message PropertyOrder message or plain object to encode
|
11533 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11534 | * @returns {$protobuf.Writer} Writer
|
11535 | */
|
11536 | PropertyOrder.encode = function encode(message, writer) {
|
11537 | if (!writer)
|
11538 | writer = $Writer.create();
|
11539 | if (message.property != null && Object.hasOwnProperty.call(message, "property"))
|
11540 | $root.google.datastore.v1.PropertyReference.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
11541 | if (message.direction != null && Object.hasOwnProperty.call(message, "direction"))
|
11542 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.direction);
|
11543 | return writer;
|
11544 | };
|
11545 |
|
11546 | /**
|
11547 | * Encodes the specified PropertyOrder message, length delimited. Does not implicitly {@link google.datastore.v1.PropertyOrder.verify|verify} messages.
|
11548 | * @function encodeDelimited
|
11549 | * @memberof google.datastore.v1.PropertyOrder
|
11550 | * @static
|
11551 | * @param {google.datastore.v1.IPropertyOrder} message PropertyOrder message or plain object to encode
|
11552 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11553 | * @returns {$protobuf.Writer} Writer
|
11554 | */
|
11555 | PropertyOrder.encodeDelimited = function encodeDelimited(message, writer) {
|
11556 | return this.encode(message, writer).ldelim();
|
11557 | };
|
11558 |
|
11559 | /**
|
11560 | * Decodes a PropertyOrder message from the specified reader or buffer.
|
11561 | * @function decode
|
11562 | * @memberof google.datastore.v1.PropertyOrder
|
11563 | * @static
|
11564 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11565 | * @param {number} [length] Message length if known beforehand
|
11566 | * @returns {google.datastore.v1.PropertyOrder} PropertyOrder
|
11567 | * @throws {Error} If the payload is not a reader or valid buffer
|
11568 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11569 | */
|
11570 | PropertyOrder.decode = function decode(reader, length) {
|
11571 | if (!(reader instanceof $Reader))
|
11572 | reader = $Reader.create(reader);
|
11573 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.PropertyOrder();
|
11574 | while (reader.pos < end) {
|
11575 | var tag = reader.uint32();
|
11576 | switch (tag >>> 3) {
|
11577 | case 1: {
|
11578 | message.property = $root.google.datastore.v1.PropertyReference.decode(reader, reader.uint32());
|
11579 | break;
|
11580 | }
|
11581 | case 2: {
|
11582 | message.direction = reader.int32();
|
11583 | break;
|
11584 | }
|
11585 | default:
|
11586 | reader.skipType(tag & 7);
|
11587 | break;
|
11588 | }
|
11589 | }
|
11590 | return message;
|
11591 | };
|
11592 |
|
11593 | /**
|
11594 | * Decodes a PropertyOrder message from the specified reader or buffer, length delimited.
|
11595 | * @function decodeDelimited
|
11596 | * @memberof google.datastore.v1.PropertyOrder
|
11597 | * @static
|
11598 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11599 | * @returns {google.datastore.v1.PropertyOrder} PropertyOrder
|
11600 | * @throws {Error} If the payload is not a reader or valid buffer
|
11601 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11602 | */
|
11603 | PropertyOrder.decodeDelimited = function decodeDelimited(reader) {
|
11604 | if (!(reader instanceof $Reader))
|
11605 | reader = new $Reader(reader);
|
11606 | return this.decode(reader, reader.uint32());
|
11607 | };
|
11608 |
|
11609 | /**
|
11610 | * Verifies a PropertyOrder message.
|
11611 | * @function verify
|
11612 | * @memberof google.datastore.v1.PropertyOrder
|
11613 | * @static
|
11614 | * @param {Object.<string,*>} message Plain object to verify
|
11615 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
11616 | */
|
11617 | PropertyOrder.verify = function verify(message) {
|
11618 | if (typeof message !== "object" || message === null)
|
11619 | return "object expected";
|
11620 | if (message.property != null && message.hasOwnProperty("property")) {
|
11621 | var error = $root.google.datastore.v1.PropertyReference.verify(message.property);
|
11622 | if (error)
|
11623 | return "property." + error;
|
11624 | }
|
11625 | if (message.direction != null && message.hasOwnProperty("direction"))
|
11626 | switch (message.direction) {
|
11627 | default:
|
11628 | return "direction: enum value expected";
|
11629 | case 0:
|
11630 | case 1:
|
11631 | case 2:
|
11632 | break;
|
11633 | }
|
11634 | return null;
|
11635 | };
|
11636 |
|
11637 | /**
|
11638 | * Creates a PropertyOrder message from a plain object. Also converts values to their respective internal types.
|
11639 | * @function fromObject
|
11640 | * @memberof google.datastore.v1.PropertyOrder
|
11641 | * @static
|
11642 | * @param {Object.<string,*>} object Plain object
|
11643 | * @returns {google.datastore.v1.PropertyOrder} PropertyOrder
|
11644 | */
|
11645 | PropertyOrder.fromObject = function fromObject(object) {
|
11646 | if (object instanceof $root.google.datastore.v1.PropertyOrder)
|
11647 | return object;
|
11648 | var message = new $root.google.datastore.v1.PropertyOrder();
|
11649 | if (object.property != null) {
|
11650 | if (typeof object.property !== "object")
|
11651 | throw TypeError(".google.datastore.v1.PropertyOrder.property: object expected");
|
11652 | message.property = $root.google.datastore.v1.PropertyReference.fromObject(object.property);
|
11653 | }
|
11654 | switch (object.direction) {
|
11655 | default:
|
11656 | if (typeof object.direction === "number") {
|
11657 | message.direction = object.direction;
|
11658 | break;
|
11659 | }
|
11660 | break;
|
11661 | case "DIRECTION_UNSPECIFIED":
|
11662 | case 0:
|
11663 | message.direction = 0;
|
11664 | break;
|
11665 | case "ASCENDING":
|
11666 | case 1:
|
11667 | message.direction = 1;
|
11668 | break;
|
11669 | case "DESCENDING":
|
11670 | case 2:
|
11671 | message.direction = 2;
|
11672 | break;
|
11673 | }
|
11674 | return message;
|
11675 | };
|
11676 |
|
11677 | /**
|
11678 | * Creates a plain object from a PropertyOrder message. Also converts values to other types if specified.
|
11679 | * @function toObject
|
11680 | * @memberof google.datastore.v1.PropertyOrder
|
11681 | * @static
|
11682 | * @param {google.datastore.v1.PropertyOrder} message PropertyOrder
|
11683 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
11684 | * @returns {Object.<string,*>} Plain object
|
11685 | */
|
11686 | PropertyOrder.toObject = function toObject(message, options) {
|
11687 | if (!options)
|
11688 | options = {};
|
11689 | var object = {};
|
11690 | if (options.defaults) {
|
11691 | object.property = null;
|
11692 | object.direction = options.enums === String ? "DIRECTION_UNSPECIFIED" : 0;
|
11693 | }
|
11694 | if (message.property != null && message.hasOwnProperty("property"))
|
11695 | object.property = $root.google.datastore.v1.PropertyReference.toObject(message.property, options);
|
11696 | if (message.direction != null && message.hasOwnProperty("direction"))
|
11697 | object.direction = options.enums === String ? $root.google.datastore.v1.PropertyOrder.Direction[message.direction] === undefined ? message.direction : $root.google.datastore.v1.PropertyOrder.Direction[message.direction] : message.direction;
|
11698 | return object;
|
11699 | };
|
11700 |
|
11701 | /**
|
11702 | * Converts this PropertyOrder to JSON.
|
11703 | * @function toJSON
|
11704 | * @memberof google.datastore.v1.PropertyOrder
|
11705 | * @instance
|
11706 | * @returns {Object.<string,*>} JSON object
|
11707 | */
|
11708 | PropertyOrder.prototype.toJSON = function toJSON() {
|
11709 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
11710 | };
|
11711 |
|
11712 | /**
|
11713 | * Gets the default type url for PropertyOrder
|
11714 | * @function getTypeUrl
|
11715 | * @memberof google.datastore.v1.PropertyOrder
|
11716 | * @static
|
11717 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
11718 | * @returns {string} The default type url
|
11719 | */
|
11720 | PropertyOrder.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
11721 | if (typeUrlPrefix === undefined) {
|
11722 | typeUrlPrefix = "type.googleapis.com";
|
11723 | }
|
11724 | return typeUrlPrefix + "/google.datastore.v1.PropertyOrder";
|
11725 | };
|
11726 |
|
11727 | /**
|
11728 | * Direction enum.
|
11729 | * @name google.datastore.v1.PropertyOrder.Direction
|
11730 | * @enum {number}
|
11731 | * @property {number} DIRECTION_UNSPECIFIED=0 DIRECTION_UNSPECIFIED value
|
11732 | * @property {number} ASCENDING=1 ASCENDING value
|
11733 | * @property {number} DESCENDING=2 DESCENDING value
|
11734 | */
|
11735 | PropertyOrder.Direction = (function() {
|
11736 | var valuesById = {}, values = Object.create(valuesById);
|
11737 | values[valuesById[0] = "DIRECTION_UNSPECIFIED"] = 0;
|
11738 | values[valuesById[1] = "ASCENDING"] = 1;
|
11739 | values[valuesById[2] = "DESCENDING"] = 2;
|
11740 | return values;
|
11741 | })();
|
11742 |
|
11743 | return PropertyOrder;
|
11744 | })();
|
11745 |
|
11746 | v1.Filter = (function() {
|
11747 |
|
11748 | /**
|
11749 | * Properties of a Filter.
|
11750 | * @memberof google.datastore.v1
|
11751 | * @interface IFilter
|
11752 | * @property {google.datastore.v1.ICompositeFilter|null} [compositeFilter] Filter compositeFilter
|
11753 | * @property {google.datastore.v1.IPropertyFilter|null} [propertyFilter] Filter propertyFilter
|
11754 | */
|
11755 |
|
11756 | /**
|
11757 | * Constructs a new Filter.
|
11758 | * @memberof google.datastore.v1
|
11759 | * @classdesc Represents a Filter.
|
11760 | * @implements IFilter
|
11761 | * @constructor
|
11762 | * @param {google.datastore.v1.IFilter=} [properties] Properties to set
|
11763 | */
|
11764 | function Filter(properties) {
|
11765 | if (properties)
|
11766 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
11767 | if (properties[keys[i]] != null)
|
11768 | this[keys[i]] = properties[keys[i]];
|
11769 | }
|
11770 |
|
11771 | /**
|
11772 | * Filter compositeFilter.
|
11773 | * @member {google.datastore.v1.ICompositeFilter|null|undefined} compositeFilter
|
11774 | * @memberof google.datastore.v1.Filter
|
11775 | * @instance
|
11776 | */
|
11777 | Filter.prototype.compositeFilter = null;
|
11778 |
|
11779 | /**
|
11780 | * Filter propertyFilter.
|
11781 | * @member {google.datastore.v1.IPropertyFilter|null|undefined} propertyFilter
|
11782 | * @memberof google.datastore.v1.Filter
|
11783 | * @instance
|
11784 | */
|
11785 | Filter.prototype.propertyFilter = null;
|
11786 |
|
11787 | // OneOf field names bound to virtual getters and setters
|
11788 | var $oneOfFields;
|
11789 |
|
11790 | /**
|
11791 | * Filter filterType.
|
11792 | * @member {"compositeFilter"|"propertyFilter"|undefined} filterType
|
11793 | * @memberof google.datastore.v1.Filter
|
11794 | * @instance
|
11795 | */
|
11796 | Object.defineProperty(Filter.prototype, "filterType", {
|
11797 | get: $util.oneOfGetter($oneOfFields = ["compositeFilter", "propertyFilter"]),
|
11798 | set: $util.oneOfSetter($oneOfFields)
|
11799 | });
|
11800 |
|
11801 | /**
|
11802 | * Creates a new Filter instance using the specified properties.
|
11803 | * @function create
|
11804 | * @memberof google.datastore.v1.Filter
|
11805 | * @static
|
11806 | * @param {google.datastore.v1.IFilter=} [properties] Properties to set
|
11807 | * @returns {google.datastore.v1.Filter} Filter instance
|
11808 | */
|
11809 | Filter.create = function create(properties) {
|
11810 | return new Filter(properties);
|
11811 | };
|
11812 |
|
11813 | /**
|
11814 | * Encodes the specified Filter message. Does not implicitly {@link google.datastore.v1.Filter.verify|verify} messages.
|
11815 | * @function encode
|
11816 | * @memberof google.datastore.v1.Filter
|
11817 | * @static
|
11818 | * @param {google.datastore.v1.IFilter} message Filter message or plain object to encode
|
11819 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11820 | * @returns {$protobuf.Writer} Writer
|
11821 | */
|
11822 | Filter.encode = function encode(message, writer) {
|
11823 | if (!writer)
|
11824 | writer = $Writer.create();
|
11825 | if (message.compositeFilter != null && Object.hasOwnProperty.call(message, "compositeFilter"))
|
11826 | $root.google.datastore.v1.CompositeFilter.encode(message.compositeFilter, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
11827 | if (message.propertyFilter != null && Object.hasOwnProperty.call(message, "propertyFilter"))
|
11828 | $root.google.datastore.v1.PropertyFilter.encode(message.propertyFilter, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
11829 | return writer;
|
11830 | };
|
11831 |
|
11832 | /**
|
11833 | * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.datastore.v1.Filter.verify|verify} messages.
|
11834 | * @function encodeDelimited
|
11835 | * @memberof google.datastore.v1.Filter
|
11836 | * @static
|
11837 | * @param {google.datastore.v1.IFilter} message Filter message or plain object to encode
|
11838 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
11839 | * @returns {$protobuf.Writer} Writer
|
11840 | */
|
11841 | Filter.encodeDelimited = function encodeDelimited(message, writer) {
|
11842 | return this.encode(message, writer).ldelim();
|
11843 | };
|
11844 |
|
11845 | /**
|
11846 | * Decodes a Filter message from the specified reader or buffer.
|
11847 | * @function decode
|
11848 | * @memberof google.datastore.v1.Filter
|
11849 | * @static
|
11850 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11851 | * @param {number} [length] Message length if known beforehand
|
11852 | * @returns {google.datastore.v1.Filter} Filter
|
11853 | * @throws {Error} If the payload is not a reader or valid buffer
|
11854 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11855 | */
|
11856 | Filter.decode = function decode(reader, length) {
|
11857 | if (!(reader instanceof $Reader))
|
11858 | reader = $Reader.create(reader);
|
11859 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.Filter();
|
11860 | while (reader.pos < end) {
|
11861 | var tag = reader.uint32();
|
11862 | switch (tag >>> 3) {
|
11863 | case 1: {
|
11864 | message.compositeFilter = $root.google.datastore.v1.CompositeFilter.decode(reader, reader.uint32());
|
11865 | break;
|
11866 | }
|
11867 | case 2: {
|
11868 | message.propertyFilter = $root.google.datastore.v1.PropertyFilter.decode(reader, reader.uint32());
|
11869 | break;
|
11870 | }
|
11871 | default:
|
11872 | reader.skipType(tag & 7);
|
11873 | break;
|
11874 | }
|
11875 | }
|
11876 | return message;
|
11877 | };
|
11878 |
|
11879 | /**
|
11880 | * Decodes a Filter message from the specified reader or buffer, length delimited.
|
11881 | * @function decodeDelimited
|
11882 | * @memberof google.datastore.v1.Filter
|
11883 | * @static
|
11884 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
11885 | * @returns {google.datastore.v1.Filter} Filter
|
11886 | * @throws {Error} If the payload is not a reader or valid buffer
|
11887 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
11888 | */
|
11889 | Filter.decodeDelimited = function decodeDelimited(reader) {
|
11890 | if (!(reader instanceof $Reader))
|
11891 | reader = new $Reader(reader);
|
11892 | return this.decode(reader, reader.uint32());
|
11893 | };
|
11894 |
|
11895 | /**
|
11896 | * Verifies a Filter message.
|
11897 | * @function verify
|
11898 | * @memberof google.datastore.v1.Filter
|
11899 | * @static
|
11900 | * @param {Object.<string,*>} message Plain object to verify
|
11901 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
11902 | */
|
11903 | Filter.verify = function verify(message) {
|
11904 | if (typeof message !== "object" || message === null)
|
11905 | return "object expected";
|
11906 | var properties = {};
|
11907 | if (message.compositeFilter != null && message.hasOwnProperty("compositeFilter")) {
|
11908 | properties.filterType = 1;
|
11909 | {
|
11910 | var error = $root.google.datastore.v1.CompositeFilter.verify(message.compositeFilter);
|
11911 | if (error)
|
11912 | return "compositeFilter." + error;
|
11913 | }
|
11914 | }
|
11915 | if (message.propertyFilter != null && message.hasOwnProperty("propertyFilter")) {
|
11916 | if (properties.filterType === 1)
|
11917 | return "filterType: multiple values";
|
11918 | properties.filterType = 1;
|
11919 | {
|
11920 | var error = $root.google.datastore.v1.PropertyFilter.verify(message.propertyFilter);
|
11921 | if (error)
|
11922 | return "propertyFilter." + error;
|
11923 | }
|
11924 | }
|
11925 | return null;
|
11926 | };
|
11927 |
|
11928 | /**
|
11929 | * Creates a Filter message from a plain object. Also converts values to their respective internal types.
|
11930 | * @function fromObject
|
11931 | * @memberof google.datastore.v1.Filter
|
11932 | * @static
|
11933 | * @param {Object.<string,*>} object Plain object
|
11934 | * @returns {google.datastore.v1.Filter} Filter
|
11935 | */
|
11936 | Filter.fromObject = function fromObject(object) {
|
11937 | if (object instanceof $root.google.datastore.v1.Filter)
|
11938 | return object;
|
11939 | var message = new $root.google.datastore.v1.Filter();
|
11940 | if (object.compositeFilter != null) {
|
11941 | if (typeof object.compositeFilter !== "object")
|
11942 | throw TypeError(".google.datastore.v1.Filter.compositeFilter: object expected");
|
11943 | message.compositeFilter = $root.google.datastore.v1.CompositeFilter.fromObject(object.compositeFilter);
|
11944 | }
|
11945 | if (object.propertyFilter != null) {
|
11946 | if (typeof object.propertyFilter !== "object")
|
11947 | throw TypeError(".google.datastore.v1.Filter.propertyFilter: object expected");
|
11948 | message.propertyFilter = $root.google.datastore.v1.PropertyFilter.fromObject(object.propertyFilter);
|
11949 | }
|
11950 | return message;
|
11951 | };
|
11952 |
|
11953 | /**
|
11954 | * Creates a plain object from a Filter message. Also converts values to other types if specified.
|
11955 | * @function toObject
|
11956 | * @memberof google.datastore.v1.Filter
|
11957 | * @static
|
11958 | * @param {google.datastore.v1.Filter} message Filter
|
11959 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
11960 | * @returns {Object.<string,*>} Plain object
|
11961 | */
|
11962 | Filter.toObject = function toObject(message, options) {
|
11963 | if (!options)
|
11964 | options = {};
|
11965 | var object = {};
|
11966 | if (message.compositeFilter != null && message.hasOwnProperty("compositeFilter")) {
|
11967 | object.compositeFilter = $root.google.datastore.v1.CompositeFilter.toObject(message.compositeFilter, options);
|
11968 | if (options.oneofs)
|
11969 | object.filterType = "compositeFilter";
|
11970 | }
|
11971 | if (message.propertyFilter != null && message.hasOwnProperty("propertyFilter")) {
|
11972 | object.propertyFilter = $root.google.datastore.v1.PropertyFilter.toObject(message.propertyFilter, options);
|
11973 | if (options.oneofs)
|
11974 | object.filterType = "propertyFilter";
|
11975 | }
|
11976 | return object;
|
11977 | };
|
11978 |
|
11979 | /**
|
11980 | * Converts this Filter to JSON.
|
11981 | * @function toJSON
|
11982 | * @memberof google.datastore.v1.Filter
|
11983 | * @instance
|
11984 | * @returns {Object.<string,*>} JSON object
|
11985 | */
|
11986 | Filter.prototype.toJSON = function toJSON() {
|
11987 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
11988 | };
|
11989 |
|
11990 | /**
|
11991 | * Gets the default type url for Filter
|
11992 | * @function getTypeUrl
|
11993 | * @memberof google.datastore.v1.Filter
|
11994 | * @static
|
11995 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
11996 | * @returns {string} The default type url
|
11997 | */
|
11998 | Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
11999 | if (typeUrlPrefix === undefined) {
|
12000 | typeUrlPrefix = "type.googleapis.com";
|
12001 | }
|
12002 | return typeUrlPrefix + "/google.datastore.v1.Filter";
|
12003 | };
|
12004 |
|
12005 | return Filter;
|
12006 | })();
|
12007 |
|
12008 | v1.CompositeFilter = (function() {
|
12009 |
|
12010 | /**
|
12011 | * Properties of a CompositeFilter.
|
12012 | * @memberof google.datastore.v1
|
12013 | * @interface ICompositeFilter
|
12014 | * @property {google.datastore.v1.CompositeFilter.Operator|null} [op] CompositeFilter op
|
12015 | * @property {Array.<google.datastore.v1.IFilter>|null} [filters] CompositeFilter filters
|
12016 | */
|
12017 |
|
12018 | /**
|
12019 | * Constructs a new CompositeFilter.
|
12020 | * @memberof google.datastore.v1
|
12021 | * @classdesc Represents a CompositeFilter.
|
12022 | * @implements ICompositeFilter
|
12023 | * @constructor
|
12024 | * @param {google.datastore.v1.ICompositeFilter=} [properties] Properties to set
|
12025 | */
|
12026 | function CompositeFilter(properties) {
|
12027 | this.filters = [];
|
12028 | if (properties)
|
12029 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
12030 | if (properties[keys[i]] != null)
|
12031 | this[keys[i]] = properties[keys[i]];
|
12032 | }
|
12033 |
|
12034 | /**
|
12035 | * CompositeFilter op.
|
12036 | * @member {google.datastore.v1.CompositeFilter.Operator} op
|
12037 | * @memberof google.datastore.v1.CompositeFilter
|
12038 | * @instance
|
12039 | */
|
12040 | CompositeFilter.prototype.op = 0;
|
12041 |
|
12042 | /**
|
12043 | * CompositeFilter filters.
|
12044 | * @member {Array.<google.datastore.v1.IFilter>} filters
|
12045 | * @memberof google.datastore.v1.CompositeFilter
|
12046 | * @instance
|
12047 | */
|
12048 | CompositeFilter.prototype.filters = $util.emptyArray;
|
12049 |
|
12050 | /**
|
12051 | * Creates a new CompositeFilter instance using the specified properties.
|
12052 | * @function create
|
12053 | * @memberof google.datastore.v1.CompositeFilter
|
12054 | * @static
|
12055 | * @param {google.datastore.v1.ICompositeFilter=} [properties] Properties to set
|
12056 | * @returns {google.datastore.v1.CompositeFilter} CompositeFilter instance
|
12057 | */
|
12058 | CompositeFilter.create = function create(properties) {
|
12059 | return new CompositeFilter(properties);
|
12060 | };
|
12061 |
|
12062 | /**
|
12063 | * Encodes the specified CompositeFilter message. Does not implicitly {@link google.datastore.v1.CompositeFilter.verify|verify} messages.
|
12064 | * @function encode
|
12065 | * @memberof google.datastore.v1.CompositeFilter
|
12066 | * @static
|
12067 | * @param {google.datastore.v1.ICompositeFilter} message CompositeFilter message or plain object to encode
|
12068 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
12069 | * @returns {$protobuf.Writer} Writer
|
12070 | */
|
12071 | CompositeFilter.encode = function encode(message, writer) {
|
12072 | if (!writer)
|
12073 | writer = $Writer.create();
|
12074 | if (message.op != null && Object.hasOwnProperty.call(message, "op"))
|
12075 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.op);
|
12076 | if (message.filters != null && message.filters.length)
|
12077 | for (var i = 0; i < message.filters.length; ++i)
|
12078 | $root.google.datastore.v1.Filter.encode(message.filters[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
12079 | return writer;
|
12080 | };
|
12081 |
|
12082 | /**
|
12083 | * Encodes the specified CompositeFilter message, length delimited. Does not implicitly {@link google.datastore.v1.CompositeFilter.verify|verify} messages.
|
12084 | * @function encodeDelimited
|
12085 | * @memberof google.datastore.v1.CompositeFilter
|
12086 | * @static
|
12087 | * @param {google.datastore.v1.ICompositeFilter} message CompositeFilter message or plain object to encode
|
12088 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
12089 | * @returns {$protobuf.Writer} Writer
|
12090 | */
|
12091 | CompositeFilter.encodeDelimited = function encodeDelimited(message, writer) {
|
12092 | return this.encode(message, writer).ldelim();
|
12093 | };
|
12094 |
|
12095 | /**
|
12096 | * Decodes a CompositeFilter message from the specified reader or buffer.
|
12097 | * @function decode
|
12098 | * @memberof google.datastore.v1.CompositeFilter
|
12099 | * @static
|
12100 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
12101 | * @param {number} [length] Message length if known beforehand
|
12102 | * @returns {google.datastore.v1.CompositeFilter} CompositeFilter
|
12103 | * @throws {Error} If the payload is not a reader or valid buffer
|
12104 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
12105 | */
|
12106 | CompositeFilter.decode = function decode(reader, length) {
|
12107 | if (!(reader instanceof $Reader))
|
12108 | reader = $Reader.create(reader);
|
12109 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.CompositeFilter();
|
12110 | while (reader.pos < end) {
|
12111 | var tag = reader.uint32();
|
12112 | switch (tag >>> 3) {
|
12113 | case 1: {
|
12114 | message.op = reader.int32();
|
12115 | break;
|
12116 | }
|
12117 | case 2: {
|
12118 | if (!(message.filters && message.filters.length))
|
12119 | message.filters = [];
|
12120 | message.filters.push($root.google.datastore.v1.Filter.decode(reader, reader.uint32()));
|
12121 | break;
|
12122 | }
|
12123 | default:
|
12124 | reader.skipType(tag & 7);
|
12125 | break;
|
12126 | }
|
12127 | }
|
12128 | return message;
|
12129 | };
|
12130 |
|
12131 | /**
|
12132 | * Decodes a CompositeFilter message from the specified reader or buffer, length delimited.
|
12133 | * @function decodeDelimited
|
12134 | * @memberof google.datastore.v1.CompositeFilter
|
12135 | * @static
|
12136 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
12137 | * @returns {google.datastore.v1.CompositeFilter} CompositeFilter
|
12138 | * @throws {Error} If the payload is not a reader or valid buffer
|
12139 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
12140 | */
|
12141 | CompositeFilter.decodeDelimited = function decodeDelimited(reader) {
|
12142 | if (!(reader instanceof $Reader))
|
12143 | reader = new $Reader(reader);
|
12144 | return this.decode(reader, reader.uint32());
|
12145 | };
|
12146 |
|
12147 | /**
|
12148 | * Verifies a CompositeFilter message.
|
12149 | * @function verify
|
12150 | * @memberof google.datastore.v1.CompositeFilter
|
12151 | * @static
|
12152 | * @param {Object.<string,*>} message Plain object to verify
|
12153 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
12154 | */
|
12155 | CompositeFilter.verify = function verify(message) {
|
12156 | if (typeof message !== "object" || message === null)
|
12157 | return "object expected";
|
12158 | if (message.op != null && message.hasOwnProperty("op"))
|
12159 | switch (message.op) {
|
12160 | default:
|
12161 | return "op: enum value expected";
|
12162 | case 0:
|
12163 | case 1:
|
12164 | case 2:
|
12165 | break;
|
12166 | }
|
12167 | if (message.filters != null && message.hasOwnProperty("filters")) {
|
12168 | if (!Array.isArray(message.filters))
|
12169 | return "filters: array expected";
|
12170 | for (var i = 0; i < message.filters.length; ++i) {
|
12171 | var error = $root.google.datastore.v1.Filter.verify(message.filters[i]);
|
12172 | if (error)
|
12173 | return "filters." + error;
|
12174 | }
|
12175 | }
|
12176 | return null;
|
12177 | };
|
12178 |
|
12179 | /**
|
12180 | * Creates a CompositeFilter message from a plain object. Also converts values to their respective internal types.
|
12181 | * @function fromObject
|
12182 | * @memberof google.datastore.v1.CompositeFilter
|
12183 | * @static
|
12184 | * @param {Object.<string,*>} object Plain object
|
12185 | * @returns {google.datastore.v1.CompositeFilter} CompositeFilter
|
12186 | */
|
12187 | CompositeFilter.fromObject = function fromObject(object) {
|
12188 | if (object instanceof $root.google.datastore.v1.CompositeFilter)
|
12189 | return object;
|
12190 | var message = new $root.google.datastore.v1.CompositeFilter();
|
12191 | switch (object.op) {
|
12192 | default:
|
12193 | if (typeof object.op === "number") {
|
12194 | message.op = object.op;
|
12195 | break;
|
12196 | }
|
12197 | break;
|
12198 | case "OPERATOR_UNSPECIFIED":
|
12199 | case 0:
|
12200 | message.op = 0;
|
12201 | break;
|
12202 | case "AND":
|
12203 | case 1:
|
12204 | message.op = 1;
|
12205 | break;
|
12206 | case "OR":
|
12207 | case 2:
|
12208 | message.op = 2;
|
12209 | break;
|
12210 | }
|
12211 | if (object.filters) {
|
12212 | if (!Array.isArray(object.filters))
|
12213 | throw TypeError(".google.datastore.v1.CompositeFilter.filters: array expected");
|
12214 | message.filters = [];
|
12215 | for (var i = 0; i < object.filters.length; ++i) {
|
12216 | if (typeof object.filters[i] !== "object")
|
12217 | throw TypeError(".google.datastore.v1.CompositeFilter.filters: object expected");
|
12218 | message.filters[i] = $root.google.datastore.v1.Filter.fromObject(object.filters[i]);
|
12219 | }
|
12220 | }
|
12221 | return message;
|
12222 | };
|
12223 |
|
12224 | /**
|
12225 | * Creates a plain object from a CompositeFilter message. Also converts values to other types if specified.
|
12226 | * @function toObject
|
12227 | * @memberof google.datastore.v1.CompositeFilter
|
12228 | * @static
|
12229 | * @param {google.datastore.v1.CompositeFilter} message CompositeFilter
|
12230 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
12231 | * @returns {Object.<string,*>} Plain object
|
12232 | */
|
12233 | CompositeFilter.toObject = function toObject(message, options) {
|
12234 | if (!options)
|
12235 | options = {};
|
12236 | var object = {};
|
12237 | if (options.arrays || options.defaults)
|
12238 | object.filters = [];
|
12239 | if (options.defaults)
|
12240 | object.op = options.enums === String ? "OPERATOR_UNSPECIFIED" : 0;
|
12241 | if (message.op != null && message.hasOwnProperty("op"))
|
12242 | object.op = options.enums === String ? $root.google.datastore.v1.CompositeFilter.Operator[message.op] === undefined ? message.op : $root.google.datastore.v1.CompositeFilter.Operator[message.op] : message.op;
|
12243 | if (message.filters && message.filters.length) {
|
12244 | object.filters = [];
|
12245 | for (var j = 0; j < message.filters.length; ++j)
|
12246 | object.filters[j] = $root.google.datastore.v1.Filter.toObject(message.filters[j], options);
|
12247 | }
|
12248 | return object;
|
12249 | };
|
12250 |
|
12251 | /**
|
12252 | * Converts this CompositeFilter to JSON.
|
12253 | * @function toJSON
|
12254 | * @memberof google.datastore.v1.CompositeFilter
|
12255 | * @instance
|
12256 | * @returns {Object.<string,*>} JSON object
|
12257 | */
|
12258 | CompositeFilter.prototype.toJSON = function toJSON() {
|
12259 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
12260 | };
|
12261 |
|
12262 | /**
|
12263 | * Gets the default type url for CompositeFilter
|
12264 | * @function getTypeUrl
|
12265 | * @memberof google.datastore.v1.CompositeFilter
|
12266 | * @static
|
12267 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
12268 | * @returns {string} The default type url
|
12269 | */
|
12270 | CompositeFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
12271 | if (typeUrlPrefix === undefined) {
|
12272 | typeUrlPrefix = "type.googleapis.com";
|
12273 | }
|
12274 | return typeUrlPrefix + "/google.datastore.v1.CompositeFilter";
|
12275 | };
|
12276 |
|
12277 | /**
|
12278 | * Operator enum.
|
12279 | * @name google.datastore.v1.CompositeFilter.Operator
|
12280 | * @enum {number}
|
12281 | * @property {number} OPERATOR_UNSPECIFIED=0 OPERATOR_UNSPECIFIED value
|
12282 | * @property {number} AND=1 AND value
|
12283 | * @property {number} OR=2 OR value
|
12284 | */
|
12285 | CompositeFilter.Operator = (function() {
|
12286 | var valuesById = {}, values = Object.create(valuesById);
|
12287 | values[valuesById[0] = "OPERATOR_UNSPECIFIED"] = 0;
|
12288 | values[valuesById[1] = "AND"] = 1;
|
12289 | values[valuesById[2] = "OR"] = 2;
|
12290 | return values;
|
12291 | })();
|
12292 |
|
12293 | return CompositeFilter;
|
12294 | })();
|
12295 |
|
12296 | v1.PropertyFilter = (function() {
|
12297 |
|
12298 | /**
|
12299 | * Properties of a PropertyFilter.
|
12300 | * @memberof google.datastore.v1
|
12301 | * @interface IPropertyFilter
|
12302 | * @property {google.datastore.v1.IPropertyReference|null} [property] PropertyFilter property
|
12303 | * @property {google.datastore.v1.PropertyFilter.Operator|null} [op] PropertyFilter op
|
12304 | * @property {google.datastore.v1.IValue|null} [value] PropertyFilter value
|
12305 | */
|
12306 |
|
12307 | /**
|
12308 | * Constructs a new PropertyFilter.
|
12309 | * @memberof google.datastore.v1
|
12310 | * @classdesc Represents a PropertyFilter.
|
12311 | * @implements IPropertyFilter
|
12312 | * @constructor
|
12313 | * @param {google.datastore.v1.IPropertyFilter=} [properties] Properties to set
|
12314 | */
|
12315 | function PropertyFilter(properties) {
|
12316 | if (properties)
|
12317 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
12318 | if (properties[keys[i]] != null)
|
12319 | this[keys[i]] = properties[keys[i]];
|
12320 | }
|
12321 |
|
12322 | /**
|
12323 | * PropertyFilter property.
|
12324 | * @member {google.datastore.v1.IPropertyReference|null|undefined} property
|
12325 | * @memberof google.datastore.v1.PropertyFilter
|
12326 | * @instance
|
12327 | */
|
12328 | PropertyFilter.prototype.property = null;
|
12329 |
|
12330 | /**
|
12331 | * PropertyFilter op.
|
12332 | * @member {google.datastore.v1.PropertyFilter.Operator} op
|
12333 | * @memberof google.datastore.v1.PropertyFilter
|
12334 | * @instance
|
12335 | */
|
12336 | PropertyFilter.prototype.op = 0;
|
12337 |
|
12338 | /**
|
12339 | * PropertyFilter value.
|
12340 | * @member {google.datastore.v1.IValue|null|undefined} value
|
12341 | * @memberof google.datastore.v1.PropertyFilter
|
12342 | * @instance
|
12343 | */
|
12344 | PropertyFilter.prototype.value = null;
|
12345 |
|
12346 | /**
|
12347 | * Creates a new PropertyFilter instance using the specified properties.
|
12348 | * @function create
|
12349 | * @memberof google.datastore.v1.PropertyFilter
|
12350 | * @static
|
12351 | * @param {google.datastore.v1.IPropertyFilter=} [properties] Properties to set
|
12352 | * @returns {google.datastore.v1.PropertyFilter} PropertyFilter instance
|
12353 | */
|
12354 | PropertyFilter.create = function create(properties) {
|
12355 | return new PropertyFilter(properties);
|
12356 | };
|
12357 |
|
12358 | /**
|
12359 | * Encodes the specified PropertyFilter message. Does not implicitly {@link google.datastore.v1.PropertyFilter.verify|verify} messages.
|
12360 | * @function encode
|
12361 | * @memberof google.datastore.v1.PropertyFilter
|
12362 | * @static
|
12363 | * @param {google.datastore.v1.IPropertyFilter} message PropertyFilter message or plain object to encode
|
12364 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
12365 | * @returns {$protobuf.Writer} Writer
|
12366 | */
|
12367 | PropertyFilter.encode = function encode(message, writer) {
|
12368 | if (!writer)
|
12369 | writer = $Writer.create();
|
12370 | if (message.property != null && Object.hasOwnProperty.call(message, "property"))
|
12371 | $root.google.datastore.v1.PropertyReference.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
12372 | if (message.op != null && Object.hasOwnProperty.call(message, "op"))
|
12373 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.op);
|
12374 | if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
12375 | $root.google.datastore.v1.Value.encode(message.value, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
12376 | return writer;
|
12377 | };
|
12378 |
|
12379 | /**
|
12380 | * Encodes the specified PropertyFilter message, length delimited. Does not implicitly {@link google.datastore.v1.PropertyFilter.verify|verify} messages.
|
12381 | * @function encodeDelimited
|
12382 | * @memberof google.datastore.v1.PropertyFilter
|
12383 | * @static
|
12384 | * @param {google.datastore.v1.IPropertyFilter} message PropertyFilter message or plain object to encode
|
12385 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
12386 | * @returns {$protobuf.Writer} Writer
|
12387 | */
|
12388 | PropertyFilter.encodeDelimited = function encodeDelimited(message, writer) {
|
12389 | return this.encode(message, writer).ldelim();
|
12390 | };
|
12391 |
|
12392 | /**
|
12393 | * Decodes a PropertyFilter message from the specified reader or buffer.
|
12394 | * @function decode
|
12395 | * @memberof google.datastore.v1.PropertyFilter
|
12396 | * @static
|
12397 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
12398 | * @param {number} [length] Message length if known beforehand
|
12399 | * @returns {google.datastore.v1.PropertyFilter} PropertyFilter
|
12400 | * @throws {Error} If the payload is not a reader or valid buffer
|
12401 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
12402 | */
|
12403 | PropertyFilter.decode = function decode(reader, length) {
|
12404 | if (!(reader instanceof $Reader))
|
12405 | reader = $Reader.create(reader);
|
12406 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.PropertyFilter();
|
12407 | while (reader.pos < end) {
|
12408 | var tag = reader.uint32();
|
12409 | switch (tag >>> 3) {
|
12410 | case 1: {
|
12411 | message.property = $root.google.datastore.v1.PropertyReference.decode(reader, reader.uint32());
|
12412 | break;
|
12413 | }
|
12414 | case 2: {
|
12415 | message.op = reader.int32();
|
12416 | break;
|
12417 | }
|
12418 | case 3: {
|
12419 | message.value = $root.google.datastore.v1.Value.decode(reader, reader.uint32());
|
12420 | break;
|
12421 | }
|
12422 | default:
|
12423 | reader.skipType(tag & 7);
|
12424 | break;
|
12425 | }
|
12426 | }
|
12427 | return message;
|
12428 | };
|
12429 |
|
12430 | /**
|
12431 | * Decodes a PropertyFilter message from the specified reader or buffer, length delimited.
|
12432 | * @function decodeDelimited
|
12433 | * @memberof google.datastore.v1.PropertyFilter
|
12434 | * @static
|
12435 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
12436 | * @returns {google.datastore.v1.PropertyFilter} PropertyFilter
|
12437 | * @throws {Error} If the payload is not a reader or valid buffer
|
12438 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
12439 | */
|
12440 | PropertyFilter.decodeDelimited = function decodeDelimited(reader) {
|
12441 | if (!(reader instanceof $Reader))
|
12442 | reader = new $Reader(reader);
|
12443 | return this.decode(reader, reader.uint32());
|
12444 | };
|
12445 |
|
12446 | /**
|
12447 | * Verifies a PropertyFilter message.
|
12448 | * @function verify
|
12449 | * @memberof google.datastore.v1.PropertyFilter
|
12450 | * @static
|
12451 | * @param {Object.<string,*>} message Plain object to verify
|
12452 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
12453 | */
|
12454 | PropertyFilter.verify = function verify(message) {
|
12455 | if (typeof message !== "object" || message === null)
|
12456 | return "object expected";
|
12457 | if (message.property != null && message.hasOwnProperty("property")) {
|
12458 | var error = $root.google.datastore.v1.PropertyReference.verify(message.property);
|
12459 | if (error)
|
12460 | return "property." + error;
|
12461 | }
|
12462 | if (message.op != null && message.hasOwnProperty("op"))
|
12463 | switch (message.op) {
|
12464 | default:
|
12465 | return "op: enum value expected";
|
12466 | case 0:
|
12467 | case 1:
|
12468 | case 2:
|
12469 | case 3:
|
12470 | case 4:
|
12471 | case 5:
|
12472 | case 6:
|
12473 | case 9:
|
12474 | case 11:
|
12475 | case 13:
|
12476 | break;
|
12477 | }
|
12478 | if (message.value != null && message.hasOwnProperty("value")) {
|
12479 | var error = $root.google.datastore.v1.Value.verify(message.value);
|
12480 | if (error)
|
12481 | return "value." + error;
|
12482 | }
|
12483 | return null;
|
12484 | };
|
12485 |
|
12486 | /**
|
12487 | * Creates a PropertyFilter message from a plain object. Also converts values to their respective internal types.
|
12488 | * @function fromObject
|
12489 | * @memberof google.datastore.v1.PropertyFilter
|
12490 | * @static
|
12491 | * @param {Object.<string,*>} object Plain object
|
12492 | * @returns {google.datastore.v1.PropertyFilter} PropertyFilter
|
12493 | */
|
12494 | PropertyFilter.fromObject = function fromObject(object) {
|
12495 | if (object instanceof $root.google.datastore.v1.PropertyFilter)
|
12496 | return object;
|
12497 | var message = new $root.google.datastore.v1.PropertyFilter();
|
12498 | if (object.property != null) {
|
12499 | if (typeof object.property !== "object")
|
12500 | throw TypeError(".google.datastore.v1.PropertyFilter.property: object expected");
|
12501 | message.property = $root.google.datastore.v1.PropertyReference.fromObject(object.property);
|
12502 | }
|
12503 | switch (object.op) {
|
12504 | default:
|
12505 | if (typeof object.op === "number") {
|
12506 | message.op = object.op;
|
12507 | break;
|
12508 | }
|
12509 | break;
|
12510 | case "OPERATOR_UNSPECIFIED":
|
12511 | case 0:
|
12512 | message.op = 0;
|
12513 | break;
|
12514 | case "LESS_THAN":
|
12515 | case 1:
|
12516 | message.op = 1;
|
12517 | break;
|
12518 | case "LESS_THAN_OR_EQUAL":
|
12519 | case 2:
|
12520 | message.op = 2;
|
12521 | break;
|
12522 | case "GREATER_THAN":
|
12523 | case 3:
|
12524 | message.op = 3;
|
12525 | break;
|
12526 | case "GREATER_THAN_OR_EQUAL":
|
12527 | case 4:
|
12528 | message.op = 4;
|
12529 | break;
|
12530 | case "EQUAL":
|
12531 | case 5:
|
12532 | message.op = 5;
|
12533 | break;
|
12534 | case "IN":
|
12535 | case 6:
|
12536 | message.op = 6;
|
12537 | break;
|
12538 | case "NOT_EQUAL":
|
12539 | case 9:
|
12540 | message.op = 9;
|
12541 | break;
|
12542 | case "HAS_ANCESTOR":
|
12543 | case 11:
|
12544 | message.op = 11;
|
12545 | break;
|
12546 | case "NOT_IN":
|
12547 | case 13:
|
12548 | message.op = 13;
|
12549 | break;
|
12550 | }
|
12551 | if (object.value != null) {
|
12552 | if (typeof object.value !== "object")
|
12553 | throw TypeError(".google.datastore.v1.PropertyFilter.value: object expected");
|
12554 | message.value = $root.google.datastore.v1.Value.fromObject(object.value);
|
12555 | }
|
12556 | return message;
|
12557 | };
|
12558 |
|
12559 | /**
|
12560 | * Creates a plain object from a PropertyFilter message. Also converts values to other types if specified.
|
12561 | * @function toObject
|
12562 | * @memberof google.datastore.v1.PropertyFilter
|
12563 | * @static
|
12564 | * @param {google.datastore.v1.PropertyFilter} message PropertyFilter
|
12565 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
12566 | * @returns {Object.<string,*>} Plain object
|
12567 | */
|
12568 | PropertyFilter.toObject = function toObject(message, options) {
|
12569 | if (!options)
|
12570 | options = {};
|
12571 | var object = {};
|
12572 | if (options.defaults) {
|
12573 | object.property = null;
|
12574 | object.op = options.enums === String ? "OPERATOR_UNSPECIFIED" : 0;
|
12575 | object.value = null;
|
12576 | }
|
12577 | if (message.property != null && message.hasOwnProperty("property"))
|
12578 | object.property = $root.google.datastore.v1.PropertyReference.toObject(message.property, options);
|
12579 | if (message.op != null && message.hasOwnProperty("op"))
|
12580 | object.op = options.enums === String ? $root.google.datastore.v1.PropertyFilter.Operator[message.op] === undefined ? message.op : $root.google.datastore.v1.PropertyFilter.Operator[message.op] : message.op;
|
12581 | if (message.value != null && message.hasOwnProperty("value"))
|
12582 | object.value = $root.google.datastore.v1.Value.toObject(message.value, options);
|
12583 | return object;
|
12584 | };
|
12585 |
|
12586 | /**
|
12587 | * Converts this PropertyFilter to JSON.
|
12588 | * @function toJSON
|
12589 | * @memberof google.datastore.v1.PropertyFilter
|
12590 | * @instance
|
12591 | * @returns {Object.<string,*>} JSON object
|
12592 | */
|
12593 | PropertyFilter.prototype.toJSON = function toJSON() {
|
12594 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
12595 | };
|
12596 |
|
12597 | /**
|
12598 | * Gets the default type url for PropertyFilter
|
12599 | * @function getTypeUrl
|
12600 | * @memberof google.datastore.v1.PropertyFilter
|
12601 | * @static
|
12602 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
12603 | * @returns {string} The default type url
|
12604 | */
|
12605 | PropertyFilter.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
12606 | if (typeUrlPrefix === undefined) {
|
12607 | typeUrlPrefix = "type.googleapis.com";
|
12608 | }
|
12609 | return typeUrlPrefix + "/google.datastore.v1.PropertyFilter";
|
12610 | };
|
12611 |
|
12612 | /**
|
12613 | * Operator enum.
|
12614 | * @name google.datastore.v1.PropertyFilter.Operator
|
12615 | * @enum {number}
|
12616 | * @property {number} OPERATOR_UNSPECIFIED=0 OPERATOR_UNSPECIFIED value
|
12617 | * @property {number} LESS_THAN=1 LESS_THAN value
|
12618 | * @property {number} LESS_THAN_OR_EQUAL=2 LESS_THAN_OR_EQUAL value
|
12619 | * @property {number} GREATER_THAN=3 GREATER_THAN value
|
12620 | * @property {number} GREATER_THAN_OR_EQUAL=4 GREATER_THAN_OR_EQUAL value
|
12621 | * @property {number} EQUAL=5 EQUAL value
|
12622 | * @property {number} IN=6 IN value
|
12623 | * @property {number} NOT_EQUAL=9 NOT_EQUAL value
|
12624 | * @property {number} HAS_ANCESTOR=11 HAS_ANCESTOR value
|
12625 | * @property {number} NOT_IN=13 NOT_IN value
|
12626 | */
|
12627 | PropertyFilter.Operator = (function() {
|
12628 | var valuesById = {}, values = Object.create(valuesById);
|
12629 | values[valuesById[0] = "OPERATOR_UNSPECIFIED"] = 0;
|
12630 | values[valuesById[1] = "LESS_THAN"] = 1;
|
12631 | values[valuesById[2] = "LESS_THAN_OR_EQUAL"] = 2;
|
12632 | values[valuesById[3] = "GREATER_THAN"] = 3;
|
12633 | values[valuesById[4] = "GREATER_THAN_OR_EQUAL"] = 4;
|
12634 | values[valuesById[5] = "EQUAL"] = 5;
|
12635 | values[valuesById[6] = "IN"] = 6;
|
12636 | values[valuesById[9] = "NOT_EQUAL"] = 9;
|
12637 | values[valuesById[11] = "HAS_ANCESTOR"] = 11;
|
12638 | values[valuesById[13] = "NOT_IN"] = 13;
|
12639 | return values;
|
12640 | })();
|
12641 |
|
12642 | return PropertyFilter;
|
12643 | })();
|
12644 |
|
12645 | v1.GqlQuery = (function() {
|
12646 |
|
12647 | /**
|
12648 | * Properties of a GqlQuery.
|
12649 | * @memberof google.datastore.v1
|
12650 | * @interface IGqlQuery
|
12651 | * @property {string|null} [queryString] GqlQuery queryString
|
12652 | * @property {boolean|null} [allowLiterals] GqlQuery allowLiterals
|
12653 | * @property {Object.<string,google.datastore.v1.IGqlQueryParameter>|null} [namedBindings] GqlQuery namedBindings
|
12654 | * @property {Array.<google.datastore.v1.IGqlQueryParameter>|null} [positionalBindings] GqlQuery positionalBindings
|
12655 | */
|
12656 |
|
12657 | /**
|
12658 | * Constructs a new GqlQuery.
|
12659 | * @memberof google.datastore.v1
|
12660 | * @classdesc Represents a GqlQuery.
|
12661 | * @implements IGqlQuery
|
12662 | * @constructor
|
12663 | * @param {google.datastore.v1.IGqlQuery=} [properties] Properties to set
|
12664 | */
|
12665 | function GqlQuery(properties) {
|
12666 | this.namedBindings = {};
|
12667 | this.positionalBindings = [];
|
12668 | if (properties)
|
12669 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
12670 | if (properties[keys[i]] != null)
|
12671 | this[keys[i]] = properties[keys[i]];
|
12672 | }
|
12673 |
|
12674 | /**
|
12675 | * GqlQuery queryString.
|
12676 | * @member {string} queryString
|
12677 | * @memberof google.datastore.v1.GqlQuery
|
12678 | * @instance
|
12679 | */
|
12680 | GqlQuery.prototype.queryString = "";
|
12681 |
|
12682 | /**
|
12683 | * GqlQuery allowLiterals.
|
12684 | * @member {boolean} allowLiterals
|
12685 | * @memberof google.datastore.v1.GqlQuery
|
12686 | * @instance
|
12687 | */
|
12688 | GqlQuery.prototype.allowLiterals = false;
|
12689 |
|
12690 | /**
|
12691 | * GqlQuery namedBindings.
|
12692 | * @member {Object.<string,google.datastore.v1.IGqlQueryParameter>} namedBindings
|
12693 | * @memberof google.datastore.v1.GqlQuery
|
12694 | * @instance
|
12695 | */
|
12696 | GqlQuery.prototype.namedBindings = $util.emptyObject;
|
12697 |
|
12698 | /**
|
12699 | * GqlQuery positionalBindings.
|
12700 | * @member {Array.<google.datastore.v1.IGqlQueryParameter>} positionalBindings
|
12701 | * @memberof google.datastore.v1.GqlQuery
|
12702 | * @instance
|
12703 | */
|
12704 | GqlQuery.prototype.positionalBindings = $util.emptyArray;
|
12705 |
|
12706 | /**
|
12707 | * Creates a new GqlQuery instance using the specified properties.
|
12708 | * @function create
|
12709 | * @memberof google.datastore.v1.GqlQuery
|
12710 | * @static
|
12711 | * @param {google.datastore.v1.IGqlQuery=} [properties] Properties to set
|
12712 | * @returns {google.datastore.v1.GqlQuery} GqlQuery instance
|
12713 | */
|
12714 | GqlQuery.create = function create(properties) {
|
12715 | return new GqlQuery(properties);
|
12716 | };
|
12717 |
|
12718 | /**
|
12719 | * Encodes the specified GqlQuery message. Does not implicitly {@link google.datastore.v1.GqlQuery.verify|verify} messages.
|
12720 | * @function encode
|
12721 | * @memberof google.datastore.v1.GqlQuery
|
12722 | * @static
|
12723 | * @param {google.datastore.v1.IGqlQuery} message GqlQuery message or plain object to encode
|
12724 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
12725 | * @returns {$protobuf.Writer} Writer
|
12726 | */
|
12727 | GqlQuery.encode = function encode(message, writer) {
|
12728 | if (!writer)
|
12729 | writer = $Writer.create();
|
12730 | if (message.queryString != null && Object.hasOwnProperty.call(message, "queryString"))
|
12731 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.queryString);
|
12732 | if (message.allowLiterals != null && Object.hasOwnProperty.call(message, "allowLiterals"))
|
12733 | writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowLiterals);
|
12734 | if (message.positionalBindings != null && message.positionalBindings.length)
|
12735 | for (var i = 0; i < message.positionalBindings.length; ++i)
|
12736 | $root.google.datastore.v1.GqlQueryParameter.encode(message.positionalBindings[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
12737 | if (message.namedBindings != null && Object.hasOwnProperty.call(message, "namedBindings"))
|
12738 | for (var keys = Object.keys(message.namedBindings), i = 0; i < keys.length; ++i) {
|
12739 | writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
|
12740 | $root.google.datastore.v1.GqlQueryParameter.encode(message.namedBindings[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
12741 | }
|
12742 | return writer;
|
12743 | };
|
12744 |
|
12745 | /**
|
12746 | * Encodes the specified GqlQuery message, length delimited. Does not implicitly {@link google.datastore.v1.GqlQuery.verify|verify} messages.
|
12747 | * @function encodeDelimited
|
12748 | * @memberof google.datastore.v1.GqlQuery
|
12749 | * @static
|
12750 | * @param {google.datastore.v1.IGqlQuery} message GqlQuery message or plain object to encode
|
12751 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
12752 | * @returns {$protobuf.Writer} Writer
|
12753 | */
|
12754 | GqlQuery.encodeDelimited = function encodeDelimited(message, writer) {
|
12755 | return this.encode(message, writer).ldelim();
|
12756 | };
|
12757 |
|
12758 | /**
|
12759 | * Decodes a GqlQuery message from the specified reader or buffer.
|
12760 | * @function decode
|
12761 | * @memberof google.datastore.v1.GqlQuery
|
12762 | * @static
|
12763 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
12764 | * @param {number} [length] Message length if known beforehand
|
12765 | * @returns {google.datastore.v1.GqlQuery} GqlQuery
|
12766 | * @throws {Error} If the payload is not a reader or valid buffer
|
12767 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
12768 | */
|
12769 | GqlQuery.decode = function decode(reader, length) {
|
12770 | if (!(reader instanceof $Reader))
|
12771 | reader = $Reader.create(reader);
|
12772 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.GqlQuery(), key, value;
|
12773 | while (reader.pos < end) {
|
12774 | var tag = reader.uint32();
|
12775 | switch (tag >>> 3) {
|
12776 | case 1: {
|
12777 | message.queryString = reader.string();
|
12778 | break;
|
12779 | }
|
12780 | case 2: {
|
12781 | message.allowLiterals = reader.bool();
|
12782 | break;
|
12783 | }
|
12784 | case 5: {
|
12785 | if (message.namedBindings === $util.emptyObject)
|
12786 | message.namedBindings = {};
|
12787 | var end2 = reader.uint32() + reader.pos;
|
12788 | key = "";
|
12789 | value = null;
|
12790 | while (reader.pos < end2) {
|
12791 | var tag2 = reader.uint32();
|
12792 | switch (tag2 >>> 3) {
|
12793 | case 1:
|
12794 | key = reader.string();
|
12795 | break;
|
12796 | case 2:
|
12797 | value = $root.google.datastore.v1.GqlQueryParameter.decode(reader, reader.uint32());
|
12798 | break;
|
12799 | default:
|
12800 | reader.skipType(tag2 & 7);
|
12801 | break;
|
12802 | }
|
12803 | }
|
12804 | message.namedBindings[key] = value;
|
12805 | break;
|
12806 | }
|
12807 | case 4: {
|
12808 | if (!(message.positionalBindings && message.positionalBindings.length))
|
12809 | message.positionalBindings = [];
|
12810 | message.positionalBindings.push($root.google.datastore.v1.GqlQueryParameter.decode(reader, reader.uint32()));
|
12811 | break;
|
12812 | }
|
12813 | default:
|
12814 | reader.skipType(tag & 7);
|
12815 | break;
|
12816 | }
|
12817 | }
|
12818 | return message;
|
12819 | };
|
12820 |
|
12821 | /**
|
12822 | * Decodes a GqlQuery message from the specified reader or buffer, length delimited.
|
12823 | * @function decodeDelimited
|
12824 | * @memberof google.datastore.v1.GqlQuery
|
12825 | * @static
|
12826 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
12827 | * @returns {google.datastore.v1.GqlQuery} GqlQuery
|
12828 | * @throws {Error} If the payload is not a reader or valid buffer
|
12829 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
12830 | */
|
12831 | GqlQuery.decodeDelimited = function decodeDelimited(reader) {
|
12832 | if (!(reader instanceof $Reader))
|
12833 | reader = new $Reader(reader);
|
12834 | return this.decode(reader, reader.uint32());
|
12835 | };
|
12836 |
|
12837 | /**
|
12838 | * Verifies a GqlQuery message.
|
12839 | * @function verify
|
12840 | * @memberof google.datastore.v1.GqlQuery
|
12841 | * @static
|
12842 | * @param {Object.<string,*>} message Plain object to verify
|
12843 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
12844 | */
|
12845 | GqlQuery.verify = function verify(message) {
|
12846 | if (typeof message !== "object" || message === null)
|
12847 | return "object expected";
|
12848 | if (message.queryString != null && message.hasOwnProperty("queryString"))
|
12849 | if (!$util.isString(message.queryString))
|
12850 | return "queryString: string expected";
|
12851 | if (message.allowLiterals != null && message.hasOwnProperty("allowLiterals"))
|
12852 | if (typeof message.allowLiterals !== "boolean")
|
12853 | return "allowLiterals: boolean expected";
|
12854 | if (message.namedBindings != null && message.hasOwnProperty("namedBindings")) {
|
12855 | if (!$util.isObject(message.namedBindings))
|
12856 | return "namedBindings: object expected";
|
12857 | var key = Object.keys(message.namedBindings);
|
12858 | for (var i = 0; i < key.length; ++i) {
|
12859 | var error = $root.google.datastore.v1.GqlQueryParameter.verify(message.namedBindings[key[i]]);
|
12860 | if (error)
|
12861 | return "namedBindings." + error;
|
12862 | }
|
12863 | }
|
12864 | if (message.positionalBindings != null && message.hasOwnProperty("positionalBindings")) {
|
12865 | if (!Array.isArray(message.positionalBindings))
|
12866 | return "positionalBindings: array expected";
|
12867 | for (var i = 0; i < message.positionalBindings.length; ++i) {
|
12868 | var error = $root.google.datastore.v1.GqlQueryParameter.verify(message.positionalBindings[i]);
|
12869 | if (error)
|
12870 | return "positionalBindings." + error;
|
12871 | }
|
12872 | }
|
12873 | return null;
|
12874 | };
|
12875 |
|
12876 | /**
|
12877 | * Creates a GqlQuery message from a plain object. Also converts values to their respective internal types.
|
12878 | * @function fromObject
|
12879 | * @memberof google.datastore.v1.GqlQuery
|
12880 | * @static
|
12881 | * @param {Object.<string,*>} object Plain object
|
12882 | * @returns {google.datastore.v1.GqlQuery} GqlQuery
|
12883 | */
|
12884 | GqlQuery.fromObject = function fromObject(object) {
|
12885 | if (object instanceof $root.google.datastore.v1.GqlQuery)
|
12886 | return object;
|
12887 | var message = new $root.google.datastore.v1.GqlQuery();
|
12888 | if (object.queryString != null)
|
12889 | message.queryString = String(object.queryString);
|
12890 | if (object.allowLiterals != null)
|
12891 | message.allowLiterals = Boolean(object.allowLiterals);
|
12892 | if (object.namedBindings) {
|
12893 | if (typeof object.namedBindings !== "object")
|
12894 | throw TypeError(".google.datastore.v1.GqlQuery.namedBindings: object expected");
|
12895 | message.namedBindings = {};
|
12896 | for (var keys = Object.keys(object.namedBindings), i = 0; i < keys.length; ++i) {
|
12897 | if (typeof object.namedBindings[keys[i]] !== "object")
|
12898 | throw TypeError(".google.datastore.v1.GqlQuery.namedBindings: object expected");
|
12899 | message.namedBindings[keys[i]] = $root.google.datastore.v1.GqlQueryParameter.fromObject(object.namedBindings[keys[i]]);
|
12900 | }
|
12901 | }
|
12902 | if (object.positionalBindings) {
|
12903 | if (!Array.isArray(object.positionalBindings))
|
12904 | throw TypeError(".google.datastore.v1.GqlQuery.positionalBindings: array expected");
|
12905 | message.positionalBindings = [];
|
12906 | for (var i = 0; i < object.positionalBindings.length; ++i) {
|
12907 | if (typeof object.positionalBindings[i] !== "object")
|
12908 | throw TypeError(".google.datastore.v1.GqlQuery.positionalBindings: object expected");
|
12909 | message.positionalBindings[i] = $root.google.datastore.v1.GqlQueryParameter.fromObject(object.positionalBindings[i]);
|
12910 | }
|
12911 | }
|
12912 | return message;
|
12913 | };
|
12914 |
|
12915 | /**
|
12916 | * Creates a plain object from a GqlQuery message. Also converts values to other types if specified.
|
12917 | * @function toObject
|
12918 | * @memberof google.datastore.v1.GqlQuery
|
12919 | * @static
|
12920 | * @param {google.datastore.v1.GqlQuery} message GqlQuery
|
12921 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
12922 | * @returns {Object.<string,*>} Plain object
|
12923 | */
|
12924 | GqlQuery.toObject = function toObject(message, options) {
|
12925 | if (!options)
|
12926 | options = {};
|
12927 | var object = {};
|
12928 | if (options.arrays || options.defaults)
|
12929 | object.positionalBindings = [];
|
12930 | if (options.objects || options.defaults)
|
12931 | object.namedBindings = {};
|
12932 | if (options.defaults) {
|
12933 | object.queryString = "";
|
12934 | object.allowLiterals = false;
|
12935 | }
|
12936 | if (message.queryString != null && message.hasOwnProperty("queryString"))
|
12937 | object.queryString = message.queryString;
|
12938 | if (message.allowLiterals != null && message.hasOwnProperty("allowLiterals"))
|
12939 | object.allowLiterals = message.allowLiterals;
|
12940 | if (message.positionalBindings && message.positionalBindings.length) {
|
12941 | object.positionalBindings = [];
|
12942 | for (var j = 0; j < message.positionalBindings.length; ++j)
|
12943 | object.positionalBindings[j] = $root.google.datastore.v1.GqlQueryParameter.toObject(message.positionalBindings[j], options);
|
12944 | }
|
12945 | var keys2;
|
12946 | if (message.namedBindings && (keys2 = Object.keys(message.namedBindings)).length) {
|
12947 | object.namedBindings = {};
|
12948 | for (var j = 0; j < keys2.length; ++j)
|
12949 | object.namedBindings[keys2[j]] = $root.google.datastore.v1.GqlQueryParameter.toObject(message.namedBindings[keys2[j]], options);
|
12950 | }
|
12951 | return object;
|
12952 | };
|
12953 |
|
12954 | /**
|
12955 | * Converts this GqlQuery to JSON.
|
12956 | * @function toJSON
|
12957 | * @memberof google.datastore.v1.GqlQuery
|
12958 | * @instance
|
12959 | * @returns {Object.<string,*>} JSON object
|
12960 | */
|
12961 | GqlQuery.prototype.toJSON = function toJSON() {
|
12962 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
12963 | };
|
12964 |
|
12965 | /**
|
12966 | * Gets the default type url for GqlQuery
|
12967 | * @function getTypeUrl
|
12968 | * @memberof google.datastore.v1.GqlQuery
|
12969 | * @static
|
12970 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
12971 | * @returns {string} The default type url
|
12972 | */
|
12973 | GqlQuery.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
12974 | if (typeUrlPrefix === undefined) {
|
12975 | typeUrlPrefix = "type.googleapis.com";
|
12976 | }
|
12977 | return typeUrlPrefix + "/google.datastore.v1.GqlQuery";
|
12978 | };
|
12979 |
|
12980 | return GqlQuery;
|
12981 | })();
|
12982 |
|
12983 | v1.GqlQueryParameter = (function() {
|
12984 |
|
12985 | /**
|
12986 | * Properties of a GqlQueryParameter.
|
12987 | * @memberof google.datastore.v1
|
12988 | * @interface IGqlQueryParameter
|
12989 | * @property {google.datastore.v1.IValue|null} [value] GqlQueryParameter value
|
12990 | * @property {Uint8Array|null} [cursor] GqlQueryParameter cursor
|
12991 | */
|
12992 |
|
12993 | /**
|
12994 | * Constructs a new GqlQueryParameter.
|
12995 | * @memberof google.datastore.v1
|
12996 | * @classdesc Represents a GqlQueryParameter.
|
12997 | * @implements IGqlQueryParameter
|
12998 | * @constructor
|
12999 | * @param {google.datastore.v1.IGqlQueryParameter=} [properties] Properties to set
|
13000 | */
|
13001 | function GqlQueryParameter(properties) {
|
13002 | if (properties)
|
13003 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
13004 | if (properties[keys[i]] != null)
|
13005 | this[keys[i]] = properties[keys[i]];
|
13006 | }
|
13007 |
|
13008 | /**
|
13009 | * GqlQueryParameter value.
|
13010 | * @member {google.datastore.v1.IValue|null|undefined} value
|
13011 | * @memberof google.datastore.v1.GqlQueryParameter
|
13012 | * @instance
|
13013 | */
|
13014 | GqlQueryParameter.prototype.value = null;
|
13015 |
|
13016 | /**
|
13017 | * GqlQueryParameter cursor.
|
13018 | * @member {Uint8Array|null|undefined} cursor
|
13019 | * @memberof google.datastore.v1.GqlQueryParameter
|
13020 | * @instance
|
13021 | */
|
13022 | GqlQueryParameter.prototype.cursor = null;
|
13023 |
|
13024 | // OneOf field names bound to virtual getters and setters
|
13025 | var $oneOfFields;
|
13026 |
|
13027 | /**
|
13028 | * GqlQueryParameter parameterType.
|
13029 | * @member {"value"|"cursor"|undefined} parameterType
|
13030 | * @memberof google.datastore.v1.GqlQueryParameter
|
13031 | * @instance
|
13032 | */
|
13033 | Object.defineProperty(GqlQueryParameter.prototype, "parameterType", {
|
13034 | get: $util.oneOfGetter($oneOfFields = ["value", "cursor"]),
|
13035 | set: $util.oneOfSetter($oneOfFields)
|
13036 | });
|
13037 |
|
13038 | /**
|
13039 | * Creates a new GqlQueryParameter instance using the specified properties.
|
13040 | * @function create
|
13041 | * @memberof google.datastore.v1.GqlQueryParameter
|
13042 | * @static
|
13043 | * @param {google.datastore.v1.IGqlQueryParameter=} [properties] Properties to set
|
13044 | * @returns {google.datastore.v1.GqlQueryParameter} GqlQueryParameter instance
|
13045 | */
|
13046 | GqlQueryParameter.create = function create(properties) {
|
13047 | return new GqlQueryParameter(properties);
|
13048 | };
|
13049 |
|
13050 | /**
|
13051 | * Encodes the specified GqlQueryParameter message. Does not implicitly {@link google.datastore.v1.GqlQueryParameter.verify|verify} messages.
|
13052 | * @function encode
|
13053 | * @memberof google.datastore.v1.GqlQueryParameter
|
13054 | * @static
|
13055 | * @param {google.datastore.v1.IGqlQueryParameter} message GqlQueryParameter message or plain object to encode
|
13056 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
13057 | * @returns {$protobuf.Writer} Writer
|
13058 | */
|
13059 | GqlQueryParameter.encode = function encode(message, writer) {
|
13060 | if (!writer)
|
13061 | writer = $Writer.create();
|
13062 | if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
13063 | $root.google.datastore.v1.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
13064 | if (message.cursor != null && Object.hasOwnProperty.call(message, "cursor"))
|
13065 | writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.cursor);
|
13066 | return writer;
|
13067 | };
|
13068 |
|
13069 | /**
|
13070 | * Encodes the specified GqlQueryParameter message, length delimited. Does not implicitly {@link google.datastore.v1.GqlQueryParameter.verify|verify} messages.
|
13071 | * @function encodeDelimited
|
13072 | * @memberof google.datastore.v1.GqlQueryParameter
|
13073 | * @static
|
13074 | * @param {google.datastore.v1.IGqlQueryParameter} message GqlQueryParameter message or plain object to encode
|
13075 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
13076 | * @returns {$protobuf.Writer} Writer
|
13077 | */
|
13078 | GqlQueryParameter.encodeDelimited = function encodeDelimited(message, writer) {
|
13079 | return this.encode(message, writer).ldelim();
|
13080 | };
|
13081 |
|
13082 | /**
|
13083 | * Decodes a GqlQueryParameter message from the specified reader or buffer.
|
13084 | * @function decode
|
13085 | * @memberof google.datastore.v1.GqlQueryParameter
|
13086 | * @static
|
13087 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
13088 | * @param {number} [length] Message length if known beforehand
|
13089 | * @returns {google.datastore.v1.GqlQueryParameter} GqlQueryParameter
|
13090 | * @throws {Error} If the payload is not a reader or valid buffer
|
13091 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
13092 | */
|
13093 | GqlQueryParameter.decode = function decode(reader, length) {
|
13094 | if (!(reader instanceof $Reader))
|
13095 | reader = $Reader.create(reader);
|
13096 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.GqlQueryParameter();
|
13097 | while (reader.pos < end) {
|
13098 | var tag = reader.uint32();
|
13099 | switch (tag >>> 3) {
|
13100 | case 2: {
|
13101 | message.value = $root.google.datastore.v1.Value.decode(reader, reader.uint32());
|
13102 | break;
|
13103 | }
|
13104 | case 3: {
|
13105 | message.cursor = reader.bytes();
|
13106 | break;
|
13107 | }
|
13108 | default:
|
13109 | reader.skipType(tag & 7);
|
13110 | break;
|
13111 | }
|
13112 | }
|
13113 | return message;
|
13114 | };
|
13115 |
|
13116 | /**
|
13117 | * Decodes a GqlQueryParameter message from the specified reader or buffer, length delimited.
|
13118 | * @function decodeDelimited
|
13119 | * @memberof google.datastore.v1.GqlQueryParameter
|
13120 | * @static
|
13121 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
13122 | * @returns {google.datastore.v1.GqlQueryParameter} GqlQueryParameter
|
13123 | * @throws {Error} If the payload is not a reader or valid buffer
|
13124 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
13125 | */
|
13126 | GqlQueryParameter.decodeDelimited = function decodeDelimited(reader) {
|
13127 | if (!(reader instanceof $Reader))
|
13128 | reader = new $Reader(reader);
|
13129 | return this.decode(reader, reader.uint32());
|
13130 | };
|
13131 |
|
13132 | /**
|
13133 | * Verifies a GqlQueryParameter message.
|
13134 | * @function verify
|
13135 | * @memberof google.datastore.v1.GqlQueryParameter
|
13136 | * @static
|
13137 | * @param {Object.<string,*>} message Plain object to verify
|
13138 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
13139 | */
|
13140 | GqlQueryParameter.verify = function verify(message) {
|
13141 | if (typeof message !== "object" || message === null)
|
13142 | return "object expected";
|
13143 | var properties = {};
|
13144 | if (message.value != null && message.hasOwnProperty("value")) {
|
13145 | properties.parameterType = 1;
|
13146 | {
|
13147 | var error = $root.google.datastore.v1.Value.verify(message.value);
|
13148 | if (error)
|
13149 | return "value." + error;
|
13150 | }
|
13151 | }
|
13152 | if (message.cursor != null && message.hasOwnProperty("cursor")) {
|
13153 | if (properties.parameterType === 1)
|
13154 | return "parameterType: multiple values";
|
13155 | properties.parameterType = 1;
|
13156 | if (!(message.cursor && typeof message.cursor.length === "number" || $util.isString(message.cursor)))
|
13157 | return "cursor: buffer expected";
|
13158 | }
|
13159 | return null;
|
13160 | };
|
13161 |
|
13162 | /**
|
13163 | * Creates a GqlQueryParameter message from a plain object. Also converts values to their respective internal types.
|
13164 | * @function fromObject
|
13165 | * @memberof google.datastore.v1.GqlQueryParameter
|
13166 | * @static
|
13167 | * @param {Object.<string,*>} object Plain object
|
13168 | * @returns {google.datastore.v1.GqlQueryParameter} GqlQueryParameter
|
13169 | */
|
13170 | GqlQueryParameter.fromObject = function fromObject(object) {
|
13171 | if (object instanceof $root.google.datastore.v1.GqlQueryParameter)
|
13172 | return object;
|
13173 | var message = new $root.google.datastore.v1.GqlQueryParameter();
|
13174 | if (object.value != null) {
|
13175 | if (typeof object.value !== "object")
|
13176 | throw TypeError(".google.datastore.v1.GqlQueryParameter.value: object expected");
|
13177 | message.value = $root.google.datastore.v1.Value.fromObject(object.value);
|
13178 | }
|
13179 | if (object.cursor != null)
|
13180 | if (typeof object.cursor === "string")
|
13181 | $util.base64.decode(object.cursor, message.cursor = $util.newBuffer($util.base64.length(object.cursor)), 0);
|
13182 | else if (object.cursor.length >= 0)
|
13183 | message.cursor = object.cursor;
|
13184 | return message;
|
13185 | };
|
13186 |
|
13187 | /**
|
13188 | * Creates a plain object from a GqlQueryParameter message. Also converts values to other types if specified.
|
13189 | * @function toObject
|
13190 | * @memberof google.datastore.v1.GqlQueryParameter
|
13191 | * @static
|
13192 | * @param {google.datastore.v1.GqlQueryParameter} message GqlQueryParameter
|
13193 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
13194 | * @returns {Object.<string,*>} Plain object
|
13195 | */
|
13196 | GqlQueryParameter.toObject = function toObject(message, options) {
|
13197 | if (!options)
|
13198 | options = {};
|
13199 | var object = {};
|
13200 | if (message.value != null && message.hasOwnProperty("value")) {
|
13201 | object.value = $root.google.datastore.v1.Value.toObject(message.value, options);
|
13202 | if (options.oneofs)
|
13203 | object.parameterType = "value";
|
13204 | }
|
13205 | if (message.cursor != null && message.hasOwnProperty("cursor")) {
|
13206 | object.cursor = options.bytes === String ? $util.base64.encode(message.cursor, 0, message.cursor.length) : options.bytes === Array ? Array.prototype.slice.call(message.cursor) : message.cursor;
|
13207 | if (options.oneofs)
|
13208 | object.parameterType = "cursor";
|
13209 | }
|
13210 | return object;
|
13211 | };
|
13212 |
|
13213 | /**
|
13214 | * Converts this GqlQueryParameter to JSON.
|
13215 | * @function toJSON
|
13216 | * @memberof google.datastore.v1.GqlQueryParameter
|
13217 | * @instance
|
13218 | * @returns {Object.<string,*>} JSON object
|
13219 | */
|
13220 | GqlQueryParameter.prototype.toJSON = function toJSON() {
|
13221 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
13222 | };
|
13223 |
|
13224 | /**
|
13225 | * Gets the default type url for GqlQueryParameter
|
13226 | * @function getTypeUrl
|
13227 | * @memberof google.datastore.v1.GqlQueryParameter
|
13228 | * @static
|
13229 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
13230 | * @returns {string} The default type url
|
13231 | */
|
13232 | GqlQueryParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
13233 | if (typeUrlPrefix === undefined) {
|
13234 | typeUrlPrefix = "type.googleapis.com";
|
13235 | }
|
13236 | return typeUrlPrefix + "/google.datastore.v1.GqlQueryParameter";
|
13237 | };
|
13238 |
|
13239 | return GqlQueryParameter;
|
13240 | })();
|
13241 |
|
13242 | v1.QueryResultBatch = (function() {
|
13243 |
|
13244 | /**
|
13245 | * Properties of a QueryResultBatch.
|
13246 | * @memberof google.datastore.v1
|
13247 | * @interface IQueryResultBatch
|
13248 | * @property {number|null} [skippedResults] QueryResultBatch skippedResults
|
13249 | * @property {Uint8Array|null} [skippedCursor] QueryResultBatch skippedCursor
|
13250 | * @property {google.datastore.v1.EntityResult.ResultType|null} [entityResultType] QueryResultBatch entityResultType
|
13251 | * @property {Array.<google.datastore.v1.IEntityResult>|null} [entityResults] QueryResultBatch entityResults
|
13252 | * @property {Uint8Array|null} [endCursor] QueryResultBatch endCursor
|
13253 | * @property {google.datastore.v1.QueryResultBatch.MoreResultsType|null} [moreResults] QueryResultBatch moreResults
|
13254 | * @property {number|Long|null} [snapshotVersion] QueryResultBatch snapshotVersion
|
13255 | * @property {google.protobuf.ITimestamp|null} [readTime] QueryResultBatch readTime
|
13256 | */
|
13257 |
|
13258 | /**
|
13259 | * Constructs a new QueryResultBatch.
|
13260 | * @memberof google.datastore.v1
|
13261 | * @classdesc Represents a QueryResultBatch.
|
13262 | * @implements IQueryResultBatch
|
13263 | * @constructor
|
13264 | * @param {google.datastore.v1.IQueryResultBatch=} [properties] Properties to set
|
13265 | */
|
13266 | function QueryResultBatch(properties) {
|
13267 | this.entityResults = [];
|
13268 | if (properties)
|
13269 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
13270 | if (properties[keys[i]] != null)
|
13271 | this[keys[i]] = properties[keys[i]];
|
13272 | }
|
13273 |
|
13274 | /**
|
13275 | * QueryResultBatch skippedResults.
|
13276 | * @member {number} skippedResults
|
13277 | * @memberof google.datastore.v1.QueryResultBatch
|
13278 | * @instance
|
13279 | */
|
13280 | QueryResultBatch.prototype.skippedResults = 0;
|
13281 |
|
13282 | /**
|
13283 | * QueryResultBatch skippedCursor.
|
13284 | * @member {Uint8Array} skippedCursor
|
13285 | * @memberof google.datastore.v1.QueryResultBatch
|
13286 | * @instance
|
13287 | */
|
13288 | QueryResultBatch.prototype.skippedCursor = $util.newBuffer([]);
|
13289 |
|
13290 | /**
|
13291 | * QueryResultBatch entityResultType.
|
13292 | * @member {google.datastore.v1.EntityResult.ResultType} entityResultType
|
13293 | * @memberof google.datastore.v1.QueryResultBatch
|
13294 | * @instance
|
13295 | */
|
13296 | QueryResultBatch.prototype.entityResultType = 0;
|
13297 |
|
13298 | /**
|
13299 | * QueryResultBatch entityResults.
|
13300 | * @member {Array.<google.datastore.v1.IEntityResult>} entityResults
|
13301 | * @memberof google.datastore.v1.QueryResultBatch
|
13302 | * @instance
|
13303 | */
|
13304 | QueryResultBatch.prototype.entityResults = $util.emptyArray;
|
13305 |
|
13306 | /**
|
13307 | * QueryResultBatch endCursor.
|
13308 | * @member {Uint8Array} endCursor
|
13309 | * @memberof google.datastore.v1.QueryResultBatch
|
13310 | * @instance
|
13311 | */
|
13312 | QueryResultBatch.prototype.endCursor = $util.newBuffer([]);
|
13313 |
|
13314 | /**
|
13315 | * QueryResultBatch moreResults.
|
13316 | * @member {google.datastore.v1.QueryResultBatch.MoreResultsType} moreResults
|
13317 | * @memberof google.datastore.v1.QueryResultBatch
|
13318 | * @instance
|
13319 | */
|
13320 | QueryResultBatch.prototype.moreResults = 0;
|
13321 |
|
13322 | /**
|
13323 | * QueryResultBatch snapshotVersion.
|
13324 | * @member {number|Long} snapshotVersion
|
13325 | * @memberof google.datastore.v1.QueryResultBatch
|
13326 | * @instance
|
13327 | */
|
13328 | QueryResultBatch.prototype.snapshotVersion = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
13329 |
|
13330 | /**
|
13331 | * QueryResultBatch readTime.
|
13332 | * @member {google.protobuf.ITimestamp|null|undefined} readTime
|
13333 | * @memberof google.datastore.v1.QueryResultBatch
|
13334 | * @instance
|
13335 | */
|
13336 | QueryResultBatch.prototype.readTime = null;
|
13337 |
|
13338 | /**
|
13339 | * Creates a new QueryResultBatch instance using the specified properties.
|
13340 | * @function create
|
13341 | * @memberof google.datastore.v1.QueryResultBatch
|
13342 | * @static
|
13343 | * @param {google.datastore.v1.IQueryResultBatch=} [properties] Properties to set
|
13344 | * @returns {google.datastore.v1.QueryResultBatch} QueryResultBatch instance
|
13345 | */
|
13346 | QueryResultBatch.create = function create(properties) {
|
13347 | return new QueryResultBatch(properties);
|
13348 | };
|
13349 |
|
13350 | /**
|
13351 | * Encodes the specified QueryResultBatch message. Does not implicitly {@link google.datastore.v1.QueryResultBatch.verify|verify} messages.
|
13352 | * @function encode
|
13353 | * @memberof google.datastore.v1.QueryResultBatch
|
13354 | * @static
|
13355 | * @param {google.datastore.v1.IQueryResultBatch} message QueryResultBatch message or plain object to encode
|
13356 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
13357 | * @returns {$protobuf.Writer} Writer
|
13358 | */
|
13359 | QueryResultBatch.encode = function encode(message, writer) {
|
13360 | if (!writer)
|
13361 | writer = $Writer.create();
|
13362 | if (message.entityResultType != null && Object.hasOwnProperty.call(message, "entityResultType"))
|
13363 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.entityResultType);
|
13364 | if (message.entityResults != null && message.entityResults.length)
|
13365 | for (var i = 0; i < message.entityResults.length; ++i)
|
13366 | $root.google.datastore.v1.EntityResult.encode(message.entityResults[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
13367 | if (message.skippedCursor != null && Object.hasOwnProperty.call(message, "skippedCursor"))
|
13368 | writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.skippedCursor);
|
13369 | if (message.endCursor != null && Object.hasOwnProperty.call(message, "endCursor"))
|
13370 | writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.endCursor);
|
13371 | if (message.moreResults != null && Object.hasOwnProperty.call(message, "moreResults"))
|
13372 | writer.uint32(/* id 5, wireType 0 =*/40).int32(message.moreResults);
|
13373 | if (message.skippedResults != null && Object.hasOwnProperty.call(message, "skippedResults"))
|
13374 | writer.uint32(/* id 6, wireType 0 =*/48).int32(message.skippedResults);
|
13375 | if (message.snapshotVersion != null && Object.hasOwnProperty.call(message, "snapshotVersion"))
|
13376 | writer.uint32(/* id 7, wireType 0 =*/56).int64(message.snapshotVersion);
|
13377 | if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime"))
|
13378 | $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
13379 | return writer;
|
13380 | };
|
13381 |
|
13382 | /**
|
13383 | * Encodes the specified QueryResultBatch message, length delimited. Does not implicitly {@link google.datastore.v1.QueryResultBatch.verify|verify} messages.
|
13384 | * @function encodeDelimited
|
13385 | * @memberof google.datastore.v1.QueryResultBatch
|
13386 | * @static
|
13387 | * @param {google.datastore.v1.IQueryResultBatch} message QueryResultBatch message or plain object to encode
|
13388 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
13389 | * @returns {$protobuf.Writer} Writer
|
13390 | */
|
13391 | QueryResultBatch.encodeDelimited = function encodeDelimited(message, writer) {
|
13392 | return this.encode(message, writer).ldelim();
|
13393 | };
|
13394 |
|
13395 | /**
|
13396 | * Decodes a QueryResultBatch message from the specified reader or buffer.
|
13397 | * @function decode
|
13398 | * @memberof google.datastore.v1.QueryResultBatch
|
13399 | * @static
|
13400 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
13401 | * @param {number} [length] Message length if known beforehand
|
13402 | * @returns {google.datastore.v1.QueryResultBatch} QueryResultBatch
|
13403 | * @throws {Error} If the payload is not a reader or valid buffer
|
13404 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
13405 | */
|
13406 | QueryResultBatch.decode = function decode(reader, length) {
|
13407 | if (!(reader instanceof $Reader))
|
13408 | reader = $Reader.create(reader);
|
13409 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.QueryResultBatch();
|
13410 | while (reader.pos < end) {
|
13411 | var tag = reader.uint32();
|
13412 | switch (tag >>> 3) {
|
13413 | case 6: {
|
13414 | message.skippedResults = reader.int32();
|
13415 | break;
|
13416 | }
|
13417 | case 3: {
|
13418 | message.skippedCursor = reader.bytes();
|
13419 | break;
|
13420 | }
|
13421 | case 1: {
|
13422 | message.entityResultType = reader.int32();
|
13423 | break;
|
13424 | }
|
13425 | case 2: {
|
13426 | if (!(message.entityResults && message.entityResults.length))
|
13427 | message.entityResults = [];
|
13428 | message.entityResults.push($root.google.datastore.v1.EntityResult.decode(reader, reader.uint32()));
|
13429 | break;
|
13430 | }
|
13431 | case 4: {
|
13432 | message.endCursor = reader.bytes();
|
13433 | break;
|
13434 | }
|
13435 | case 5: {
|
13436 | message.moreResults = reader.int32();
|
13437 | break;
|
13438 | }
|
13439 | case 7: {
|
13440 | message.snapshotVersion = reader.int64();
|
13441 | break;
|
13442 | }
|
13443 | case 8: {
|
13444 | message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
13445 | break;
|
13446 | }
|
13447 | default:
|
13448 | reader.skipType(tag & 7);
|
13449 | break;
|
13450 | }
|
13451 | }
|
13452 | return message;
|
13453 | };
|
13454 |
|
13455 | /**
|
13456 | * Decodes a QueryResultBatch message from the specified reader or buffer, length delimited.
|
13457 | * @function decodeDelimited
|
13458 | * @memberof google.datastore.v1.QueryResultBatch
|
13459 | * @static
|
13460 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
13461 | * @returns {google.datastore.v1.QueryResultBatch} QueryResultBatch
|
13462 | * @throws {Error} If the payload is not a reader or valid buffer
|
13463 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
13464 | */
|
13465 | QueryResultBatch.decodeDelimited = function decodeDelimited(reader) {
|
13466 | if (!(reader instanceof $Reader))
|
13467 | reader = new $Reader(reader);
|
13468 | return this.decode(reader, reader.uint32());
|
13469 | };
|
13470 |
|
13471 | /**
|
13472 | * Verifies a QueryResultBatch message.
|
13473 | * @function verify
|
13474 | * @memberof google.datastore.v1.QueryResultBatch
|
13475 | * @static
|
13476 | * @param {Object.<string,*>} message Plain object to verify
|
13477 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
13478 | */
|
13479 | QueryResultBatch.verify = function verify(message) {
|
13480 | if (typeof message !== "object" || message === null)
|
13481 | return "object expected";
|
13482 | if (message.skippedResults != null && message.hasOwnProperty("skippedResults"))
|
13483 | if (!$util.isInteger(message.skippedResults))
|
13484 | return "skippedResults: integer expected";
|
13485 | if (message.skippedCursor != null && message.hasOwnProperty("skippedCursor"))
|
13486 | if (!(message.skippedCursor && typeof message.skippedCursor.length === "number" || $util.isString(message.skippedCursor)))
|
13487 | return "skippedCursor: buffer expected";
|
13488 | if (message.entityResultType != null && message.hasOwnProperty("entityResultType"))
|
13489 | switch (message.entityResultType) {
|
13490 | default:
|
13491 | return "entityResultType: enum value expected";
|
13492 | case 0:
|
13493 | case 1:
|
13494 | case 2:
|
13495 | case 3:
|
13496 | break;
|
13497 | }
|
13498 | if (message.entityResults != null && message.hasOwnProperty("entityResults")) {
|
13499 | if (!Array.isArray(message.entityResults))
|
13500 | return "entityResults: array expected";
|
13501 | for (var i = 0; i < message.entityResults.length; ++i) {
|
13502 | var error = $root.google.datastore.v1.EntityResult.verify(message.entityResults[i]);
|
13503 | if (error)
|
13504 | return "entityResults." + error;
|
13505 | }
|
13506 | }
|
13507 | if (message.endCursor != null && message.hasOwnProperty("endCursor"))
|
13508 | if (!(message.endCursor && typeof message.endCursor.length === "number" || $util.isString(message.endCursor)))
|
13509 | return "endCursor: buffer expected";
|
13510 | if (message.moreResults != null && message.hasOwnProperty("moreResults"))
|
13511 | switch (message.moreResults) {
|
13512 | default:
|
13513 | return "moreResults: enum value expected";
|
13514 | case 0:
|
13515 | case 1:
|
13516 | case 2:
|
13517 | case 4:
|
13518 | case 3:
|
13519 | break;
|
13520 | }
|
13521 | if (message.snapshotVersion != null && message.hasOwnProperty("snapshotVersion"))
|
13522 | if (!$util.isInteger(message.snapshotVersion) && !(message.snapshotVersion && $util.isInteger(message.snapshotVersion.low) && $util.isInteger(message.snapshotVersion.high)))
|
13523 | return "snapshotVersion: integer|Long expected";
|
13524 | if (message.readTime != null && message.hasOwnProperty("readTime")) {
|
13525 | var error = $root.google.protobuf.Timestamp.verify(message.readTime);
|
13526 | if (error)
|
13527 | return "readTime." + error;
|
13528 | }
|
13529 | return null;
|
13530 | };
|
13531 |
|
13532 | /**
|
13533 | * Creates a QueryResultBatch message from a plain object. Also converts values to their respective internal types.
|
13534 | * @function fromObject
|
13535 | * @memberof google.datastore.v1.QueryResultBatch
|
13536 | * @static
|
13537 | * @param {Object.<string,*>} object Plain object
|
13538 | * @returns {google.datastore.v1.QueryResultBatch} QueryResultBatch
|
13539 | */
|
13540 | QueryResultBatch.fromObject = function fromObject(object) {
|
13541 | if (object instanceof $root.google.datastore.v1.QueryResultBatch)
|
13542 | return object;
|
13543 | var message = new $root.google.datastore.v1.QueryResultBatch();
|
13544 | if (object.skippedResults != null)
|
13545 | message.skippedResults = object.skippedResults | 0;
|
13546 | if (object.skippedCursor != null)
|
13547 | if (typeof object.skippedCursor === "string")
|
13548 | $util.base64.decode(object.skippedCursor, message.skippedCursor = $util.newBuffer($util.base64.length(object.skippedCursor)), 0);
|
13549 | else if (object.skippedCursor.length >= 0)
|
13550 | message.skippedCursor = object.skippedCursor;
|
13551 | switch (object.entityResultType) {
|
13552 | default:
|
13553 | if (typeof object.entityResultType === "number") {
|
13554 | message.entityResultType = object.entityResultType;
|
13555 | break;
|
13556 | }
|
13557 | break;
|
13558 | case "RESULT_TYPE_UNSPECIFIED":
|
13559 | case 0:
|
13560 | message.entityResultType = 0;
|
13561 | break;
|
13562 | case "FULL":
|
13563 | case 1:
|
13564 | message.entityResultType = 1;
|
13565 | break;
|
13566 | case "PROJECTION":
|
13567 | case 2:
|
13568 | message.entityResultType = 2;
|
13569 | break;
|
13570 | case "KEY_ONLY":
|
13571 | case 3:
|
13572 | message.entityResultType = 3;
|
13573 | break;
|
13574 | }
|
13575 | if (object.entityResults) {
|
13576 | if (!Array.isArray(object.entityResults))
|
13577 | throw TypeError(".google.datastore.v1.QueryResultBatch.entityResults: array expected");
|
13578 | message.entityResults = [];
|
13579 | for (var i = 0; i < object.entityResults.length; ++i) {
|
13580 | if (typeof object.entityResults[i] !== "object")
|
13581 | throw TypeError(".google.datastore.v1.QueryResultBatch.entityResults: object expected");
|
13582 | message.entityResults[i] = $root.google.datastore.v1.EntityResult.fromObject(object.entityResults[i]);
|
13583 | }
|
13584 | }
|
13585 | if (object.endCursor != null)
|
13586 | if (typeof object.endCursor === "string")
|
13587 | $util.base64.decode(object.endCursor, message.endCursor = $util.newBuffer($util.base64.length(object.endCursor)), 0);
|
13588 | else if (object.endCursor.length >= 0)
|
13589 | message.endCursor = object.endCursor;
|
13590 | switch (object.moreResults) {
|
13591 | default:
|
13592 | if (typeof object.moreResults === "number") {
|
13593 | message.moreResults = object.moreResults;
|
13594 | break;
|
13595 | }
|
13596 | break;
|
13597 | case "MORE_RESULTS_TYPE_UNSPECIFIED":
|
13598 | case 0:
|
13599 | message.moreResults = 0;
|
13600 | break;
|
13601 | case "NOT_FINISHED":
|
13602 | case 1:
|
13603 | message.moreResults = 1;
|
13604 | break;
|
13605 | case "MORE_RESULTS_AFTER_LIMIT":
|
13606 | case 2:
|
13607 | message.moreResults = 2;
|
13608 | break;
|
13609 | case "MORE_RESULTS_AFTER_CURSOR":
|
13610 | case 4:
|
13611 | message.moreResults = 4;
|
13612 | break;
|
13613 | case "NO_MORE_RESULTS":
|
13614 | case 3:
|
13615 | message.moreResults = 3;
|
13616 | break;
|
13617 | }
|
13618 | if (object.snapshotVersion != null)
|
13619 | if ($util.Long)
|
13620 | (message.snapshotVersion = $util.Long.fromValue(object.snapshotVersion)).unsigned = false;
|
13621 | else if (typeof object.snapshotVersion === "string")
|
13622 | message.snapshotVersion = parseInt(object.snapshotVersion, 10);
|
13623 | else if (typeof object.snapshotVersion === "number")
|
13624 | message.snapshotVersion = object.snapshotVersion;
|
13625 | else if (typeof object.snapshotVersion === "object")
|
13626 | message.snapshotVersion = new $util.LongBits(object.snapshotVersion.low >>> 0, object.snapshotVersion.high >>> 0).toNumber();
|
13627 | if (object.readTime != null) {
|
13628 | if (typeof object.readTime !== "object")
|
13629 | throw TypeError(".google.datastore.v1.QueryResultBatch.readTime: object expected");
|
13630 | message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime);
|
13631 | }
|
13632 | return message;
|
13633 | };
|
13634 |
|
13635 | /**
|
13636 | * Creates a plain object from a QueryResultBatch message. Also converts values to other types if specified.
|
13637 | * @function toObject
|
13638 | * @memberof google.datastore.v1.QueryResultBatch
|
13639 | * @static
|
13640 | * @param {google.datastore.v1.QueryResultBatch} message QueryResultBatch
|
13641 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
13642 | * @returns {Object.<string,*>} Plain object
|
13643 | */
|
13644 | QueryResultBatch.toObject = function toObject(message, options) {
|
13645 | if (!options)
|
13646 | options = {};
|
13647 | var object = {};
|
13648 | if (options.arrays || options.defaults)
|
13649 | object.entityResults = [];
|
13650 | if (options.defaults) {
|
13651 | object.entityResultType = options.enums === String ? "RESULT_TYPE_UNSPECIFIED" : 0;
|
13652 | if (options.bytes === String)
|
13653 | object.skippedCursor = "";
|
13654 | else {
|
13655 | object.skippedCursor = [];
|
13656 | if (options.bytes !== Array)
|
13657 | object.skippedCursor = $util.newBuffer(object.skippedCursor);
|
13658 | }
|
13659 | if (options.bytes === String)
|
13660 | object.endCursor = "";
|
13661 | else {
|
13662 | object.endCursor = [];
|
13663 | if (options.bytes !== Array)
|
13664 | object.endCursor = $util.newBuffer(object.endCursor);
|
13665 | }
|
13666 | object.moreResults = options.enums === String ? "MORE_RESULTS_TYPE_UNSPECIFIED" : 0;
|
13667 | object.skippedResults = 0;
|
13668 | if ($util.Long) {
|
13669 | var long = new $util.Long(0, 0, false);
|
13670 | object.snapshotVersion = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
13671 | } else
|
13672 | object.snapshotVersion = options.longs === String ? "0" : 0;
|
13673 | object.readTime = null;
|
13674 | }
|
13675 | if (message.entityResultType != null && message.hasOwnProperty("entityResultType"))
|
13676 | object.entityResultType = options.enums === String ? $root.google.datastore.v1.EntityResult.ResultType[message.entityResultType] === undefined ? message.entityResultType : $root.google.datastore.v1.EntityResult.ResultType[message.entityResultType] : message.entityResultType;
|
13677 | if (message.entityResults && message.entityResults.length) {
|
13678 | object.entityResults = [];
|
13679 | for (var j = 0; j < message.entityResults.length; ++j)
|
13680 | object.entityResults[j] = $root.google.datastore.v1.EntityResult.toObject(message.entityResults[j], options);
|
13681 | }
|
13682 | if (message.skippedCursor != null && message.hasOwnProperty("skippedCursor"))
|
13683 | object.skippedCursor = options.bytes === String ? $util.base64.encode(message.skippedCursor, 0, message.skippedCursor.length) : options.bytes === Array ? Array.prototype.slice.call(message.skippedCursor) : message.skippedCursor;
|
13684 | if (message.endCursor != null && message.hasOwnProperty("endCursor"))
|
13685 | object.endCursor = options.bytes === String ? $util.base64.encode(message.endCursor, 0, message.endCursor.length) : options.bytes === Array ? Array.prototype.slice.call(message.endCursor) : message.endCursor;
|
13686 | if (message.moreResults != null && message.hasOwnProperty("moreResults"))
|
13687 | object.moreResults = options.enums === String ? $root.google.datastore.v1.QueryResultBatch.MoreResultsType[message.moreResults] === undefined ? message.moreResults : $root.google.datastore.v1.QueryResultBatch.MoreResultsType[message.moreResults] : message.moreResults;
|
13688 | if (message.skippedResults != null && message.hasOwnProperty("skippedResults"))
|
13689 | object.skippedResults = message.skippedResults;
|
13690 | if (message.snapshotVersion != null && message.hasOwnProperty("snapshotVersion"))
|
13691 | if (typeof message.snapshotVersion === "number")
|
13692 | object.snapshotVersion = options.longs === String ? String(message.snapshotVersion) : message.snapshotVersion;
|
13693 | else
|
13694 | object.snapshotVersion = options.longs === String ? $util.Long.prototype.toString.call(message.snapshotVersion) : options.longs === Number ? new $util.LongBits(message.snapshotVersion.low >>> 0, message.snapshotVersion.high >>> 0).toNumber() : message.snapshotVersion;
|
13695 | if (message.readTime != null && message.hasOwnProperty("readTime"))
|
13696 | object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options);
|
13697 | return object;
|
13698 | };
|
13699 |
|
13700 | /**
|
13701 | * Converts this QueryResultBatch to JSON.
|
13702 | * @function toJSON
|
13703 | * @memberof google.datastore.v1.QueryResultBatch
|
13704 | * @instance
|
13705 | * @returns {Object.<string,*>} JSON object
|
13706 | */
|
13707 | QueryResultBatch.prototype.toJSON = function toJSON() {
|
13708 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
13709 | };
|
13710 |
|
13711 | /**
|
13712 | * Gets the default type url for QueryResultBatch
|
13713 | * @function getTypeUrl
|
13714 | * @memberof google.datastore.v1.QueryResultBatch
|
13715 | * @static
|
13716 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
13717 | * @returns {string} The default type url
|
13718 | */
|
13719 | QueryResultBatch.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
13720 | if (typeUrlPrefix === undefined) {
|
13721 | typeUrlPrefix = "type.googleapis.com";
|
13722 | }
|
13723 | return typeUrlPrefix + "/google.datastore.v1.QueryResultBatch";
|
13724 | };
|
13725 |
|
13726 | /**
|
13727 | * MoreResultsType enum.
|
13728 | * @name google.datastore.v1.QueryResultBatch.MoreResultsType
|
13729 | * @enum {number}
|
13730 | * @property {number} MORE_RESULTS_TYPE_UNSPECIFIED=0 MORE_RESULTS_TYPE_UNSPECIFIED value
|
13731 | * @property {number} NOT_FINISHED=1 NOT_FINISHED value
|
13732 | * @property {number} MORE_RESULTS_AFTER_LIMIT=2 MORE_RESULTS_AFTER_LIMIT value
|
13733 | * @property {number} MORE_RESULTS_AFTER_CURSOR=4 MORE_RESULTS_AFTER_CURSOR value
|
13734 | * @property {number} NO_MORE_RESULTS=3 NO_MORE_RESULTS value
|
13735 | */
|
13736 | QueryResultBatch.MoreResultsType = (function() {
|
13737 | var valuesById = {}, values = Object.create(valuesById);
|
13738 | values[valuesById[0] = "MORE_RESULTS_TYPE_UNSPECIFIED"] = 0;
|
13739 | values[valuesById[1] = "NOT_FINISHED"] = 1;
|
13740 | values[valuesById[2] = "MORE_RESULTS_AFTER_LIMIT"] = 2;
|
13741 | values[valuesById[4] = "MORE_RESULTS_AFTER_CURSOR"] = 4;
|
13742 | values[valuesById[3] = "NO_MORE_RESULTS"] = 3;
|
13743 | return values;
|
13744 | })();
|
13745 |
|
13746 | return QueryResultBatch;
|
13747 | })();
|
13748 |
|
13749 | v1.Datastore = (function() {
|
13750 |
|
13751 | /**
|
13752 | * Constructs a new Datastore service.
|
13753 | * @memberof google.datastore.v1
|
13754 | * @classdesc Represents a Datastore
|
13755 | * @extends $protobuf.rpc.Service
|
13756 | * @constructor
|
13757 | * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
|
13758 | * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
|
13759 | * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
|
13760 | */
|
13761 | function Datastore(rpcImpl, requestDelimited, responseDelimited) {
|
13762 | $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
|
13763 | }
|
13764 |
|
13765 | (Datastore.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Datastore;
|
13766 |
|
13767 | /**
|
13768 | * Creates new Datastore service using the specified rpc implementation.
|
13769 | * @function create
|
13770 | * @memberof google.datastore.v1.Datastore
|
13771 | * @static
|
13772 | * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
|
13773 | * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
|
13774 | * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
|
13775 | * @returns {Datastore} RPC service. Useful where requests and/or responses are streamed.
|
13776 | */
|
13777 | Datastore.create = function create(rpcImpl, requestDelimited, responseDelimited) {
|
13778 | return new this(rpcImpl, requestDelimited, responseDelimited);
|
13779 | };
|
13780 |
|
13781 | /**
|
13782 | * Callback as used by {@link google.datastore.v1.Datastore|lookup}.
|
13783 | * @memberof google.datastore.v1.Datastore
|
13784 | * @typedef LookupCallback
|
13785 | * @type {function}
|
13786 | * @param {Error|null} error Error, if any
|
13787 | * @param {google.datastore.v1.LookupResponse} [response] LookupResponse
|
13788 | */
|
13789 |
|
13790 | /**
|
13791 | * Calls Lookup.
|
13792 | * @function lookup
|
13793 | * @memberof google.datastore.v1.Datastore
|
13794 | * @instance
|
13795 | * @param {google.datastore.v1.ILookupRequest} request LookupRequest message or plain object
|
13796 | * @param {google.datastore.v1.Datastore.LookupCallback} callback Node-style callback called with the error, if any, and LookupResponse
|
13797 | * @returns {undefined}
|
13798 | * @variation 1
|
13799 | */
|
13800 | Object.defineProperty(Datastore.prototype.lookup = function lookup(request, callback) {
|
13801 | return this.rpcCall(lookup, $root.google.datastore.v1.LookupRequest, $root.google.datastore.v1.LookupResponse, request, callback);
|
13802 | }, "name", { value: "Lookup" });
|
13803 |
|
13804 | /**
|
13805 | * Calls Lookup.
|
13806 | * @function lookup
|
13807 | * @memberof google.datastore.v1.Datastore
|
13808 | * @instance
|
13809 | * @param {google.datastore.v1.ILookupRequest} request LookupRequest message or plain object
|
13810 | * @returns {Promise<google.datastore.v1.LookupResponse>} Promise
|
13811 | * @variation 2
|
13812 | */
|
13813 |
|
13814 | /**
|
13815 | * Callback as used by {@link google.datastore.v1.Datastore|runQuery}.
|
13816 | * @memberof google.datastore.v1.Datastore
|
13817 | * @typedef RunQueryCallback
|
13818 | * @type {function}
|
13819 | * @param {Error|null} error Error, if any
|
13820 | * @param {google.datastore.v1.RunQueryResponse} [response] RunQueryResponse
|
13821 | */
|
13822 |
|
13823 | /**
|
13824 | * Calls RunQuery.
|
13825 | * @function runQuery
|
13826 | * @memberof google.datastore.v1.Datastore
|
13827 | * @instance
|
13828 | * @param {google.datastore.v1.IRunQueryRequest} request RunQueryRequest message or plain object
|
13829 | * @param {google.datastore.v1.Datastore.RunQueryCallback} callback Node-style callback called with the error, if any, and RunQueryResponse
|
13830 | * @returns {undefined}
|
13831 | * @variation 1
|
13832 | */
|
13833 | Object.defineProperty(Datastore.prototype.runQuery = function runQuery(request, callback) {
|
13834 | return this.rpcCall(runQuery, $root.google.datastore.v1.RunQueryRequest, $root.google.datastore.v1.RunQueryResponse, request, callback);
|
13835 | }, "name", { value: "RunQuery" });
|
13836 |
|
13837 | /**
|
13838 | * Calls RunQuery.
|
13839 | * @function runQuery
|
13840 | * @memberof google.datastore.v1.Datastore
|
13841 | * @instance
|
13842 | * @param {google.datastore.v1.IRunQueryRequest} request RunQueryRequest message or plain object
|
13843 | * @returns {Promise<google.datastore.v1.RunQueryResponse>} Promise
|
13844 | * @variation 2
|
13845 | */
|
13846 |
|
13847 | /**
|
13848 | * Callback as used by {@link google.datastore.v1.Datastore|runAggregationQuery}.
|
13849 | * @memberof google.datastore.v1.Datastore
|
13850 | * @typedef RunAggregationQueryCallback
|
13851 | * @type {function}
|
13852 | * @param {Error|null} error Error, if any
|
13853 | * @param {google.datastore.v1.RunAggregationQueryResponse} [response] RunAggregationQueryResponse
|
13854 | */
|
13855 |
|
13856 | /**
|
13857 | * Calls RunAggregationQuery.
|
13858 | * @function runAggregationQuery
|
13859 | * @memberof google.datastore.v1.Datastore
|
13860 | * @instance
|
13861 | * @param {google.datastore.v1.IRunAggregationQueryRequest} request RunAggregationQueryRequest message or plain object
|
13862 | * @param {google.datastore.v1.Datastore.RunAggregationQueryCallback} callback Node-style callback called with the error, if any, and RunAggregationQueryResponse
|
13863 | * @returns {undefined}
|
13864 | * @variation 1
|
13865 | */
|
13866 | Object.defineProperty(Datastore.prototype.runAggregationQuery = function runAggregationQuery(request, callback) {
|
13867 | return this.rpcCall(runAggregationQuery, $root.google.datastore.v1.RunAggregationQueryRequest, $root.google.datastore.v1.RunAggregationQueryResponse, request, callback);
|
13868 | }, "name", { value: "RunAggregationQuery" });
|
13869 |
|
13870 | /**
|
13871 | * Calls RunAggregationQuery.
|
13872 | * @function runAggregationQuery
|
13873 | * @memberof google.datastore.v1.Datastore
|
13874 | * @instance
|
13875 | * @param {google.datastore.v1.IRunAggregationQueryRequest} request RunAggregationQueryRequest message or plain object
|
13876 | * @returns {Promise<google.datastore.v1.RunAggregationQueryResponse>} Promise
|
13877 | * @variation 2
|
13878 | */
|
13879 |
|
13880 | /**
|
13881 | * Callback as used by {@link google.datastore.v1.Datastore|beginTransaction}.
|
13882 | * @memberof google.datastore.v1.Datastore
|
13883 | * @typedef BeginTransactionCallback
|
13884 | * @type {function}
|
13885 | * @param {Error|null} error Error, if any
|
13886 | * @param {google.datastore.v1.BeginTransactionResponse} [response] BeginTransactionResponse
|
13887 | */
|
13888 |
|
13889 | /**
|
13890 | * Calls BeginTransaction.
|
13891 | * @function beginTransaction
|
13892 | * @memberof google.datastore.v1.Datastore
|
13893 | * @instance
|
13894 | * @param {google.datastore.v1.IBeginTransactionRequest} request BeginTransactionRequest message or plain object
|
13895 | * @param {google.datastore.v1.Datastore.BeginTransactionCallback} callback Node-style callback called with the error, if any, and BeginTransactionResponse
|
13896 | * @returns {undefined}
|
13897 | * @variation 1
|
13898 | */
|
13899 | Object.defineProperty(Datastore.prototype.beginTransaction = function beginTransaction(request, callback) {
|
13900 | return this.rpcCall(beginTransaction, $root.google.datastore.v1.BeginTransactionRequest, $root.google.datastore.v1.BeginTransactionResponse, request, callback);
|
13901 | }, "name", { value: "BeginTransaction" });
|
13902 |
|
13903 | /**
|
13904 | * Calls BeginTransaction.
|
13905 | * @function beginTransaction
|
13906 | * @memberof google.datastore.v1.Datastore
|
13907 | * @instance
|
13908 | * @param {google.datastore.v1.IBeginTransactionRequest} request BeginTransactionRequest message or plain object
|
13909 | * @returns {Promise<google.datastore.v1.BeginTransactionResponse>} Promise
|
13910 | * @variation 2
|
13911 | */
|
13912 |
|
13913 | /**
|
13914 | * Callback as used by {@link google.datastore.v1.Datastore|commit}.
|
13915 | * @memberof google.datastore.v1.Datastore
|
13916 | * @typedef CommitCallback
|
13917 | * @type {function}
|
13918 | * @param {Error|null} error Error, if any
|
13919 | * @param {google.datastore.v1.CommitResponse} [response] CommitResponse
|
13920 | */
|
13921 |
|
13922 | /**
|
13923 | * Calls Commit.
|
13924 | * @function commit
|
13925 | * @memberof google.datastore.v1.Datastore
|
13926 | * @instance
|
13927 | * @param {google.datastore.v1.ICommitRequest} request CommitRequest message or plain object
|
13928 | * @param {google.datastore.v1.Datastore.CommitCallback} callback Node-style callback called with the error, if any, and CommitResponse
|
13929 | * @returns {undefined}
|
13930 | * @variation 1
|
13931 | */
|
13932 | Object.defineProperty(Datastore.prototype.commit = function commit(request, callback) {
|
13933 | return this.rpcCall(commit, $root.google.datastore.v1.CommitRequest, $root.google.datastore.v1.CommitResponse, request, callback);
|
13934 | }, "name", { value: "Commit" });
|
13935 |
|
13936 | /**
|
13937 | * Calls Commit.
|
13938 | * @function commit
|
13939 | * @memberof google.datastore.v1.Datastore
|
13940 | * @instance
|
13941 | * @param {google.datastore.v1.ICommitRequest} request CommitRequest message or plain object
|
13942 | * @returns {Promise<google.datastore.v1.CommitResponse>} Promise
|
13943 | * @variation 2
|
13944 | */
|
13945 |
|
13946 | /**
|
13947 | * Callback as used by {@link google.datastore.v1.Datastore|rollback}.
|
13948 | * @memberof google.datastore.v1.Datastore
|
13949 | * @typedef RollbackCallback
|
13950 | * @type {function}
|
13951 | * @param {Error|null} error Error, if any
|
13952 | * @param {google.datastore.v1.RollbackResponse} [response] RollbackResponse
|
13953 | */
|
13954 |
|
13955 | /**
|
13956 | * Calls Rollback.
|
13957 | * @function rollback
|
13958 | * @memberof google.datastore.v1.Datastore
|
13959 | * @instance
|
13960 | * @param {google.datastore.v1.IRollbackRequest} request RollbackRequest message or plain object
|
13961 | * @param {google.datastore.v1.Datastore.RollbackCallback} callback Node-style callback called with the error, if any, and RollbackResponse
|
13962 | * @returns {undefined}
|
13963 | * @variation 1
|
13964 | */
|
13965 | Object.defineProperty(Datastore.prototype.rollback = function rollback(request, callback) {
|
13966 | return this.rpcCall(rollback, $root.google.datastore.v1.RollbackRequest, $root.google.datastore.v1.RollbackResponse, request, callback);
|
13967 | }, "name", { value: "Rollback" });
|
13968 |
|
13969 | /**
|
13970 | * Calls Rollback.
|
13971 | * @function rollback
|
13972 | * @memberof google.datastore.v1.Datastore
|
13973 | * @instance
|
13974 | * @param {google.datastore.v1.IRollbackRequest} request RollbackRequest message or plain object
|
13975 | * @returns {Promise<google.datastore.v1.RollbackResponse>} Promise
|
13976 | * @variation 2
|
13977 | */
|
13978 |
|
13979 | /**
|
13980 | * Callback as used by {@link google.datastore.v1.Datastore|allocateIds}.
|
13981 | * @memberof google.datastore.v1.Datastore
|
13982 | * @typedef AllocateIdsCallback
|
13983 | * @type {function}
|
13984 | * @param {Error|null} error Error, if any
|
13985 | * @param {google.datastore.v1.AllocateIdsResponse} [response] AllocateIdsResponse
|
13986 | */
|
13987 |
|
13988 | /**
|
13989 | * Calls AllocateIds.
|
13990 | * @function allocateIds
|
13991 | * @memberof google.datastore.v1.Datastore
|
13992 | * @instance
|
13993 | * @param {google.datastore.v1.IAllocateIdsRequest} request AllocateIdsRequest message or plain object
|
13994 | * @param {google.datastore.v1.Datastore.AllocateIdsCallback} callback Node-style callback called with the error, if any, and AllocateIdsResponse
|
13995 | * @returns {undefined}
|
13996 | * @variation 1
|
13997 | */
|
13998 | Object.defineProperty(Datastore.prototype.allocateIds = function allocateIds(request, callback) {
|
13999 | return this.rpcCall(allocateIds, $root.google.datastore.v1.AllocateIdsRequest, $root.google.datastore.v1.AllocateIdsResponse, request, callback);
|
14000 | }, "name", { value: "AllocateIds" });
|
14001 |
|
14002 | /**
|
14003 | * Calls AllocateIds.
|
14004 | * @function allocateIds
|
14005 | * @memberof google.datastore.v1.Datastore
|
14006 | * @instance
|
14007 | * @param {google.datastore.v1.IAllocateIdsRequest} request AllocateIdsRequest message or plain object
|
14008 | * @returns {Promise<google.datastore.v1.AllocateIdsResponse>} Promise
|
14009 | * @variation 2
|
14010 | */
|
14011 |
|
14012 | /**
|
14013 | * Callback as used by {@link google.datastore.v1.Datastore|reserveIds}.
|
14014 | * @memberof google.datastore.v1.Datastore
|
14015 | * @typedef ReserveIdsCallback
|
14016 | * @type {function}
|
14017 | * @param {Error|null} error Error, if any
|
14018 | * @param {google.datastore.v1.ReserveIdsResponse} [response] ReserveIdsResponse
|
14019 | */
|
14020 |
|
14021 | /**
|
14022 | * Calls ReserveIds.
|
14023 | * @function reserveIds
|
14024 | * @memberof google.datastore.v1.Datastore
|
14025 | * @instance
|
14026 | * @param {google.datastore.v1.IReserveIdsRequest} request ReserveIdsRequest message or plain object
|
14027 | * @param {google.datastore.v1.Datastore.ReserveIdsCallback} callback Node-style callback called with the error, if any, and ReserveIdsResponse
|
14028 | * @returns {undefined}
|
14029 | * @variation 1
|
14030 | */
|
14031 | Object.defineProperty(Datastore.prototype.reserveIds = function reserveIds(request, callback) {
|
14032 | return this.rpcCall(reserveIds, $root.google.datastore.v1.ReserveIdsRequest, $root.google.datastore.v1.ReserveIdsResponse, request, callback);
|
14033 | }, "name", { value: "ReserveIds" });
|
14034 |
|
14035 | /**
|
14036 | * Calls ReserveIds.
|
14037 | * @function reserveIds
|
14038 | * @memberof google.datastore.v1.Datastore
|
14039 | * @instance
|
14040 | * @param {google.datastore.v1.IReserveIdsRequest} request ReserveIdsRequest message or plain object
|
14041 | * @returns {Promise<google.datastore.v1.ReserveIdsResponse>} Promise
|
14042 | * @variation 2
|
14043 | */
|
14044 |
|
14045 | return Datastore;
|
14046 | })();
|
14047 |
|
14048 | v1.LookupRequest = (function() {
|
14049 |
|
14050 | /**
|
14051 | * Properties of a LookupRequest.
|
14052 | * @memberof google.datastore.v1
|
14053 | * @interface ILookupRequest
|
14054 | * @property {string|null} [projectId] LookupRequest projectId
|
14055 | * @property {string|null} [databaseId] LookupRequest databaseId
|
14056 | * @property {google.datastore.v1.IReadOptions|null} [readOptions] LookupRequest readOptions
|
14057 | * @property {Array.<google.datastore.v1.IKey>|null} [keys] LookupRequest keys
|
14058 | */
|
14059 |
|
14060 | /**
|
14061 | * Constructs a new LookupRequest.
|
14062 | * @memberof google.datastore.v1
|
14063 | * @classdesc Represents a LookupRequest.
|
14064 | * @implements ILookupRequest
|
14065 | * @constructor
|
14066 | * @param {google.datastore.v1.ILookupRequest=} [properties] Properties to set
|
14067 | */
|
14068 | function LookupRequest(properties) {
|
14069 | this.keys = [];
|
14070 | if (properties)
|
14071 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
14072 | if (properties[keys[i]] != null)
|
14073 | this[keys[i]] = properties[keys[i]];
|
14074 | }
|
14075 |
|
14076 | /**
|
14077 | * LookupRequest projectId.
|
14078 | * @member {string} projectId
|
14079 | * @memberof google.datastore.v1.LookupRequest
|
14080 | * @instance
|
14081 | */
|
14082 | LookupRequest.prototype.projectId = "";
|
14083 |
|
14084 | /**
|
14085 | * LookupRequest databaseId.
|
14086 | * @member {string} databaseId
|
14087 | * @memberof google.datastore.v1.LookupRequest
|
14088 | * @instance
|
14089 | */
|
14090 | LookupRequest.prototype.databaseId = "";
|
14091 |
|
14092 | /**
|
14093 | * LookupRequest readOptions.
|
14094 | * @member {google.datastore.v1.IReadOptions|null|undefined} readOptions
|
14095 | * @memberof google.datastore.v1.LookupRequest
|
14096 | * @instance
|
14097 | */
|
14098 | LookupRequest.prototype.readOptions = null;
|
14099 |
|
14100 | /**
|
14101 | * LookupRequest keys.
|
14102 | * @member {Array.<google.datastore.v1.IKey>} keys
|
14103 | * @memberof google.datastore.v1.LookupRequest
|
14104 | * @instance
|
14105 | */
|
14106 | LookupRequest.prototype.keys = $util.emptyArray;
|
14107 |
|
14108 | /**
|
14109 | * Creates a new LookupRequest instance using the specified properties.
|
14110 | * @function create
|
14111 | * @memberof google.datastore.v1.LookupRequest
|
14112 | * @static
|
14113 | * @param {google.datastore.v1.ILookupRequest=} [properties] Properties to set
|
14114 | * @returns {google.datastore.v1.LookupRequest} LookupRequest instance
|
14115 | */
|
14116 | LookupRequest.create = function create(properties) {
|
14117 | return new LookupRequest(properties);
|
14118 | };
|
14119 |
|
14120 | /**
|
14121 | * Encodes the specified LookupRequest message. Does not implicitly {@link google.datastore.v1.LookupRequest.verify|verify} messages.
|
14122 | * @function encode
|
14123 | * @memberof google.datastore.v1.LookupRequest
|
14124 | * @static
|
14125 | * @param {google.datastore.v1.ILookupRequest} message LookupRequest message or plain object to encode
|
14126 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
14127 | * @returns {$protobuf.Writer} Writer
|
14128 | */
|
14129 | LookupRequest.encode = function encode(message, writer) {
|
14130 | if (!writer)
|
14131 | writer = $Writer.create();
|
14132 | if (message.readOptions != null && Object.hasOwnProperty.call(message, "readOptions"))
|
14133 | $root.google.datastore.v1.ReadOptions.encode(message.readOptions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
14134 | if (message.keys != null && message.keys.length)
|
14135 | for (var i = 0; i < message.keys.length; ++i)
|
14136 | $root.google.datastore.v1.Key.encode(message.keys[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
14137 | if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
|
14138 | writer.uint32(/* id 8, wireType 2 =*/66).string(message.projectId);
|
14139 | if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId"))
|
14140 | writer.uint32(/* id 9, wireType 2 =*/74).string(message.databaseId);
|
14141 | return writer;
|
14142 | };
|
14143 |
|
14144 | /**
|
14145 | * Encodes the specified LookupRequest message, length delimited. Does not implicitly {@link google.datastore.v1.LookupRequest.verify|verify} messages.
|
14146 | * @function encodeDelimited
|
14147 | * @memberof google.datastore.v1.LookupRequest
|
14148 | * @static
|
14149 | * @param {google.datastore.v1.ILookupRequest} message LookupRequest message or plain object to encode
|
14150 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
14151 | * @returns {$protobuf.Writer} Writer
|
14152 | */
|
14153 | LookupRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
14154 | return this.encode(message, writer).ldelim();
|
14155 | };
|
14156 |
|
14157 | /**
|
14158 | * Decodes a LookupRequest message from the specified reader or buffer.
|
14159 | * @function decode
|
14160 | * @memberof google.datastore.v1.LookupRequest
|
14161 | * @static
|
14162 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
14163 | * @param {number} [length] Message length if known beforehand
|
14164 | * @returns {google.datastore.v1.LookupRequest} LookupRequest
|
14165 | * @throws {Error} If the payload is not a reader or valid buffer
|
14166 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
14167 | */
|
14168 | LookupRequest.decode = function decode(reader, length) {
|
14169 | if (!(reader instanceof $Reader))
|
14170 | reader = $Reader.create(reader);
|
14171 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.LookupRequest();
|
14172 | while (reader.pos < end) {
|
14173 | var tag = reader.uint32();
|
14174 | switch (tag >>> 3) {
|
14175 | case 8: {
|
14176 | message.projectId = reader.string();
|
14177 | break;
|
14178 | }
|
14179 | case 9: {
|
14180 | message.databaseId = reader.string();
|
14181 | break;
|
14182 | }
|
14183 | case 1: {
|
14184 | message.readOptions = $root.google.datastore.v1.ReadOptions.decode(reader, reader.uint32());
|
14185 | break;
|
14186 | }
|
14187 | case 3: {
|
14188 | if (!(message.keys && message.keys.length))
|
14189 | message.keys = [];
|
14190 | message.keys.push($root.google.datastore.v1.Key.decode(reader, reader.uint32()));
|
14191 | break;
|
14192 | }
|
14193 | default:
|
14194 | reader.skipType(tag & 7);
|
14195 | break;
|
14196 | }
|
14197 | }
|
14198 | return message;
|
14199 | };
|
14200 |
|
14201 | /**
|
14202 | * Decodes a LookupRequest message from the specified reader or buffer, length delimited.
|
14203 | * @function decodeDelimited
|
14204 | * @memberof google.datastore.v1.LookupRequest
|
14205 | * @static
|
14206 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
14207 | * @returns {google.datastore.v1.LookupRequest} LookupRequest
|
14208 | * @throws {Error} If the payload is not a reader or valid buffer
|
14209 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
14210 | */
|
14211 | LookupRequest.decodeDelimited = function decodeDelimited(reader) {
|
14212 | if (!(reader instanceof $Reader))
|
14213 | reader = new $Reader(reader);
|
14214 | return this.decode(reader, reader.uint32());
|
14215 | };
|
14216 |
|
14217 | /**
|
14218 | * Verifies a LookupRequest message.
|
14219 | * @function verify
|
14220 | * @memberof google.datastore.v1.LookupRequest
|
14221 | * @static
|
14222 | * @param {Object.<string,*>} message Plain object to verify
|
14223 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
14224 | */
|
14225 | LookupRequest.verify = function verify(message) {
|
14226 | if (typeof message !== "object" || message === null)
|
14227 | return "object expected";
|
14228 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
14229 | if (!$util.isString(message.projectId))
|
14230 | return "projectId: string expected";
|
14231 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
14232 | if (!$util.isString(message.databaseId))
|
14233 | return "databaseId: string expected";
|
14234 | if (message.readOptions != null && message.hasOwnProperty("readOptions")) {
|
14235 | var error = $root.google.datastore.v1.ReadOptions.verify(message.readOptions);
|
14236 | if (error)
|
14237 | return "readOptions." + error;
|
14238 | }
|
14239 | if (message.keys != null && message.hasOwnProperty("keys")) {
|
14240 | if (!Array.isArray(message.keys))
|
14241 | return "keys: array expected";
|
14242 | for (var i = 0; i < message.keys.length; ++i) {
|
14243 | var error = $root.google.datastore.v1.Key.verify(message.keys[i]);
|
14244 | if (error)
|
14245 | return "keys." + error;
|
14246 | }
|
14247 | }
|
14248 | return null;
|
14249 | };
|
14250 |
|
14251 | /**
|
14252 | * Creates a LookupRequest message from a plain object. Also converts values to their respective internal types.
|
14253 | * @function fromObject
|
14254 | * @memberof google.datastore.v1.LookupRequest
|
14255 | * @static
|
14256 | * @param {Object.<string,*>} object Plain object
|
14257 | * @returns {google.datastore.v1.LookupRequest} LookupRequest
|
14258 | */
|
14259 | LookupRequest.fromObject = function fromObject(object) {
|
14260 | if (object instanceof $root.google.datastore.v1.LookupRequest)
|
14261 | return object;
|
14262 | var message = new $root.google.datastore.v1.LookupRequest();
|
14263 | if (object.projectId != null)
|
14264 | message.projectId = String(object.projectId);
|
14265 | if (object.databaseId != null)
|
14266 | message.databaseId = String(object.databaseId);
|
14267 | if (object.readOptions != null) {
|
14268 | if (typeof object.readOptions !== "object")
|
14269 | throw TypeError(".google.datastore.v1.LookupRequest.readOptions: object expected");
|
14270 | message.readOptions = $root.google.datastore.v1.ReadOptions.fromObject(object.readOptions);
|
14271 | }
|
14272 | if (object.keys) {
|
14273 | if (!Array.isArray(object.keys))
|
14274 | throw TypeError(".google.datastore.v1.LookupRequest.keys: array expected");
|
14275 | message.keys = [];
|
14276 | for (var i = 0; i < object.keys.length; ++i) {
|
14277 | if (typeof object.keys[i] !== "object")
|
14278 | throw TypeError(".google.datastore.v1.LookupRequest.keys: object expected");
|
14279 | message.keys[i] = $root.google.datastore.v1.Key.fromObject(object.keys[i]);
|
14280 | }
|
14281 | }
|
14282 | return message;
|
14283 | };
|
14284 |
|
14285 | /**
|
14286 | * Creates a plain object from a LookupRequest message. Also converts values to other types if specified.
|
14287 | * @function toObject
|
14288 | * @memberof google.datastore.v1.LookupRequest
|
14289 | * @static
|
14290 | * @param {google.datastore.v1.LookupRequest} message LookupRequest
|
14291 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
14292 | * @returns {Object.<string,*>} Plain object
|
14293 | */
|
14294 | LookupRequest.toObject = function toObject(message, options) {
|
14295 | if (!options)
|
14296 | options = {};
|
14297 | var object = {};
|
14298 | if (options.arrays || options.defaults)
|
14299 | object.keys = [];
|
14300 | if (options.defaults) {
|
14301 | object.readOptions = null;
|
14302 | object.projectId = "";
|
14303 | object.databaseId = "";
|
14304 | }
|
14305 | if (message.readOptions != null && message.hasOwnProperty("readOptions"))
|
14306 | object.readOptions = $root.google.datastore.v1.ReadOptions.toObject(message.readOptions, options);
|
14307 | if (message.keys && message.keys.length) {
|
14308 | object.keys = [];
|
14309 | for (var j = 0; j < message.keys.length; ++j)
|
14310 | object.keys[j] = $root.google.datastore.v1.Key.toObject(message.keys[j], options);
|
14311 | }
|
14312 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
14313 | object.projectId = message.projectId;
|
14314 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
14315 | object.databaseId = message.databaseId;
|
14316 | return object;
|
14317 | };
|
14318 |
|
14319 | /**
|
14320 | * Converts this LookupRequest to JSON.
|
14321 | * @function toJSON
|
14322 | * @memberof google.datastore.v1.LookupRequest
|
14323 | * @instance
|
14324 | * @returns {Object.<string,*>} JSON object
|
14325 | */
|
14326 | LookupRequest.prototype.toJSON = function toJSON() {
|
14327 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
14328 | };
|
14329 |
|
14330 | /**
|
14331 | * Gets the default type url for LookupRequest
|
14332 | * @function getTypeUrl
|
14333 | * @memberof google.datastore.v1.LookupRequest
|
14334 | * @static
|
14335 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
14336 | * @returns {string} The default type url
|
14337 | */
|
14338 | LookupRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
14339 | if (typeUrlPrefix === undefined) {
|
14340 | typeUrlPrefix = "type.googleapis.com";
|
14341 | }
|
14342 | return typeUrlPrefix + "/google.datastore.v1.LookupRequest";
|
14343 | };
|
14344 |
|
14345 | return LookupRequest;
|
14346 | })();
|
14347 |
|
14348 | v1.LookupResponse = (function() {
|
14349 |
|
14350 | /**
|
14351 | * Properties of a LookupResponse.
|
14352 | * @memberof google.datastore.v1
|
14353 | * @interface ILookupResponse
|
14354 | * @property {Array.<google.datastore.v1.IEntityResult>|null} [found] LookupResponse found
|
14355 | * @property {Array.<google.datastore.v1.IEntityResult>|null} [missing] LookupResponse missing
|
14356 | * @property {Array.<google.datastore.v1.IKey>|null} [deferred] LookupResponse deferred
|
14357 | * @property {Uint8Array|null} [transaction] LookupResponse transaction
|
14358 | * @property {google.protobuf.ITimestamp|null} [readTime] LookupResponse readTime
|
14359 | */
|
14360 |
|
14361 | /**
|
14362 | * Constructs a new LookupResponse.
|
14363 | * @memberof google.datastore.v1
|
14364 | * @classdesc Represents a LookupResponse.
|
14365 | * @implements ILookupResponse
|
14366 | * @constructor
|
14367 | * @param {google.datastore.v1.ILookupResponse=} [properties] Properties to set
|
14368 | */
|
14369 | function LookupResponse(properties) {
|
14370 | this.found = [];
|
14371 | this.missing = [];
|
14372 | this.deferred = [];
|
14373 | if (properties)
|
14374 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
14375 | if (properties[keys[i]] != null)
|
14376 | this[keys[i]] = properties[keys[i]];
|
14377 | }
|
14378 |
|
14379 | /**
|
14380 | * LookupResponse found.
|
14381 | * @member {Array.<google.datastore.v1.IEntityResult>} found
|
14382 | * @memberof google.datastore.v1.LookupResponse
|
14383 | * @instance
|
14384 | */
|
14385 | LookupResponse.prototype.found = $util.emptyArray;
|
14386 |
|
14387 | /**
|
14388 | * LookupResponse missing.
|
14389 | * @member {Array.<google.datastore.v1.IEntityResult>} missing
|
14390 | * @memberof google.datastore.v1.LookupResponse
|
14391 | * @instance
|
14392 | */
|
14393 | LookupResponse.prototype.missing = $util.emptyArray;
|
14394 |
|
14395 | /**
|
14396 | * LookupResponse deferred.
|
14397 | * @member {Array.<google.datastore.v1.IKey>} deferred
|
14398 | * @memberof google.datastore.v1.LookupResponse
|
14399 | * @instance
|
14400 | */
|
14401 | LookupResponse.prototype.deferred = $util.emptyArray;
|
14402 |
|
14403 | /**
|
14404 | * LookupResponse transaction.
|
14405 | * @member {Uint8Array} transaction
|
14406 | * @memberof google.datastore.v1.LookupResponse
|
14407 | * @instance
|
14408 | */
|
14409 | LookupResponse.prototype.transaction = $util.newBuffer([]);
|
14410 |
|
14411 | /**
|
14412 | * LookupResponse readTime.
|
14413 | * @member {google.protobuf.ITimestamp|null|undefined} readTime
|
14414 | * @memberof google.datastore.v1.LookupResponse
|
14415 | * @instance
|
14416 | */
|
14417 | LookupResponse.prototype.readTime = null;
|
14418 |
|
14419 | /**
|
14420 | * Creates a new LookupResponse instance using the specified properties.
|
14421 | * @function create
|
14422 | * @memberof google.datastore.v1.LookupResponse
|
14423 | * @static
|
14424 | * @param {google.datastore.v1.ILookupResponse=} [properties] Properties to set
|
14425 | * @returns {google.datastore.v1.LookupResponse} LookupResponse instance
|
14426 | */
|
14427 | LookupResponse.create = function create(properties) {
|
14428 | return new LookupResponse(properties);
|
14429 | };
|
14430 |
|
14431 | /**
|
14432 | * Encodes the specified LookupResponse message. Does not implicitly {@link google.datastore.v1.LookupResponse.verify|verify} messages.
|
14433 | * @function encode
|
14434 | * @memberof google.datastore.v1.LookupResponse
|
14435 | * @static
|
14436 | * @param {google.datastore.v1.ILookupResponse} message LookupResponse message or plain object to encode
|
14437 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
14438 | * @returns {$protobuf.Writer} Writer
|
14439 | */
|
14440 | LookupResponse.encode = function encode(message, writer) {
|
14441 | if (!writer)
|
14442 | writer = $Writer.create();
|
14443 | if (message.found != null && message.found.length)
|
14444 | for (var i = 0; i < message.found.length; ++i)
|
14445 | $root.google.datastore.v1.EntityResult.encode(message.found[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
14446 | if (message.missing != null && message.missing.length)
|
14447 | for (var i = 0; i < message.missing.length; ++i)
|
14448 | $root.google.datastore.v1.EntityResult.encode(message.missing[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
14449 | if (message.deferred != null && message.deferred.length)
|
14450 | for (var i = 0; i < message.deferred.length; ++i)
|
14451 | $root.google.datastore.v1.Key.encode(message.deferred[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
14452 | if (message.transaction != null && Object.hasOwnProperty.call(message, "transaction"))
|
14453 | writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.transaction);
|
14454 | if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime"))
|
14455 | $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
14456 | return writer;
|
14457 | };
|
14458 |
|
14459 | /**
|
14460 | * Encodes the specified LookupResponse message, length delimited. Does not implicitly {@link google.datastore.v1.LookupResponse.verify|verify} messages.
|
14461 | * @function encodeDelimited
|
14462 | * @memberof google.datastore.v1.LookupResponse
|
14463 | * @static
|
14464 | * @param {google.datastore.v1.ILookupResponse} message LookupResponse message or plain object to encode
|
14465 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
14466 | * @returns {$protobuf.Writer} Writer
|
14467 | */
|
14468 | LookupResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
14469 | return this.encode(message, writer).ldelim();
|
14470 | };
|
14471 |
|
14472 | /**
|
14473 | * Decodes a LookupResponse message from the specified reader or buffer.
|
14474 | * @function decode
|
14475 | * @memberof google.datastore.v1.LookupResponse
|
14476 | * @static
|
14477 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
14478 | * @param {number} [length] Message length if known beforehand
|
14479 | * @returns {google.datastore.v1.LookupResponse} LookupResponse
|
14480 | * @throws {Error} If the payload is not a reader or valid buffer
|
14481 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
14482 | */
|
14483 | LookupResponse.decode = function decode(reader, length) {
|
14484 | if (!(reader instanceof $Reader))
|
14485 | reader = $Reader.create(reader);
|
14486 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.LookupResponse();
|
14487 | while (reader.pos < end) {
|
14488 | var tag = reader.uint32();
|
14489 | switch (tag >>> 3) {
|
14490 | case 1: {
|
14491 | if (!(message.found && message.found.length))
|
14492 | message.found = [];
|
14493 | message.found.push($root.google.datastore.v1.EntityResult.decode(reader, reader.uint32()));
|
14494 | break;
|
14495 | }
|
14496 | case 2: {
|
14497 | if (!(message.missing && message.missing.length))
|
14498 | message.missing = [];
|
14499 | message.missing.push($root.google.datastore.v1.EntityResult.decode(reader, reader.uint32()));
|
14500 | break;
|
14501 | }
|
14502 | case 3: {
|
14503 | if (!(message.deferred && message.deferred.length))
|
14504 | message.deferred = [];
|
14505 | message.deferred.push($root.google.datastore.v1.Key.decode(reader, reader.uint32()));
|
14506 | break;
|
14507 | }
|
14508 | case 5: {
|
14509 | message.transaction = reader.bytes();
|
14510 | break;
|
14511 | }
|
14512 | case 7: {
|
14513 | message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
14514 | break;
|
14515 | }
|
14516 | default:
|
14517 | reader.skipType(tag & 7);
|
14518 | break;
|
14519 | }
|
14520 | }
|
14521 | return message;
|
14522 | };
|
14523 |
|
14524 | /**
|
14525 | * Decodes a LookupResponse message from the specified reader or buffer, length delimited.
|
14526 | * @function decodeDelimited
|
14527 | * @memberof google.datastore.v1.LookupResponse
|
14528 | * @static
|
14529 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
14530 | * @returns {google.datastore.v1.LookupResponse} LookupResponse
|
14531 | * @throws {Error} If the payload is not a reader or valid buffer
|
14532 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
14533 | */
|
14534 | LookupResponse.decodeDelimited = function decodeDelimited(reader) {
|
14535 | if (!(reader instanceof $Reader))
|
14536 | reader = new $Reader(reader);
|
14537 | return this.decode(reader, reader.uint32());
|
14538 | };
|
14539 |
|
14540 | /**
|
14541 | * Verifies a LookupResponse message.
|
14542 | * @function verify
|
14543 | * @memberof google.datastore.v1.LookupResponse
|
14544 | * @static
|
14545 | * @param {Object.<string,*>} message Plain object to verify
|
14546 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
14547 | */
|
14548 | LookupResponse.verify = function verify(message) {
|
14549 | if (typeof message !== "object" || message === null)
|
14550 | return "object expected";
|
14551 | if (message.found != null && message.hasOwnProperty("found")) {
|
14552 | if (!Array.isArray(message.found))
|
14553 | return "found: array expected";
|
14554 | for (var i = 0; i < message.found.length; ++i) {
|
14555 | var error = $root.google.datastore.v1.EntityResult.verify(message.found[i]);
|
14556 | if (error)
|
14557 | return "found." + error;
|
14558 | }
|
14559 | }
|
14560 | if (message.missing != null && message.hasOwnProperty("missing")) {
|
14561 | if (!Array.isArray(message.missing))
|
14562 | return "missing: array expected";
|
14563 | for (var i = 0; i < message.missing.length; ++i) {
|
14564 | var error = $root.google.datastore.v1.EntityResult.verify(message.missing[i]);
|
14565 | if (error)
|
14566 | return "missing." + error;
|
14567 | }
|
14568 | }
|
14569 | if (message.deferred != null && message.hasOwnProperty("deferred")) {
|
14570 | if (!Array.isArray(message.deferred))
|
14571 | return "deferred: array expected";
|
14572 | for (var i = 0; i < message.deferred.length; ++i) {
|
14573 | var error = $root.google.datastore.v1.Key.verify(message.deferred[i]);
|
14574 | if (error)
|
14575 | return "deferred." + error;
|
14576 | }
|
14577 | }
|
14578 | if (message.transaction != null && message.hasOwnProperty("transaction"))
|
14579 | if (!(message.transaction && typeof message.transaction.length === "number" || $util.isString(message.transaction)))
|
14580 | return "transaction: buffer expected";
|
14581 | if (message.readTime != null && message.hasOwnProperty("readTime")) {
|
14582 | var error = $root.google.protobuf.Timestamp.verify(message.readTime);
|
14583 | if (error)
|
14584 | return "readTime." + error;
|
14585 | }
|
14586 | return null;
|
14587 | };
|
14588 |
|
14589 | /**
|
14590 | * Creates a LookupResponse message from a plain object. Also converts values to their respective internal types.
|
14591 | * @function fromObject
|
14592 | * @memberof google.datastore.v1.LookupResponse
|
14593 | * @static
|
14594 | * @param {Object.<string,*>} object Plain object
|
14595 | * @returns {google.datastore.v1.LookupResponse} LookupResponse
|
14596 | */
|
14597 | LookupResponse.fromObject = function fromObject(object) {
|
14598 | if (object instanceof $root.google.datastore.v1.LookupResponse)
|
14599 | return object;
|
14600 | var message = new $root.google.datastore.v1.LookupResponse();
|
14601 | if (object.found) {
|
14602 | if (!Array.isArray(object.found))
|
14603 | throw TypeError(".google.datastore.v1.LookupResponse.found: array expected");
|
14604 | message.found = [];
|
14605 | for (var i = 0; i < object.found.length; ++i) {
|
14606 | if (typeof object.found[i] !== "object")
|
14607 | throw TypeError(".google.datastore.v1.LookupResponse.found: object expected");
|
14608 | message.found[i] = $root.google.datastore.v1.EntityResult.fromObject(object.found[i]);
|
14609 | }
|
14610 | }
|
14611 | if (object.missing) {
|
14612 | if (!Array.isArray(object.missing))
|
14613 | throw TypeError(".google.datastore.v1.LookupResponse.missing: array expected");
|
14614 | message.missing = [];
|
14615 | for (var i = 0; i < object.missing.length; ++i) {
|
14616 | if (typeof object.missing[i] !== "object")
|
14617 | throw TypeError(".google.datastore.v1.LookupResponse.missing: object expected");
|
14618 | message.missing[i] = $root.google.datastore.v1.EntityResult.fromObject(object.missing[i]);
|
14619 | }
|
14620 | }
|
14621 | if (object.deferred) {
|
14622 | if (!Array.isArray(object.deferred))
|
14623 | throw TypeError(".google.datastore.v1.LookupResponse.deferred: array expected");
|
14624 | message.deferred = [];
|
14625 | for (var i = 0; i < object.deferred.length; ++i) {
|
14626 | if (typeof object.deferred[i] !== "object")
|
14627 | throw TypeError(".google.datastore.v1.LookupResponse.deferred: object expected");
|
14628 | message.deferred[i] = $root.google.datastore.v1.Key.fromObject(object.deferred[i]);
|
14629 | }
|
14630 | }
|
14631 | if (object.transaction != null)
|
14632 | if (typeof object.transaction === "string")
|
14633 | $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0);
|
14634 | else if (object.transaction.length >= 0)
|
14635 | message.transaction = object.transaction;
|
14636 | if (object.readTime != null) {
|
14637 | if (typeof object.readTime !== "object")
|
14638 | throw TypeError(".google.datastore.v1.LookupResponse.readTime: object expected");
|
14639 | message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime);
|
14640 | }
|
14641 | return message;
|
14642 | };
|
14643 |
|
14644 | /**
|
14645 | * Creates a plain object from a LookupResponse message. Also converts values to other types if specified.
|
14646 | * @function toObject
|
14647 | * @memberof google.datastore.v1.LookupResponse
|
14648 | * @static
|
14649 | * @param {google.datastore.v1.LookupResponse} message LookupResponse
|
14650 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
14651 | * @returns {Object.<string,*>} Plain object
|
14652 | */
|
14653 | LookupResponse.toObject = function toObject(message, options) {
|
14654 | if (!options)
|
14655 | options = {};
|
14656 | var object = {};
|
14657 | if (options.arrays || options.defaults) {
|
14658 | object.found = [];
|
14659 | object.missing = [];
|
14660 | object.deferred = [];
|
14661 | }
|
14662 | if (options.defaults) {
|
14663 | if (options.bytes === String)
|
14664 | object.transaction = "";
|
14665 | else {
|
14666 | object.transaction = [];
|
14667 | if (options.bytes !== Array)
|
14668 | object.transaction = $util.newBuffer(object.transaction);
|
14669 | }
|
14670 | object.readTime = null;
|
14671 | }
|
14672 | if (message.found && message.found.length) {
|
14673 | object.found = [];
|
14674 | for (var j = 0; j < message.found.length; ++j)
|
14675 | object.found[j] = $root.google.datastore.v1.EntityResult.toObject(message.found[j], options);
|
14676 | }
|
14677 | if (message.missing && message.missing.length) {
|
14678 | object.missing = [];
|
14679 | for (var j = 0; j < message.missing.length; ++j)
|
14680 | object.missing[j] = $root.google.datastore.v1.EntityResult.toObject(message.missing[j], options);
|
14681 | }
|
14682 | if (message.deferred && message.deferred.length) {
|
14683 | object.deferred = [];
|
14684 | for (var j = 0; j < message.deferred.length; ++j)
|
14685 | object.deferred[j] = $root.google.datastore.v1.Key.toObject(message.deferred[j], options);
|
14686 | }
|
14687 | if (message.transaction != null && message.hasOwnProperty("transaction"))
|
14688 | object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction;
|
14689 | if (message.readTime != null && message.hasOwnProperty("readTime"))
|
14690 | object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options);
|
14691 | return object;
|
14692 | };
|
14693 |
|
14694 | /**
|
14695 | * Converts this LookupResponse to JSON.
|
14696 | * @function toJSON
|
14697 | * @memberof google.datastore.v1.LookupResponse
|
14698 | * @instance
|
14699 | * @returns {Object.<string,*>} JSON object
|
14700 | */
|
14701 | LookupResponse.prototype.toJSON = function toJSON() {
|
14702 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
14703 | };
|
14704 |
|
14705 | /**
|
14706 | * Gets the default type url for LookupResponse
|
14707 | * @function getTypeUrl
|
14708 | * @memberof google.datastore.v1.LookupResponse
|
14709 | * @static
|
14710 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
14711 | * @returns {string} The default type url
|
14712 | */
|
14713 | LookupResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
14714 | if (typeUrlPrefix === undefined) {
|
14715 | typeUrlPrefix = "type.googleapis.com";
|
14716 | }
|
14717 | return typeUrlPrefix + "/google.datastore.v1.LookupResponse";
|
14718 | };
|
14719 |
|
14720 | return LookupResponse;
|
14721 | })();
|
14722 |
|
14723 | v1.RunQueryRequest = (function() {
|
14724 |
|
14725 | /**
|
14726 | * Properties of a RunQueryRequest.
|
14727 | * @memberof google.datastore.v1
|
14728 | * @interface IRunQueryRequest
|
14729 | * @property {string|null} [projectId] RunQueryRequest projectId
|
14730 | * @property {string|null} [databaseId] RunQueryRequest databaseId
|
14731 | * @property {google.datastore.v1.IPartitionId|null} [partitionId] RunQueryRequest partitionId
|
14732 | * @property {google.datastore.v1.IReadOptions|null} [readOptions] RunQueryRequest readOptions
|
14733 | * @property {google.datastore.v1.IQuery|null} [query] RunQueryRequest query
|
14734 | * @property {google.datastore.v1.IGqlQuery|null} [gqlQuery] RunQueryRequest gqlQuery
|
14735 | */
|
14736 |
|
14737 | /**
|
14738 | * Constructs a new RunQueryRequest.
|
14739 | * @memberof google.datastore.v1
|
14740 | * @classdesc Represents a RunQueryRequest.
|
14741 | * @implements IRunQueryRequest
|
14742 | * @constructor
|
14743 | * @param {google.datastore.v1.IRunQueryRequest=} [properties] Properties to set
|
14744 | */
|
14745 | function RunQueryRequest(properties) {
|
14746 | if (properties)
|
14747 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
14748 | if (properties[keys[i]] != null)
|
14749 | this[keys[i]] = properties[keys[i]];
|
14750 | }
|
14751 |
|
14752 | /**
|
14753 | * RunQueryRequest projectId.
|
14754 | * @member {string} projectId
|
14755 | * @memberof google.datastore.v1.RunQueryRequest
|
14756 | * @instance
|
14757 | */
|
14758 | RunQueryRequest.prototype.projectId = "";
|
14759 |
|
14760 | /**
|
14761 | * RunQueryRequest databaseId.
|
14762 | * @member {string} databaseId
|
14763 | * @memberof google.datastore.v1.RunQueryRequest
|
14764 | * @instance
|
14765 | */
|
14766 | RunQueryRequest.prototype.databaseId = "";
|
14767 |
|
14768 | /**
|
14769 | * RunQueryRequest partitionId.
|
14770 | * @member {google.datastore.v1.IPartitionId|null|undefined} partitionId
|
14771 | * @memberof google.datastore.v1.RunQueryRequest
|
14772 | * @instance
|
14773 | */
|
14774 | RunQueryRequest.prototype.partitionId = null;
|
14775 |
|
14776 | /**
|
14777 | * RunQueryRequest readOptions.
|
14778 | * @member {google.datastore.v1.IReadOptions|null|undefined} readOptions
|
14779 | * @memberof google.datastore.v1.RunQueryRequest
|
14780 | * @instance
|
14781 | */
|
14782 | RunQueryRequest.prototype.readOptions = null;
|
14783 |
|
14784 | /**
|
14785 | * RunQueryRequest query.
|
14786 | * @member {google.datastore.v1.IQuery|null|undefined} query
|
14787 | * @memberof google.datastore.v1.RunQueryRequest
|
14788 | * @instance
|
14789 | */
|
14790 | RunQueryRequest.prototype.query = null;
|
14791 |
|
14792 | /**
|
14793 | * RunQueryRequest gqlQuery.
|
14794 | * @member {google.datastore.v1.IGqlQuery|null|undefined} gqlQuery
|
14795 | * @memberof google.datastore.v1.RunQueryRequest
|
14796 | * @instance
|
14797 | */
|
14798 | RunQueryRequest.prototype.gqlQuery = null;
|
14799 |
|
14800 | // OneOf field names bound to virtual getters and setters
|
14801 | var $oneOfFields;
|
14802 |
|
14803 | /**
|
14804 | * RunQueryRequest queryType.
|
14805 | * @member {"query"|"gqlQuery"|undefined} queryType
|
14806 | * @memberof google.datastore.v1.RunQueryRequest
|
14807 | * @instance
|
14808 | */
|
14809 | Object.defineProperty(RunQueryRequest.prototype, "queryType", {
|
14810 | get: $util.oneOfGetter($oneOfFields = ["query", "gqlQuery"]),
|
14811 | set: $util.oneOfSetter($oneOfFields)
|
14812 | });
|
14813 |
|
14814 | /**
|
14815 | * Creates a new RunQueryRequest instance using the specified properties.
|
14816 | * @function create
|
14817 | * @memberof google.datastore.v1.RunQueryRequest
|
14818 | * @static
|
14819 | * @param {google.datastore.v1.IRunQueryRequest=} [properties] Properties to set
|
14820 | * @returns {google.datastore.v1.RunQueryRequest} RunQueryRequest instance
|
14821 | */
|
14822 | RunQueryRequest.create = function create(properties) {
|
14823 | return new RunQueryRequest(properties);
|
14824 | };
|
14825 |
|
14826 | /**
|
14827 | * Encodes the specified RunQueryRequest message. Does not implicitly {@link google.datastore.v1.RunQueryRequest.verify|verify} messages.
|
14828 | * @function encode
|
14829 | * @memberof google.datastore.v1.RunQueryRequest
|
14830 | * @static
|
14831 | * @param {google.datastore.v1.IRunQueryRequest} message RunQueryRequest message or plain object to encode
|
14832 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
14833 | * @returns {$protobuf.Writer} Writer
|
14834 | */
|
14835 | RunQueryRequest.encode = function encode(message, writer) {
|
14836 | if (!writer)
|
14837 | writer = $Writer.create();
|
14838 | if (message.readOptions != null && Object.hasOwnProperty.call(message, "readOptions"))
|
14839 | $root.google.datastore.v1.ReadOptions.encode(message.readOptions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
14840 | if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId"))
|
14841 | $root.google.datastore.v1.PartitionId.encode(message.partitionId, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
14842 | if (message.query != null && Object.hasOwnProperty.call(message, "query"))
|
14843 | $root.google.datastore.v1.Query.encode(message.query, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
14844 | if (message.gqlQuery != null && Object.hasOwnProperty.call(message, "gqlQuery"))
|
14845 | $root.google.datastore.v1.GqlQuery.encode(message.gqlQuery, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
14846 | if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
|
14847 | writer.uint32(/* id 8, wireType 2 =*/66).string(message.projectId);
|
14848 | if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId"))
|
14849 | writer.uint32(/* id 9, wireType 2 =*/74).string(message.databaseId);
|
14850 | return writer;
|
14851 | };
|
14852 |
|
14853 | /**
|
14854 | * Encodes the specified RunQueryRequest message, length delimited. Does not implicitly {@link google.datastore.v1.RunQueryRequest.verify|verify} messages.
|
14855 | * @function encodeDelimited
|
14856 | * @memberof google.datastore.v1.RunQueryRequest
|
14857 | * @static
|
14858 | * @param {google.datastore.v1.IRunQueryRequest} message RunQueryRequest message or plain object to encode
|
14859 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
14860 | * @returns {$protobuf.Writer} Writer
|
14861 | */
|
14862 | RunQueryRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
14863 | return this.encode(message, writer).ldelim();
|
14864 | };
|
14865 |
|
14866 | /**
|
14867 | * Decodes a RunQueryRequest message from the specified reader or buffer.
|
14868 | * @function decode
|
14869 | * @memberof google.datastore.v1.RunQueryRequest
|
14870 | * @static
|
14871 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
14872 | * @param {number} [length] Message length if known beforehand
|
14873 | * @returns {google.datastore.v1.RunQueryRequest} RunQueryRequest
|
14874 | * @throws {Error} If the payload is not a reader or valid buffer
|
14875 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
14876 | */
|
14877 | RunQueryRequest.decode = function decode(reader, length) {
|
14878 | if (!(reader instanceof $Reader))
|
14879 | reader = $Reader.create(reader);
|
14880 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.RunQueryRequest();
|
14881 | while (reader.pos < end) {
|
14882 | var tag = reader.uint32();
|
14883 | switch (tag >>> 3) {
|
14884 | case 8: {
|
14885 | message.projectId = reader.string();
|
14886 | break;
|
14887 | }
|
14888 | case 9: {
|
14889 | message.databaseId = reader.string();
|
14890 | break;
|
14891 | }
|
14892 | case 2: {
|
14893 | message.partitionId = $root.google.datastore.v1.PartitionId.decode(reader, reader.uint32());
|
14894 | break;
|
14895 | }
|
14896 | case 1: {
|
14897 | message.readOptions = $root.google.datastore.v1.ReadOptions.decode(reader, reader.uint32());
|
14898 | break;
|
14899 | }
|
14900 | case 3: {
|
14901 | message.query = $root.google.datastore.v1.Query.decode(reader, reader.uint32());
|
14902 | break;
|
14903 | }
|
14904 | case 7: {
|
14905 | message.gqlQuery = $root.google.datastore.v1.GqlQuery.decode(reader, reader.uint32());
|
14906 | break;
|
14907 | }
|
14908 | default:
|
14909 | reader.skipType(tag & 7);
|
14910 | break;
|
14911 | }
|
14912 | }
|
14913 | return message;
|
14914 | };
|
14915 |
|
14916 | /**
|
14917 | * Decodes a RunQueryRequest message from the specified reader or buffer, length delimited.
|
14918 | * @function decodeDelimited
|
14919 | * @memberof google.datastore.v1.RunQueryRequest
|
14920 | * @static
|
14921 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
14922 | * @returns {google.datastore.v1.RunQueryRequest} RunQueryRequest
|
14923 | * @throws {Error} If the payload is not a reader or valid buffer
|
14924 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
14925 | */
|
14926 | RunQueryRequest.decodeDelimited = function decodeDelimited(reader) {
|
14927 | if (!(reader instanceof $Reader))
|
14928 | reader = new $Reader(reader);
|
14929 | return this.decode(reader, reader.uint32());
|
14930 | };
|
14931 |
|
14932 | /**
|
14933 | * Verifies a RunQueryRequest message.
|
14934 | * @function verify
|
14935 | * @memberof google.datastore.v1.RunQueryRequest
|
14936 | * @static
|
14937 | * @param {Object.<string,*>} message Plain object to verify
|
14938 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
14939 | */
|
14940 | RunQueryRequest.verify = function verify(message) {
|
14941 | if (typeof message !== "object" || message === null)
|
14942 | return "object expected";
|
14943 | var properties = {};
|
14944 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
14945 | if (!$util.isString(message.projectId))
|
14946 | return "projectId: string expected";
|
14947 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
14948 | if (!$util.isString(message.databaseId))
|
14949 | return "databaseId: string expected";
|
14950 | if (message.partitionId != null && message.hasOwnProperty("partitionId")) {
|
14951 | var error = $root.google.datastore.v1.PartitionId.verify(message.partitionId);
|
14952 | if (error)
|
14953 | return "partitionId." + error;
|
14954 | }
|
14955 | if (message.readOptions != null && message.hasOwnProperty("readOptions")) {
|
14956 | var error = $root.google.datastore.v1.ReadOptions.verify(message.readOptions);
|
14957 | if (error)
|
14958 | return "readOptions." + error;
|
14959 | }
|
14960 | if (message.query != null && message.hasOwnProperty("query")) {
|
14961 | properties.queryType = 1;
|
14962 | {
|
14963 | var error = $root.google.datastore.v1.Query.verify(message.query);
|
14964 | if (error)
|
14965 | return "query." + error;
|
14966 | }
|
14967 | }
|
14968 | if (message.gqlQuery != null && message.hasOwnProperty("gqlQuery")) {
|
14969 | if (properties.queryType === 1)
|
14970 | return "queryType: multiple values";
|
14971 | properties.queryType = 1;
|
14972 | {
|
14973 | var error = $root.google.datastore.v1.GqlQuery.verify(message.gqlQuery);
|
14974 | if (error)
|
14975 | return "gqlQuery." + error;
|
14976 | }
|
14977 | }
|
14978 | return null;
|
14979 | };
|
14980 |
|
14981 | /**
|
14982 | * Creates a RunQueryRequest message from a plain object. Also converts values to their respective internal types.
|
14983 | * @function fromObject
|
14984 | * @memberof google.datastore.v1.RunQueryRequest
|
14985 | * @static
|
14986 | * @param {Object.<string,*>} object Plain object
|
14987 | * @returns {google.datastore.v1.RunQueryRequest} RunQueryRequest
|
14988 | */
|
14989 | RunQueryRequest.fromObject = function fromObject(object) {
|
14990 | if (object instanceof $root.google.datastore.v1.RunQueryRequest)
|
14991 | return object;
|
14992 | var message = new $root.google.datastore.v1.RunQueryRequest();
|
14993 | if (object.projectId != null)
|
14994 | message.projectId = String(object.projectId);
|
14995 | if (object.databaseId != null)
|
14996 | message.databaseId = String(object.databaseId);
|
14997 | if (object.partitionId != null) {
|
14998 | if (typeof object.partitionId !== "object")
|
14999 | throw TypeError(".google.datastore.v1.RunQueryRequest.partitionId: object expected");
|
15000 | message.partitionId = $root.google.datastore.v1.PartitionId.fromObject(object.partitionId);
|
15001 | }
|
15002 | if (object.readOptions != null) {
|
15003 | if (typeof object.readOptions !== "object")
|
15004 | throw TypeError(".google.datastore.v1.RunQueryRequest.readOptions: object expected");
|
15005 | message.readOptions = $root.google.datastore.v1.ReadOptions.fromObject(object.readOptions);
|
15006 | }
|
15007 | if (object.query != null) {
|
15008 | if (typeof object.query !== "object")
|
15009 | throw TypeError(".google.datastore.v1.RunQueryRequest.query: object expected");
|
15010 | message.query = $root.google.datastore.v1.Query.fromObject(object.query);
|
15011 | }
|
15012 | if (object.gqlQuery != null) {
|
15013 | if (typeof object.gqlQuery !== "object")
|
15014 | throw TypeError(".google.datastore.v1.RunQueryRequest.gqlQuery: object expected");
|
15015 | message.gqlQuery = $root.google.datastore.v1.GqlQuery.fromObject(object.gqlQuery);
|
15016 | }
|
15017 | return message;
|
15018 | };
|
15019 |
|
15020 | /**
|
15021 | * Creates a plain object from a RunQueryRequest message. Also converts values to other types if specified.
|
15022 | * @function toObject
|
15023 | * @memberof google.datastore.v1.RunQueryRequest
|
15024 | * @static
|
15025 | * @param {google.datastore.v1.RunQueryRequest} message RunQueryRequest
|
15026 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
15027 | * @returns {Object.<string,*>} Plain object
|
15028 | */
|
15029 | RunQueryRequest.toObject = function toObject(message, options) {
|
15030 | if (!options)
|
15031 | options = {};
|
15032 | var object = {};
|
15033 | if (options.defaults) {
|
15034 | object.readOptions = null;
|
15035 | object.partitionId = null;
|
15036 | object.projectId = "";
|
15037 | object.databaseId = "";
|
15038 | }
|
15039 | if (message.readOptions != null && message.hasOwnProperty("readOptions"))
|
15040 | object.readOptions = $root.google.datastore.v1.ReadOptions.toObject(message.readOptions, options);
|
15041 | if (message.partitionId != null && message.hasOwnProperty("partitionId"))
|
15042 | object.partitionId = $root.google.datastore.v1.PartitionId.toObject(message.partitionId, options);
|
15043 | if (message.query != null && message.hasOwnProperty("query")) {
|
15044 | object.query = $root.google.datastore.v1.Query.toObject(message.query, options);
|
15045 | if (options.oneofs)
|
15046 | object.queryType = "query";
|
15047 | }
|
15048 | if (message.gqlQuery != null && message.hasOwnProperty("gqlQuery")) {
|
15049 | object.gqlQuery = $root.google.datastore.v1.GqlQuery.toObject(message.gqlQuery, options);
|
15050 | if (options.oneofs)
|
15051 | object.queryType = "gqlQuery";
|
15052 | }
|
15053 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
15054 | object.projectId = message.projectId;
|
15055 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
15056 | object.databaseId = message.databaseId;
|
15057 | return object;
|
15058 | };
|
15059 |
|
15060 | /**
|
15061 | * Converts this RunQueryRequest to JSON.
|
15062 | * @function toJSON
|
15063 | * @memberof google.datastore.v1.RunQueryRequest
|
15064 | * @instance
|
15065 | * @returns {Object.<string,*>} JSON object
|
15066 | */
|
15067 | RunQueryRequest.prototype.toJSON = function toJSON() {
|
15068 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
15069 | };
|
15070 |
|
15071 | /**
|
15072 | * Gets the default type url for RunQueryRequest
|
15073 | * @function getTypeUrl
|
15074 | * @memberof google.datastore.v1.RunQueryRequest
|
15075 | * @static
|
15076 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
15077 | * @returns {string} The default type url
|
15078 | */
|
15079 | RunQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
15080 | if (typeUrlPrefix === undefined) {
|
15081 | typeUrlPrefix = "type.googleapis.com";
|
15082 | }
|
15083 | return typeUrlPrefix + "/google.datastore.v1.RunQueryRequest";
|
15084 | };
|
15085 |
|
15086 | return RunQueryRequest;
|
15087 | })();
|
15088 |
|
15089 | v1.RunQueryResponse = (function() {
|
15090 |
|
15091 | /**
|
15092 | * Properties of a RunQueryResponse.
|
15093 | * @memberof google.datastore.v1
|
15094 | * @interface IRunQueryResponse
|
15095 | * @property {google.datastore.v1.IQueryResultBatch|null} [batch] RunQueryResponse batch
|
15096 | * @property {google.datastore.v1.IQuery|null} [query] RunQueryResponse query
|
15097 | * @property {Uint8Array|null} [transaction] RunQueryResponse transaction
|
15098 | */
|
15099 |
|
15100 | /**
|
15101 | * Constructs a new RunQueryResponse.
|
15102 | * @memberof google.datastore.v1
|
15103 | * @classdesc Represents a RunQueryResponse.
|
15104 | * @implements IRunQueryResponse
|
15105 | * @constructor
|
15106 | * @param {google.datastore.v1.IRunQueryResponse=} [properties] Properties to set
|
15107 | */
|
15108 | function RunQueryResponse(properties) {
|
15109 | if (properties)
|
15110 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
15111 | if (properties[keys[i]] != null)
|
15112 | this[keys[i]] = properties[keys[i]];
|
15113 | }
|
15114 |
|
15115 | /**
|
15116 | * RunQueryResponse batch.
|
15117 | * @member {google.datastore.v1.IQueryResultBatch|null|undefined} batch
|
15118 | * @memberof google.datastore.v1.RunQueryResponse
|
15119 | * @instance
|
15120 | */
|
15121 | RunQueryResponse.prototype.batch = null;
|
15122 |
|
15123 | /**
|
15124 | * RunQueryResponse query.
|
15125 | * @member {google.datastore.v1.IQuery|null|undefined} query
|
15126 | * @memberof google.datastore.v1.RunQueryResponse
|
15127 | * @instance
|
15128 | */
|
15129 | RunQueryResponse.prototype.query = null;
|
15130 |
|
15131 | /**
|
15132 | * RunQueryResponse transaction.
|
15133 | * @member {Uint8Array} transaction
|
15134 | * @memberof google.datastore.v1.RunQueryResponse
|
15135 | * @instance
|
15136 | */
|
15137 | RunQueryResponse.prototype.transaction = $util.newBuffer([]);
|
15138 |
|
15139 | /**
|
15140 | * Creates a new RunQueryResponse instance using the specified properties.
|
15141 | * @function create
|
15142 | * @memberof google.datastore.v1.RunQueryResponse
|
15143 | * @static
|
15144 | * @param {google.datastore.v1.IRunQueryResponse=} [properties] Properties to set
|
15145 | * @returns {google.datastore.v1.RunQueryResponse} RunQueryResponse instance
|
15146 | */
|
15147 | RunQueryResponse.create = function create(properties) {
|
15148 | return new RunQueryResponse(properties);
|
15149 | };
|
15150 |
|
15151 | /**
|
15152 | * Encodes the specified RunQueryResponse message. Does not implicitly {@link google.datastore.v1.RunQueryResponse.verify|verify} messages.
|
15153 | * @function encode
|
15154 | * @memberof google.datastore.v1.RunQueryResponse
|
15155 | * @static
|
15156 | * @param {google.datastore.v1.IRunQueryResponse} message RunQueryResponse message or plain object to encode
|
15157 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
15158 | * @returns {$protobuf.Writer} Writer
|
15159 | */
|
15160 | RunQueryResponse.encode = function encode(message, writer) {
|
15161 | if (!writer)
|
15162 | writer = $Writer.create();
|
15163 | if (message.batch != null && Object.hasOwnProperty.call(message, "batch"))
|
15164 | $root.google.datastore.v1.QueryResultBatch.encode(message.batch, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
15165 | if (message.query != null && Object.hasOwnProperty.call(message, "query"))
|
15166 | $root.google.datastore.v1.Query.encode(message.query, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
15167 | if (message.transaction != null && Object.hasOwnProperty.call(message, "transaction"))
|
15168 | writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.transaction);
|
15169 | return writer;
|
15170 | };
|
15171 |
|
15172 | /**
|
15173 | * Encodes the specified RunQueryResponse message, length delimited. Does not implicitly {@link google.datastore.v1.RunQueryResponse.verify|verify} messages.
|
15174 | * @function encodeDelimited
|
15175 | * @memberof google.datastore.v1.RunQueryResponse
|
15176 | * @static
|
15177 | * @param {google.datastore.v1.IRunQueryResponse} message RunQueryResponse message or plain object to encode
|
15178 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
15179 | * @returns {$protobuf.Writer} Writer
|
15180 | */
|
15181 | RunQueryResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
15182 | return this.encode(message, writer).ldelim();
|
15183 | };
|
15184 |
|
15185 | /**
|
15186 | * Decodes a RunQueryResponse message from the specified reader or buffer.
|
15187 | * @function decode
|
15188 | * @memberof google.datastore.v1.RunQueryResponse
|
15189 | * @static
|
15190 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
15191 | * @param {number} [length] Message length if known beforehand
|
15192 | * @returns {google.datastore.v1.RunQueryResponse} RunQueryResponse
|
15193 | * @throws {Error} If the payload is not a reader or valid buffer
|
15194 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
15195 | */
|
15196 | RunQueryResponse.decode = function decode(reader, length) {
|
15197 | if (!(reader instanceof $Reader))
|
15198 | reader = $Reader.create(reader);
|
15199 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.RunQueryResponse();
|
15200 | while (reader.pos < end) {
|
15201 | var tag = reader.uint32();
|
15202 | switch (tag >>> 3) {
|
15203 | case 1: {
|
15204 | message.batch = $root.google.datastore.v1.QueryResultBatch.decode(reader, reader.uint32());
|
15205 | break;
|
15206 | }
|
15207 | case 2: {
|
15208 | message.query = $root.google.datastore.v1.Query.decode(reader, reader.uint32());
|
15209 | break;
|
15210 | }
|
15211 | case 5: {
|
15212 | message.transaction = reader.bytes();
|
15213 | break;
|
15214 | }
|
15215 | default:
|
15216 | reader.skipType(tag & 7);
|
15217 | break;
|
15218 | }
|
15219 | }
|
15220 | return message;
|
15221 | };
|
15222 |
|
15223 | /**
|
15224 | * Decodes a RunQueryResponse message from the specified reader or buffer, length delimited.
|
15225 | * @function decodeDelimited
|
15226 | * @memberof google.datastore.v1.RunQueryResponse
|
15227 | * @static
|
15228 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
15229 | * @returns {google.datastore.v1.RunQueryResponse} RunQueryResponse
|
15230 | * @throws {Error} If the payload is not a reader or valid buffer
|
15231 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
15232 | */
|
15233 | RunQueryResponse.decodeDelimited = function decodeDelimited(reader) {
|
15234 | if (!(reader instanceof $Reader))
|
15235 | reader = new $Reader(reader);
|
15236 | return this.decode(reader, reader.uint32());
|
15237 | };
|
15238 |
|
15239 | /**
|
15240 | * Verifies a RunQueryResponse message.
|
15241 | * @function verify
|
15242 | * @memberof google.datastore.v1.RunQueryResponse
|
15243 | * @static
|
15244 | * @param {Object.<string,*>} message Plain object to verify
|
15245 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
15246 | */
|
15247 | RunQueryResponse.verify = function verify(message) {
|
15248 | if (typeof message !== "object" || message === null)
|
15249 | return "object expected";
|
15250 | if (message.batch != null && message.hasOwnProperty("batch")) {
|
15251 | var error = $root.google.datastore.v1.QueryResultBatch.verify(message.batch);
|
15252 | if (error)
|
15253 | return "batch." + error;
|
15254 | }
|
15255 | if (message.query != null && message.hasOwnProperty("query")) {
|
15256 | var error = $root.google.datastore.v1.Query.verify(message.query);
|
15257 | if (error)
|
15258 | return "query." + error;
|
15259 | }
|
15260 | if (message.transaction != null && message.hasOwnProperty("transaction"))
|
15261 | if (!(message.transaction && typeof message.transaction.length === "number" || $util.isString(message.transaction)))
|
15262 | return "transaction: buffer expected";
|
15263 | return null;
|
15264 | };
|
15265 |
|
15266 | /**
|
15267 | * Creates a RunQueryResponse message from a plain object. Also converts values to their respective internal types.
|
15268 | * @function fromObject
|
15269 | * @memberof google.datastore.v1.RunQueryResponse
|
15270 | * @static
|
15271 | * @param {Object.<string,*>} object Plain object
|
15272 | * @returns {google.datastore.v1.RunQueryResponse} RunQueryResponse
|
15273 | */
|
15274 | RunQueryResponse.fromObject = function fromObject(object) {
|
15275 | if (object instanceof $root.google.datastore.v1.RunQueryResponse)
|
15276 | return object;
|
15277 | var message = new $root.google.datastore.v1.RunQueryResponse();
|
15278 | if (object.batch != null) {
|
15279 | if (typeof object.batch !== "object")
|
15280 | throw TypeError(".google.datastore.v1.RunQueryResponse.batch: object expected");
|
15281 | message.batch = $root.google.datastore.v1.QueryResultBatch.fromObject(object.batch);
|
15282 | }
|
15283 | if (object.query != null) {
|
15284 | if (typeof object.query !== "object")
|
15285 | throw TypeError(".google.datastore.v1.RunQueryResponse.query: object expected");
|
15286 | message.query = $root.google.datastore.v1.Query.fromObject(object.query);
|
15287 | }
|
15288 | if (object.transaction != null)
|
15289 | if (typeof object.transaction === "string")
|
15290 | $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0);
|
15291 | else if (object.transaction.length >= 0)
|
15292 | message.transaction = object.transaction;
|
15293 | return message;
|
15294 | };
|
15295 |
|
15296 | /**
|
15297 | * Creates a plain object from a RunQueryResponse message. Also converts values to other types if specified.
|
15298 | * @function toObject
|
15299 | * @memberof google.datastore.v1.RunQueryResponse
|
15300 | * @static
|
15301 | * @param {google.datastore.v1.RunQueryResponse} message RunQueryResponse
|
15302 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
15303 | * @returns {Object.<string,*>} Plain object
|
15304 | */
|
15305 | RunQueryResponse.toObject = function toObject(message, options) {
|
15306 | if (!options)
|
15307 | options = {};
|
15308 | var object = {};
|
15309 | if (options.defaults) {
|
15310 | object.batch = null;
|
15311 | object.query = null;
|
15312 | if (options.bytes === String)
|
15313 | object.transaction = "";
|
15314 | else {
|
15315 | object.transaction = [];
|
15316 | if (options.bytes !== Array)
|
15317 | object.transaction = $util.newBuffer(object.transaction);
|
15318 | }
|
15319 | }
|
15320 | if (message.batch != null && message.hasOwnProperty("batch"))
|
15321 | object.batch = $root.google.datastore.v1.QueryResultBatch.toObject(message.batch, options);
|
15322 | if (message.query != null && message.hasOwnProperty("query"))
|
15323 | object.query = $root.google.datastore.v1.Query.toObject(message.query, options);
|
15324 | if (message.transaction != null && message.hasOwnProperty("transaction"))
|
15325 | object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction;
|
15326 | return object;
|
15327 | };
|
15328 |
|
15329 | /**
|
15330 | * Converts this RunQueryResponse to JSON.
|
15331 | * @function toJSON
|
15332 | * @memberof google.datastore.v1.RunQueryResponse
|
15333 | * @instance
|
15334 | * @returns {Object.<string,*>} JSON object
|
15335 | */
|
15336 | RunQueryResponse.prototype.toJSON = function toJSON() {
|
15337 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
15338 | };
|
15339 |
|
15340 | /**
|
15341 | * Gets the default type url for RunQueryResponse
|
15342 | * @function getTypeUrl
|
15343 | * @memberof google.datastore.v1.RunQueryResponse
|
15344 | * @static
|
15345 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
15346 | * @returns {string} The default type url
|
15347 | */
|
15348 | RunQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
15349 | if (typeUrlPrefix === undefined) {
|
15350 | typeUrlPrefix = "type.googleapis.com";
|
15351 | }
|
15352 | return typeUrlPrefix + "/google.datastore.v1.RunQueryResponse";
|
15353 | };
|
15354 |
|
15355 | return RunQueryResponse;
|
15356 | })();
|
15357 |
|
15358 | v1.RunAggregationQueryRequest = (function() {
|
15359 |
|
15360 | /**
|
15361 | * Properties of a RunAggregationQueryRequest.
|
15362 | * @memberof google.datastore.v1
|
15363 | * @interface IRunAggregationQueryRequest
|
15364 | * @property {string|null} [projectId] RunAggregationQueryRequest projectId
|
15365 | * @property {string|null} [databaseId] RunAggregationQueryRequest databaseId
|
15366 | * @property {google.datastore.v1.IPartitionId|null} [partitionId] RunAggregationQueryRequest partitionId
|
15367 | * @property {google.datastore.v1.IReadOptions|null} [readOptions] RunAggregationQueryRequest readOptions
|
15368 | * @property {google.datastore.v1.IAggregationQuery|null} [aggregationQuery] RunAggregationQueryRequest aggregationQuery
|
15369 | * @property {google.datastore.v1.IGqlQuery|null} [gqlQuery] RunAggregationQueryRequest gqlQuery
|
15370 | */
|
15371 |
|
15372 | /**
|
15373 | * Constructs a new RunAggregationQueryRequest.
|
15374 | * @memberof google.datastore.v1
|
15375 | * @classdesc Represents a RunAggregationQueryRequest.
|
15376 | * @implements IRunAggregationQueryRequest
|
15377 | * @constructor
|
15378 | * @param {google.datastore.v1.IRunAggregationQueryRequest=} [properties] Properties to set
|
15379 | */
|
15380 | function RunAggregationQueryRequest(properties) {
|
15381 | if (properties)
|
15382 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
15383 | if (properties[keys[i]] != null)
|
15384 | this[keys[i]] = properties[keys[i]];
|
15385 | }
|
15386 |
|
15387 | /**
|
15388 | * RunAggregationQueryRequest projectId.
|
15389 | * @member {string} projectId
|
15390 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15391 | * @instance
|
15392 | */
|
15393 | RunAggregationQueryRequest.prototype.projectId = "";
|
15394 |
|
15395 | /**
|
15396 | * RunAggregationQueryRequest databaseId.
|
15397 | * @member {string} databaseId
|
15398 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15399 | * @instance
|
15400 | */
|
15401 | RunAggregationQueryRequest.prototype.databaseId = "";
|
15402 |
|
15403 | /**
|
15404 | * RunAggregationQueryRequest partitionId.
|
15405 | * @member {google.datastore.v1.IPartitionId|null|undefined} partitionId
|
15406 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15407 | * @instance
|
15408 | */
|
15409 | RunAggregationQueryRequest.prototype.partitionId = null;
|
15410 |
|
15411 | /**
|
15412 | * RunAggregationQueryRequest readOptions.
|
15413 | * @member {google.datastore.v1.IReadOptions|null|undefined} readOptions
|
15414 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15415 | * @instance
|
15416 | */
|
15417 | RunAggregationQueryRequest.prototype.readOptions = null;
|
15418 |
|
15419 | /**
|
15420 | * RunAggregationQueryRequest aggregationQuery.
|
15421 | * @member {google.datastore.v1.IAggregationQuery|null|undefined} aggregationQuery
|
15422 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15423 | * @instance
|
15424 | */
|
15425 | RunAggregationQueryRequest.prototype.aggregationQuery = null;
|
15426 |
|
15427 | /**
|
15428 | * RunAggregationQueryRequest gqlQuery.
|
15429 | * @member {google.datastore.v1.IGqlQuery|null|undefined} gqlQuery
|
15430 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15431 | * @instance
|
15432 | */
|
15433 | RunAggregationQueryRequest.prototype.gqlQuery = null;
|
15434 |
|
15435 | // OneOf field names bound to virtual getters and setters
|
15436 | var $oneOfFields;
|
15437 |
|
15438 | /**
|
15439 | * RunAggregationQueryRequest queryType.
|
15440 | * @member {"aggregationQuery"|"gqlQuery"|undefined} queryType
|
15441 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15442 | * @instance
|
15443 | */
|
15444 | Object.defineProperty(RunAggregationQueryRequest.prototype, "queryType", {
|
15445 | get: $util.oneOfGetter($oneOfFields = ["aggregationQuery", "gqlQuery"]),
|
15446 | set: $util.oneOfSetter($oneOfFields)
|
15447 | });
|
15448 |
|
15449 | /**
|
15450 | * Creates a new RunAggregationQueryRequest instance using the specified properties.
|
15451 | * @function create
|
15452 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15453 | * @static
|
15454 | * @param {google.datastore.v1.IRunAggregationQueryRequest=} [properties] Properties to set
|
15455 | * @returns {google.datastore.v1.RunAggregationQueryRequest} RunAggregationQueryRequest instance
|
15456 | */
|
15457 | RunAggregationQueryRequest.create = function create(properties) {
|
15458 | return new RunAggregationQueryRequest(properties);
|
15459 | };
|
15460 |
|
15461 | /**
|
15462 | * Encodes the specified RunAggregationQueryRequest message. Does not implicitly {@link google.datastore.v1.RunAggregationQueryRequest.verify|verify} messages.
|
15463 | * @function encode
|
15464 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15465 | * @static
|
15466 | * @param {google.datastore.v1.IRunAggregationQueryRequest} message RunAggregationQueryRequest message or plain object to encode
|
15467 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
15468 | * @returns {$protobuf.Writer} Writer
|
15469 | */
|
15470 | RunAggregationQueryRequest.encode = function encode(message, writer) {
|
15471 | if (!writer)
|
15472 | writer = $Writer.create();
|
15473 | if (message.readOptions != null && Object.hasOwnProperty.call(message, "readOptions"))
|
15474 | $root.google.datastore.v1.ReadOptions.encode(message.readOptions, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
15475 | if (message.partitionId != null && Object.hasOwnProperty.call(message, "partitionId"))
|
15476 | $root.google.datastore.v1.PartitionId.encode(message.partitionId, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
15477 | if (message.aggregationQuery != null && Object.hasOwnProperty.call(message, "aggregationQuery"))
|
15478 | $root.google.datastore.v1.AggregationQuery.encode(message.aggregationQuery, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
15479 | if (message.gqlQuery != null && Object.hasOwnProperty.call(message, "gqlQuery"))
|
15480 | $root.google.datastore.v1.GqlQuery.encode(message.gqlQuery, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
15481 | if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
|
15482 | writer.uint32(/* id 8, wireType 2 =*/66).string(message.projectId);
|
15483 | if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId"))
|
15484 | writer.uint32(/* id 9, wireType 2 =*/74).string(message.databaseId);
|
15485 | return writer;
|
15486 | };
|
15487 |
|
15488 | /**
|
15489 | * Encodes the specified RunAggregationQueryRequest message, length delimited. Does not implicitly {@link google.datastore.v1.RunAggregationQueryRequest.verify|verify} messages.
|
15490 | * @function encodeDelimited
|
15491 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15492 | * @static
|
15493 | * @param {google.datastore.v1.IRunAggregationQueryRequest} message RunAggregationQueryRequest message or plain object to encode
|
15494 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
15495 | * @returns {$protobuf.Writer} Writer
|
15496 | */
|
15497 | RunAggregationQueryRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
15498 | return this.encode(message, writer).ldelim();
|
15499 | };
|
15500 |
|
15501 | /**
|
15502 | * Decodes a RunAggregationQueryRequest message from the specified reader or buffer.
|
15503 | * @function decode
|
15504 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15505 | * @static
|
15506 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
15507 | * @param {number} [length] Message length if known beforehand
|
15508 | * @returns {google.datastore.v1.RunAggregationQueryRequest} RunAggregationQueryRequest
|
15509 | * @throws {Error} If the payload is not a reader or valid buffer
|
15510 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
15511 | */
|
15512 | RunAggregationQueryRequest.decode = function decode(reader, length) {
|
15513 | if (!(reader instanceof $Reader))
|
15514 | reader = $Reader.create(reader);
|
15515 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.RunAggregationQueryRequest();
|
15516 | while (reader.pos < end) {
|
15517 | var tag = reader.uint32();
|
15518 | switch (tag >>> 3) {
|
15519 | case 8: {
|
15520 | message.projectId = reader.string();
|
15521 | break;
|
15522 | }
|
15523 | case 9: {
|
15524 | message.databaseId = reader.string();
|
15525 | break;
|
15526 | }
|
15527 | case 2: {
|
15528 | message.partitionId = $root.google.datastore.v1.PartitionId.decode(reader, reader.uint32());
|
15529 | break;
|
15530 | }
|
15531 | case 1: {
|
15532 | message.readOptions = $root.google.datastore.v1.ReadOptions.decode(reader, reader.uint32());
|
15533 | break;
|
15534 | }
|
15535 | case 3: {
|
15536 | message.aggregationQuery = $root.google.datastore.v1.AggregationQuery.decode(reader, reader.uint32());
|
15537 | break;
|
15538 | }
|
15539 | case 7: {
|
15540 | message.gqlQuery = $root.google.datastore.v1.GqlQuery.decode(reader, reader.uint32());
|
15541 | break;
|
15542 | }
|
15543 | default:
|
15544 | reader.skipType(tag & 7);
|
15545 | break;
|
15546 | }
|
15547 | }
|
15548 | return message;
|
15549 | };
|
15550 |
|
15551 | /**
|
15552 | * Decodes a RunAggregationQueryRequest message from the specified reader or buffer, length delimited.
|
15553 | * @function decodeDelimited
|
15554 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15555 | * @static
|
15556 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
15557 | * @returns {google.datastore.v1.RunAggregationQueryRequest} RunAggregationQueryRequest
|
15558 | * @throws {Error} If the payload is not a reader or valid buffer
|
15559 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
15560 | */
|
15561 | RunAggregationQueryRequest.decodeDelimited = function decodeDelimited(reader) {
|
15562 | if (!(reader instanceof $Reader))
|
15563 | reader = new $Reader(reader);
|
15564 | return this.decode(reader, reader.uint32());
|
15565 | };
|
15566 |
|
15567 | /**
|
15568 | * Verifies a RunAggregationQueryRequest message.
|
15569 | * @function verify
|
15570 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15571 | * @static
|
15572 | * @param {Object.<string,*>} message Plain object to verify
|
15573 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
15574 | */
|
15575 | RunAggregationQueryRequest.verify = function verify(message) {
|
15576 | if (typeof message !== "object" || message === null)
|
15577 | return "object expected";
|
15578 | var properties = {};
|
15579 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
15580 | if (!$util.isString(message.projectId))
|
15581 | return "projectId: string expected";
|
15582 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
15583 | if (!$util.isString(message.databaseId))
|
15584 | return "databaseId: string expected";
|
15585 | if (message.partitionId != null && message.hasOwnProperty("partitionId")) {
|
15586 | var error = $root.google.datastore.v1.PartitionId.verify(message.partitionId);
|
15587 | if (error)
|
15588 | return "partitionId." + error;
|
15589 | }
|
15590 | if (message.readOptions != null && message.hasOwnProperty("readOptions")) {
|
15591 | var error = $root.google.datastore.v1.ReadOptions.verify(message.readOptions);
|
15592 | if (error)
|
15593 | return "readOptions." + error;
|
15594 | }
|
15595 | if (message.aggregationQuery != null && message.hasOwnProperty("aggregationQuery")) {
|
15596 | properties.queryType = 1;
|
15597 | {
|
15598 | var error = $root.google.datastore.v1.AggregationQuery.verify(message.aggregationQuery);
|
15599 | if (error)
|
15600 | return "aggregationQuery." + error;
|
15601 | }
|
15602 | }
|
15603 | if (message.gqlQuery != null && message.hasOwnProperty("gqlQuery")) {
|
15604 | if (properties.queryType === 1)
|
15605 | return "queryType: multiple values";
|
15606 | properties.queryType = 1;
|
15607 | {
|
15608 | var error = $root.google.datastore.v1.GqlQuery.verify(message.gqlQuery);
|
15609 | if (error)
|
15610 | return "gqlQuery." + error;
|
15611 | }
|
15612 | }
|
15613 | return null;
|
15614 | };
|
15615 |
|
15616 | /**
|
15617 | * Creates a RunAggregationQueryRequest message from a plain object. Also converts values to their respective internal types.
|
15618 | * @function fromObject
|
15619 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15620 | * @static
|
15621 | * @param {Object.<string,*>} object Plain object
|
15622 | * @returns {google.datastore.v1.RunAggregationQueryRequest} RunAggregationQueryRequest
|
15623 | */
|
15624 | RunAggregationQueryRequest.fromObject = function fromObject(object) {
|
15625 | if (object instanceof $root.google.datastore.v1.RunAggregationQueryRequest)
|
15626 | return object;
|
15627 | var message = new $root.google.datastore.v1.RunAggregationQueryRequest();
|
15628 | if (object.projectId != null)
|
15629 | message.projectId = String(object.projectId);
|
15630 | if (object.databaseId != null)
|
15631 | message.databaseId = String(object.databaseId);
|
15632 | if (object.partitionId != null) {
|
15633 | if (typeof object.partitionId !== "object")
|
15634 | throw TypeError(".google.datastore.v1.RunAggregationQueryRequest.partitionId: object expected");
|
15635 | message.partitionId = $root.google.datastore.v1.PartitionId.fromObject(object.partitionId);
|
15636 | }
|
15637 | if (object.readOptions != null) {
|
15638 | if (typeof object.readOptions !== "object")
|
15639 | throw TypeError(".google.datastore.v1.RunAggregationQueryRequest.readOptions: object expected");
|
15640 | message.readOptions = $root.google.datastore.v1.ReadOptions.fromObject(object.readOptions);
|
15641 | }
|
15642 | if (object.aggregationQuery != null) {
|
15643 | if (typeof object.aggregationQuery !== "object")
|
15644 | throw TypeError(".google.datastore.v1.RunAggregationQueryRequest.aggregationQuery: object expected");
|
15645 | message.aggregationQuery = $root.google.datastore.v1.AggregationQuery.fromObject(object.aggregationQuery);
|
15646 | }
|
15647 | if (object.gqlQuery != null) {
|
15648 | if (typeof object.gqlQuery !== "object")
|
15649 | throw TypeError(".google.datastore.v1.RunAggregationQueryRequest.gqlQuery: object expected");
|
15650 | message.gqlQuery = $root.google.datastore.v1.GqlQuery.fromObject(object.gqlQuery);
|
15651 | }
|
15652 | return message;
|
15653 | };
|
15654 |
|
15655 | /**
|
15656 | * Creates a plain object from a RunAggregationQueryRequest message. Also converts values to other types if specified.
|
15657 | * @function toObject
|
15658 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15659 | * @static
|
15660 | * @param {google.datastore.v1.RunAggregationQueryRequest} message RunAggregationQueryRequest
|
15661 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
15662 | * @returns {Object.<string,*>} Plain object
|
15663 | */
|
15664 | RunAggregationQueryRequest.toObject = function toObject(message, options) {
|
15665 | if (!options)
|
15666 | options = {};
|
15667 | var object = {};
|
15668 | if (options.defaults) {
|
15669 | object.readOptions = null;
|
15670 | object.partitionId = null;
|
15671 | object.projectId = "";
|
15672 | object.databaseId = "";
|
15673 | }
|
15674 | if (message.readOptions != null && message.hasOwnProperty("readOptions"))
|
15675 | object.readOptions = $root.google.datastore.v1.ReadOptions.toObject(message.readOptions, options);
|
15676 | if (message.partitionId != null && message.hasOwnProperty("partitionId"))
|
15677 | object.partitionId = $root.google.datastore.v1.PartitionId.toObject(message.partitionId, options);
|
15678 | if (message.aggregationQuery != null && message.hasOwnProperty("aggregationQuery")) {
|
15679 | object.aggregationQuery = $root.google.datastore.v1.AggregationQuery.toObject(message.aggregationQuery, options);
|
15680 | if (options.oneofs)
|
15681 | object.queryType = "aggregationQuery";
|
15682 | }
|
15683 | if (message.gqlQuery != null && message.hasOwnProperty("gqlQuery")) {
|
15684 | object.gqlQuery = $root.google.datastore.v1.GqlQuery.toObject(message.gqlQuery, options);
|
15685 | if (options.oneofs)
|
15686 | object.queryType = "gqlQuery";
|
15687 | }
|
15688 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
15689 | object.projectId = message.projectId;
|
15690 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
15691 | object.databaseId = message.databaseId;
|
15692 | return object;
|
15693 | };
|
15694 |
|
15695 | /**
|
15696 | * Converts this RunAggregationQueryRequest to JSON.
|
15697 | * @function toJSON
|
15698 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15699 | * @instance
|
15700 | * @returns {Object.<string,*>} JSON object
|
15701 | */
|
15702 | RunAggregationQueryRequest.prototype.toJSON = function toJSON() {
|
15703 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
15704 | };
|
15705 |
|
15706 | /**
|
15707 | * Gets the default type url for RunAggregationQueryRequest
|
15708 | * @function getTypeUrl
|
15709 | * @memberof google.datastore.v1.RunAggregationQueryRequest
|
15710 | * @static
|
15711 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
15712 | * @returns {string} The default type url
|
15713 | */
|
15714 | RunAggregationQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
15715 | if (typeUrlPrefix === undefined) {
|
15716 | typeUrlPrefix = "type.googleapis.com";
|
15717 | }
|
15718 | return typeUrlPrefix + "/google.datastore.v1.RunAggregationQueryRequest";
|
15719 | };
|
15720 |
|
15721 | return RunAggregationQueryRequest;
|
15722 | })();
|
15723 |
|
15724 | v1.RunAggregationQueryResponse = (function() {
|
15725 |
|
15726 | /**
|
15727 | * Properties of a RunAggregationQueryResponse.
|
15728 | * @memberof google.datastore.v1
|
15729 | * @interface IRunAggregationQueryResponse
|
15730 | * @property {google.datastore.v1.IAggregationResultBatch|null} [batch] RunAggregationQueryResponse batch
|
15731 | * @property {google.datastore.v1.IAggregationQuery|null} [query] RunAggregationQueryResponse query
|
15732 | * @property {Uint8Array|null} [transaction] RunAggregationQueryResponse transaction
|
15733 | */
|
15734 |
|
15735 | /**
|
15736 | * Constructs a new RunAggregationQueryResponse.
|
15737 | * @memberof google.datastore.v1
|
15738 | * @classdesc Represents a RunAggregationQueryResponse.
|
15739 | * @implements IRunAggregationQueryResponse
|
15740 | * @constructor
|
15741 | * @param {google.datastore.v1.IRunAggregationQueryResponse=} [properties] Properties to set
|
15742 | */
|
15743 | function RunAggregationQueryResponse(properties) {
|
15744 | if (properties)
|
15745 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
15746 | if (properties[keys[i]] != null)
|
15747 | this[keys[i]] = properties[keys[i]];
|
15748 | }
|
15749 |
|
15750 | /**
|
15751 | * RunAggregationQueryResponse batch.
|
15752 | * @member {google.datastore.v1.IAggregationResultBatch|null|undefined} batch
|
15753 | * @memberof google.datastore.v1.RunAggregationQueryResponse
|
15754 | * @instance
|
15755 | */
|
15756 | RunAggregationQueryResponse.prototype.batch = null;
|
15757 |
|
15758 | /**
|
15759 | * RunAggregationQueryResponse query.
|
15760 | * @member {google.datastore.v1.IAggregationQuery|null|undefined} query
|
15761 | * @memberof google.datastore.v1.RunAggregationQueryResponse
|
15762 | * @instance
|
15763 | */
|
15764 | RunAggregationQueryResponse.prototype.query = null;
|
15765 |
|
15766 | /**
|
15767 | * RunAggregationQueryResponse transaction.
|
15768 | * @member {Uint8Array} transaction
|
15769 | * @memberof google.datastore.v1.RunAggregationQueryResponse
|
15770 | * @instance
|
15771 | */
|
15772 | RunAggregationQueryResponse.prototype.transaction = $util.newBuffer([]);
|
15773 |
|
15774 | /**
|
15775 | * Creates a new RunAggregationQueryResponse instance using the specified properties.
|
15776 | * @function create
|
15777 | * @memberof google.datastore.v1.RunAggregationQueryResponse
|
15778 | * @static
|
15779 | * @param {google.datastore.v1.IRunAggregationQueryResponse=} [properties] Properties to set
|
15780 | * @returns {google.datastore.v1.RunAggregationQueryResponse} RunAggregationQueryResponse instance
|
15781 | */
|
15782 | RunAggregationQueryResponse.create = function create(properties) {
|
15783 | return new RunAggregationQueryResponse(properties);
|
15784 | };
|
15785 |
|
15786 | /**
|
15787 | * Encodes the specified RunAggregationQueryResponse message. Does not implicitly {@link google.datastore.v1.RunAggregationQueryResponse.verify|verify} messages.
|
15788 | * @function encode
|
15789 | * @memberof google.datastore.v1.RunAggregationQueryResponse
|
15790 | * @static
|
15791 | * @param {google.datastore.v1.IRunAggregationQueryResponse} message RunAggregationQueryResponse message or plain object to encode
|
15792 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
15793 | * @returns {$protobuf.Writer} Writer
|
15794 | */
|
15795 | RunAggregationQueryResponse.encode = function encode(message, writer) {
|
15796 | if (!writer)
|
15797 | writer = $Writer.create();
|
15798 | if (message.batch != null && Object.hasOwnProperty.call(message, "batch"))
|
15799 | $root.google.datastore.v1.AggregationResultBatch.encode(message.batch, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
15800 | if (message.query != null && Object.hasOwnProperty.call(message, "query"))
|
15801 | $root.google.datastore.v1.AggregationQuery.encode(message.query, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
15802 | if (message.transaction != null && Object.hasOwnProperty.call(message, "transaction"))
|
15803 | writer.uint32(/* id 5, wireType 2 =*/42).bytes(message.transaction);
|
15804 | return writer;
|
15805 | };
|
15806 |
|
15807 | /**
|
15808 | * Encodes the specified RunAggregationQueryResponse message, length delimited. Does not implicitly {@link google.datastore.v1.RunAggregationQueryResponse.verify|verify} messages.
|
15809 | * @function encodeDelimited
|
15810 | * @memberof google.datastore.v1.RunAggregationQueryResponse
|
15811 | * @static
|
15812 | * @param {google.datastore.v1.IRunAggregationQueryResponse} message RunAggregationQueryResponse message or plain object to encode
|
15813 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
15814 | * @returns {$protobuf.Writer} Writer
|
15815 | */
|
15816 | RunAggregationQueryResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
15817 | return this.encode(message, writer).ldelim();
|
15818 | };
|
15819 |
|
15820 | /**
|
15821 | * Decodes a RunAggregationQueryResponse message from the specified reader or buffer.
|
15822 | * @function decode
|
15823 | * @memberof google.datastore.v1.RunAggregationQueryResponse
|
15824 | * @static
|
15825 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
15826 | * @param {number} [length] Message length if known beforehand
|
15827 | * @returns {google.datastore.v1.RunAggregationQueryResponse} RunAggregationQueryResponse
|
15828 | * @throws {Error} If the payload is not a reader or valid buffer
|
15829 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
15830 | */
|
15831 | RunAggregationQueryResponse.decode = function decode(reader, length) {
|
15832 | if (!(reader instanceof $Reader))
|
15833 | reader = $Reader.create(reader);
|
15834 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.RunAggregationQueryResponse();
|
15835 | while (reader.pos < end) {
|
15836 | var tag = reader.uint32();
|
15837 | switch (tag >>> 3) {
|
15838 | case 1: {
|
15839 | message.batch = $root.google.datastore.v1.AggregationResultBatch.decode(reader, reader.uint32());
|
15840 | break;
|
15841 | }
|
15842 | case 2: {
|
15843 | message.query = $root.google.datastore.v1.AggregationQuery.decode(reader, reader.uint32());
|
15844 | break;
|
15845 | }
|
15846 | case 5: {
|
15847 | message.transaction = reader.bytes();
|
15848 | break;
|
15849 | }
|
15850 | default:
|
15851 | reader.skipType(tag & 7);
|
15852 | break;
|
15853 | }
|
15854 | }
|
15855 | return message;
|
15856 | };
|
15857 |
|
15858 | /**
|
15859 | * Decodes a RunAggregationQueryResponse message from the specified reader or buffer, length delimited.
|
15860 | * @function decodeDelimited
|
15861 | * @memberof google.datastore.v1.RunAggregationQueryResponse
|
15862 | * @static
|
15863 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
15864 | * @returns {google.datastore.v1.RunAggregationQueryResponse} RunAggregationQueryResponse
|
15865 | * @throws {Error} If the payload is not a reader or valid buffer
|
15866 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
15867 | */
|
15868 | RunAggregationQueryResponse.decodeDelimited = function decodeDelimited(reader) {
|
15869 | if (!(reader instanceof $Reader))
|
15870 | reader = new $Reader(reader);
|
15871 | return this.decode(reader, reader.uint32());
|
15872 | };
|
15873 |
|
15874 | /**
|
15875 | * Verifies a RunAggregationQueryResponse message.
|
15876 | * @function verify
|
15877 | * @memberof google.datastore.v1.RunAggregationQueryResponse
|
15878 | * @static
|
15879 | * @param {Object.<string,*>} message Plain object to verify
|
15880 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
15881 | */
|
15882 | RunAggregationQueryResponse.verify = function verify(message) {
|
15883 | if (typeof message !== "object" || message === null)
|
15884 | return "object expected";
|
15885 | if (message.batch != null && message.hasOwnProperty("batch")) {
|
15886 | var error = $root.google.datastore.v1.AggregationResultBatch.verify(message.batch);
|
15887 | if (error)
|
15888 | return "batch." + error;
|
15889 | }
|
15890 | if (message.query != null && message.hasOwnProperty("query")) {
|
15891 | var error = $root.google.datastore.v1.AggregationQuery.verify(message.query);
|
15892 | if (error)
|
15893 | return "query." + error;
|
15894 | }
|
15895 | if (message.transaction != null && message.hasOwnProperty("transaction"))
|
15896 | if (!(message.transaction && typeof message.transaction.length === "number" || $util.isString(message.transaction)))
|
15897 | return "transaction: buffer expected";
|
15898 | return null;
|
15899 | };
|
15900 |
|
15901 | /**
|
15902 | * Creates a RunAggregationQueryResponse message from a plain object. Also converts values to their respective internal types.
|
15903 | * @function fromObject
|
15904 | * @memberof google.datastore.v1.RunAggregationQueryResponse
|
15905 | * @static
|
15906 | * @param {Object.<string,*>} object Plain object
|
15907 | * @returns {google.datastore.v1.RunAggregationQueryResponse} RunAggregationQueryResponse
|
15908 | */
|
15909 | RunAggregationQueryResponse.fromObject = function fromObject(object) {
|
15910 | if (object instanceof $root.google.datastore.v1.RunAggregationQueryResponse)
|
15911 | return object;
|
15912 | var message = new $root.google.datastore.v1.RunAggregationQueryResponse();
|
15913 | if (object.batch != null) {
|
15914 | if (typeof object.batch !== "object")
|
15915 | throw TypeError(".google.datastore.v1.RunAggregationQueryResponse.batch: object expected");
|
15916 | message.batch = $root.google.datastore.v1.AggregationResultBatch.fromObject(object.batch);
|
15917 | }
|
15918 | if (object.query != null) {
|
15919 | if (typeof object.query !== "object")
|
15920 | throw TypeError(".google.datastore.v1.RunAggregationQueryResponse.query: object expected");
|
15921 | message.query = $root.google.datastore.v1.AggregationQuery.fromObject(object.query);
|
15922 | }
|
15923 | if (object.transaction != null)
|
15924 | if (typeof object.transaction === "string")
|
15925 | $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0);
|
15926 | else if (object.transaction.length >= 0)
|
15927 | message.transaction = object.transaction;
|
15928 | return message;
|
15929 | };
|
15930 |
|
15931 | /**
|
15932 | * Creates a plain object from a RunAggregationQueryResponse message. Also converts values to other types if specified.
|
15933 | * @function toObject
|
15934 | * @memberof google.datastore.v1.RunAggregationQueryResponse
|
15935 | * @static
|
15936 | * @param {google.datastore.v1.RunAggregationQueryResponse} message RunAggregationQueryResponse
|
15937 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
15938 | * @returns {Object.<string,*>} Plain object
|
15939 | */
|
15940 | RunAggregationQueryResponse.toObject = function toObject(message, options) {
|
15941 | if (!options)
|
15942 | options = {};
|
15943 | var object = {};
|
15944 | if (options.defaults) {
|
15945 | object.batch = null;
|
15946 | object.query = null;
|
15947 | if (options.bytes === String)
|
15948 | object.transaction = "";
|
15949 | else {
|
15950 | object.transaction = [];
|
15951 | if (options.bytes !== Array)
|
15952 | object.transaction = $util.newBuffer(object.transaction);
|
15953 | }
|
15954 | }
|
15955 | if (message.batch != null && message.hasOwnProperty("batch"))
|
15956 | object.batch = $root.google.datastore.v1.AggregationResultBatch.toObject(message.batch, options);
|
15957 | if (message.query != null && message.hasOwnProperty("query"))
|
15958 | object.query = $root.google.datastore.v1.AggregationQuery.toObject(message.query, options);
|
15959 | if (message.transaction != null && message.hasOwnProperty("transaction"))
|
15960 | object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction;
|
15961 | return object;
|
15962 | };
|
15963 |
|
15964 | /**
|
15965 | * Converts this RunAggregationQueryResponse to JSON.
|
15966 | * @function toJSON
|
15967 | * @memberof google.datastore.v1.RunAggregationQueryResponse
|
15968 | * @instance
|
15969 | * @returns {Object.<string,*>} JSON object
|
15970 | */
|
15971 | RunAggregationQueryResponse.prototype.toJSON = function toJSON() {
|
15972 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
15973 | };
|
15974 |
|
15975 | /**
|
15976 | * Gets the default type url for RunAggregationQueryResponse
|
15977 | * @function getTypeUrl
|
15978 | * @memberof google.datastore.v1.RunAggregationQueryResponse
|
15979 | * @static
|
15980 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
15981 | * @returns {string} The default type url
|
15982 | */
|
15983 | RunAggregationQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
15984 | if (typeUrlPrefix === undefined) {
|
15985 | typeUrlPrefix = "type.googleapis.com";
|
15986 | }
|
15987 | return typeUrlPrefix + "/google.datastore.v1.RunAggregationQueryResponse";
|
15988 | };
|
15989 |
|
15990 | return RunAggregationQueryResponse;
|
15991 | })();
|
15992 |
|
15993 | v1.BeginTransactionRequest = (function() {
|
15994 |
|
15995 | /**
|
15996 | * Properties of a BeginTransactionRequest.
|
15997 | * @memberof google.datastore.v1
|
15998 | * @interface IBeginTransactionRequest
|
15999 | * @property {string|null} [projectId] BeginTransactionRequest projectId
|
16000 | * @property {string|null} [databaseId] BeginTransactionRequest databaseId
|
16001 | * @property {google.datastore.v1.ITransactionOptions|null} [transactionOptions] BeginTransactionRequest transactionOptions
|
16002 | */
|
16003 |
|
16004 | /**
|
16005 | * Constructs a new BeginTransactionRequest.
|
16006 | * @memberof google.datastore.v1
|
16007 | * @classdesc Represents a BeginTransactionRequest.
|
16008 | * @implements IBeginTransactionRequest
|
16009 | * @constructor
|
16010 | * @param {google.datastore.v1.IBeginTransactionRequest=} [properties] Properties to set
|
16011 | */
|
16012 | function BeginTransactionRequest(properties) {
|
16013 | if (properties)
|
16014 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
16015 | if (properties[keys[i]] != null)
|
16016 | this[keys[i]] = properties[keys[i]];
|
16017 | }
|
16018 |
|
16019 | /**
|
16020 | * BeginTransactionRequest projectId.
|
16021 | * @member {string} projectId
|
16022 | * @memberof google.datastore.v1.BeginTransactionRequest
|
16023 | * @instance
|
16024 | */
|
16025 | BeginTransactionRequest.prototype.projectId = "";
|
16026 |
|
16027 | /**
|
16028 | * BeginTransactionRequest databaseId.
|
16029 | * @member {string} databaseId
|
16030 | * @memberof google.datastore.v1.BeginTransactionRequest
|
16031 | * @instance
|
16032 | */
|
16033 | BeginTransactionRequest.prototype.databaseId = "";
|
16034 |
|
16035 | /**
|
16036 | * BeginTransactionRequest transactionOptions.
|
16037 | * @member {google.datastore.v1.ITransactionOptions|null|undefined} transactionOptions
|
16038 | * @memberof google.datastore.v1.BeginTransactionRequest
|
16039 | * @instance
|
16040 | */
|
16041 | BeginTransactionRequest.prototype.transactionOptions = null;
|
16042 |
|
16043 | /**
|
16044 | * Creates a new BeginTransactionRequest instance using the specified properties.
|
16045 | * @function create
|
16046 | * @memberof google.datastore.v1.BeginTransactionRequest
|
16047 | * @static
|
16048 | * @param {google.datastore.v1.IBeginTransactionRequest=} [properties] Properties to set
|
16049 | * @returns {google.datastore.v1.BeginTransactionRequest} BeginTransactionRequest instance
|
16050 | */
|
16051 | BeginTransactionRequest.create = function create(properties) {
|
16052 | return new BeginTransactionRequest(properties);
|
16053 | };
|
16054 |
|
16055 | /**
|
16056 | * Encodes the specified BeginTransactionRequest message. Does not implicitly {@link google.datastore.v1.BeginTransactionRequest.verify|verify} messages.
|
16057 | * @function encode
|
16058 | * @memberof google.datastore.v1.BeginTransactionRequest
|
16059 | * @static
|
16060 | * @param {google.datastore.v1.IBeginTransactionRequest} message BeginTransactionRequest message or plain object to encode
|
16061 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
16062 | * @returns {$protobuf.Writer} Writer
|
16063 | */
|
16064 | BeginTransactionRequest.encode = function encode(message, writer) {
|
16065 | if (!writer)
|
16066 | writer = $Writer.create();
|
16067 | if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
|
16068 | writer.uint32(/* id 8, wireType 2 =*/66).string(message.projectId);
|
16069 | if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId"))
|
16070 | writer.uint32(/* id 9, wireType 2 =*/74).string(message.databaseId);
|
16071 | if (message.transactionOptions != null && Object.hasOwnProperty.call(message, "transactionOptions"))
|
16072 | $root.google.datastore.v1.TransactionOptions.encode(message.transactionOptions, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
16073 | return writer;
|
16074 | };
|
16075 |
|
16076 | /**
|
16077 | * Encodes the specified BeginTransactionRequest message, length delimited. Does not implicitly {@link google.datastore.v1.BeginTransactionRequest.verify|verify} messages.
|
16078 | * @function encodeDelimited
|
16079 | * @memberof google.datastore.v1.BeginTransactionRequest
|
16080 | * @static
|
16081 | * @param {google.datastore.v1.IBeginTransactionRequest} message BeginTransactionRequest message or plain object to encode
|
16082 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
16083 | * @returns {$protobuf.Writer} Writer
|
16084 | */
|
16085 | BeginTransactionRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
16086 | return this.encode(message, writer).ldelim();
|
16087 | };
|
16088 |
|
16089 | /**
|
16090 | * Decodes a BeginTransactionRequest message from the specified reader or buffer.
|
16091 | * @function decode
|
16092 | * @memberof google.datastore.v1.BeginTransactionRequest
|
16093 | * @static
|
16094 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
16095 | * @param {number} [length] Message length if known beforehand
|
16096 | * @returns {google.datastore.v1.BeginTransactionRequest} BeginTransactionRequest
|
16097 | * @throws {Error} If the payload is not a reader or valid buffer
|
16098 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
16099 | */
|
16100 | BeginTransactionRequest.decode = function decode(reader, length) {
|
16101 | if (!(reader instanceof $Reader))
|
16102 | reader = $Reader.create(reader);
|
16103 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.BeginTransactionRequest();
|
16104 | while (reader.pos < end) {
|
16105 | var tag = reader.uint32();
|
16106 | switch (tag >>> 3) {
|
16107 | case 8: {
|
16108 | message.projectId = reader.string();
|
16109 | break;
|
16110 | }
|
16111 | case 9: {
|
16112 | message.databaseId = reader.string();
|
16113 | break;
|
16114 | }
|
16115 | case 10: {
|
16116 | message.transactionOptions = $root.google.datastore.v1.TransactionOptions.decode(reader, reader.uint32());
|
16117 | break;
|
16118 | }
|
16119 | default:
|
16120 | reader.skipType(tag & 7);
|
16121 | break;
|
16122 | }
|
16123 | }
|
16124 | return message;
|
16125 | };
|
16126 |
|
16127 | /**
|
16128 | * Decodes a BeginTransactionRequest message from the specified reader or buffer, length delimited.
|
16129 | * @function decodeDelimited
|
16130 | * @memberof google.datastore.v1.BeginTransactionRequest
|
16131 | * @static
|
16132 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
16133 | * @returns {google.datastore.v1.BeginTransactionRequest} BeginTransactionRequest
|
16134 | * @throws {Error} If the payload is not a reader or valid buffer
|
16135 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
16136 | */
|
16137 | BeginTransactionRequest.decodeDelimited = function decodeDelimited(reader) {
|
16138 | if (!(reader instanceof $Reader))
|
16139 | reader = new $Reader(reader);
|
16140 | return this.decode(reader, reader.uint32());
|
16141 | };
|
16142 |
|
16143 | /**
|
16144 | * Verifies a BeginTransactionRequest message.
|
16145 | * @function verify
|
16146 | * @memberof google.datastore.v1.BeginTransactionRequest
|
16147 | * @static
|
16148 | * @param {Object.<string,*>} message Plain object to verify
|
16149 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
16150 | */
|
16151 | BeginTransactionRequest.verify = function verify(message) {
|
16152 | if (typeof message !== "object" || message === null)
|
16153 | return "object expected";
|
16154 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
16155 | if (!$util.isString(message.projectId))
|
16156 | return "projectId: string expected";
|
16157 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
16158 | if (!$util.isString(message.databaseId))
|
16159 | return "databaseId: string expected";
|
16160 | if (message.transactionOptions != null && message.hasOwnProperty("transactionOptions")) {
|
16161 | var error = $root.google.datastore.v1.TransactionOptions.verify(message.transactionOptions);
|
16162 | if (error)
|
16163 | return "transactionOptions." + error;
|
16164 | }
|
16165 | return null;
|
16166 | };
|
16167 |
|
16168 | /**
|
16169 | * Creates a BeginTransactionRequest message from a plain object. Also converts values to their respective internal types.
|
16170 | * @function fromObject
|
16171 | * @memberof google.datastore.v1.BeginTransactionRequest
|
16172 | * @static
|
16173 | * @param {Object.<string,*>} object Plain object
|
16174 | * @returns {google.datastore.v1.BeginTransactionRequest} BeginTransactionRequest
|
16175 | */
|
16176 | BeginTransactionRequest.fromObject = function fromObject(object) {
|
16177 | if (object instanceof $root.google.datastore.v1.BeginTransactionRequest)
|
16178 | return object;
|
16179 | var message = new $root.google.datastore.v1.BeginTransactionRequest();
|
16180 | if (object.projectId != null)
|
16181 | message.projectId = String(object.projectId);
|
16182 | if (object.databaseId != null)
|
16183 | message.databaseId = String(object.databaseId);
|
16184 | if (object.transactionOptions != null) {
|
16185 | if (typeof object.transactionOptions !== "object")
|
16186 | throw TypeError(".google.datastore.v1.BeginTransactionRequest.transactionOptions: object expected");
|
16187 | message.transactionOptions = $root.google.datastore.v1.TransactionOptions.fromObject(object.transactionOptions);
|
16188 | }
|
16189 | return message;
|
16190 | };
|
16191 |
|
16192 | /**
|
16193 | * Creates a plain object from a BeginTransactionRequest message. Also converts values to other types if specified.
|
16194 | * @function toObject
|
16195 | * @memberof google.datastore.v1.BeginTransactionRequest
|
16196 | * @static
|
16197 | * @param {google.datastore.v1.BeginTransactionRequest} message BeginTransactionRequest
|
16198 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
16199 | * @returns {Object.<string,*>} Plain object
|
16200 | */
|
16201 | BeginTransactionRequest.toObject = function toObject(message, options) {
|
16202 | if (!options)
|
16203 | options = {};
|
16204 | var object = {};
|
16205 | if (options.defaults) {
|
16206 | object.projectId = "";
|
16207 | object.databaseId = "";
|
16208 | object.transactionOptions = null;
|
16209 | }
|
16210 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
16211 | object.projectId = message.projectId;
|
16212 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
16213 | object.databaseId = message.databaseId;
|
16214 | if (message.transactionOptions != null && message.hasOwnProperty("transactionOptions"))
|
16215 | object.transactionOptions = $root.google.datastore.v1.TransactionOptions.toObject(message.transactionOptions, options);
|
16216 | return object;
|
16217 | };
|
16218 |
|
16219 | /**
|
16220 | * Converts this BeginTransactionRequest to JSON.
|
16221 | * @function toJSON
|
16222 | * @memberof google.datastore.v1.BeginTransactionRequest
|
16223 | * @instance
|
16224 | * @returns {Object.<string,*>} JSON object
|
16225 | */
|
16226 | BeginTransactionRequest.prototype.toJSON = function toJSON() {
|
16227 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
16228 | };
|
16229 |
|
16230 | /**
|
16231 | * Gets the default type url for BeginTransactionRequest
|
16232 | * @function getTypeUrl
|
16233 | * @memberof google.datastore.v1.BeginTransactionRequest
|
16234 | * @static
|
16235 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
16236 | * @returns {string} The default type url
|
16237 | */
|
16238 | BeginTransactionRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
16239 | if (typeUrlPrefix === undefined) {
|
16240 | typeUrlPrefix = "type.googleapis.com";
|
16241 | }
|
16242 | return typeUrlPrefix + "/google.datastore.v1.BeginTransactionRequest";
|
16243 | };
|
16244 |
|
16245 | return BeginTransactionRequest;
|
16246 | })();
|
16247 |
|
16248 | v1.BeginTransactionResponse = (function() {
|
16249 |
|
16250 | /**
|
16251 | * Properties of a BeginTransactionResponse.
|
16252 | * @memberof google.datastore.v1
|
16253 | * @interface IBeginTransactionResponse
|
16254 | * @property {Uint8Array|null} [transaction] BeginTransactionResponse transaction
|
16255 | */
|
16256 |
|
16257 | /**
|
16258 | * Constructs a new BeginTransactionResponse.
|
16259 | * @memberof google.datastore.v1
|
16260 | * @classdesc Represents a BeginTransactionResponse.
|
16261 | * @implements IBeginTransactionResponse
|
16262 | * @constructor
|
16263 | * @param {google.datastore.v1.IBeginTransactionResponse=} [properties] Properties to set
|
16264 | */
|
16265 | function BeginTransactionResponse(properties) {
|
16266 | if (properties)
|
16267 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
16268 | if (properties[keys[i]] != null)
|
16269 | this[keys[i]] = properties[keys[i]];
|
16270 | }
|
16271 |
|
16272 | /**
|
16273 | * BeginTransactionResponse transaction.
|
16274 | * @member {Uint8Array} transaction
|
16275 | * @memberof google.datastore.v1.BeginTransactionResponse
|
16276 | * @instance
|
16277 | */
|
16278 | BeginTransactionResponse.prototype.transaction = $util.newBuffer([]);
|
16279 |
|
16280 | /**
|
16281 | * Creates a new BeginTransactionResponse instance using the specified properties.
|
16282 | * @function create
|
16283 | * @memberof google.datastore.v1.BeginTransactionResponse
|
16284 | * @static
|
16285 | * @param {google.datastore.v1.IBeginTransactionResponse=} [properties] Properties to set
|
16286 | * @returns {google.datastore.v1.BeginTransactionResponse} BeginTransactionResponse instance
|
16287 | */
|
16288 | BeginTransactionResponse.create = function create(properties) {
|
16289 | return new BeginTransactionResponse(properties);
|
16290 | };
|
16291 |
|
16292 | /**
|
16293 | * Encodes the specified BeginTransactionResponse message. Does not implicitly {@link google.datastore.v1.BeginTransactionResponse.verify|verify} messages.
|
16294 | * @function encode
|
16295 | * @memberof google.datastore.v1.BeginTransactionResponse
|
16296 | * @static
|
16297 | * @param {google.datastore.v1.IBeginTransactionResponse} message BeginTransactionResponse message or plain object to encode
|
16298 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
16299 | * @returns {$protobuf.Writer} Writer
|
16300 | */
|
16301 | BeginTransactionResponse.encode = function encode(message, writer) {
|
16302 | if (!writer)
|
16303 | writer = $Writer.create();
|
16304 | if (message.transaction != null && Object.hasOwnProperty.call(message, "transaction"))
|
16305 | writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.transaction);
|
16306 | return writer;
|
16307 | };
|
16308 |
|
16309 | /**
|
16310 | * Encodes the specified BeginTransactionResponse message, length delimited. Does not implicitly {@link google.datastore.v1.BeginTransactionResponse.verify|verify} messages.
|
16311 | * @function encodeDelimited
|
16312 | * @memberof google.datastore.v1.BeginTransactionResponse
|
16313 | * @static
|
16314 | * @param {google.datastore.v1.IBeginTransactionResponse} message BeginTransactionResponse message or plain object to encode
|
16315 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
16316 | * @returns {$protobuf.Writer} Writer
|
16317 | */
|
16318 | BeginTransactionResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
16319 | return this.encode(message, writer).ldelim();
|
16320 | };
|
16321 |
|
16322 | /**
|
16323 | * Decodes a BeginTransactionResponse message from the specified reader or buffer.
|
16324 | * @function decode
|
16325 | * @memberof google.datastore.v1.BeginTransactionResponse
|
16326 | * @static
|
16327 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
16328 | * @param {number} [length] Message length if known beforehand
|
16329 | * @returns {google.datastore.v1.BeginTransactionResponse} BeginTransactionResponse
|
16330 | * @throws {Error} If the payload is not a reader or valid buffer
|
16331 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
16332 | */
|
16333 | BeginTransactionResponse.decode = function decode(reader, length) {
|
16334 | if (!(reader instanceof $Reader))
|
16335 | reader = $Reader.create(reader);
|
16336 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.BeginTransactionResponse();
|
16337 | while (reader.pos < end) {
|
16338 | var tag = reader.uint32();
|
16339 | switch (tag >>> 3) {
|
16340 | case 1: {
|
16341 | message.transaction = reader.bytes();
|
16342 | break;
|
16343 | }
|
16344 | default:
|
16345 | reader.skipType(tag & 7);
|
16346 | break;
|
16347 | }
|
16348 | }
|
16349 | return message;
|
16350 | };
|
16351 |
|
16352 | /**
|
16353 | * Decodes a BeginTransactionResponse message from the specified reader or buffer, length delimited.
|
16354 | * @function decodeDelimited
|
16355 | * @memberof google.datastore.v1.BeginTransactionResponse
|
16356 | * @static
|
16357 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
16358 | * @returns {google.datastore.v1.BeginTransactionResponse} BeginTransactionResponse
|
16359 | * @throws {Error} If the payload is not a reader or valid buffer
|
16360 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
16361 | */
|
16362 | BeginTransactionResponse.decodeDelimited = function decodeDelimited(reader) {
|
16363 | if (!(reader instanceof $Reader))
|
16364 | reader = new $Reader(reader);
|
16365 | return this.decode(reader, reader.uint32());
|
16366 | };
|
16367 |
|
16368 | /**
|
16369 | * Verifies a BeginTransactionResponse message.
|
16370 | * @function verify
|
16371 | * @memberof google.datastore.v1.BeginTransactionResponse
|
16372 | * @static
|
16373 | * @param {Object.<string,*>} message Plain object to verify
|
16374 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
16375 | */
|
16376 | BeginTransactionResponse.verify = function verify(message) {
|
16377 | if (typeof message !== "object" || message === null)
|
16378 | return "object expected";
|
16379 | if (message.transaction != null && message.hasOwnProperty("transaction"))
|
16380 | if (!(message.transaction && typeof message.transaction.length === "number" || $util.isString(message.transaction)))
|
16381 | return "transaction: buffer expected";
|
16382 | return null;
|
16383 | };
|
16384 |
|
16385 | /**
|
16386 | * Creates a BeginTransactionResponse message from a plain object. Also converts values to their respective internal types.
|
16387 | * @function fromObject
|
16388 | * @memberof google.datastore.v1.BeginTransactionResponse
|
16389 | * @static
|
16390 | * @param {Object.<string,*>} object Plain object
|
16391 | * @returns {google.datastore.v1.BeginTransactionResponse} BeginTransactionResponse
|
16392 | */
|
16393 | BeginTransactionResponse.fromObject = function fromObject(object) {
|
16394 | if (object instanceof $root.google.datastore.v1.BeginTransactionResponse)
|
16395 | return object;
|
16396 | var message = new $root.google.datastore.v1.BeginTransactionResponse();
|
16397 | if (object.transaction != null)
|
16398 | if (typeof object.transaction === "string")
|
16399 | $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0);
|
16400 | else if (object.transaction.length >= 0)
|
16401 | message.transaction = object.transaction;
|
16402 | return message;
|
16403 | };
|
16404 |
|
16405 | /**
|
16406 | * Creates a plain object from a BeginTransactionResponse message. Also converts values to other types if specified.
|
16407 | * @function toObject
|
16408 | * @memberof google.datastore.v1.BeginTransactionResponse
|
16409 | * @static
|
16410 | * @param {google.datastore.v1.BeginTransactionResponse} message BeginTransactionResponse
|
16411 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
16412 | * @returns {Object.<string,*>} Plain object
|
16413 | */
|
16414 | BeginTransactionResponse.toObject = function toObject(message, options) {
|
16415 | if (!options)
|
16416 | options = {};
|
16417 | var object = {};
|
16418 | if (options.defaults)
|
16419 | if (options.bytes === String)
|
16420 | object.transaction = "";
|
16421 | else {
|
16422 | object.transaction = [];
|
16423 | if (options.bytes !== Array)
|
16424 | object.transaction = $util.newBuffer(object.transaction);
|
16425 | }
|
16426 | if (message.transaction != null && message.hasOwnProperty("transaction"))
|
16427 | object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction;
|
16428 | return object;
|
16429 | };
|
16430 |
|
16431 | /**
|
16432 | * Converts this BeginTransactionResponse to JSON.
|
16433 | * @function toJSON
|
16434 | * @memberof google.datastore.v1.BeginTransactionResponse
|
16435 | * @instance
|
16436 | * @returns {Object.<string,*>} JSON object
|
16437 | */
|
16438 | BeginTransactionResponse.prototype.toJSON = function toJSON() {
|
16439 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
16440 | };
|
16441 |
|
16442 | /**
|
16443 | * Gets the default type url for BeginTransactionResponse
|
16444 | * @function getTypeUrl
|
16445 | * @memberof google.datastore.v1.BeginTransactionResponse
|
16446 | * @static
|
16447 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
16448 | * @returns {string} The default type url
|
16449 | */
|
16450 | BeginTransactionResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
16451 | if (typeUrlPrefix === undefined) {
|
16452 | typeUrlPrefix = "type.googleapis.com";
|
16453 | }
|
16454 | return typeUrlPrefix + "/google.datastore.v1.BeginTransactionResponse";
|
16455 | };
|
16456 |
|
16457 | return BeginTransactionResponse;
|
16458 | })();
|
16459 |
|
16460 | v1.RollbackRequest = (function() {
|
16461 |
|
16462 | /**
|
16463 | * Properties of a RollbackRequest.
|
16464 | * @memberof google.datastore.v1
|
16465 | * @interface IRollbackRequest
|
16466 | * @property {string|null} [projectId] RollbackRequest projectId
|
16467 | * @property {string|null} [databaseId] RollbackRequest databaseId
|
16468 | * @property {Uint8Array|null} [transaction] RollbackRequest transaction
|
16469 | */
|
16470 |
|
16471 | /**
|
16472 | * Constructs a new RollbackRequest.
|
16473 | * @memberof google.datastore.v1
|
16474 | * @classdesc Represents a RollbackRequest.
|
16475 | * @implements IRollbackRequest
|
16476 | * @constructor
|
16477 | * @param {google.datastore.v1.IRollbackRequest=} [properties] Properties to set
|
16478 | */
|
16479 | function RollbackRequest(properties) {
|
16480 | if (properties)
|
16481 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
16482 | if (properties[keys[i]] != null)
|
16483 | this[keys[i]] = properties[keys[i]];
|
16484 | }
|
16485 |
|
16486 | /**
|
16487 | * RollbackRequest projectId.
|
16488 | * @member {string} projectId
|
16489 | * @memberof google.datastore.v1.RollbackRequest
|
16490 | * @instance
|
16491 | */
|
16492 | RollbackRequest.prototype.projectId = "";
|
16493 |
|
16494 | /**
|
16495 | * RollbackRequest databaseId.
|
16496 | * @member {string} databaseId
|
16497 | * @memberof google.datastore.v1.RollbackRequest
|
16498 | * @instance
|
16499 | */
|
16500 | RollbackRequest.prototype.databaseId = "";
|
16501 |
|
16502 | /**
|
16503 | * RollbackRequest transaction.
|
16504 | * @member {Uint8Array} transaction
|
16505 | * @memberof google.datastore.v1.RollbackRequest
|
16506 | * @instance
|
16507 | */
|
16508 | RollbackRequest.prototype.transaction = $util.newBuffer([]);
|
16509 |
|
16510 | /**
|
16511 | * Creates a new RollbackRequest instance using the specified properties.
|
16512 | * @function create
|
16513 | * @memberof google.datastore.v1.RollbackRequest
|
16514 | * @static
|
16515 | * @param {google.datastore.v1.IRollbackRequest=} [properties] Properties to set
|
16516 | * @returns {google.datastore.v1.RollbackRequest} RollbackRequest instance
|
16517 | */
|
16518 | RollbackRequest.create = function create(properties) {
|
16519 | return new RollbackRequest(properties);
|
16520 | };
|
16521 |
|
16522 | /**
|
16523 | * Encodes the specified RollbackRequest message. Does not implicitly {@link google.datastore.v1.RollbackRequest.verify|verify} messages.
|
16524 | * @function encode
|
16525 | * @memberof google.datastore.v1.RollbackRequest
|
16526 | * @static
|
16527 | * @param {google.datastore.v1.IRollbackRequest} message RollbackRequest message or plain object to encode
|
16528 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
16529 | * @returns {$protobuf.Writer} Writer
|
16530 | */
|
16531 | RollbackRequest.encode = function encode(message, writer) {
|
16532 | if (!writer)
|
16533 | writer = $Writer.create();
|
16534 | if (message.transaction != null && Object.hasOwnProperty.call(message, "transaction"))
|
16535 | writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.transaction);
|
16536 | if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
|
16537 | writer.uint32(/* id 8, wireType 2 =*/66).string(message.projectId);
|
16538 | if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId"))
|
16539 | writer.uint32(/* id 9, wireType 2 =*/74).string(message.databaseId);
|
16540 | return writer;
|
16541 | };
|
16542 |
|
16543 | /**
|
16544 | * Encodes the specified RollbackRequest message, length delimited. Does not implicitly {@link google.datastore.v1.RollbackRequest.verify|verify} messages.
|
16545 | * @function encodeDelimited
|
16546 | * @memberof google.datastore.v1.RollbackRequest
|
16547 | * @static
|
16548 | * @param {google.datastore.v1.IRollbackRequest} message RollbackRequest message or plain object to encode
|
16549 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
16550 | * @returns {$protobuf.Writer} Writer
|
16551 | */
|
16552 | RollbackRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
16553 | return this.encode(message, writer).ldelim();
|
16554 | };
|
16555 |
|
16556 | /**
|
16557 | * Decodes a RollbackRequest message from the specified reader or buffer.
|
16558 | * @function decode
|
16559 | * @memberof google.datastore.v1.RollbackRequest
|
16560 | * @static
|
16561 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
16562 | * @param {number} [length] Message length if known beforehand
|
16563 | * @returns {google.datastore.v1.RollbackRequest} RollbackRequest
|
16564 | * @throws {Error} If the payload is not a reader or valid buffer
|
16565 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
16566 | */
|
16567 | RollbackRequest.decode = function decode(reader, length) {
|
16568 | if (!(reader instanceof $Reader))
|
16569 | reader = $Reader.create(reader);
|
16570 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.RollbackRequest();
|
16571 | while (reader.pos < end) {
|
16572 | var tag = reader.uint32();
|
16573 | switch (tag >>> 3) {
|
16574 | case 8: {
|
16575 | message.projectId = reader.string();
|
16576 | break;
|
16577 | }
|
16578 | case 9: {
|
16579 | message.databaseId = reader.string();
|
16580 | break;
|
16581 | }
|
16582 | case 1: {
|
16583 | message.transaction = reader.bytes();
|
16584 | break;
|
16585 | }
|
16586 | default:
|
16587 | reader.skipType(tag & 7);
|
16588 | break;
|
16589 | }
|
16590 | }
|
16591 | return message;
|
16592 | };
|
16593 |
|
16594 | /**
|
16595 | * Decodes a RollbackRequest message from the specified reader or buffer, length delimited.
|
16596 | * @function decodeDelimited
|
16597 | * @memberof google.datastore.v1.RollbackRequest
|
16598 | * @static
|
16599 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
16600 | * @returns {google.datastore.v1.RollbackRequest} RollbackRequest
|
16601 | * @throws {Error} If the payload is not a reader or valid buffer
|
16602 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
16603 | */
|
16604 | RollbackRequest.decodeDelimited = function decodeDelimited(reader) {
|
16605 | if (!(reader instanceof $Reader))
|
16606 | reader = new $Reader(reader);
|
16607 | return this.decode(reader, reader.uint32());
|
16608 | };
|
16609 |
|
16610 | /**
|
16611 | * Verifies a RollbackRequest message.
|
16612 | * @function verify
|
16613 | * @memberof google.datastore.v1.RollbackRequest
|
16614 | * @static
|
16615 | * @param {Object.<string,*>} message Plain object to verify
|
16616 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
16617 | */
|
16618 | RollbackRequest.verify = function verify(message) {
|
16619 | if (typeof message !== "object" || message === null)
|
16620 | return "object expected";
|
16621 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
16622 | if (!$util.isString(message.projectId))
|
16623 | return "projectId: string expected";
|
16624 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
16625 | if (!$util.isString(message.databaseId))
|
16626 | return "databaseId: string expected";
|
16627 | if (message.transaction != null && message.hasOwnProperty("transaction"))
|
16628 | if (!(message.transaction && typeof message.transaction.length === "number" || $util.isString(message.transaction)))
|
16629 | return "transaction: buffer expected";
|
16630 | return null;
|
16631 | };
|
16632 |
|
16633 | /**
|
16634 | * Creates a RollbackRequest message from a plain object. Also converts values to their respective internal types.
|
16635 | * @function fromObject
|
16636 | * @memberof google.datastore.v1.RollbackRequest
|
16637 | * @static
|
16638 | * @param {Object.<string,*>} object Plain object
|
16639 | * @returns {google.datastore.v1.RollbackRequest} RollbackRequest
|
16640 | */
|
16641 | RollbackRequest.fromObject = function fromObject(object) {
|
16642 | if (object instanceof $root.google.datastore.v1.RollbackRequest)
|
16643 | return object;
|
16644 | var message = new $root.google.datastore.v1.RollbackRequest();
|
16645 | if (object.projectId != null)
|
16646 | message.projectId = String(object.projectId);
|
16647 | if (object.databaseId != null)
|
16648 | message.databaseId = String(object.databaseId);
|
16649 | if (object.transaction != null)
|
16650 | if (typeof object.transaction === "string")
|
16651 | $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0);
|
16652 | else if (object.transaction.length >= 0)
|
16653 | message.transaction = object.transaction;
|
16654 | return message;
|
16655 | };
|
16656 |
|
16657 | /**
|
16658 | * Creates a plain object from a RollbackRequest message. Also converts values to other types if specified.
|
16659 | * @function toObject
|
16660 | * @memberof google.datastore.v1.RollbackRequest
|
16661 | * @static
|
16662 | * @param {google.datastore.v1.RollbackRequest} message RollbackRequest
|
16663 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
16664 | * @returns {Object.<string,*>} Plain object
|
16665 | */
|
16666 | RollbackRequest.toObject = function toObject(message, options) {
|
16667 | if (!options)
|
16668 | options = {};
|
16669 | var object = {};
|
16670 | if (options.defaults) {
|
16671 | if (options.bytes === String)
|
16672 | object.transaction = "";
|
16673 | else {
|
16674 | object.transaction = [];
|
16675 | if (options.bytes !== Array)
|
16676 | object.transaction = $util.newBuffer(object.transaction);
|
16677 | }
|
16678 | object.projectId = "";
|
16679 | object.databaseId = "";
|
16680 | }
|
16681 | if (message.transaction != null && message.hasOwnProperty("transaction"))
|
16682 | object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction;
|
16683 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
16684 | object.projectId = message.projectId;
|
16685 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
16686 | object.databaseId = message.databaseId;
|
16687 | return object;
|
16688 | };
|
16689 |
|
16690 | /**
|
16691 | * Converts this RollbackRequest to JSON.
|
16692 | * @function toJSON
|
16693 | * @memberof google.datastore.v1.RollbackRequest
|
16694 | * @instance
|
16695 | * @returns {Object.<string,*>} JSON object
|
16696 | */
|
16697 | RollbackRequest.prototype.toJSON = function toJSON() {
|
16698 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
16699 | };
|
16700 |
|
16701 | /**
|
16702 | * Gets the default type url for RollbackRequest
|
16703 | * @function getTypeUrl
|
16704 | * @memberof google.datastore.v1.RollbackRequest
|
16705 | * @static
|
16706 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
16707 | * @returns {string} The default type url
|
16708 | */
|
16709 | RollbackRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
16710 | if (typeUrlPrefix === undefined) {
|
16711 | typeUrlPrefix = "type.googleapis.com";
|
16712 | }
|
16713 | return typeUrlPrefix + "/google.datastore.v1.RollbackRequest";
|
16714 | };
|
16715 |
|
16716 | return RollbackRequest;
|
16717 | })();
|
16718 |
|
16719 | v1.RollbackResponse = (function() {
|
16720 |
|
16721 | /**
|
16722 | * Properties of a RollbackResponse.
|
16723 | * @memberof google.datastore.v1
|
16724 | * @interface IRollbackResponse
|
16725 | */
|
16726 |
|
16727 | /**
|
16728 | * Constructs a new RollbackResponse.
|
16729 | * @memberof google.datastore.v1
|
16730 | * @classdesc Represents a RollbackResponse.
|
16731 | * @implements IRollbackResponse
|
16732 | * @constructor
|
16733 | * @param {google.datastore.v1.IRollbackResponse=} [properties] Properties to set
|
16734 | */
|
16735 | function RollbackResponse(properties) {
|
16736 | if (properties)
|
16737 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
16738 | if (properties[keys[i]] != null)
|
16739 | this[keys[i]] = properties[keys[i]];
|
16740 | }
|
16741 |
|
16742 | /**
|
16743 | * Creates a new RollbackResponse instance using the specified properties.
|
16744 | * @function create
|
16745 | * @memberof google.datastore.v1.RollbackResponse
|
16746 | * @static
|
16747 | * @param {google.datastore.v1.IRollbackResponse=} [properties] Properties to set
|
16748 | * @returns {google.datastore.v1.RollbackResponse} RollbackResponse instance
|
16749 | */
|
16750 | RollbackResponse.create = function create(properties) {
|
16751 | return new RollbackResponse(properties);
|
16752 | };
|
16753 |
|
16754 | /**
|
16755 | * Encodes the specified RollbackResponse message. Does not implicitly {@link google.datastore.v1.RollbackResponse.verify|verify} messages.
|
16756 | * @function encode
|
16757 | * @memberof google.datastore.v1.RollbackResponse
|
16758 | * @static
|
16759 | * @param {google.datastore.v1.IRollbackResponse} message RollbackResponse message or plain object to encode
|
16760 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
16761 | * @returns {$protobuf.Writer} Writer
|
16762 | */
|
16763 | RollbackResponse.encode = function encode(message, writer) {
|
16764 | if (!writer)
|
16765 | writer = $Writer.create();
|
16766 | return writer;
|
16767 | };
|
16768 |
|
16769 | /**
|
16770 | * Encodes the specified RollbackResponse message, length delimited. Does not implicitly {@link google.datastore.v1.RollbackResponse.verify|verify} messages.
|
16771 | * @function encodeDelimited
|
16772 | * @memberof google.datastore.v1.RollbackResponse
|
16773 | * @static
|
16774 | * @param {google.datastore.v1.IRollbackResponse} message RollbackResponse message or plain object to encode
|
16775 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
16776 | * @returns {$protobuf.Writer} Writer
|
16777 | */
|
16778 | RollbackResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
16779 | return this.encode(message, writer).ldelim();
|
16780 | };
|
16781 |
|
16782 | /**
|
16783 | * Decodes a RollbackResponse message from the specified reader or buffer.
|
16784 | * @function decode
|
16785 | * @memberof google.datastore.v1.RollbackResponse
|
16786 | * @static
|
16787 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
16788 | * @param {number} [length] Message length if known beforehand
|
16789 | * @returns {google.datastore.v1.RollbackResponse} RollbackResponse
|
16790 | * @throws {Error} If the payload is not a reader or valid buffer
|
16791 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
16792 | */
|
16793 | RollbackResponse.decode = function decode(reader, length) {
|
16794 | if (!(reader instanceof $Reader))
|
16795 | reader = $Reader.create(reader);
|
16796 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.RollbackResponse();
|
16797 | while (reader.pos < end) {
|
16798 | var tag = reader.uint32();
|
16799 | switch (tag >>> 3) {
|
16800 | default:
|
16801 | reader.skipType(tag & 7);
|
16802 | break;
|
16803 | }
|
16804 | }
|
16805 | return message;
|
16806 | };
|
16807 |
|
16808 | /**
|
16809 | * Decodes a RollbackResponse message from the specified reader or buffer, length delimited.
|
16810 | * @function decodeDelimited
|
16811 | * @memberof google.datastore.v1.RollbackResponse
|
16812 | * @static
|
16813 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
16814 | * @returns {google.datastore.v1.RollbackResponse} RollbackResponse
|
16815 | * @throws {Error} If the payload is not a reader or valid buffer
|
16816 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
16817 | */
|
16818 | RollbackResponse.decodeDelimited = function decodeDelimited(reader) {
|
16819 | if (!(reader instanceof $Reader))
|
16820 | reader = new $Reader(reader);
|
16821 | return this.decode(reader, reader.uint32());
|
16822 | };
|
16823 |
|
16824 | /**
|
16825 | * Verifies a RollbackResponse message.
|
16826 | * @function verify
|
16827 | * @memberof google.datastore.v1.RollbackResponse
|
16828 | * @static
|
16829 | * @param {Object.<string,*>} message Plain object to verify
|
16830 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
16831 | */
|
16832 | RollbackResponse.verify = function verify(message) {
|
16833 | if (typeof message !== "object" || message === null)
|
16834 | return "object expected";
|
16835 | return null;
|
16836 | };
|
16837 |
|
16838 | /**
|
16839 | * Creates a RollbackResponse message from a plain object. Also converts values to their respective internal types.
|
16840 | * @function fromObject
|
16841 | * @memberof google.datastore.v1.RollbackResponse
|
16842 | * @static
|
16843 | * @param {Object.<string,*>} object Plain object
|
16844 | * @returns {google.datastore.v1.RollbackResponse} RollbackResponse
|
16845 | */
|
16846 | RollbackResponse.fromObject = function fromObject(object) {
|
16847 | if (object instanceof $root.google.datastore.v1.RollbackResponse)
|
16848 | return object;
|
16849 | return new $root.google.datastore.v1.RollbackResponse();
|
16850 | };
|
16851 |
|
16852 | /**
|
16853 | * Creates a plain object from a RollbackResponse message. Also converts values to other types if specified.
|
16854 | * @function toObject
|
16855 | * @memberof google.datastore.v1.RollbackResponse
|
16856 | * @static
|
16857 | * @param {google.datastore.v1.RollbackResponse} message RollbackResponse
|
16858 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
16859 | * @returns {Object.<string,*>} Plain object
|
16860 | */
|
16861 | RollbackResponse.toObject = function toObject() {
|
16862 | return {};
|
16863 | };
|
16864 |
|
16865 | /**
|
16866 | * Converts this RollbackResponse to JSON.
|
16867 | * @function toJSON
|
16868 | * @memberof google.datastore.v1.RollbackResponse
|
16869 | * @instance
|
16870 | * @returns {Object.<string,*>} JSON object
|
16871 | */
|
16872 | RollbackResponse.prototype.toJSON = function toJSON() {
|
16873 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
16874 | };
|
16875 |
|
16876 | /**
|
16877 | * Gets the default type url for RollbackResponse
|
16878 | * @function getTypeUrl
|
16879 | * @memberof google.datastore.v1.RollbackResponse
|
16880 | * @static
|
16881 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
16882 | * @returns {string} The default type url
|
16883 | */
|
16884 | RollbackResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
16885 | if (typeUrlPrefix === undefined) {
|
16886 | typeUrlPrefix = "type.googleapis.com";
|
16887 | }
|
16888 | return typeUrlPrefix + "/google.datastore.v1.RollbackResponse";
|
16889 | };
|
16890 |
|
16891 | return RollbackResponse;
|
16892 | })();
|
16893 |
|
16894 | v1.CommitRequest = (function() {
|
16895 |
|
16896 | /**
|
16897 | * Properties of a CommitRequest.
|
16898 | * @memberof google.datastore.v1
|
16899 | * @interface ICommitRequest
|
16900 | * @property {string|null} [projectId] CommitRequest projectId
|
16901 | * @property {string|null} [databaseId] CommitRequest databaseId
|
16902 | * @property {google.datastore.v1.CommitRequest.Mode|null} [mode] CommitRequest mode
|
16903 | * @property {Uint8Array|null} [transaction] CommitRequest transaction
|
16904 | * @property {google.datastore.v1.ITransactionOptions|null} [singleUseTransaction] CommitRequest singleUseTransaction
|
16905 | * @property {Array.<google.datastore.v1.IMutation>|null} [mutations] CommitRequest mutations
|
16906 | */
|
16907 |
|
16908 | /**
|
16909 | * Constructs a new CommitRequest.
|
16910 | * @memberof google.datastore.v1
|
16911 | * @classdesc Represents a CommitRequest.
|
16912 | * @implements ICommitRequest
|
16913 | * @constructor
|
16914 | * @param {google.datastore.v1.ICommitRequest=} [properties] Properties to set
|
16915 | */
|
16916 | function CommitRequest(properties) {
|
16917 | this.mutations = [];
|
16918 | if (properties)
|
16919 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
16920 | if (properties[keys[i]] != null)
|
16921 | this[keys[i]] = properties[keys[i]];
|
16922 | }
|
16923 |
|
16924 | /**
|
16925 | * CommitRequest projectId.
|
16926 | * @member {string} projectId
|
16927 | * @memberof google.datastore.v1.CommitRequest
|
16928 | * @instance
|
16929 | */
|
16930 | CommitRequest.prototype.projectId = "";
|
16931 |
|
16932 | /**
|
16933 | * CommitRequest databaseId.
|
16934 | * @member {string} databaseId
|
16935 | * @memberof google.datastore.v1.CommitRequest
|
16936 | * @instance
|
16937 | */
|
16938 | CommitRequest.prototype.databaseId = "";
|
16939 |
|
16940 | /**
|
16941 | * CommitRequest mode.
|
16942 | * @member {google.datastore.v1.CommitRequest.Mode} mode
|
16943 | * @memberof google.datastore.v1.CommitRequest
|
16944 | * @instance
|
16945 | */
|
16946 | CommitRequest.prototype.mode = 0;
|
16947 |
|
16948 | /**
|
16949 | * CommitRequest transaction.
|
16950 | * @member {Uint8Array|null|undefined} transaction
|
16951 | * @memberof google.datastore.v1.CommitRequest
|
16952 | * @instance
|
16953 | */
|
16954 | CommitRequest.prototype.transaction = null;
|
16955 |
|
16956 | /**
|
16957 | * CommitRequest singleUseTransaction.
|
16958 | * @member {google.datastore.v1.ITransactionOptions|null|undefined} singleUseTransaction
|
16959 | * @memberof google.datastore.v1.CommitRequest
|
16960 | * @instance
|
16961 | */
|
16962 | CommitRequest.prototype.singleUseTransaction = null;
|
16963 |
|
16964 | /**
|
16965 | * CommitRequest mutations.
|
16966 | * @member {Array.<google.datastore.v1.IMutation>} mutations
|
16967 | * @memberof google.datastore.v1.CommitRequest
|
16968 | * @instance
|
16969 | */
|
16970 | CommitRequest.prototype.mutations = $util.emptyArray;
|
16971 |
|
16972 | // OneOf field names bound to virtual getters and setters
|
16973 | var $oneOfFields;
|
16974 |
|
16975 | /**
|
16976 | * CommitRequest transactionSelector.
|
16977 | * @member {"transaction"|"singleUseTransaction"|undefined} transactionSelector
|
16978 | * @memberof google.datastore.v1.CommitRequest
|
16979 | * @instance
|
16980 | */
|
16981 | Object.defineProperty(CommitRequest.prototype, "transactionSelector", {
|
16982 | get: $util.oneOfGetter($oneOfFields = ["transaction", "singleUseTransaction"]),
|
16983 | set: $util.oneOfSetter($oneOfFields)
|
16984 | });
|
16985 |
|
16986 | /**
|
16987 | * Creates a new CommitRequest instance using the specified properties.
|
16988 | * @function create
|
16989 | * @memberof google.datastore.v1.CommitRequest
|
16990 | * @static
|
16991 | * @param {google.datastore.v1.ICommitRequest=} [properties] Properties to set
|
16992 | * @returns {google.datastore.v1.CommitRequest} CommitRequest instance
|
16993 | */
|
16994 | CommitRequest.create = function create(properties) {
|
16995 | return new CommitRequest(properties);
|
16996 | };
|
16997 |
|
16998 | /**
|
16999 | * Encodes the specified CommitRequest message. Does not implicitly {@link google.datastore.v1.CommitRequest.verify|verify} messages.
|
17000 | * @function encode
|
17001 | * @memberof google.datastore.v1.CommitRequest
|
17002 | * @static
|
17003 | * @param {google.datastore.v1.ICommitRequest} message CommitRequest message or plain object to encode
|
17004 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
17005 | * @returns {$protobuf.Writer} Writer
|
17006 | */
|
17007 | CommitRequest.encode = function encode(message, writer) {
|
17008 | if (!writer)
|
17009 | writer = $Writer.create();
|
17010 | if (message.transaction != null && Object.hasOwnProperty.call(message, "transaction"))
|
17011 | writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.transaction);
|
17012 | if (message.mode != null && Object.hasOwnProperty.call(message, "mode"))
|
17013 | writer.uint32(/* id 5, wireType 0 =*/40).int32(message.mode);
|
17014 | if (message.mutations != null && message.mutations.length)
|
17015 | for (var i = 0; i < message.mutations.length; ++i)
|
17016 | $root.google.datastore.v1.Mutation.encode(message.mutations[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
17017 | if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
|
17018 | writer.uint32(/* id 8, wireType 2 =*/66).string(message.projectId);
|
17019 | if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId"))
|
17020 | writer.uint32(/* id 9, wireType 2 =*/74).string(message.databaseId);
|
17021 | if (message.singleUseTransaction != null && Object.hasOwnProperty.call(message, "singleUseTransaction"))
|
17022 | $root.google.datastore.v1.TransactionOptions.encode(message.singleUseTransaction, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
|
17023 | return writer;
|
17024 | };
|
17025 |
|
17026 | /**
|
17027 | * Encodes the specified CommitRequest message, length delimited. Does not implicitly {@link google.datastore.v1.CommitRequest.verify|verify} messages.
|
17028 | * @function encodeDelimited
|
17029 | * @memberof google.datastore.v1.CommitRequest
|
17030 | * @static
|
17031 | * @param {google.datastore.v1.ICommitRequest} message CommitRequest message or plain object to encode
|
17032 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
17033 | * @returns {$protobuf.Writer} Writer
|
17034 | */
|
17035 | CommitRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
17036 | return this.encode(message, writer).ldelim();
|
17037 | };
|
17038 |
|
17039 | /**
|
17040 | * Decodes a CommitRequest message from the specified reader or buffer.
|
17041 | * @function decode
|
17042 | * @memberof google.datastore.v1.CommitRequest
|
17043 | * @static
|
17044 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
17045 | * @param {number} [length] Message length if known beforehand
|
17046 | * @returns {google.datastore.v1.CommitRequest} CommitRequest
|
17047 | * @throws {Error} If the payload is not a reader or valid buffer
|
17048 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
17049 | */
|
17050 | CommitRequest.decode = function decode(reader, length) {
|
17051 | if (!(reader instanceof $Reader))
|
17052 | reader = $Reader.create(reader);
|
17053 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.CommitRequest();
|
17054 | while (reader.pos < end) {
|
17055 | var tag = reader.uint32();
|
17056 | switch (tag >>> 3) {
|
17057 | case 8: {
|
17058 | message.projectId = reader.string();
|
17059 | break;
|
17060 | }
|
17061 | case 9: {
|
17062 | message.databaseId = reader.string();
|
17063 | break;
|
17064 | }
|
17065 | case 5: {
|
17066 | message.mode = reader.int32();
|
17067 | break;
|
17068 | }
|
17069 | case 1: {
|
17070 | message.transaction = reader.bytes();
|
17071 | break;
|
17072 | }
|
17073 | case 10: {
|
17074 | message.singleUseTransaction = $root.google.datastore.v1.TransactionOptions.decode(reader, reader.uint32());
|
17075 | break;
|
17076 | }
|
17077 | case 6: {
|
17078 | if (!(message.mutations && message.mutations.length))
|
17079 | message.mutations = [];
|
17080 | message.mutations.push($root.google.datastore.v1.Mutation.decode(reader, reader.uint32()));
|
17081 | break;
|
17082 | }
|
17083 | default:
|
17084 | reader.skipType(tag & 7);
|
17085 | break;
|
17086 | }
|
17087 | }
|
17088 | return message;
|
17089 | };
|
17090 |
|
17091 | /**
|
17092 | * Decodes a CommitRequest message from the specified reader or buffer, length delimited.
|
17093 | * @function decodeDelimited
|
17094 | * @memberof google.datastore.v1.CommitRequest
|
17095 | * @static
|
17096 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
17097 | * @returns {google.datastore.v1.CommitRequest} CommitRequest
|
17098 | * @throws {Error} If the payload is not a reader or valid buffer
|
17099 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
17100 | */
|
17101 | CommitRequest.decodeDelimited = function decodeDelimited(reader) {
|
17102 | if (!(reader instanceof $Reader))
|
17103 | reader = new $Reader(reader);
|
17104 | return this.decode(reader, reader.uint32());
|
17105 | };
|
17106 |
|
17107 | /**
|
17108 | * Verifies a CommitRequest message.
|
17109 | * @function verify
|
17110 | * @memberof google.datastore.v1.CommitRequest
|
17111 | * @static
|
17112 | * @param {Object.<string,*>} message Plain object to verify
|
17113 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
17114 | */
|
17115 | CommitRequest.verify = function verify(message) {
|
17116 | if (typeof message !== "object" || message === null)
|
17117 | return "object expected";
|
17118 | var properties = {};
|
17119 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
17120 | if (!$util.isString(message.projectId))
|
17121 | return "projectId: string expected";
|
17122 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
17123 | if (!$util.isString(message.databaseId))
|
17124 | return "databaseId: string expected";
|
17125 | if (message.mode != null && message.hasOwnProperty("mode"))
|
17126 | switch (message.mode) {
|
17127 | default:
|
17128 | return "mode: enum value expected";
|
17129 | case 0:
|
17130 | case 1:
|
17131 | case 2:
|
17132 | break;
|
17133 | }
|
17134 | if (message.transaction != null && message.hasOwnProperty("transaction")) {
|
17135 | properties.transactionSelector = 1;
|
17136 | if (!(message.transaction && typeof message.transaction.length === "number" || $util.isString(message.transaction)))
|
17137 | return "transaction: buffer expected";
|
17138 | }
|
17139 | if (message.singleUseTransaction != null && message.hasOwnProperty("singleUseTransaction")) {
|
17140 | if (properties.transactionSelector === 1)
|
17141 | return "transactionSelector: multiple values";
|
17142 | properties.transactionSelector = 1;
|
17143 | {
|
17144 | var error = $root.google.datastore.v1.TransactionOptions.verify(message.singleUseTransaction);
|
17145 | if (error)
|
17146 | return "singleUseTransaction." + error;
|
17147 | }
|
17148 | }
|
17149 | if (message.mutations != null && message.hasOwnProperty("mutations")) {
|
17150 | if (!Array.isArray(message.mutations))
|
17151 | return "mutations: array expected";
|
17152 | for (var i = 0; i < message.mutations.length; ++i) {
|
17153 | var error = $root.google.datastore.v1.Mutation.verify(message.mutations[i]);
|
17154 | if (error)
|
17155 | return "mutations." + error;
|
17156 | }
|
17157 | }
|
17158 | return null;
|
17159 | };
|
17160 |
|
17161 | /**
|
17162 | * Creates a CommitRequest message from a plain object. Also converts values to their respective internal types.
|
17163 | * @function fromObject
|
17164 | * @memberof google.datastore.v1.CommitRequest
|
17165 | * @static
|
17166 | * @param {Object.<string,*>} object Plain object
|
17167 | * @returns {google.datastore.v1.CommitRequest} CommitRequest
|
17168 | */
|
17169 | CommitRequest.fromObject = function fromObject(object) {
|
17170 | if (object instanceof $root.google.datastore.v1.CommitRequest)
|
17171 | return object;
|
17172 | var message = new $root.google.datastore.v1.CommitRequest();
|
17173 | if (object.projectId != null)
|
17174 | message.projectId = String(object.projectId);
|
17175 | if (object.databaseId != null)
|
17176 | message.databaseId = String(object.databaseId);
|
17177 | switch (object.mode) {
|
17178 | default:
|
17179 | if (typeof object.mode === "number") {
|
17180 | message.mode = object.mode;
|
17181 | break;
|
17182 | }
|
17183 | break;
|
17184 | case "MODE_UNSPECIFIED":
|
17185 | case 0:
|
17186 | message.mode = 0;
|
17187 | break;
|
17188 | case "TRANSACTIONAL":
|
17189 | case 1:
|
17190 | message.mode = 1;
|
17191 | break;
|
17192 | case "NON_TRANSACTIONAL":
|
17193 | case 2:
|
17194 | message.mode = 2;
|
17195 | break;
|
17196 | }
|
17197 | if (object.transaction != null)
|
17198 | if (typeof object.transaction === "string")
|
17199 | $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0);
|
17200 | else if (object.transaction.length >= 0)
|
17201 | message.transaction = object.transaction;
|
17202 | if (object.singleUseTransaction != null) {
|
17203 | if (typeof object.singleUseTransaction !== "object")
|
17204 | throw TypeError(".google.datastore.v1.CommitRequest.singleUseTransaction: object expected");
|
17205 | message.singleUseTransaction = $root.google.datastore.v1.TransactionOptions.fromObject(object.singleUseTransaction);
|
17206 | }
|
17207 | if (object.mutations) {
|
17208 | if (!Array.isArray(object.mutations))
|
17209 | throw TypeError(".google.datastore.v1.CommitRequest.mutations: array expected");
|
17210 | message.mutations = [];
|
17211 | for (var i = 0; i < object.mutations.length; ++i) {
|
17212 | if (typeof object.mutations[i] !== "object")
|
17213 | throw TypeError(".google.datastore.v1.CommitRequest.mutations: object expected");
|
17214 | message.mutations[i] = $root.google.datastore.v1.Mutation.fromObject(object.mutations[i]);
|
17215 | }
|
17216 | }
|
17217 | return message;
|
17218 | };
|
17219 |
|
17220 | /**
|
17221 | * Creates a plain object from a CommitRequest message. Also converts values to other types if specified.
|
17222 | * @function toObject
|
17223 | * @memberof google.datastore.v1.CommitRequest
|
17224 | * @static
|
17225 | * @param {google.datastore.v1.CommitRequest} message CommitRequest
|
17226 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
17227 | * @returns {Object.<string,*>} Plain object
|
17228 | */
|
17229 | CommitRequest.toObject = function toObject(message, options) {
|
17230 | if (!options)
|
17231 | options = {};
|
17232 | var object = {};
|
17233 | if (options.arrays || options.defaults)
|
17234 | object.mutations = [];
|
17235 | if (options.defaults) {
|
17236 | object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0;
|
17237 | object.projectId = "";
|
17238 | object.databaseId = "";
|
17239 | }
|
17240 | if (message.transaction != null && message.hasOwnProperty("transaction")) {
|
17241 | object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction;
|
17242 | if (options.oneofs)
|
17243 | object.transactionSelector = "transaction";
|
17244 | }
|
17245 | if (message.mode != null && message.hasOwnProperty("mode"))
|
17246 | object.mode = options.enums === String ? $root.google.datastore.v1.CommitRequest.Mode[message.mode] === undefined ? message.mode : $root.google.datastore.v1.CommitRequest.Mode[message.mode] : message.mode;
|
17247 | if (message.mutations && message.mutations.length) {
|
17248 | object.mutations = [];
|
17249 | for (var j = 0; j < message.mutations.length; ++j)
|
17250 | object.mutations[j] = $root.google.datastore.v1.Mutation.toObject(message.mutations[j], options);
|
17251 | }
|
17252 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
17253 | object.projectId = message.projectId;
|
17254 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
17255 | object.databaseId = message.databaseId;
|
17256 | if (message.singleUseTransaction != null && message.hasOwnProperty("singleUseTransaction")) {
|
17257 | object.singleUseTransaction = $root.google.datastore.v1.TransactionOptions.toObject(message.singleUseTransaction, options);
|
17258 | if (options.oneofs)
|
17259 | object.transactionSelector = "singleUseTransaction";
|
17260 | }
|
17261 | return object;
|
17262 | };
|
17263 |
|
17264 | /**
|
17265 | * Converts this CommitRequest to JSON.
|
17266 | * @function toJSON
|
17267 | * @memberof google.datastore.v1.CommitRequest
|
17268 | * @instance
|
17269 | * @returns {Object.<string,*>} JSON object
|
17270 | */
|
17271 | CommitRequest.prototype.toJSON = function toJSON() {
|
17272 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
17273 | };
|
17274 |
|
17275 | /**
|
17276 | * Gets the default type url for CommitRequest
|
17277 | * @function getTypeUrl
|
17278 | * @memberof google.datastore.v1.CommitRequest
|
17279 | * @static
|
17280 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
17281 | * @returns {string} The default type url
|
17282 | */
|
17283 | CommitRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
17284 | if (typeUrlPrefix === undefined) {
|
17285 | typeUrlPrefix = "type.googleapis.com";
|
17286 | }
|
17287 | return typeUrlPrefix + "/google.datastore.v1.CommitRequest";
|
17288 | };
|
17289 |
|
17290 | /**
|
17291 | * Mode enum.
|
17292 | * @name google.datastore.v1.CommitRequest.Mode
|
17293 | * @enum {number}
|
17294 | * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value
|
17295 | * @property {number} TRANSACTIONAL=1 TRANSACTIONAL value
|
17296 | * @property {number} NON_TRANSACTIONAL=2 NON_TRANSACTIONAL value
|
17297 | */
|
17298 | CommitRequest.Mode = (function() {
|
17299 | var valuesById = {}, values = Object.create(valuesById);
|
17300 | values[valuesById[0] = "MODE_UNSPECIFIED"] = 0;
|
17301 | values[valuesById[1] = "TRANSACTIONAL"] = 1;
|
17302 | values[valuesById[2] = "NON_TRANSACTIONAL"] = 2;
|
17303 | return values;
|
17304 | })();
|
17305 |
|
17306 | return CommitRequest;
|
17307 | })();
|
17308 |
|
17309 | v1.CommitResponse = (function() {
|
17310 |
|
17311 | /**
|
17312 | * Properties of a CommitResponse.
|
17313 | * @memberof google.datastore.v1
|
17314 | * @interface ICommitResponse
|
17315 | * @property {Array.<google.datastore.v1.IMutationResult>|null} [mutationResults] CommitResponse mutationResults
|
17316 | * @property {number|null} [indexUpdates] CommitResponse indexUpdates
|
17317 | * @property {google.protobuf.ITimestamp|null} [commitTime] CommitResponse commitTime
|
17318 | */
|
17319 |
|
17320 | /**
|
17321 | * Constructs a new CommitResponse.
|
17322 | * @memberof google.datastore.v1
|
17323 | * @classdesc Represents a CommitResponse.
|
17324 | * @implements ICommitResponse
|
17325 | * @constructor
|
17326 | * @param {google.datastore.v1.ICommitResponse=} [properties] Properties to set
|
17327 | */
|
17328 | function CommitResponse(properties) {
|
17329 | this.mutationResults = [];
|
17330 | if (properties)
|
17331 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
17332 | if (properties[keys[i]] != null)
|
17333 | this[keys[i]] = properties[keys[i]];
|
17334 | }
|
17335 |
|
17336 | /**
|
17337 | * CommitResponse mutationResults.
|
17338 | * @member {Array.<google.datastore.v1.IMutationResult>} mutationResults
|
17339 | * @memberof google.datastore.v1.CommitResponse
|
17340 | * @instance
|
17341 | */
|
17342 | CommitResponse.prototype.mutationResults = $util.emptyArray;
|
17343 |
|
17344 | /**
|
17345 | * CommitResponse indexUpdates.
|
17346 | * @member {number} indexUpdates
|
17347 | * @memberof google.datastore.v1.CommitResponse
|
17348 | * @instance
|
17349 | */
|
17350 | CommitResponse.prototype.indexUpdates = 0;
|
17351 |
|
17352 | /**
|
17353 | * CommitResponse commitTime.
|
17354 | * @member {google.protobuf.ITimestamp|null|undefined} commitTime
|
17355 | * @memberof google.datastore.v1.CommitResponse
|
17356 | * @instance
|
17357 | */
|
17358 | CommitResponse.prototype.commitTime = null;
|
17359 |
|
17360 | /**
|
17361 | * Creates a new CommitResponse instance using the specified properties.
|
17362 | * @function create
|
17363 | * @memberof google.datastore.v1.CommitResponse
|
17364 | * @static
|
17365 | * @param {google.datastore.v1.ICommitResponse=} [properties] Properties to set
|
17366 | * @returns {google.datastore.v1.CommitResponse} CommitResponse instance
|
17367 | */
|
17368 | CommitResponse.create = function create(properties) {
|
17369 | return new CommitResponse(properties);
|
17370 | };
|
17371 |
|
17372 | /**
|
17373 | * Encodes the specified CommitResponse message. Does not implicitly {@link google.datastore.v1.CommitResponse.verify|verify} messages.
|
17374 | * @function encode
|
17375 | * @memberof google.datastore.v1.CommitResponse
|
17376 | * @static
|
17377 | * @param {google.datastore.v1.ICommitResponse} message CommitResponse message or plain object to encode
|
17378 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
17379 | * @returns {$protobuf.Writer} Writer
|
17380 | */
|
17381 | CommitResponse.encode = function encode(message, writer) {
|
17382 | if (!writer)
|
17383 | writer = $Writer.create();
|
17384 | if (message.mutationResults != null && message.mutationResults.length)
|
17385 | for (var i = 0; i < message.mutationResults.length; ++i)
|
17386 | $root.google.datastore.v1.MutationResult.encode(message.mutationResults[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
17387 | if (message.indexUpdates != null && Object.hasOwnProperty.call(message, "indexUpdates"))
|
17388 | writer.uint32(/* id 4, wireType 0 =*/32).int32(message.indexUpdates);
|
17389 | if (message.commitTime != null && Object.hasOwnProperty.call(message, "commitTime"))
|
17390 | $root.google.protobuf.Timestamp.encode(message.commitTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
17391 | return writer;
|
17392 | };
|
17393 |
|
17394 | /**
|
17395 | * Encodes the specified CommitResponse message, length delimited. Does not implicitly {@link google.datastore.v1.CommitResponse.verify|verify} messages.
|
17396 | * @function encodeDelimited
|
17397 | * @memberof google.datastore.v1.CommitResponse
|
17398 | * @static
|
17399 | * @param {google.datastore.v1.ICommitResponse} message CommitResponse message or plain object to encode
|
17400 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
17401 | * @returns {$protobuf.Writer} Writer
|
17402 | */
|
17403 | CommitResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
17404 | return this.encode(message, writer).ldelim();
|
17405 | };
|
17406 |
|
17407 | /**
|
17408 | * Decodes a CommitResponse message from the specified reader or buffer.
|
17409 | * @function decode
|
17410 | * @memberof google.datastore.v1.CommitResponse
|
17411 | * @static
|
17412 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
17413 | * @param {number} [length] Message length if known beforehand
|
17414 | * @returns {google.datastore.v1.CommitResponse} CommitResponse
|
17415 | * @throws {Error} If the payload is not a reader or valid buffer
|
17416 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
17417 | */
|
17418 | CommitResponse.decode = function decode(reader, length) {
|
17419 | if (!(reader instanceof $Reader))
|
17420 | reader = $Reader.create(reader);
|
17421 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.CommitResponse();
|
17422 | while (reader.pos < end) {
|
17423 | var tag = reader.uint32();
|
17424 | switch (tag >>> 3) {
|
17425 | case 3: {
|
17426 | if (!(message.mutationResults && message.mutationResults.length))
|
17427 | message.mutationResults = [];
|
17428 | message.mutationResults.push($root.google.datastore.v1.MutationResult.decode(reader, reader.uint32()));
|
17429 | break;
|
17430 | }
|
17431 | case 4: {
|
17432 | message.indexUpdates = reader.int32();
|
17433 | break;
|
17434 | }
|
17435 | case 8: {
|
17436 | message.commitTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
17437 | break;
|
17438 | }
|
17439 | default:
|
17440 | reader.skipType(tag & 7);
|
17441 | break;
|
17442 | }
|
17443 | }
|
17444 | return message;
|
17445 | };
|
17446 |
|
17447 | /**
|
17448 | * Decodes a CommitResponse message from the specified reader or buffer, length delimited.
|
17449 | * @function decodeDelimited
|
17450 | * @memberof google.datastore.v1.CommitResponse
|
17451 | * @static
|
17452 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
17453 | * @returns {google.datastore.v1.CommitResponse} CommitResponse
|
17454 | * @throws {Error} If the payload is not a reader or valid buffer
|
17455 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
17456 | */
|
17457 | CommitResponse.decodeDelimited = function decodeDelimited(reader) {
|
17458 | if (!(reader instanceof $Reader))
|
17459 | reader = new $Reader(reader);
|
17460 | return this.decode(reader, reader.uint32());
|
17461 | };
|
17462 |
|
17463 | /**
|
17464 | * Verifies a CommitResponse message.
|
17465 | * @function verify
|
17466 | * @memberof google.datastore.v1.CommitResponse
|
17467 | * @static
|
17468 | * @param {Object.<string,*>} message Plain object to verify
|
17469 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
17470 | */
|
17471 | CommitResponse.verify = function verify(message) {
|
17472 | if (typeof message !== "object" || message === null)
|
17473 | return "object expected";
|
17474 | if (message.mutationResults != null && message.hasOwnProperty("mutationResults")) {
|
17475 | if (!Array.isArray(message.mutationResults))
|
17476 | return "mutationResults: array expected";
|
17477 | for (var i = 0; i < message.mutationResults.length; ++i) {
|
17478 | var error = $root.google.datastore.v1.MutationResult.verify(message.mutationResults[i]);
|
17479 | if (error)
|
17480 | return "mutationResults." + error;
|
17481 | }
|
17482 | }
|
17483 | if (message.indexUpdates != null && message.hasOwnProperty("indexUpdates"))
|
17484 | if (!$util.isInteger(message.indexUpdates))
|
17485 | return "indexUpdates: integer expected";
|
17486 | if (message.commitTime != null && message.hasOwnProperty("commitTime")) {
|
17487 | var error = $root.google.protobuf.Timestamp.verify(message.commitTime);
|
17488 | if (error)
|
17489 | return "commitTime." + error;
|
17490 | }
|
17491 | return null;
|
17492 | };
|
17493 |
|
17494 | /**
|
17495 | * Creates a CommitResponse message from a plain object. Also converts values to their respective internal types.
|
17496 | * @function fromObject
|
17497 | * @memberof google.datastore.v1.CommitResponse
|
17498 | * @static
|
17499 | * @param {Object.<string,*>} object Plain object
|
17500 | * @returns {google.datastore.v1.CommitResponse} CommitResponse
|
17501 | */
|
17502 | CommitResponse.fromObject = function fromObject(object) {
|
17503 | if (object instanceof $root.google.datastore.v1.CommitResponse)
|
17504 | return object;
|
17505 | var message = new $root.google.datastore.v1.CommitResponse();
|
17506 | if (object.mutationResults) {
|
17507 | if (!Array.isArray(object.mutationResults))
|
17508 | throw TypeError(".google.datastore.v1.CommitResponse.mutationResults: array expected");
|
17509 | message.mutationResults = [];
|
17510 | for (var i = 0; i < object.mutationResults.length; ++i) {
|
17511 | if (typeof object.mutationResults[i] !== "object")
|
17512 | throw TypeError(".google.datastore.v1.CommitResponse.mutationResults: object expected");
|
17513 | message.mutationResults[i] = $root.google.datastore.v1.MutationResult.fromObject(object.mutationResults[i]);
|
17514 | }
|
17515 | }
|
17516 | if (object.indexUpdates != null)
|
17517 | message.indexUpdates = object.indexUpdates | 0;
|
17518 | if (object.commitTime != null) {
|
17519 | if (typeof object.commitTime !== "object")
|
17520 | throw TypeError(".google.datastore.v1.CommitResponse.commitTime: object expected");
|
17521 | message.commitTime = $root.google.protobuf.Timestamp.fromObject(object.commitTime);
|
17522 | }
|
17523 | return message;
|
17524 | };
|
17525 |
|
17526 | /**
|
17527 | * Creates a plain object from a CommitResponse message. Also converts values to other types if specified.
|
17528 | * @function toObject
|
17529 | * @memberof google.datastore.v1.CommitResponse
|
17530 | * @static
|
17531 | * @param {google.datastore.v1.CommitResponse} message CommitResponse
|
17532 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
17533 | * @returns {Object.<string,*>} Plain object
|
17534 | */
|
17535 | CommitResponse.toObject = function toObject(message, options) {
|
17536 | if (!options)
|
17537 | options = {};
|
17538 | var object = {};
|
17539 | if (options.arrays || options.defaults)
|
17540 | object.mutationResults = [];
|
17541 | if (options.defaults) {
|
17542 | object.indexUpdates = 0;
|
17543 | object.commitTime = null;
|
17544 | }
|
17545 | if (message.mutationResults && message.mutationResults.length) {
|
17546 | object.mutationResults = [];
|
17547 | for (var j = 0; j < message.mutationResults.length; ++j)
|
17548 | object.mutationResults[j] = $root.google.datastore.v1.MutationResult.toObject(message.mutationResults[j], options);
|
17549 | }
|
17550 | if (message.indexUpdates != null && message.hasOwnProperty("indexUpdates"))
|
17551 | object.indexUpdates = message.indexUpdates;
|
17552 | if (message.commitTime != null && message.hasOwnProperty("commitTime"))
|
17553 | object.commitTime = $root.google.protobuf.Timestamp.toObject(message.commitTime, options);
|
17554 | return object;
|
17555 | };
|
17556 |
|
17557 | /**
|
17558 | * Converts this CommitResponse to JSON.
|
17559 | * @function toJSON
|
17560 | * @memberof google.datastore.v1.CommitResponse
|
17561 | * @instance
|
17562 | * @returns {Object.<string,*>} JSON object
|
17563 | */
|
17564 | CommitResponse.prototype.toJSON = function toJSON() {
|
17565 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
17566 | };
|
17567 |
|
17568 | /**
|
17569 | * Gets the default type url for CommitResponse
|
17570 | * @function getTypeUrl
|
17571 | * @memberof google.datastore.v1.CommitResponse
|
17572 | * @static
|
17573 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
17574 | * @returns {string} The default type url
|
17575 | */
|
17576 | CommitResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
17577 | if (typeUrlPrefix === undefined) {
|
17578 | typeUrlPrefix = "type.googleapis.com";
|
17579 | }
|
17580 | return typeUrlPrefix + "/google.datastore.v1.CommitResponse";
|
17581 | };
|
17582 |
|
17583 | return CommitResponse;
|
17584 | })();
|
17585 |
|
17586 | v1.AllocateIdsRequest = (function() {
|
17587 |
|
17588 | /**
|
17589 | * Properties of an AllocateIdsRequest.
|
17590 | * @memberof google.datastore.v1
|
17591 | * @interface IAllocateIdsRequest
|
17592 | * @property {string|null} [projectId] AllocateIdsRequest projectId
|
17593 | * @property {string|null} [databaseId] AllocateIdsRequest databaseId
|
17594 | * @property {Array.<google.datastore.v1.IKey>|null} [keys] AllocateIdsRequest keys
|
17595 | */
|
17596 |
|
17597 | /**
|
17598 | * Constructs a new AllocateIdsRequest.
|
17599 | * @memberof google.datastore.v1
|
17600 | * @classdesc Represents an AllocateIdsRequest.
|
17601 | * @implements IAllocateIdsRequest
|
17602 | * @constructor
|
17603 | * @param {google.datastore.v1.IAllocateIdsRequest=} [properties] Properties to set
|
17604 | */
|
17605 | function AllocateIdsRequest(properties) {
|
17606 | this.keys = [];
|
17607 | if (properties)
|
17608 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
17609 | if (properties[keys[i]] != null)
|
17610 | this[keys[i]] = properties[keys[i]];
|
17611 | }
|
17612 |
|
17613 | /**
|
17614 | * AllocateIdsRequest projectId.
|
17615 | * @member {string} projectId
|
17616 | * @memberof google.datastore.v1.AllocateIdsRequest
|
17617 | * @instance
|
17618 | */
|
17619 | AllocateIdsRequest.prototype.projectId = "";
|
17620 |
|
17621 | /**
|
17622 | * AllocateIdsRequest databaseId.
|
17623 | * @member {string} databaseId
|
17624 | * @memberof google.datastore.v1.AllocateIdsRequest
|
17625 | * @instance
|
17626 | */
|
17627 | AllocateIdsRequest.prototype.databaseId = "";
|
17628 |
|
17629 | /**
|
17630 | * AllocateIdsRequest keys.
|
17631 | * @member {Array.<google.datastore.v1.IKey>} keys
|
17632 | * @memberof google.datastore.v1.AllocateIdsRequest
|
17633 | * @instance
|
17634 | */
|
17635 | AllocateIdsRequest.prototype.keys = $util.emptyArray;
|
17636 |
|
17637 | /**
|
17638 | * Creates a new AllocateIdsRequest instance using the specified properties.
|
17639 | * @function create
|
17640 | * @memberof google.datastore.v1.AllocateIdsRequest
|
17641 | * @static
|
17642 | * @param {google.datastore.v1.IAllocateIdsRequest=} [properties] Properties to set
|
17643 | * @returns {google.datastore.v1.AllocateIdsRequest} AllocateIdsRequest instance
|
17644 | */
|
17645 | AllocateIdsRequest.create = function create(properties) {
|
17646 | return new AllocateIdsRequest(properties);
|
17647 | };
|
17648 |
|
17649 | /**
|
17650 | * Encodes the specified AllocateIdsRequest message. Does not implicitly {@link google.datastore.v1.AllocateIdsRequest.verify|verify} messages.
|
17651 | * @function encode
|
17652 | * @memberof google.datastore.v1.AllocateIdsRequest
|
17653 | * @static
|
17654 | * @param {google.datastore.v1.IAllocateIdsRequest} message AllocateIdsRequest message or plain object to encode
|
17655 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
17656 | * @returns {$protobuf.Writer} Writer
|
17657 | */
|
17658 | AllocateIdsRequest.encode = function encode(message, writer) {
|
17659 | if (!writer)
|
17660 | writer = $Writer.create();
|
17661 | if (message.keys != null && message.keys.length)
|
17662 | for (var i = 0; i < message.keys.length; ++i)
|
17663 | $root.google.datastore.v1.Key.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
17664 | if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
|
17665 | writer.uint32(/* id 8, wireType 2 =*/66).string(message.projectId);
|
17666 | if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId"))
|
17667 | writer.uint32(/* id 9, wireType 2 =*/74).string(message.databaseId);
|
17668 | return writer;
|
17669 | };
|
17670 |
|
17671 | /**
|
17672 | * Encodes the specified AllocateIdsRequest message, length delimited. Does not implicitly {@link google.datastore.v1.AllocateIdsRequest.verify|verify} messages.
|
17673 | * @function encodeDelimited
|
17674 | * @memberof google.datastore.v1.AllocateIdsRequest
|
17675 | * @static
|
17676 | * @param {google.datastore.v1.IAllocateIdsRequest} message AllocateIdsRequest message or plain object to encode
|
17677 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
17678 | * @returns {$protobuf.Writer} Writer
|
17679 | */
|
17680 | AllocateIdsRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
17681 | return this.encode(message, writer).ldelim();
|
17682 | };
|
17683 |
|
17684 | /**
|
17685 | * Decodes an AllocateIdsRequest message from the specified reader or buffer.
|
17686 | * @function decode
|
17687 | * @memberof google.datastore.v1.AllocateIdsRequest
|
17688 | * @static
|
17689 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
17690 | * @param {number} [length] Message length if known beforehand
|
17691 | * @returns {google.datastore.v1.AllocateIdsRequest} AllocateIdsRequest
|
17692 | * @throws {Error} If the payload is not a reader or valid buffer
|
17693 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
17694 | */
|
17695 | AllocateIdsRequest.decode = function decode(reader, length) {
|
17696 | if (!(reader instanceof $Reader))
|
17697 | reader = $Reader.create(reader);
|
17698 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.AllocateIdsRequest();
|
17699 | while (reader.pos < end) {
|
17700 | var tag = reader.uint32();
|
17701 | switch (tag >>> 3) {
|
17702 | case 8: {
|
17703 | message.projectId = reader.string();
|
17704 | break;
|
17705 | }
|
17706 | case 9: {
|
17707 | message.databaseId = reader.string();
|
17708 | break;
|
17709 | }
|
17710 | case 1: {
|
17711 | if (!(message.keys && message.keys.length))
|
17712 | message.keys = [];
|
17713 | message.keys.push($root.google.datastore.v1.Key.decode(reader, reader.uint32()));
|
17714 | break;
|
17715 | }
|
17716 | default:
|
17717 | reader.skipType(tag & 7);
|
17718 | break;
|
17719 | }
|
17720 | }
|
17721 | return message;
|
17722 | };
|
17723 |
|
17724 | /**
|
17725 | * Decodes an AllocateIdsRequest message from the specified reader or buffer, length delimited.
|
17726 | * @function decodeDelimited
|
17727 | * @memberof google.datastore.v1.AllocateIdsRequest
|
17728 | * @static
|
17729 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
17730 | * @returns {google.datastore.v1.AllocateIdsRequest} AllocateIdsRequest
|
17731 | * @throws {Error} If the payload is not a reader or valid buffer
|
17732 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
17733 | */
|
17734 | AllocateIdsRequest.decodeDelimited = function decodeDelimited(reader) {
|
17735 | if (!(reader instanceof $Reader))
|
17736 | reader = new $Reader(reader);
|
17737 | return this.decode(reader, reader.uint32());
|
17738 | };
|
17739 |
|
17740 | /**
|
17741 | * Verifies an AllocateIdsRequest message.
|
17742 | * @function verify
|
17743 | * @memberof google.datastore.v1.AllocateIdsRequest
|
17744 | * @static
|
17745 | * @param {Object.<string,*>} message Plain object to verify
|
17746 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
17747 | */
|
17748 | AllocateIdsRequest.verify = function verify(message) {
|
17749 | if (typeof message !== "object" || message === null)
|
17750 | return "object expected";
|
17751 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
17752 | if (!$util.isString(message.projectId))
|
17753 | return "projectId: string expected";
|
17754 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
17755 | if (!$util.isString(message.databaseId))
|
17756 | return "databaseId: string expected";
|
17757 | if (message.keys != null && message.hasOwnProperty("keys")) {
|
17758 | if (!Array.isArray(message.keys))
|
17759 | return "keys: array expected";
|
17760 | for (var i = 0; i < message.keys.length; ++i) {
|
17761 | var error = $root.google.datastore.v1.Key.verify(message.keys[i]);
|
17762 | if (error)
|
17763 | return "keys." + error;
|
17764 | }
|
17765 | }
|
17766 | return null;
|
17767 | };
|
17768 |
|
17769 | /**
|
17770 | * Creates an AllocateIdsRequest message from a plain object. Also converts values to their respective internal types.
|
17771 | * @function fromObject
|
17772 | * @memberof google.datastore.v1.AllocateIdsRequest
|
17773 | * @static
|
17774 | * @param {Object.<string,*>} object Plain object
|
17775 | * @returns {google.datastore.v1.AllocateIdsRequest} AllocateIdsRequest
|
17776 | */
|
17777 | AllocateIdsRequest.fromObject = function fromObject(object) {
|
17778 | if (object instanceof $root.google.datastore.v1.AllocateIdsRequest)
|
17779 | return object;
|
17780 | var message = new $root.google.datastore.v1.AllocateIdsRequest();
|
17781 | if (object.projectId != null)
|
17782 | message.projectId = String(object.projectId);
|
17783 | if (object.databaseId != null)
|
17784 | message.databaseId = String(object.databaseId);
|
17785 | if (object.keys) {
|
17786 | if (!Array.isArray(object.keys))
|
17787 | throw TypeError(".google.datastore.v1.AllocateIdsRequest.keys: array expected");
|
17788 | message.keys = [];
|
17789 | for (var i = 0; i < object.keys.length; ++i) {
|
17790 | if (typeof object.keys[i] !== "object")
|
17791 | throw TypeError(".google.datastore.v1.AllocateIdsRequest.keys: object expected");
|
17792 | message.keys[i] = $root.google.datastore.v1.Key.fromObject(object.keys[i]);
|
17793 | }
|
17794 | }
|
17795 | return message;
|
17796 | };
|
17797 |
|
17798 | /**
|
17799 | * Creates a plain object from an AllocateIdsRequest message. Also converts values to other types if specified.
|
17800 | * @function toObject
|
17801 | * @memberof google.datastore.v1.AllocateIdsRequest
|
17802 | * @static
|
17803 | * @param {google.datastore.v1.AllocateIdsRequest} message AllocateIdsRequest
|
17804 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
17805 | * @returns {Object.<string,*>} Plain object
|
17806 | */
|
17807 | AllocateIdsRequest.toObject = function toObject(message, options) {
|
17808 | if (!options)
|
17809 | options = {};
|
17810 | var object = {};
|
17811 | if (options.arrays || options.defaults)
|
17812 | object.keys = [];
|
17813 | if (options.defaults) {
|
17814 | object.projectId = "";
|
17815 | object.databaseId = "";
|
17816 | }
|
17817 | if (message.keys && message.keys.length) {
|
17818 | object.keys = [];
|
17819 | for (var j = 0; j < message.keys.length; ++j)
|
17820 | object.keys[j] = $root.google.datastore.v1.Key.toObject(message.keys[j], options);
|
17821 | }
|
17822 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
17823 | object.projectId = message.projectId;
|
17824 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
17825 | object.databaseId = message.databaseId;
|
17826 | return object;
|
17827 | };
|
17828 |
|
17829 | /**
|
17830 | * Converts this AllocateIdsRequest to JSON.
|
17831 | * @function toJSON
|
17832 | * @memberof google.datastore.v1.AllocateIdsRequest
|
17833 | * @instance
|
17834 | * @returns {Object.<string,*>} JSON object
|
17835 | */
|
17836 | AllocateIdsRequest.prototype.toJSON = function toJSON() {
|
17837 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
17838 | };
|
17839 |
|
17840 | /**
|
17841 | * Gets the default type url for AllocateIdsRequest
|
17842 | * @function getTypeUrl
|
17843 | * @memberof google.datastore.v1.AllocateIdsRequest
|
17844 | * @static
|
17845 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
17846 | * @returns {string} The default type url
|
17847 | */
|
17848 | AllocateIdsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
17849 | if (typeUrlPrefix === undefined) {
|
17850 | typeUrlPrefix = "type.googleapis.com";
|
17851 | }
|
17852 | return typeUrlPrefix + "/google.datastore.v1.AllocateIdsRequest";
|
17853 | };
|
17854 |
|
17855 | return AllocateIdsRequest;
|
17856 | })();
|
17857 |
|
17858 | v1.AllocateIdsResponse = (function() {
|
17859 |
|
17860 | /**
|
17861 | * Properties of an AllocateIdsResponse.
|
17862 | * @memberof google.datastore.v1
|
17863 | * @interface IAllocateIdsResponse
|
17864 | * @property {Array.<google.datastore.v1.IKey>|null} [keys] AllocateIdsResponse keys
|
17865 | */
|
17866 |
|
17867 | /**
|
17868 | * Constructs a new AllocateIdsResponse.
|
17869 | * @memberof google.datastore.v1
|
17870 | * @classdesc Represents an AllocateIdsResponse.
|
17871 | * @implements IAllocateIdsResponse
|
17872 | * @constructor
|
17873 | * @param {google.datastore.v1.IAllocateIdsResponse=} [properties] Properties to set
|
17874 | */
|
17875 | function AllocateIdsResponse(properties) {
|
17876 | this.keys = [];
|
17877 | if (properties)
|
17878 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
17879 | if (properties[keys[i]] != null)
|
17880 | this[keys[i]] = properties[keys[i]];
|
17881 | }
|
17882 |
|
17883 | /**
|
17884 | * AllocateIdsResponse keys.
|
17885 | * @member {Array.<google.datastore.v1.IKey>} keys
|
17886 | * @memberof google.datastore.v1.AllocateIdsResponse
|
17887 | * @instance
|
17888 | */
|
17889 | AllocateIdsResponse.prototype.keys = $util.emptyArray;
|
17890 |
|
17891 | /**
|
17892 | * Creates a new AllocateIdsResponse instance using the specified properties.
|
17893 | * @function create
|
17894 | * @memberof google.datastore.v1.AllocateIdsResponse
|
17895 | * @static
|
17896 | * @param {google.datastore.v1.IAllocateIdsResponse=} [properties] Properties to set
|
17897 | * @returns {google.datastore.v1.AllocateIdsResponse} AllocateIdsResponse instance
|
17898 | */
|
17899 | AllocateIdsResponse.create = function create(properties) {
|
17900 | return new AllocateIdsResponse(properties);
|
17901 | };
|
17902 |
|
17903 | /**
|
17904 | * Encodes the specified AllocateIdsResponse message. Does not implicitly {@link google.datastore.v1.AllocateIdsResponse.verify|verify} messages.
|
17905 | * @function encode
|
17906 | * @memberof google.datastore.v1.AllocateIdsResponse
|
17907 | * @static
|
17908 | * @param {google.datastore.v1.IAllocateIdsResponse} message AllocateIdsResponse message or plain object to encode
|
17909 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
17910 | * @returns {$protobuf.Writer} Writer
|
17911 | */
|
17912 | AllocateIdsResponse.encode = function encode(message, writer) {
|
17913 | if (!writer)
|
17914 | writer = $Writer.create();
|
17915 | if (message.keys != null && message.keys.length)
|
17916 | for (var i = 0; i < message.keys.length; ++i)
|
17917 | $root.google.datastore.v1.Key.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
17918 | return writer;
|
17919 | };
|
17920 |
|
17921 | /**
|
17922 | * Encodes the specified AllocateIdsResponse message, length delimited. Does not implicitly {@link google.datastore.v1.AllocateIdsResponse.verify|verify} messages.
|
17923 | * @function encodeDelimited
|
17924 | * @memberof google.datastore.v1.AllocateIdsResponse
|
17925 | * @static
|
17926 | * @param {google.datastore.v1.IAllocateIdsResponse} message AllocateIdsResponse message or plain object to encode
|
17927 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
17928 | * @returns {$protobuf.Writer} Writer
|
17929 | */
|
17930 | AllocateIdsResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
17931 | return this.encode(message, writer).ldelim();
|
17932 | };
|
17933 |
|
17934 | /**
|
17935 | * Decodes an AllocateIdsResponse message from the specified reader or buffer.
|
17936 | * @function decode
|
17937 | * @memberof google.datastore.v1.AllocateIdsResponse
|
17938 | * @static
|
17939 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
17940 | * @param {number} [length] Message length if known beforehand
|
17941 | * @returns {google.datastore.v1.AllocateIdsResponse} AllocateIdsResponse
|
17942 | * @throws {Error} If the payload is not a reader or valid buffer
|
17943 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
17944 | */
|
17945 | AllocateIdsResponse.decode = function decode(reader, length) {
|
17946 | if (!(reader instanceof $Reader))
|
17947 | reader = $Reader.create(reader);
|
17948 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.AllocateIdsResponse();
|
17949 | while (reader.pos < end) {
|
17950 | var tag = reader.uint32();
|
17951 | switch (tag >>> 3) {
|
17952 | case 1: {
|
17953 | if (!(message.keys && message.keys.length))
|
17954 | message.keys = [];
|
17955 | message.keys.push($root.google.datastore.v1.Key.decode(reader, reader.uint32()));
|
17956 | break;
|
17957 | }
|
17958 | default:
|
17959 | reader.skipType(tag & 7);
|
17960 | break;
|
17961 | }
|
17962 | }
|
17963 | return message;
|
17964 | };
|
17965 |
|
17966 | /**
|
17967 | * Decodes an AllocateIdsResponse message from the specified reader or buffer, length delimited.
|
17968 | * @function decodeDelimited
|
17969 | * @memberof google.datastore.v1.AllocateIdsResponse
|
17970 | * @static
|
17971 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
17972 | * @returns {google.datastore.v1.AllocateIdsResponse} AllocateIdsResponse
|
17973 | * @throws {Error} If the payload is not a reader or valid buffer
|
17974 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
17975 | */
|
17976 | AllocateIdsResponse.decodeDelimited = function decodeDelimited(reader) {
|
17977 | if (!(reader instanceof $Reader))
|
17978 | reader = new $Reader(reader);
|
17979 | return this.decode(reader, reader.uint32());
|
17980 | };
|
17981 |
|
17982 | /**
|
17983 | * Verifies an AllocateIdsResponse message.
|
17984 | * @function verify
|
17985 | * @memberof google.datastore.v1.AllocateIdsResponse
|
17986 | * @static
|
17987 | * @param {Object.<string,*>} message Plain object to verify
|
17988 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
17989 | */
|
17990 | AllocateIdsResponse.verify = function verify(message) {
|
17991 | if (typeof message !== "object" || message === null)
|
17992 | return "object expected";
|
17993 | if (message.keys != null && message.hasOwnProperty("keys")) {
|
17994 | if (!Array.isArray(message.keys))
|
17995 | return "keys: array expected";
|
17996 | for (var i = 0; i < message.keys.length; ++i) {
|
17997 | var error = $root.google.datastore.v1.Key.verify(message.keys[i]);
|
17998 | if (error)
|
17999 | return "keys." + error;
|
18000 | }
|
18001 | }
|
18002 | return null;
|
18003 | };
|
18004 |
|
18005 | /**
|
18006 | * Creates an AllocateIdsResponse message from a plain object. Also converts values to their respective internal types.
|
18007 | * @function fromObject
|
18008 | * @memberof google.datastore.v1.AllocateIdsResponse
|
18009 | * @static
|
18010 | * @param {Object.<string,*>} object Plain object
|
18011 | * @returns {google.datastore.v1.AllocateIdsResponse} AllocateIdsResponse
|
18012 | */
|
18013 | AllocateIdsResponse.fromObject = function fromObject(object) {
|
18014 | if (object instanceof $root.google.datastore.v1.AllocateIdsResponse)
|
18015 | return object;
|
18016 | var message = new $root.google.datastore.v1.AllocateIdsResponse();
|
18017 | if (object.keys) {
|
18018 | if (!Array.isArray(object.keys))
|
18019 | throw TypeError(".google.datastore.v1.AllocateIdsResponse.keys: array expected");
|
18020 | message.keys = [];
|
18021 | for (var i = 0; i < object.keys.length; ++i) {
|
18022 | if (typeof object.keys[i] !== "object")
|
18023 | throw TypeError(".google.datastore.v1.AllocateIdsResponse.keys: object expected");
|
18024 | message.keys[i] = $root.google.datastore.v1.Key.fromObject(object.keys[i]);
|
18025 | }
|
18026 | }
|
18027 | return message;
|
18028 | };
|
18029 |
|
18030 | /**
|
18031 | * Creates a plain object from an AllocateIdsResponse message. Also converts values to other types if specified.
|
18032 | * @function toObject
|
18033 | * @memberof google.datastore.v1.AllocateIdsResponse
|
18034 | * @static
|
18035 | * @param {google.datastore.v1.AllocateIdsResponse} message AllocateIdsResponse
|
18036 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
18037 | * @returns {Object.<string,*>} Plain object
|
18038 | */
|
18039 | AllocateIdsResponse.toObject = function toObject(message, options) {
|
18040 | if (!options)
|
18041 | options = {};
|
18042 | var object = {};
|
18043 | if (options.arrays || options.defaults)
|
18044 | object.keys = [];
|
18045 | if (message.keys && message.keys.length) {
|
18046 | object.keys = [];
|
18047 | for (var j = 0; j < message.keys.length; ++j)
|
18048 | object.keys[j] = $root.google.datastore.v1.Key.toObject(message.keys[j], options);
|
18049 | }
|
18050 | return object;
|
18051 | };
|
18052 |
|
18053 | /**
|
18054 | * Converts this AllocateIdsResponse to JSON.
|
18055 | * @function toJSON
|
18056 | * @memberof google.datastore.v1.AllocateIdsResponse
|
18057 | * @instance
|
18058 | * @returns {Object.<string,*>} JSON object
|
18059 | */
|
18060 | AllocateIdsResponse.prototype.toJSON = function toJSON() {
|
18061 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
18062 | };
|
18063 |
|
18064 | /**
|
18065 | * Gets the default type url for AllocateIdsResponse
|
18066 | * @function getTypeUrl
|
18067 | * @memberof google.datastore.v1.AllocateIdsResponse
|
18068 | * @static
|
18069 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
18070 | * @returns {string} The default type url
|
18071 | */
|
18072 | AllocateIdsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
18073 | if (typeUrlPrefix === undefined) {
|
18074 | typeUrlPrefix = "type.googleapis.com";
|
18075 | }
|
18076 | return typeUrlPrefix + "/google.datastore.v1.AllocateIdsResponse";
|
18077 | };
|
18078 |
|
18079 | return AllocateIdsResponse;
|
18080 | })();
|
18081 |
|
18082 | v1.ReserveIdsRequest = (function() {
|
18083 |
|
18084 | /**
|
18085 | * Properties of a ReserveIdsRequest.
|
18086 | * @memberof google.datastore.v1
|
18087 | * @interface IReserveIdsRequest
|
18088 | * @property {string|null} [projectId] ReserveIdsRequest projectId
|
18089 | * @property {string|null} [databaseId] ReserveIdsRequest databaseId
|
18090 | * @property {Array.<google.datastore.v1.IKey>|null} [keys] ReserveIdsRequest keys
|
18091 | */
|
18092 |
|
18093 | /**
|
18094 | * Constructs a new ReserveIdsRequest.
|
18095 | * @memberof google.datastore.v1
|
18096 | * @classdesc Represents a ReserveIdsRequest.
|
18097 | * @implements IReserveIdsRequest
|
18098 | * @constructor
|
18099 | * @param {google.datastore.v1.IReserveIdsRequest=} [properties] Properties to set
|
18100 | */
|
18101 | function ReserveIdsRequest(properties) {
|
18102 | this.keys = [];
|
18103 | if (properties)
|
18104 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
18105 | if (properties[keys[i]] != null)
|
18106 | this[keys[i]] = properties[keys[i]];
|
18107 | }
|
18108 |
|
18109 | /**
|
18110 | * ReserveIdsRequest projectId.
|
18111 | * @member {string} projectId
|
18112 | * @memberof google.datastore.v1.ReserveIdsRequest
|
18113 | * @instance
|
18114 | */
|
18115 | ReserveIdsRequest.prototype.projectId = "";
|
18116 |
|
18117 | /**
|
18118 | * ReserveIdsRequest databaseId.
|
18119 | * @member {string} databaseId
|
18120 | * @memberof google.datastore.v1.ReserveIdsRequest
|
18121 | * @instance
|
18122 | */
|
18123 | ReserveIdsRequest.prototype.databaseId = "";
|
18124 |
|
18125 | /**
|
18126 | * ReserveIdsRequest keys.
|
18127 | * @member {Array.<google.datastore.v1.IKey>} keys
|
18128 | * @memberof google.datastore.v1.ReserveIdsRequest
|
18129 | * @instance
|
18130 | */
|
18131 | ReserveIdsRequest.prototype.keys = $util.emptyArray;
|
18132 |
|
18133 | /**
|
18134 | * Creates a new ReserveIdsRequest instance using the specified properties.
|
18135 | * @function create
|
18136 | * @memberof google.datastore.v1.ReserveIdsRequest
|
18137 | * @static
|
18138 | * @param {google.datastore.v1.IReserveIdsRequest=} [properties] Properties to set
|
18139 | * @returns {google.datastore.v1.ReserveIdsRequest} ReserveIdsRequest instance
|
18140 | */
|
18141 | ReserveIdsRequest.create = function create(properties) {
|
18142 | return new ReserveIdsRequest(properties);
|
18143 | };
|
18144 |
|
18145 | /**
|
18146 | * Encodes the specified ReserveIdsRequest message. Does not implicitly {@link google.datastore.v1.ReserveIdsRequest.verify|verify} messages.
|
18147 | * @function encode
|
18148 | * @memberof google.datastore.v1.ReserveIdsRequest
|
18149 | * @static
|
18150 | * @param {google.datastore.v1.IReserveIdsRequest} message ReserveIdsRequest message or plain object to encode
|
18151 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
18152 | * @returns {$protobuf.Writer} Writer
|
18153 | */
|
18154 | ReserveIdsRequest.encode = function encode(message, writer) {
|
18155 | if (!writer)
|
18156 | writer = $Writer.create();
|
18157 | if (message.keys != null && message.keys.length)
|
18158 | for (var i = 0; i < message.keys.length; ++i)
|
18159 | $root.google.datastore.v1.Key.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
18160 | if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId"))
|
18161 | writer.uint32(/* id 8, wireType 2 =*/66).string(message.projectId);
|
18162 | if (message.databaseId != null && Object.hasOwnProperty.call(message, "databaseId"))
|
18163 | writer.uint32(/* id 9, wireType 2 =*/74).string(message.databaseId);
|
18164 | return writer;
|
18165 | };
|
18166 |
|
18167 | /**
|
18168 | * Encodes the specified ReserveIdsRequest message, length delimited. Does not implicitly {@link google.datastore.v1.ReserveIdsRequest.verify|verify} messages.
|
18169 | * @function encodeDelimited
|
18170 | * @memberof google.datastore.v1.ReserveIdsRequest
|
18171 | * @static
|
18172 | * @param {google.datastore.v1.IReserveIdsRequest} message ReserveIdsRequest message or plain object to encode
|
18173 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
18174 | * @returns {$protobuf.Writer} Writer
|
18175 | */
|
18176 | ReserveIdsRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
18177 | return this.encode(message, writer).ldelim();
|
18178 | };
|
18179 |
|
18180 | /**
|
18181 | * Decodes a ReserveIdsRequest message from the specified reader or buffer.
|
18182 | * @function decode
|
18183 | * @memberof google.datastore.v1.ReserveIdsRequest
|
18184 | * @static
|
18185 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
18186 | * @param {number} [length] Message length if known beforehand
|
18187 | * @returns {google.datastore.v1.ReserveIdsRequest} ReserveIdsRequest
|
18188 | * @throws {Error} If the payload is not a reader or valid buffer
|
18189 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
18190 | */
|
18191 | ReserveIdsRequest.decode = function decode(reader, length) {
|
18192 | if (!(reader instanceof $Reader))
|
18193 | reader = $Reader.create(reader);
|
18194 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.ReserveIdsRequest();
|
18195 | while (reader.pos < end) {
|
18196 | var tag = reader.uint32();
|
18197 | switch (tag >>> 3) {
|
18198 | case 8: {
|
18199 | message.projectId = reader.string();
|
18200 | break;
|
18201 | }
|
18202 | case 9: {
|
18203 | message.databaseId = reader.string();
|
18204 | break;
|
18205 | }
|
18206 | case 1: {
|
18207 | if (!(message.keys && message.keys.length))
|
18208 | message.keys = [];
|
18209 | message.keys.push($root.google.datastore.v1.Key.decode(reader, reader.uint32()));
|
18210 | break;
|
18211 | }
|
18212 | default:
|
18213 | reader.skipType(tag & 7);
|
18214 | break;
|
18215 | }
|
18216 | }
|
18217 | return message;
|
18218 | };
|
18219 |
|
18220 | /**
|
18221 | * Decodes a ReserveIdsRequest message from the specified reader or buffer, length delimited.
|
18222 | * @function decodeDelimited
|
18223 | * @memberof google.datastore.v1.ReserveIdsRequest
|
18224 | * @static
|
18225 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
18226 | * @returns {google.datastore.v1.ReserveIdsRequest} ReserveIdsRequest
|
18227 | * @throws {Error} If the payload is not a reader or valid buffer
|
18228 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
18229 | */
|
18230 | ReserveIdsRequest.decodeDelimited = function decodeDelimited(reader) {
|
18231 | if (!(reader instanceof $Reader))
|
18232 | reader = new $Reader(reader);
|
18233 | return this.decode(reader, reader.uint32());
|
18234 | };
|
18235 |
|
18236 | /**
|
18237 | * Verifies a ReserveIdsRequest message.
|
18238 | * @function verify
|
18239 | * @memberof google.datastore.v1.ReserveIdsRequest
|
18240 | * @static
|
18241 | * @param {Object.<string,*>} message Plain object to verify
|
18242 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
18243 | */
|
18244 | ReserveIdsRequest.verify = function verify(message) {
|
18245 | if (typeof message !== "object" || message === null)
|
18246 | return "object expected";
|
18247 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
18248 | if (!$util.isString(message.projectId))
|
18249 | return "projectId: string expected";
|
18250 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
18251 | if (!$util.isString(message.databaseId))
|
18252 | return "databaseId: string expected";
|
18253 | if (message.keys != null && message.hasOwnProperty("keys")) {
|
18254 | if (!Array.isArray(message.keys))
|
18255 | return "keys: array expected";
|
18256 | for (var i = 0; i < message.keys.length; ++i) {
|
18257 | var error = $root.google.datastore.v1.Key.verify(message.keys[i]);
|
18258 | if (error)
|
18259 | return "keys." + error;
|
18260 | }
|
18261 | }
|
18262 | return null;
|
18263 | };
|
18264 |
|
18265 | /**
|
18266 | * Creates a ReserveIdsRequest message from a plain object. Also converts values to their respective internal types.
|
18267 | * @function fromObject
|
18268 | * @memberof google.datastore.v1.ReserveIdsRequest
|
18269 | * @static
|
18270 | * @param {Object.<string,*>} object Plain object
|
18271 | * @returns {google.datastore.v1.ReserveIdsRequest} ReserveIdsRequest
|
18272 | */
|
18273 | ReserveIdsRequest.fromObject = function fromObject(object) {
|
18274 | if (object instanceof $root.google.datastore.v1.ReserveIdsRequest)
|
18275 | return object;
|
18276 | var message = new $root.google.datastore.v1.ReserveIdsRequest();
|
18277 | if (object.projectId != null)
|
18278 | message.projectId = String(object.projectId);
|
18279 | if (object.databaseId != null)
|
18280 | message.databaseId = String(object.databaseId);
|
18281 | if (object.keys) {
|
18282 | if (!Array.isArray(object.keys))
|
18283 | throw TypeError(".google.datastore.v1.ReserveIdsRequest.keys: array expected");
|
18284 | message.keys = [];
|
18285 | for (var i = 0; i < object.keys.length; ++i) {
|
18286 | if (typeof object.keys[i] !== "object")
|
18287 | throw TypeError(".google.datastore.v1.ReserveIdsRequest.keys: object expected");
|
18288 | message.keys[i] = $root.google.datastore.v1.Key.fromObject(object.keys[i]);
|
18289 | }
|
18290 | }
|
18291 | return message;
|
18292 | };
|
18293 |
|
18294 | /**
|
18295 | * Creates a plain object from a ReserveIdsRequest message. Also converts values to other types if specified.
|
18296 | * @function toObject
|
18297 | * @memberof google.datastore.v1.ReserveIdsRequest
|
18298 | * @static
|
18299 | * @param {google.datastore.v1.ReserveIdsRequest} message ReserveIdsRequest
|
18300 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
18301 | * @returns {Object.<string,*>} Plain object
|
18302 | */
|
18303 | ReserveIdsRequest.toObject = function toObject(message, options) {
|
18304 | if (!options)
|
18305 | options = {};
|
18306 | var object = {};
|
18307 | if (options.arrays || options.defaults)
|
18308 | object.keys = [];
|
18309 | if (options.defaults) {
|
18310 | object.projectId = "";
|
18311 | object.databaseId = "";
|
18312 | }
|
18313 | if (message.keys && message.keys.length) {
|
18314 | object.keys = [];
|
18315 | for (var j = 0; j < message.keys.length; ++j)
|
18316 | object.keys[j] = $root.google.datastore.v1.Key.toObject(message.keys[j], options);
|
18317 | }
|
18318 | if (message.projectId != null && message.hasOwnProperty("projectId"))
|
18319 | object.projectId = message.projectId;
|
18320 | if (message.databaseId != null && message.hasOwnProperty("databaseId"))
|
18321 | object.databaseId = message.databaseId;
|
18322 | return object;
|
18323 | };
|
18324 |
|
18325 | /**
|
18326 | * Converts this ReserveIdsRequest to JSON.
|
18327 | * @function toJSON
|
18328 | * @memberof google.datastore.v1.ReserveIdsRequest
|
18329 | * @instance
|
18330 | * @returns {Object.<string,*>} JSON object
|
18331 | */
|
18332 | ReserveIdsRequest.prototype.toJSON = function toJSON() {
|
18333 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
18334 | };
|
18335 |
|
18336 | /**
|
18337 | * Gets the default type url for ReserveIdsRequest
|
18338 | * @function getTypeUrl
|
18339 | * @memberof google.datastore.v1.ReserveIdsRequest
|
18340 | * @static
|
18341 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
18342 | * @returns {string} The default type url
|
18343 | */
|
18344 | ReserveIdsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
18345 | if (typeUrlPrefix === undefined) {
|
18346 | typeUrlPrefix = "type.googleapis.com";
|
18347 | }
|
18348 | return typeUrlPrefix + "/google.datastore.v1.ReserveIdsRequest";
|
18349 | };
|
18350 |
|
18351 | return ReserveIdsRequest;
|
18352 | })();
|
18353 |
|
18354 | v1.ReserveIdsResponse = (function() {
|
18355 |
|
18356 | /**
|
18357 | * Properties of a ReserveIdsResponse.
|
18358 | * @memberof google.datastore.v1
|
18359 | * @interface IReserveIdsResponse
|
18360 | */
|
18361 |
|
18362 | /**
|
18363 | * Constructs a new ReserveIdsResponse.
|
18364 | * @memberof google.datastore.v1
|
18365 | * @classdesc Represents a ReserveIdsResponse.
|
18366 | * @implements IReserveIdsResponse
|
18367 | * @constructor
|
18368 | * @param {google.datastore.v1.IReserveIdsResponse=} [properties] Properties to set
|
18369 | */
|
18370 | function ReserveIdsResponse(properties) {
|
18371 | if (properties)
|
18372 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
18373 | if (properties[keys[i]] != null)
|
18374 | this[keys[i]] = properties[keys[i]];
|
18375 | }
|
18376 |
|
18377 | /**
|
18378 | * Creates a new ReserveIdsResponse instance using the specified properties.
|
18379 | * @function create
|
18380 | * @memberof google.datastore.v1.ReserveIdsResponse
|
18381 | * @static
|
18382 | * @param {google.datastore.v1.IReserveIdsResponse=} [properties] Properties to set
|
18383 | * @returns {google.datastore.v1.ReserveIdsResponse} ReserveIdsResponse instance
|
18384 | */
|
18385 | ReserveIdsResponse.create = function create(properties) {
|
18386 | return new ReserveIdsResponse(properties);
|
18387 | };
|
18388 |
|
18389 | /**
|
18390 | * Encodes the specified ReserveIdsResponse message. Does not implicitly {@link google.datastore.v1.ReserveIdsResponse.verify|verify} messages.
|
18391 | * @function encode
|
18392 | * @memberof google.datastore.v1.ReserveIdsResponse
|
18393 | * @static
|
18394 | * @param {google.datastore.v1.IReserveIdsResponse} message ReserveIdsResponse message or plain object to encode
|
18395 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
18396 | * @returns {$protobuf.Writer} Writer
|
18397 | */
|
18398 | ReserveIdsResponse.encode = function encode(message, writer) {
|
18399 | if (!writer)
|
18400 | writer = $Writer.create();
|
18401 | return writer;
|
18402 | };
|
18403 |
|
18404 | /**
|
18405 | * Encodes the specified ReserveIdsResponse message, length delimited. Does not implicitly {@link google.datastore.v1.ReserveIdsResponse.verify|verify} messages.
|
18406 | * @function encodeDelimited
|
18407 | * @memberof google.datastore.v1.ReserveIdsResponse
|
18408 | * @static
|
18409 | * @param {google.datastore.v1.IReserveIdsResponse} message ReserveIdsResponse message or plain object to encode
|
18410 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
18411 | * @returns {$protobuf.Writer} Writer
|
18412 | */
|
18413 | ReserveIdsResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
18414 | return this.encode(message, writer).ldelim();
|
18415 | };
|
18416 |
|
18417 | /**
|
18418 | * Decodes a ReserveIdsResponse message from the specified reader or buffer.
|
18419 | * @function decode
|
18420 | * @memberof google.datastore.v1.ReserveIdsResponse
|
18421 | * @static
|
18422 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
18423 | * @param {number} [length] Message length if known beforehand
|
18424 | * @returns {google.datastore.v1.ReserveIdsResponse} ReserveIdsResponse
|
18425 | * @throws {Error} If the payload is not a reader or valid buffer
|
18426 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
18427 | */
|
18428 | ReserveIdsResponse.decode = function decode(reader, length) {
|
18429 | if (!(reader instanceof $Reader))
|
18430 | reader = $Reader.create(reader);
|
18431 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.ReserveIdsResponse();
|
18432 | while (reader.pos < end) {
|
18433 | var tag = reader.uint32();
|
18434 | switch (tag >>> 3) {
|
18435 | default:
|
18436 | reader.skipType(tag & 7);
|
18437 | break;
|
18438 | }
|
18439 | }
|
18440 | return message;
|
18441 | };
|
18442 |
|
18443 | /**
|
18444 | * Decodes a ReserveIdsResponse message from the specified reader or buffer, length delimited.
|
18445 | * @function decodeDelimited
|
18446 | * @memberof google.datastore.v1.ReserveIdsResponse
|
18447 | * @static
|
18448 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
18449 | * @returns {google.datastore.v1.ReserveIdsResponse} ReserveIdsResponse
|
18450 | * @throws {Error} If the payload is not a reader or valid buffer
|
18451 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
18452 | */
|
18453 | ReserveIdsResponse.decodeDelimited = function decodeDelimited(reader) {
|
18454 | if (!(reader instanceof $Reader))
|
18455 | reader = new $Reader(reader);
|
18456 | return this.decode(reader, reader.uint32());
|
18457 | };
|
18458 |
|
18459 | /**
|
18460 | * Verifies a ReserveIdsResponse message.
|
18461 | * @function verify
|
18462 | * @memberof google.datastore.v1.ReserveIdsResponse
|
18463 | * @static
|
18464 | * @param {Object.<string,*>} message Plain object to verify
|
18465 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
18466 | */
|
18467 | ReserveIdsResponse.verify = function verify(message) {
|
18468 | if (typeof message !== "object" || message === null)
|
18469 | return "object expected";
|
18470 | return null;
|
18471 | };
|
18472 |
|
18473 | /**
|
18474 | * Creates a ReserveIdsResponse message from a plain object. Also converts values to their respective internal types.
|
18475 | * @function fromObject
|
18476 | * @memberof google.datastore.v1.ReserveIdsResponse
|
18477 | * @static
|
18478 | * @param {Object.<string,*>} object Plain object
|
18479 | * @returns {google.datastore.v1.ReserveIdsResponse} ReserveIdsResponse
|
18480 | */
|
18481 | ReserveIdsResponse.fromObject = function fromObject(object) {
|
18482 | if (object instanceof $root.google.datastore.v1.ReserveIdsResponse)
|
18483 | return object;
|
18484 | return new $root.google.datastore.v1.ReserveIdsResponse();
|
18485 | };
|
18486 |
|
18487 | /**
|
18488 | * Creates a plain object from a ReserveIdsResponse message. Also converts values to other types if specified.
|
18489 | * @function toObject
|
18490 | * @memberof google.datastore.v1.ReserveIdsResponse
|
18491 | * @static
|
18492 | * @param {google.datastore.v1.ReserveIdsResponse} message ReserveIdsResponse
|
18493 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
18494 | * @returns {Object.<string,*>} Plain object
|
18495 | */
|
18496 | ReserveIdsResponse.toObject = function toObject() {
|
18497 | return {};
|
18498 | };
|
18499 |
|
18500 | /**
|
18501 | * Converts this ReserveIdsResponse to JSON.
|
18502 | * @function toJSON
|
18503 | * @memberof google.datastore.v1.ReserveIdsResponse
|
18504 | * @instance
|
18505 | * @returns {Object.<string,*>} JSON object
|
18506 | */
|
18507 | ReserveIdsResponse.prototype.toJSON = function toJSON() {
|
18508 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
18509 | };
|
18510 |
|
18511 | /**
|
18512 | * Gets the default type url for ReserveIdsResponse
|
18513 | * @function getTypeUrl
|
18514 | * @memberof google.datastore.v1.ReserveIdsResponse
|
18515 | * @static
|
18516 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
18517 | * @returns {string} The default type url
|
18518 | */
|
18519 | ReserveIdsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
18520 | if (typeUrlPrefix === undefined) {
|
18521 | typeUrlPrefix = "type.googleapis.com";
|
18522 | }
|
18523 | return typeUrlPrefix + "/google.datastore.v1.ReserveIdsResponse";
|
18524 | };
|
18525 |
|
18526 | return ReserveIdsResponse;
|
18527 | })();
|
18528 |
|
18529 | v1.Mutation = (function() {
|
18530 |
|
18531 | /**
|
18532 | * Properties of a Mutation.
|
18533 | * @memberof google.datastore.v1
|
18534 | * @interface IMutation
|
18535 | * @property {google.datastore.v1.IEntity|null} [insert] Mutation insert
|
18536 | * @property {google.datastore.v1.IEntity|null} [update] Mutation update
|
18537 | * @property {google.datastore.v1.IEntity|null} [upsert] Mutation upsert
|
18538 | * @property {google.datastore.v1.IKey|null} ["delete"] Mutation delete
|
18539 | * @property {number|Long|null} [baseVersion] Mutation baseVersion
|
18540 | * @property {google.protobuf.ITimestamp|null} [updateTime] Mutation updateTime
|
18541 | */
|
18542 |
|
18543 | /**
|
18544 | * Constructs a new Mutation.
|
18545 | * @memberof google.datastore.v1
|
18546 | * @classdesc Represents a Mutation.
|
18547 | * @implements IMutation
|
18548 | * @constructor
|
18549 | * @param {google.datastore.v1.IMutation=} [properties] Properties to set
|
18550 | */
|
18551 | function Mutation(properties) {
|
18552 | if (properties)
|
18553 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
18554 | if (properties[keys[i]] != null)
|
18555 | this[keys[i]] = properties[keys[i]];
|
18556 | }
|
18557 |
|
18558 | /**
|
18559 | * Mutation insert.
|
18560 | * @member {google.datastore.v1.IEntity|null|undefined} insert
|
18561 | * @memberof google.datastore.v1.Mutation
|
18562 | * @instance
|
18563 | */
|
18564 | Mutation.prototype.insert = null;
|
18565 |
|
18566 | /**
|
18567 | * Mutation update.
|
18568 | * @member {google.datastore.v1.IEntity|null|undefined} update
|
18569 | * @memberof google.datastore.v1.Mutation
|
18570 | * @instance
|
18571 | */
|
18572 | Mutation.prototype.update = null;
|
18573 |
|
18574 | /**
|
18575 | * Mutation upsert.
|
18576 | * @member {google.datastore.v1.IEntity|null|undefined} upsert
|
18577 | * @memberof google.datastore.v1.Mutation
|
18578 | * @instance
|
18579 | */
|
18580 | Mutation.prototype.upsert = null;
|
18581 |
|
18582 | /**
|
18583 | * Mutation delete.
|
18584 | * @member {google.datastore.v1.IKey|null|undefined} delete
|
18585 | * @memberof google.datastore.v1.Mutation
|
18586 | * @instance
|
18587 | */
|
18588 | Mutation.prototype["delete"] = null;
|
18589 |
|
18590 | /**
|
18591 | * Mutation baseVersion.
|
18592 | * @member {number|Long|null|undefined} baseVersion
|
18593 | * @memberof google.datastore.v1.Mutation
|
18594 | * @instance
|
18595 | */
|
18596 | Mutation.prototype.baseVersion = null;
|
18597 |
|
18598 | /**
|
18599 | * Mutation updateTime.
|
18600 | * @member {google.protobuf.ITimestamp|null|undefined} updateTime
|
18601 | * @memberof google.datastore.v1.Mutation
|
18602 | * @instance
|
18603 | */
|
18604 | Mutation.prototype.updateTime = null;
|
18605 |
|
18606 | // OneOf field names bound to virtual getters and setters
|
18607 | var $oneOfFields;
|
18608 |
|
18609 | /**
|
18610 | * Mutation operation.
|
18611 | * @member {"insert"|"update"|"upsert"|"delete"|undefined} operation
|
18612 | * @memberof google.datastore.v1.Mutation
|
18613 | * @instance
|
18614 | */
|
18615 | Object.defineProperty(Mutation.prototype, "operation", {
|
18616 | get: $util.oneOfGetter($oneOfFields = ["insert", "update", "upsert", "delete"]),
|
18617 | set: $util.oneOfSetter($oneOfFields)
|
18618 | });
|
18619 |
|
18620 | /**
|
18621 | * Mutation conflictDetectionStrategy.
|
18622 | * @member {"baseVersion"|"updateTime"|undefined} conflictDetectionStrategy
|
18623 | * @memberof google.datastore.v1.Mutation
|
18624 | * @instance
|
18625 | */
|
18626 | Object.defineProperty(Mutation.prototype, "conflictDetectionStrategy", {
|
18627 | get: $util.oneOfGetter($oneOfFields = ["baseVersion", "updateTime"]),
|
18628 | set: $util.oneOfSetter($oneOfFields)
|
18629 | });
|
18630 |
|
18631 | /**
|
18632 | * Creates a new Mutation instance using the specified properties.
|
18633 | * @function create
|
18634 | * @memberof google.datastore.v1.Mutation
|
18635 | * @static
|
18636 | * @param {google.datastore.v1.IMutation=} [properties] Properties to set
|
18637 | * @returns {google.datastore.v1.Mutation} Mutation instance
|
18638 | */
|
18639 | Mutation.create = function create(properties) {
|
18640 | return new Mutation(properties);
|
18641 | };
|
18642 |
|
18643 | /**
|
18644 | * Encodes the specified Mutation message. Does not implicitly {@link google.datastore.v1.Mutation.verify|verify} messages.
|
18645 | * @function encode
|
18646 | * @memberof google.datastore.v1.Mutation
|
18647 | * @static
|
18648 | * @param {google.datastore.v1.IMutation} message Mutation message or plain object to encode
|
18649 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
18650 | * @returns {$protobuf.Writer} Writer
|
18651 | */
|
18652 | Mutation.encode = function encode(message, writer) {
|
18653 | if (!writer)
|
18654 | writer = $Writer.create();
|
18655 | if (message.insert != null && Object.hasOwnProperty.call(message, "insert"))
|
18656 | $root.google.datastore.v1.Entity.encode(message.insert, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
18657 | if (message.update != null && Object.hasOwnProperty.call(message, "update"))
|
18658 | $root.google.datastore.v1.Entity.encode(message.update, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
18659 | if (message.upsert != null && Object.hasOwnProperty.call(message, "upsert"))
|
18660 | $root.google.datastore.v1.Entity.encode(message.upsert, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
18661 | if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete"))
|
18662 | $root.google.datastore.v1.Key.encode(message["delete"], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
18663 | if (message.baseVersion != null && Object.hasOwnProperty.call(message, "baseVersion"))
|
18664 | writer.uint32(/* id 8, wireType 0 =*/64).int64(message.baseVersion);
|
18665 | if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime"))
|
18666 | $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
|
18667 | return writer;
|
18668 | };
|
18669 |
|
18670 | /**
|
18671 | * Encodes the specified Mutation message, length delimited. Does not implicitly {@link google.datastore.v1.Mutation.verify|verify} messages.
|
18672 | * @function encodeDelimited
|
18673 | * @memberof google.datastore.v1.Mutation
|
18674 | * @static
|
18675 | * @param {google.datastore.v1.IMutation} message Mutation message or plain object to encode
|
18676 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
18677 | * @returns {$protobuf.Writer} Writer
|
18678 | */
|
18679 | Mutation.encodeDelimited = function encodeDelimited(message, writer) {
|
18680 | return this.encode(message, writer).ldelim();
|
18681 | };
|
18682 |
|
18683 | /**
|
18684 | * Decodes a Mutation message from the specified reader or buffer.
|
18685 | * @function decode
|
18686 | * @memberof google.datastore.v1.Mutation
|
18687 | * @static
|
18688 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
18689 | * @param {number} [length] Message length if known beforehand
|
18690 | * @returns {google.datastore.v1.Mutation} Mutation
|
18691 | * @throws {Error} If the payload is not a reader or valid buffer
|
18692 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
18693 | */
|
18694 | Mutation.decode = function decode(reader, length) {
|
18695 | if (!(reader instanceof $Reader))
|
18696 | reader = $Reader.create(reader);
|
18697 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.Mutation();
|
18698 | while (reader.pos < end) {
|
18699 | var tag = reader.uint32();
|
18700 | switch (tag >>> 3) {
|
18701 | case 4: {
|
18702 | message.insert = $root.google.datastore.v1.Entity.decode(reader, reader.uint32());
|
18703 | break;
|
18704 | }
|
18705 | case 5: {
|
18706 | message.update = $root.google.datastore.v1.Entity.decode(reader, reader.uint32());
|
18707 | break;
|
18708 | }
|
18709 | case 6: {
|
18710 | message.upsert = $root.google.datastore.v1.Entity.decode(reader, reader.uint32());
|
18711 | break;
|
18712 | }
|
18713 | case 7: {
|
18714 | message["delete"] = $root.google.datastore.v1.Key.decode(reader, reader.uint32());
|
18715 | break;
|
18716 | }
|
18717 | case 8: {
|
18718 | message.baseVersion = reader.int64();
|
18719 | break;
|
18720 | }
|
18721 | case 11: {
|
18722 | message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
18723 | break;
|
18724 | }
|
18725 | default:
|
18726 | reader.skipType(tag & 7);
|
18727 | break;
|
18728 | }
|
18729 | }
|
18730 | return message;
|
18731 | };
|
18732 |
|
18733 | /**
|
18734 | * Decodes a Mutation message from the specified reader or buffer, length delimited.
|
18735 | * @function decodeDelimited
|
18736 | * @memberof google.datastore.v1.Mutation
|
18737 | * @static
|
18738 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
18739 | * @returns {google.datastore.v1.Mutation} Mutation
|
18740 | * @throws {Error} If the payload is not a reader or valid buffer
|
18741 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
18742 | */
|
18743 | Mutation.decodeDelimited = function decodeDelimited(reader) {
|
18744 | if (!(reader instanceof $Reader))
|
18745 | reader = new $Reader(reader);
|
18746 | return this.decode(reader, reader.uint32());
|
18747 | };
|
18748 |
|
18749 | /**
|
18750 | * Verifies a Mutation message.
|
18751 | * @function verify
|
18752 | * @memberof google.datastore.v1.Mutation
|
18753 | * @static
|
18754 | * @param {Object.<string,*>} message Plain object to verify
|
18755 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
18756 | */
|
18757 | Mutation.verify = function verify(message) {
|
18758 | if (typeof message !== "object" || message === null)
|
18759 | return "object expected";
|
18760 | var properties = {};
|
18761 | if (message.insert != null && message.hasOwnProperty("insert")) {
|
18762 | properties.operation = 1;
|
18763 | {
|
18764 | var error = $root.google.datastore.v1.Entity.verify(message.insert);
|
18765 | if (error)
|
18766 | return "insert." + error;
|
18767 | }
|
18768 | }
|
18769 | if (message.update != null && message.hasOwnProperty("update")) {
|
18770 | if (properties.operation === 1)
|
18771 | return "operation: multiple values";
|
18772 | properties.operation = 1;
|
18773 | {
|
18774 | var error = $root.google.datastore.v1.Entity.verify(message.update);
|
18775 | if (error)
|
18776 | return "update." + error;
|
18777 | }
|
18778 | }
|
18779 | if (message.upsert != null && message.hasOwnProperty("upsert")) {
|
18780 | if (properties.operation === 1)
|
18781 | return "operation: multiple values";
|
18782 | properties.operation = 1;
|
18783 | {
|
18784 | var error = $root.google.datastore.v1.Entity.verify(message.upsert);
|
18785 | if (error)
|
18786 | return "upsert." + error;
|
18787 | }
|
18788 | }
|
18789 | if (message["delete"] != null && message.hasOwnProperty("delete")) {
|
18790 | if (properties.operation === 1)
|
18791 | return "operation: multiple values";
|
18792 | properties.operation = 1;
|
18793 | {
|
18794 | var error = $root.google.datastore.v1.Key.verify(message["delete"]);
|
18795 | if (error)
|
18796 | return "delete." + error;
|
18797 | }
|
18798 | }
|
18799 | if (message.baseVersion != null && message.hasOwnProperty("baseVersion")) {
|
18800 | properties.conflictDetectionStrategy = 1;
|
18801 | if (!$util.isInteger(message.baseVersion) && !(message.baseVersion && $util.isInteger(message.baseVersion.low) && $util.isInteger(message.baseVersion.high)))
|
18802 | return "baseVersion: integer|Long expected";
|
18803 | }
|
18804 | if (message.updateTime != null && message.hasOwnProperty("updateTime")) {
|
18805 | if (properties.conflictDetectionStrategy === 1)
|
18806 | return "conflictDetectionStrategy: multiple values";
|
18807 | properties.conflictDetectionStrategy = 1;
|
18808 | {
|
18809 | var error = $root.google.protobuf.Timestamp.verify(message.updateTime);
|
18810 | if (error)
|
18811 | return "updateTime." + error;
|
18812 | }
|
18813 | }
|
18814 | return null;
|
18815 | };
|
18816 |
|
18817 | /**
|
18818 | * Creates a Mutation message from a plain object. Also converts values to their respective internal types.
|
18819 | * @function fromObject
|
18820 | * @memberof google.datastore.v1.Mutation
|
18821 | * @static
|
18822 | * @param {Object.<string,*>} object Plain object
|
18823 | * @returns {google.datastore.v1.Mutation} Mutation
|
18824 | */
|
18825 | Mutation.fromObject = function fromObject(object) {
|
18826 | if (object instanceof $root.google.datastore.v1.Mutation)
|
18827 | return object;
|
18828 | var message = new $root.google.datastore.v1.Mutation();
|
18829 | if (object.insert != null) {
|
18830 | if (typeof object.insert !== "object")
|
18831 | throw TypeError(".google.datastore.v1.Mutation.insert: object expected");
|
18832 | message.insert = $root.google.datastore.v1.Entity.fromObject(object.insert);
|
18833 | }
|
18834 | if (object.update != null) {
|
18835 | if (typeof object.update !== "object")
|
18836 | throw TypeError(".google.datastore.v1.Mutation.update: object expected");
|
18837 | message.update = $root.google.datastore.v1.Entity.fromObject(object.update);
|
18838 | }
|
18839 | if (object.upsert != null) {
|
18840 | if (typeof object.upsert !== "object")
|
18841 | throw TypeError(".google.datastore.v1.Mutation.upsert: object expected");
|
18842 | message.upsert = $root.google.datastore.v1.Entity.fromObject(object.upsert);
|
18843 | }
|
18844 | if (object["delete"] != null) {
|
18845 | if (typeof object["delete"] !== "object")
|
18846 | throw TypeError(".google.datastore.v1.Mutation.delete: object expected");
|
18847 | message["delete"] = $root.google.datastore.v1.Key.fromObject(object["delete"]);
|
18848 | }
|
18849 | if (object.baseVersion != null)
|
18850 | if ($util.Long)
|
18851 | (message.baseVersion = $util.Long.fromValue(object.baseVersion)).unsigned = false;
|
18852 | else if (typeof object.baseVersion === "string")
|
18853 | message.baseVersion = parseInt(object.baseVersion, 10);
|
18854 | else if (typeof object.baseVersion === "number")
|
18855 | message.baseVersion = object.baseVersion;
|
18856 | else if (typeof object.baseVersion === "object")
|
18857 | message.baseVersion = new $util.LongBits(object.baseVersion.low >>> 0, object.baseVersion.high >>> 0).toNumber();
|
18858 | if (object.updateTime != null) {
|
18859 | if (typeof object.updateTime !== "object")
|
18860 | throw TypeError(".google.datastore.v1.Mutation.updateTime: object expected");
|
18861 | message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime);
|
18862 | }
|
18863 | return message;
|
18864 | };
|
18865 |
|
18866 | /**
|
18867 | * Creates a plain object from a Mutation message. Also converts values to other types if specified.
|
18868 | * @function toObject
|
18869 | * @memberof google.datastore.v1.Mutation
|
18870 | * @static
|
18871 | * @param {google.datastore.v1.Mutation} message Mutation
|
18872 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
18873 | * @returns {Object.<string,*>} Plain object
|
18874 | */
|
18875 | Mutation.toObject = function toObject(message, options) {
|
18876 | if (!options)
|
18877 | options = {};
|
18878 | var object = {};
|
18879 | if (message.insert != null && message.hasOwnProperty("insert")) {
|
18880 | object.insert = $root.google.datastore.v1.Entity.toObject(message.insert, options);
|
18881 | if (options.oneofs)
|
18882 | object.operation = "insert";
|
18883 | }
|
18884 | if (message.update != null && message.hasOwnProperty("update")) {
|
18885 | object.update = $root.google.datastore.v1.Entity.toObject(message.update, options);
|
18886 | if (options.oneofs)
|
18887 | object.operation = "update";
|
18888 | }
|
18889 | if (message.upsert != null && message.hasOwnProperty("upsert")) {
|
18890 | object.upsert = $root.google.datastore.v1.Entity.toObject(message.upsert, options);
|
18891 | if (options.oneofs)
|
18892 | object.operation = "upsert";
|
18893 | }
|
18894 | if (message["delete"] != null && message.hasOwnProperty("delete")) {
|
18895 | object["delete"] = $root.google.datastore.v1.Key.toObject(message["delete"], options);
|
18896 | if (options.oneofs)
|
18897 | object.operation = "delete";
|
18898 | }
|
18899 | if (message.baseVersion != null && message.hasOwnProperty("baseVersion")) {
|
18900 | if (typeof message.baseVersion === "number")
|
18901 | object.baseVersion = options.longs === String ? String(message.baseVersion) : message.baseVersion;
|
18902 | else
|
18903 | object.baseVersion = options.longs === String ? $util.Long.prototype.toString.call(message.baseVersion) : options.longs === Number ? new $util.LongBits(message.baseVersion.low >>> 0, message.baseVersion.high >>> 0).toNumber() : message.baseVersion;
|
18904 | if (options.oneofs)
|
18905 | object.conflictDetectionStrategy = "baseVersion";
|
18906 | }
|
18907 | if (message.updateTime != null && message.hasOwnProperty("updateTime")) {
|
18908 | object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options);
|
18909 | if (options.oneofs)
|
18910 | object.conflictDetectionStrategy = "updateTime";
|
18911 | }
|
18912 | return object;
|
18913 | };
|
18914 |
|
18915 | /**
|
18916 | * Converts this Mutation to JSON.
|
18917 | * @function toJSON
|
18918 | * @memberof google.datastore.v1.Mutation
|
18919 | * @instance
|
18920 | * @returns {Object.<string,*>} JSON object
|
18921 | */
|
18922 | Mutation.prototype.toJSON = function toJSON() {
|
18923 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
18924 | };
|
18925 |
|
18926 | /**
|
18927 | * Gets the default type url for Mutation
|
18928 | * @function getTypeUrl
|
18929 | * @memberof google.datastore.v1.Mutation
|
18930 | * @static
|
18931 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
18932 | * @returns {string} The default type url
|
18933 | */
|
18934 | Mutation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
18935 | if (typeUrlPrefix === undefined) {
|
18936 | typeUrlPrefix = "type.googleapis.com";
|
18937 | }
|
18938 | return typeUrlPrefix + "/google.datastore.v1.Mutation";
|
18939 | };
|
18940 |
|
18941 | return Mutation;
|
18942 | })();
|
18943 |
|
18944 | v1.MutationResult = (function() {
|
18945 |
|
18946 | /**
|
18947 | * Properties of a MutationResult.
|
18948 | * @memberof google.datastore.v1
|
18949 | * @interface IMutationResult
|
18950 | * @property {google.datastore.v1.IKey|null} [key] MutationResult key
|
18951 | * @property {number|Long|null} [version] MutationResult version
|
18952 | * @property {google.protobuf.ITimestamp|null} [createTime] MutationResult createTime
|
18953 | * @property {google.protobuf.ITimestamp|null} [updateTime] MutationResult updateTime
|
18954 | * @property {boolean|null} [conflictDetected] MutationResult conflictDetected
|
18955 | */
|
18956 |
|
18957 | /**
|
18958 | * Constructs a new MutationResult.
|
18959 | * @memberof google.datastore.v1
|
18960 | * @classdesc Represents a MutationResult.
|
18961 | * @implements IMutationResult
|
18962 | * @constructor
|
18963 | * @param {google.datastore.v1.IMutationResult=} [properties] Properties to set
|
18964 | */
|
18965 | function MutationResult(properties) {
|
18966 | if (properties)
|
18967 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
18968 | if (properties[keys[i]] != null)
|
18969 | this[keys[i]] = properties[keys[i]];
|
18970 | }
|
18971 |
|
18972 | /**
|
18973 | * MutationResult key.
|
18974 | * @member {google.datastore.v1.IKey|null|undefined} key
|
18975 | * @memberof google.datastore.v1.MutationResult
|
18976 | * @instance
|
18977 | */
|
18978 | MutationResult.prototype.key = null;
|
18979 |
|
18980 | /**
|
18981 | * MutationResult version.
|
18982 | * @member {number|Long} version
|
18983 | * @memberof google.datastore.v1.MutationResult
|
18984 | * @instance
|
18985 | */
|
18986 | MutationResult.prototype.version = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
18987 |
|
18988 | /**
|
18989 | * MutationResult createTime.
|
18990 | * @member {google.protobuf.ITimestamp|null|undefined} createTime
|
18991 | * @memberof google.datastore.v1.MutationResult
|
18992 | * @instance
|
18993 | */
|
18994 | MutationResult.prototype.createTime = null;
|
18995 |
|
18996 | /**
|
18997 | * MutationResult updateTime.
|
18998 | * @member {google.protobuf.ITimestamp|null|undefined} updateTime
|
18999 | * @memberof google.datastore.v1.MutationResult
|
19000 | * @instance
|
19001 | */
|
19002 | MutationResult.prototype.updateTime = null;
|
19003 |
|
19004 | /**
|
19005 | * MutationResult conflictDetected.
|
19006 | * @member {boolean} conflictDetected
|
19007 | * @memberof google.datastore.v1.MutationResult
|
19008 | * @instance
|
19009 | */
|
19010 | MutationResult.prototype.conflictDetected = false;
|
19011 |
|
19012 | /**
|
19013 | * Creates a new MutationResult instance using the specified properties.
|
19014 | * @function create
|
19015 | * @memberof google.datastore.v1.MutationResult
|
19016 | * @static
|
19017 | * @param {google.datastore.v1.IMutationResult=} [properties] Properties to set
|
19018 | * @returns {google.datastore.v1.MutationResult} MutationResult instance
|
19019 | */
|
19020 | MutationResult.create = function create(properties) {
|
19021 | return new MutationResult(properties);
|
19022 | };
|
19023 |
|
19024 | /**
|
19025 | * Encodes the specified MutationResult message. Does not implicitly {@link google.datastore.v1.MutationResult.verify|verify} messages.
|
19026 | * @function encode
|
19027 | * @memberof google.datastore.v1.MutationResult
|
19028 | * @static
|
19029 | * @param {google.datastore.v1.IMutationResult} message MutationResult message or plain object to encode
|
19030 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
19031 | * @returns {$protobuf.Writer} Writer
|
19032 | */
|
19033 | MutationResult.encode = function encode(message, writer) {
|
19034 | if (!writer)
|
19035 | writer = $Writer.create();
|
19036 | if (message.key != null && Object.hasOwnProperty.call(message, "key"))
|
19037 | $root.google.datastore.v1.Key.encode(message.key, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
19038 | if (message.version != null && Object.hasOwnProperty.call(message, "version"))
|
19039 | writer.uint32(/* id 4, wireType 0 =*/32).int64(message.version);
|
19040 | if (message.conflictDetected != null && Object.hasOwnProperty.call(message, "conflictDetected"))
|
19041 | writer.uint32(/* id 5, wireType 0 =*/40).bool(message.conflictDetected);
|
19042 | if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime"))
|
19043 | $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
19044 | if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
|
19045 | $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
19046 | return writer;
|
19047 | };
|
19048 |
|
19049 | /**
|
19050 | * Encodes the specified MutationResult message, length delimited. Does not implicitly {@link google.datastore.v1.MutationResult.verify|verify} messages.
|
19051 | * @function encodeDelimited
|
19052 | * @memberof google.datastore.v1.MutationResult
|
19053 | * @static
|
19054 | * @param {google.datastore.v1.IMutationResult} message MutationResult message or plain object to encode
|
19055 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
19056 | * @returns {$protobuf.Writer} Writer
|
19057 | */
|
19058 | MutationResult.encodeDelimited = function encodeDelimited(message, writer) {
|
19059 | return this.encode(message, writer).ldelim();
|
19060 | };
|
19061 |
|
19062 | /**
|
19063 | * Decodes a MutationResult message from the specified reader or buffer.
|
19064 | * @function decode
|
19065 | * @memberof google.datastore.v1.MutationResult
|
19066 | * @static
|
19067 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
19068 | * @param {number} [length] Message length if known beforehand
|
19069 | * @returns {google.datastore.v1.MutationResult} MutationResult
|
19070 | * @throws {Error} If the payload is not a reader or valid buffer
|
19071 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
19072 | */
|
19073 | MutationResult.decode = function decode(reader, length) {
|
19074 | if (!(reader instanceof $Reader))
|
19075 | reader = $Reader.create(reader);
|
19076 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.MutationResult();
|
19077 | while (reader.pos < end) {
|
19078 | var tag = reader.uint32();
|
19079 | switch (tag >>> 3) {
|
19080 | case 3: {
|
19081 | message.key = $root.google.datastore.v1.Key.decode(reader, reader.uint32());
|
19082 | break;
|
19083 | }
|
19084 | case 4: {
|
19085 | message.version = reader.int64();
|
19086 | break;
|
19087 | }
|
19088 | case 7: {
|
19089 | message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
19090 | break;
|
19091 | }
|
19092 | case 6: {
|
19093 | message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
19094 | break;
|
19095 | }
|
19096 | case 5: {
|
19097 | message.conflictDetected = reader.bool();
|
19098 | break;
|
19099 | }
|
19100 | default:
|
19101 | reader.skipType(tag & 7);
|
19102 | break;
|
19103 | }
|
19104 | }
|
19105 | return message;
|
19106 | };
|
19107 |
|
19108 | /**
|
19109 | * Decodes a MutationResult message from the specified reader or buffer, length delimited.
|
19110 | * @function decodeDelimited
|
19111 | * @memberof google.datastore.v1.MutationResult
|
19112 | * @static
|
19113 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
19114 | * @returns {google.datastore.v1.MutationResult} MutationResult
|
19115 | * @throws {Error} If the payload is not a reader or valid buffer
|
19116 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
19117 | */
|
19118 | MutationResult.decodeDelimited = function decodeDelimited(reader) {
|
19119 | if (!(reader instanceof $Reader))
|
19120 | reader = new $Reader(reader);
|
19121 | return this.decode(reader, reader.uint32());
|
19122 | };
|
19123 |
|
19124 | /**
|
19125 | * Verifies a MutationResult message.
|
19126 | * @function verify
|
19127 | * @memberof google.datastore.v1.MutationResult
|
19128 | * @static
|
19129 | * @param {Object.<string,*>} message Plain object to verify
|
19130 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
19131 | */
|
19132 | MutationResult.verify = function verify(message) {
|
19133 | if (typeof message !== "object" || message === null)
|
19134 | return "object expected";
|
19135 | if (message.key != null && message.hasOwnProperty("key")) {
|
19136 | var error = $root.google.datastore.v1.Key.verify(message.key);
|
19137 | if (error)
|
19138 | return "key." + error;
|
19139 | }
|
19140 | if (message.version != null && message.hasOwnProperty("version"))
|
19141 | if (!$util.isInteger(message.version) && !(message.version && $util.isInteger(message.version.low) && $util.isInteger(message.version.high)))
|
19142 | return "version: integer|Long expected";
|
19143 | if (message.createTime != null && message.hasOwnProperty("createTime")) {
|
19144 | var error = $root.google.protobuf.Timestamp.verify(message.createTime);
|
19145 | if (error)
|
19146 | return "createTime." + error;
|
19147 | }
|
19148 | if (message.updateTime != null && message.hasOwnProperty("updateTime")) {
|
19149 | var error = $root.google.protobuf.Timestamp.verify(message.updateTime);
|
19150 | if (error)
|
19151 | return "updateTime." + error;
|
19152 | }
|
19153 | if (message.conflictDetected != null && message.hasOwnProperty("conflictDetected"))
|
19154 | if (typeof message.conflictDetected !== "boolean")
|
19155 | return "conflictDetected: boolean expected";
|
19156 | return null;
|
19157 | };
|
19158 |
|
19159 | /**
|
19160 | * Creates a MutationResult message from a plain object. Also converts values to their respective internal types.
|
19161 | * @function fromObject
|
19162 | * @memberof google.datastore.v1.MutationResult
|
19163 | * @static
|
19164 | * @param {Object.<string,*>} object Plain object
|
19165 | * @returns {google.datastore.v1.MutationResult} MutationResult
|
19166 | */
|
19167 | MutationResult.fromObject = function fromObject(object) {
|
19168 | if (object instanceof $root.google.datastore.v1.MutationResult)
|
19169 | return object;
|
19170 | var message = new $root.google.datastore.v1.MutationResult();
|
19171 | if (object.key != null) {
|
19172 | if (typeof object.key !== "object")
|
19173 | throw TypeError(".google.datastore.v1.MutationResult.key: object expected");
|
19174 | message.key = $root.google.datastore.v1.Key.fromObject(object.key);
|
19175 | }
|
19176 | if (object.version != null)
|
19177 | if ($util.Long)
|
19178 | (message.version = $util.Long.fromValue(object.version)).unsigned = false;
|
19179 | else if (typeof object.version === "string")
|
19180 | message.version = parseInt(object.version, 10);
|
19181 | else if (typeof object.version === "number")
|
19182 | message.version = object.version;
|
19183 | else if (typeof object.version === "object")
|
19184 | message.version = new $util.LongBits(object.version.low >>> 0, object.version.high >>> 0).toNumber();
|
19185 | if (object.createTime != null) {
|
19186 | if (typeof object.createTime !== "object")
|
19187 | throw TypeError(".google.datastore.v1.MutationResult.createTime: object expected");
|
19188 | message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
|
19189 | }
|
19190 | if (object.updateTime != null) {
|
19191 | if (typeof object.updateTime !== "object")
|
19192 | throw TypeError(".google.datastore.v1.MutationResult.updateTime: object expected");
|
19193 | message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime);
|
19194 | }
|
19195 | if (object.conflictDetected != null)
|
19196 | message.conflictDetected = Boolean(object.conflictDetected);
|
19197 | return message;
|
19198 | };
|
19199 |
|
19200 | /**
|
19201 | * Creates a plain object from a MutationResult message. Also converts values to other types if specified.
|
19202 | * @function toObject
|
19203 | * @memberof google.datastore.v1.MutationResult
|
19204 | * @static
|
19205 | * @param {google.datastore.v1.MutationResult} message MutationResult
|
19206 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
19207 | * @returns {Object.<string,*>} Plain object
|
19208 | */
|
19209 | MutationResult.toObject = function toObject(message, options) {
|
19210 | if (!options)
|
19211 | options = {};
|
19212 | var object = {};
|
19213 | if (options.defaults) {
|
19214 | object.key = null;
|
19215 | if ($util.Long) {
|
19216 | var long = new $util.Long(0, 0, false);
|
19217 | object.version = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
19218 | } else
|
19219 | object.version = options.longs === String ? "0" : 0;
|
19220 | object.conflictDetected = false;
|
19221 | object.updateTime = null;
|
19222 | object.createTime = null;
|
19223 | }
|
19224 | if (message.key != null && message.hasOwnProperty("key"))
|
19225 | object.key = $root.google.datastore.v1.Key.toObject(message.key, options);
|
19226 | if (message.version != null && message.hasOwnProperty("version"))
|
19227 | if (typeof message.version === "number")
|
19228 | object.version = options.longs === String ? String(message.version) : message.version;
|
19229 | else
|
19230 | object.version = options.longs === String ? $util.Long.prototype.toString.call(message.version) : options.longs === Number ? new $util.LongBits(message.version.low >>> 0, message.version.high >>> 0).toNumber() : message.version;
|
19231 | if (message.conflictDetected != null && message.hasOwnProperty("conflictDetected"))
|
19232 | object.conflictDetected = message.conflictDetected;
|
19233 | if (message.updateTime != null && message.hasOwnProperty("updateTime"))
|
19234 | object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options);
|
19235 | if (message.createTime != null && message.hasOwnProperty("createTime"))
|
19236 | object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
|
19237 | return object;
|
19238 | };
|
19239 |
|
19240 | /**
|
19241 | * Converts this MutationResult to JSON.
|
19242 | * @function toJSON
|
19243 | * @memberof google.datastore.v1.MutationResult
|
19244 | * @instance
|
19245 | * @returns {Object.<string,*>} JSON object
|
19246 | */
|
19247 | MutationResult.prototype.toJSON = function toJSON() {
|
19248 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
19249 | };
|
19250 |
|
19251 | /**
|
19252 | * Gets the default type url for MutationResult
|
19253 | * @function getTypeUrl
|
19254 | * @memberof google.datastore.v1.MutationResult
|
19255 | * @static
|
19256 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
19257 | * @returns {string} The default type url
|
19258 | */
|
19259 | MutationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
19260 | if (typeUrlPrefix === undefined) {
|
19261 | typeUrlPrefix = "type.googleapis.com";
|
19262 | }
|
19263 | return typeUrlPrefix + "/google.datastore.v1.MutationResult";
|
19264 | };
|
19265 |
|
19266 | return MutationResult;
|
19267 | })();
|
19268 |
|
19269 | v1.ReadOptions = (function() {
|
19270 |
|
19271 | /**
|
19272 | * Properties of a ReadOptions.
|
19273 | * @memberof google.datastore.v1
|
19274 | * @interface IReadOptions
|
19275 | * @property {google.datastore.v1.ReadOptions.ReadConsistency|null} [readConsistency] ReadOptions readConsistency
|
19276 | * @property {Uint8Array|null} [transaction] ReadOptions transaction
|
19277 | * @property {google.datastore.v1.ITransactionOptions|null} [newTransaction] ReadOptions newTransaction
|
19278 | * @property {google.protobuf.ITimestamp|null} [readTime] ReadOptions readTime
|
19279 | */
|
19280 |
|
19281 | /**
|
19282 | * Constructs a new ReadOptions.
|
19283 | * @memberof google.datastore.v1
|
19284 | * @classdesc Represents a ReadOptions.
|
19285 | * @implements IReadOptions
|
19286 | * @constructor
|
19287 | * @param {google.datastore.v1.IReadOptions=} [properties] Properties to set
|
19288 | */
|
19289 | function ReadOptions(properties) {
|
19290 | if (properties)
|
19291 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
19292 | if (properties[keys[i]] != null)
|
19293 | this[keys[i]] = properties[keys[i]];
|
19294 | }
|
19295 |
|
19296 | /**
|
19297 | * ReadOptions readConsistency.
|
19298 | * @member {google.datastore.v1.ReadOptions.ReadConsistency|null|undefined} readConsistency
|
19299 | * @memberof google.datastore.v1.ReadOptions
|
19300 | * @instance
|
19301 | */
|
19302 | ReadOptions.prototype.readConsistency = null;
|
19303 |
|
19304 | /**
|
19305 | * ReadOptions transaction.
|
19306 | * @member {Uint8Array|null|undefined} transaction
|
19307 | * @memberof google.datastore.v1.ReadOptions
|
19308 | * @instance
|
19309 | */
|
19310 | ReadOptions.prototype.transaction = null;
|
19311 |
|
19312 | /**
|
19313 | * ReadOptions newTransaction.
|
19314 | * @member {google.datastore.v1.ITransactionOptions|null|undefined} newTransaction
|
19315 | * @memberof google.datastore.v1.ReadOptions
|
19316 | * @instance
|
19317 | */
|
19318 | ReadOptions.prototype.newTransaction = null;
|
19319 |
|
19320 | /**
|
19321 | * ReadOptions readTime.
|
19322 | * @member {google.protobuf.ITimestamp|null|undefined} readTime
|
19323 | * @memberof google.datastore.v1.ReadOptions
|
19324 | * @instance
|
19325 | */
|
19326 | ReadOptions.prototype.readTime = null;
|
19327 |
|
19328 | // OneOf field names bound to virtual getters and setters
|
19329 | var $oneOfFields;
|
19330 |
|
19331 | /**
|
19332 | * ReadOptions consistencyType.
|
19333 | * @member {"readConsistency"|"transaction"|"newTransaction"|"readTime"|undefined} consistencyType
|
19334 | * @memberof google.datastore.v1.ReadOptions
|
19335 | * @instance
|
19336 | */
|
19337 | Object.defineProperty(ReadOptions.prototype, "consistencyType", {
|
19338 | get: $util.oneOfGetter($oneOfFields = ["readConsistency", "transaction", "newTransaction", "readTime"]),
|
19339 | set: $util.oneOfSetter($oneOfFields)
|
19340 | });
|
19341 |
|
19342 | /**
|
19343 | * Creates a new ReadOptions instance using the specified properties.
|
19344 | * @function create
|
19345 | * @memberof google.datastore.v1.ReadOptions
|
19346 | * @static
|
19347 | * @param {google.datastore.v1.IReadOptions=} [properties] Properties to set
|
19348 | * @returns {google.datastore.v1.ReadOptions} ReadOptions instance
|
19349 | */
|
19350 | ReadOptions.create = function create(properties) {
|
19351 | return new ReadOptions(properties);
|
19352 | };
|
19353 |
|
19354 | /**
|
19355 | * Encodes the specified ReadOptions message. Does not implicitly {@link google.datastore.v1.ReadOptions.verify|verify} messages.
|
19356 | * @function encode
|
19357 | * @memberof google.datastore.v1.ReadOptions
|
19358 | * @static
|
19359 | * @param {google.datastore.v1.IReadOptions} message ReadOptions message or plain object to encode
|
19360 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
19361 | * @returns {$protobuf.Writer} Writer
|
19362 | */
|
19363 | ReadOptions.encode = function encode(message, writer) {
|
19364 | if (!writer)
|
19365 | writer = $Writer.create();
|
19366 | if (message.readConsistency != null && Object.hasOwnProperty.call(message, "readConsistency"))
|
19367 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.readConsistency);
|
19368 | if (message.transaction != null && Object.hasOwnProperty.call(message, "transaction"))
|
19369 | writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.transaction);
|
19370 | if (message.newTransaction != null && Object.hasOwnProperty.call(message, "newTransaction"))
|
19371 | $root.google.datastore.v1.TransactionOptions.encode(message.newTransaction, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
19372 | if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime"))
|
19373 | $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
19374 | return writer;
|
19375 | };
|
19376 |
|
19377 | /**
|
19378 | * Encodes the specified ReadOptions message, length delimited. Does not implicitly {@link google.datastore.v1.ReadOptions.verify|verify} messages.
|
19379 | * @function encodeDelimited
|
19380 | * @memberof google.datastore.v1.ReadOptions
|
19381 | * @static
|
19382 | * @param {google.datastore.v1.IReadOptions} message ReadOptions message or plain object to encode
|
19383 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
19384 | * @returns {$protobuf.Writer} Writer
|
19385 | */
|
19386 | ReadOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
19387 | return this.encode(message, writer).ldelim();
|
19388 | };
|
19389 |
|
19390 | /**
|
19391 | * Decodes a ReadOptions message from the specified reader or buffer.
|
19392 | * @function decode
|
19393 | * @memberof google.datastore.v1.ReadOptions
|
19394 | * @static
|
19395 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
19396 | * @param {number} [length] Message length if known beforehand
|
19397 | * @returns {google.datastore.v1.ReadOptions} ReadOptions
|
19398 | * @throws {Error} If the payload is not a reader or valid buffer
|
19399 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
19400 | */
|
19401 | ReadOptions.decode = function decode(reader, length) {
|
19402 | if (!(reader instanceof $Reader))
|
19403 | reader = $Reader.create(reader);
|
19404 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.ReadOptions();
|
19405 | while (reader.pos < end) {
|
19406 | var tag = reader.uint32();
|
19407 | switch (tag >>> 3) {
|
19408 | case 1: {
|
19409 | message.readConsistency = reader.int32();
|
19410 | break;
|
19411 | }
|
19412 | case 2: {
|
19413 | message.transaction = reader.bytes();
|
19414 | break;
|
19415 | }
|
19416 | case 3: {
|
19417 | message.newTransaction = $root.google.datastore.v1.TransactionOptions.decode(reader, reader.uint32());
|
19418 | break;
|
19419 | }
|
19420 | case 4: {
|
19421 | message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
19422 | break;
|
19423 | }
|
19424 | default:
|
19425 | reader.skipType(tag & 7);
|
19426 | break;
|
19427 | }
|
19428 | }
|
19429 | return message;
|
19430 | };
|
19431 |
|
19432 | /**
|
19433 | * Decodes a ReadOptions message from the specified reader or buffer, length delimited.
|
19434 | * @function decodeDelimited
|
19435 | * @memberof google.datastore.v1.ReadOptions
|
19436 | * @static
|
19437 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
19438 | * @returns {google.datastore.v1.ReadOptions} ReadOptions
|
19439 | * @throws {Error} If the payload is not a reader or valid buffer
|
19440 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
19441 | */
|
19442 | ReadOptions.decodeDelimited = function decodeDelimited(reader) {
|
19443 | if (!(reader instanceof $Reader))
|
19444 | reader = new $Reader(reader);
|
19445 | return this.decode(reader, reader.uint32());
|
19446 | };
|
19447 |
|
19448 | /**
|
19449 | * Verifies a ReadOptions message.
|
19450 | * @function verify
|
19451 | * @memberof google.datastore.v1.ReadOptions
|
19452 | * @static
|
19453 | * @param {Object.<string,*>} message Plain object to verify
|
19454 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
19455 | */
|
19456 | ReadOptions.verify = function verify(message) {
|
19457 | if (typeof message !== "object" || message === null)
|
19458 | return "object expected";
|
19459 | var properties = {};
|
19460 | if (message.readConsistency != null && message.hasOwnProperty("readConsistency")) {
|
19461 | properties.consistencyType = 1;
|
19462 | switch (message.readConsistency) {
|
19463 | default:
|
19464 | return "readConsistency: enum value expected";
|
19465 | case 0:
|
19466 | case 1:
|
19467 | case 2:
|
19468 | break;
|
19469 | }
|
19470 | }
|
19471 | if (message.transaction != null && message.hasOwnProperty("transaction")) {
|
19472 | if (properties.consistencyType === 1)
|
19473 | return "consistencyType: multiple values";
|
19474 | properties.consistencyType = 1;
|
19475 | if (!(message.transaction && typeof message.transaction.length === "number" || $util.isString(message.transaction)))
|
19476 | return "transaction: buffer expected";
|
19477 | }
|
19478 | if (message.newTransaction != null && message.hasOwnProperty("newTransaction")) {
|
19479 | if (properties.consistencyType === 1)
|
19480 | return "consistencyType: multiple values";
|
19481 | properties.consistencyType = 1;
|
19482 | {
|
19483 | var error = $root.google.datastore.v1.TransactionOptions.verify(message.newTransaction);
|
19484 | if (error)
|
19485 | return "newTransaction." + error;
|
19486 | }
|
19487 | }
|
19488 | if (message.readTime != null && message.hasOwnProperty("readTime")) {
|
19489 | if (properties.consistencyType === 1)
|
19490 | return "consistencyType: multiple values";
|
19491 | properties.consistencyType = 1;
|
19492 | {
|
19493 | var error = $root.google.protobuf.Timestamp.verify(message.readTime);
|
19494 | if (error)
|
19495 | return "readTime." + error;
|
19496 | }
|
19497 | }
|
19498 | return null;
|
19499 | };
|
19500 |
|
19501 | /**
|
19502 | * Creates a ReadOptions message from a plain object. Also converts values to their respective internal types.
|
19503 | * @function fromObject
|
19504 | * @memberof google.datastore.v1.ReadOptions
|
19505 | * @static
|
19506 | * @param {Object.<string,*>} object Plain object
|
19507 | * @returns {google.datastore.v1.ReadOptions} ReadOptions
|
19508 | */
|
19509 | ReadOptions.fromObject = function fromObject(object) {
|
19510 | if (object instanceof $root.google.datastore.v1.ReadOptions)
|
19511 | return object;
|
19512 | var message = new $root.google.datastore.v1.ReadOptions();
|
19513 | switch (object.readConsistency) {
|
19514 | default:
|
19515 | if (typeof object.readConsistency === "number") {
|
19516 | message.readConsistency = object.readConsistency;
|
19517 | break;
|
19518 | }
|
19519 | break;
|
19520 | case "READ_CONSISTENCY_UNSPECIFIED":
|
19521 | case 0:
|
19522 | message.readConsistency = 0;
|
19523 | break;
|
19524 | case "STRONG":
|
19525 | case 1:
|
19526 | message.readConsistency = 1;
|
19527 | break;
|
19528 | case "EVENTUAL":
|
19529 | case 2:
|
19530 | message.readConsistency = 2;
|
19531 | break;
|
19532 | }
|
19533 | if (object.transaction != null)
|
19534 | if (typeof object.transaction === "string")
|
19535 | $util.base64.decode(object.transaction, message.transaction = $util.newBuffer($util.base64.length(object.transaction)), 0);
|
19536 | else if (object.transaction.length >= 0)
|
19537 | message.transaction = object.transaction;
|
19538 | if (object.newTransaction != null) {
|
19539 | if (typeof object.newTransaction !== "object")
|
19540 | throw TypeError(".google.datastore.v1.ReadOptions.newTransaction: object expected");
|
19541 | message.newTransaction = $root.google.datastore.v1.TransactionOptions.fromObject(object.newTransaction);
|
19542 | }
|
19543 | if (object.readTime != null) {
|
19544 | if (typeof object.readTime !== "object")
|
19545 | throw TypeError(".google.datastore.v1.ReadOptions.readTime: object expected");
|
19546 | message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime);
|
19547 | }
|
19548 | return message;
|
19549 | };
|
19550 |
|
19551 | /**
|
19552 | * Creates a plain object from a ReadOptions message. Also converts values to other types if specified.
|
19553 | * @function toObject
|
19554 | * @memberof google.datastore.v1.ReadOptions
|
19555 | * @static
|
19556 | * @param {google.datastore.v1.ReadOptions} message ReadOptions
|
19557 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
19558 | * @returns {Object.<string,*>} Plain object
|
19559 | */
|
19560 | ReadOptions.toObject = function toObject(message, options) {
|
19561 | if (!options)
|
19562 | options = {};
|
19563 | var object = {};
|
19564 | if (message.readConsistency != null && message.hasOwnProperty("readConsistency")) {
|
19565 | object.readConsistency = options.enums === String ? $root.google.datastore.v1.ReadOptions.ReadConsistency[message.readConsistency] === undefined ? message.readConsistency : $root.google.datastore.v1.ReadOptions.ReadConsistency[message.readConsistency] : message.readConsistency;
|
19566 | if (options.oneofs)
|
19567 | object.consistencyType = "readConsistency";
|
19568 | }
|
19569 | if (message.transaction != null && message.hasOwnProperty("transaction")) {
|
19570 | object.transaction = options.bytes === String ? $util.base64.encode(message.transaction, 0, message.transaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.transaction) : message.transaction;
|
19571 | if (options.oneofs)
|
19572 | object.consistencyType = "transaction";
|
19573 | }
|
19574 | if (message.newTransaction != null && message.hasOwnProperty("newTransaction")) {
|
19575 | object.newTransaction = $root.google.datastore.v1.TransactionOptions.toObject(message.newTransaction, options);
|
19576 | if (options.oneofs)
|
19577 | object.consistencyType = "newTransaction";
|
19578 | }
|
19579 | if (message.readTime != null && message.hasOwnProperty("readTime")) {
|
19580 | object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options);
|
19581 | if (options.oneofs)
|
19582 | object.consistencyType = "readTime";
|
19583 | }
|
19584 | return object;
|
19585 | };
|
19586 |
|
19587 | /**
|
19588 | * Converts this ReadOptions to JSON.
|
19589 | * @function toJSON
|
19590 | * @memberof google.datastore.v1.ReadOptions
|
19591 | * @instance
|
19592 | * @returns {Object.<string,*>} JSON object
|
19593 | */
|
19594 | ReadOptions.prototype.toJSON = function toJSON() {
|
19595 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
19596 | };
|
19597 |
|
19598 | /**
|
19599 | * Gets the default type url for ReadOptions
|
19600 | * @function getTypeUrl
|
19601 | * @memberof google.datastore.v1.ReadOptions
|
19602 | * @static
|
19603 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
19604 | * @returns {string} The default type url
|
19605 | */
|
19606 | ReadOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
19607 | if (typeUrlPrefix === undefined) {
|
19608 | typeUrlPrefix = "type.googleapis.com";
|
19609 | }
|
19610 | return typeUrlPrefix + "/google.datastore.v1.ReadOptions";
|
19611 | };
|
19612 |
|
19613 | /**
|
19614 | * ReadConsistency enum.
|
19615 | * @name google.datastore.v1.ReadOptions.ReadConsistency
|
19616 | * @enum {number}
|
19617 | * @property {number} READ_CONSISTENCY_UNSPECIFIED=0 READ_CONSISTENCY_UNSPECIFIED value
|
19618 | * @property {number} STRONG=1 STRONG value
|
19619 | * @property {number} EVENTUAL=2 EVENTUAL value
|
19620 | */
|
19621 | ReadOptions.ReadConsistency = (function() {
|
19622 | var valuesById = {}, values = Object.create(valuesById);
|
19623 | values[valuesById[0] = "READ_CONSISTENCY_UNSPECIFIED"] = 0;
|
19624 | values[valuesById[1] = "STRONG"] = 1;
|
19625 | values[valuesById[2] = "EVENTUAL"] = 2;
|
19626 | return values;
|
19627 | })();
|
19628 |
|
19629 | return ReadOptions;
|
19630 | })();
|
19631 |
|
19632 | v1.TransactionOptions = (function() {
|
19633 |
|
19634 | /**
|
19635 | * Properties of a TransactionOptions.
|
19636 | * @memberof google.datastore.v1
|
19637 | * @interface ITransactionOptions
|
19638 | * @property {google.datastore.v1.TransactionOptions.IReadWrite|null} [readWrite] TransactionOptions readWrite
|
19639 | * @property {google.datastore.v1.TransactionOptions.IReadOnly|null} [readOnly] TransactionOptions readOnly
|
19640 | */
|
19641 |
|
19642 | /**
|
19643 | * Constructs a new TransactionOptions.
|
19644 | * @memberof google.datastore.v1
|
19645 | * @classdesc Represents a TransactionOptions.
|
19646 | * @implements ITransactionOptions
|
19647 | * @constructor
|
19648 | * @param {google.datastore.v1.ITransactionOptions=} [properties] Properties to set
|
19649 | */
|
19650 | function TransactionOptions(properties) {
|
19651 | if (properties)
|
19652 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
19653 | if (properties[keys[i]] != null)
|
19654 | this[keys[i]] = properties[keys[i]];
|
19655 | }
|
19656 |
|
19657 | /**
|
19658 | * TransactionOptions readWrite.
|
19659 | * @member {google.datastore.v1.TransactionOptions.IReadWrite|null|undefined} readWrite
|
19660 | * @memberof google.datastore.v1.TransactionOptions
|
19661 | * @instance
|
19662 | */
|
19663 | TransactionOptions.prototype.readWrite = null;
|
19664 |
|
19665 | /**
|
19666 | * TransactionOptions readOnly.
|
19667 | * @member {google.datastore.v1.TransactionOptions.IReadOnly|null|undefined} readOnly
|
19668 | * @memberof google.datastore.v1.TransactionOptions
|
19669 | * @instance
|
19670 | */
|
19671 | TransactionOptions.prototype.readOnly = null;
|
19672 |
|
19673 | // OneOf field names bound to virtual getters and setters
|
19674 | var $oneOfFields;
|
19675 |
|
19676 | /**
|
19677 | * TransactionOptions mode.
|
19678 | * @member {"readWrite"|"readOnly"|undefined} mode
|
19679 | * @memberof google.datastore.v1.TransactionOptions
|
19680 | * @instance
|
19681 | */
|
19682 | Object.defineProperty(TransactionOptions.prototype, "mode", {
|
19683 | get: $util.oneOfGetter($oneOfFields = ["readWrite", "readOnly"]),
|
19684 | set: $util.oneOfSetter($oneOfFields)
|
19685 | });
|
19686 |
|
19687 | /**
|
19688 | * Creates a new TransactionOptions instance using the specified properties.
|
19689 | * @function create
|
19690 | * @memberof google.datastore.v1.TransactionOptions
|
19691 | * @static
|
19692 | * @param {google.datastore.v1.ITransactionOptions=} [properties] Properties to set
|
19693 | * @returns {google.datastore.v1.TransactionOptions} TransactionOptions instance
|
19694 | */
|
19695 | TransactionOptions.create = function create(properties) {
|
19696 | return new TransactionOptions(properties);
|
19697 | };
|
19698 |
|
19699 | /**
|
19700 | * Encodes the specified TransactionOptions message. Does not implicitly {@link google.datastore.v1.TransactionOptions.verify|verify} messages.
|
19701 | * @function encode
|
19702 | * @memberof google.datastore.v1.TransactionOptions
|
19703 | * @static
|
19704 | * @param {google.datastore.v1.ITransactionOptions} message TransactionOptions message or plain object to encode
|
19705 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
19706 | * @returns {$protobuf.Writer} Writer
|
19707 | */
|
19708 | TransactionOptions.encode = function encode(message, writer) {
|
19709 | if (!writer)
|
19710 | writer = $Writer.create();
|
19711 | if (message.readWrite != null && Object.hasOwnProperty.call(message, "readWrite"))
|
19712 | $root.google.datastore.v1.TransactionOptions.ReadWrite.encode(message.readWrite, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
19713 | if (message.readOnly != null && Object.hasOwnProperty.call(message, "readOnly"))
|
19714 | $root.google.datastore.v1.TransactionOptions.ReadOnly.encode(message.readOnly, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
19715 | return writer;
|
19716 | };
|
19717 |
|
19718 | /**
|
19719 | * Encodes the specified TransactionOptions message, length delimited. Does not implicitly {@link google.datastore.v1.TransactionOptions.verify|verify} messages.
|
19720 | * @function encodeDelimited
|
19721 | * @memberof google.datastore.v1.TransactionOptions
|
19722 | * @static
|
19723 | * @param {google.datastore.v1.ITransactionOptions} message TransactionOptions message or plain object to encode
|
19724 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
19725 | * @returns {$protobuf.Writer} Writer
|
19726 | */
|
19727 | TransactionOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
19728 | return this.encode(message, writer).ldelim();
|
19729 | };
|
19730 |
|
19731 | /**
|
19732 | * Decodes a TransactionOptions message from the specified reader or buffer.
|
19733 | * @function decode
|
19734 | * @memberof google.datastore.v1.TransactionOptions
|
19735 | * @static
|
19736 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
19737 | * @param {number} [length] Message length if known beforehand
|
19738 | * @returns {google.datastore.v1.TransactionOptions} TransactionOptions
|
19739 | * @throws {Error} If the payload is not a reader or valid buffer
|
19740 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
19741 | */
|
19742 | TransactionOptions.decode = function decode(reader, length) {
|
19743 | if (!(reader instanceof $Reader))
|
19744 | reader = $Reader.create(reader);
|
19745 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.TransactionOptions();
|
19746 | while (reader.pos < end) {
|
19747 | var tag = reader.uint32();
|
19748 | switch (tag >>> 3) {
|
19749 | case 1: {
|
19750 | message.readWrite = $root.google.datastore.v1.TransactionOptions.ReadWrite.decode(reader, reader.uint32());
|
19751 | break;
|
19752 | }
|
19753 | case 2: {
|
19754 | message.readOnly = $root.google.datastore.v1.TransactionOptions.ReadOnly.decode(reader, reader.uint32());
|
19755 | break;
|
19756 | }
|
19757 | default:
|
19758 | reader.skipType(tag & 7);
|
19759 | break;
|
19760 | }
|
19761 | }
|
19762 | return message;
|
19763 | };
|
19764 |
|
19765 | /**
|
19766 | * Decodes a TransactionOptions message from the specified reader or buffer, length delimited.
|
19767 | * @function decodeDelimited
|
19768 | * @memberof google.datastore.v1.TransactionOptions
|
19769 | * @static
|
19770 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
19771 | * @returns {google.datastore.v1.TransactionOptions} TransactionOptions
|
19772 | * @throws {Error} If the payload is not a reader or valid buffer
|
19773 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
19774 | */
|
19775 | TransactionOptions.decodeDelimited = function decodeDelimited(reader) {
|
19776 | if (!(reader instanceof $Reader))
|
19777 | reader = new $Reader(reader);
|
19778 | return this.decode(reader, reader.uint32());
|
19779 | };
|
19780 |
|
19781 | /**
|
19782 | * Verifies a TransactionOptions message.
|
19783 | * @function verify
|
19784 | * @memberof google.datastore.v1.TransactionOptions
|
19785 | * @static
|
19786 | * @param {Object.<string,*>} message Plain object to verify
|
19787 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
19788 | */
|
19789 | TransactionOptions.verify = function verify(message) {
|
19790 | if (typeof message !== "object" || message === null)
|
19791 | return "object expected";
|
19792 | var properties = {};
|
19793 | if (message.readWrite != null && message.hasOwnProperty("readWrite")) {
|
19794 | properties.mode = 1;
|
19795 | {
|
19796 | var error = $root.google.datastore.v1.TransactionOptions.ReadWrite.verify(message.readWrite);
|
19797 | if (error)
|
19798 | return "readWrite." + error;
|
19799 | }
|
19800 | }
|
19801 | if (message.readOnly != null && message.hasOwnProperty("readOnly")) {
|
19802 | if (properties.mode === 1)
|
19803 | return "mode: multiple values";
|
19804 | properties.mode = 1;
|
19805 | {
|
19806 | var error = $root.google.datastore.v1.TransactionOptions.ReadOnly.verify(message.readOnly);
|
19807 | if (error)
|
19808 | return "readOnly." + error;
|
19809 | }
|
19810 | }
|
19811 | return null;
|
19812 | };
|
19813 |
|
19814 | /**
|
19815 | * Creates a TransactionOptions message from a plain object. Also converts values to their respective internal types.
|
19816 | * @function fromObject
|
19817 | * @memberof google.datastore.v1.TransactionOptions
|
19818 | * @static
|
19819 | * @param {Object.<string,*>} object Plain object
|
19820 | * @returns {google.datastore.v1.TransactionOptions} TransactionOptions
|
19821 | */
|
19822 | TransactionOptions.fromObject = function fromObject(object) {
|
19823 | if (object instanceof $root.google.datastore.v1.TransactionOptions)
|
19824 | return object;
|
19825 | var message = new $root.google.datastore.v1.TransactionOptions();
|
19826 | if (object.readWrite != null) {
|
19827 | if (typeof object.readWrite !== "object")
|
19828 | throw TypeError(".google.datastore.v1.TransactionOptions.readWrite: object expected");
|
19829 | message.readWrite = $root.google.datastore.v1.TransactionOptions.ReadWrite.fromObject(object.readWrite);
|
19830 | }
|
19831 | if (object.readOnly != null) {
|
19832 | if (typeof object.readOnly !== "object")
|
19833 | throw TypeError(".google.datastore.v1.TransactionOptions.readOnly: object expected");
|
19834 | message.readOnly = $root.google.datastore.v1.TransactionOptions.ReadOnly.fromObject(object.readOnly);
|
19835 | }
|
19836 | return message;
|
19837 | };
|
19838 |
|
19839 | /**
|
19840 | * Creates a plain object from a TransactionOptions message. Also converts values to other types if specified.
|
19841 | * @function toObject
|
19842 | * @memberof google.datastore.v1.TransactionOptions
|
19843 | * @static
|
19844 | * @param {google.datastore.v1.TransactionOptions} message TransactionOptions
|
19845 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
19846 | * @returns {Object.<string,*>} Plain object
|
19847 | */
|
19848 | TransactionOptions.toObject = function toObject(message, options) {
|
19849 | if (!options)
|
19850 | options = {};
|
19851 | var object = {};
|
19852 | if (message.readWrite != null && message.hasOwnProperty("readWrite")) {
|
19853 | object.readWrite = $root.google.datastore.v1.TransactionOptions.ReadWrite.toObject(message.readWrite, options);
|
19854 | if (options.oneofs)
|
19855 | object.mode = "readWrite";
|
19856 | }
|
19857 | if (message.readOnly != null && message.hasOwnProperty("readOnly")) {
|
19858 | object.readOnly = $root.google.datastore.v1.TransactionOptions.ReadOnly.toObject(message.readOnly, options);
|
19859 | if (options.oneofs)
|
19860 | object.mode = "readOnly";
|
19861 | }
|
19862 | return object;
|
19863 | };
|
19864 |
|
19865 | /**
|
19866 | * Converts this TransactionOptions to JSON.
|
19867 | * @function toJSON
|
19868 | * @memberof google.datastore.v1.TransactionOptions
|
19869 | * @instance
|
19870 | * @returns {Object.<string,*>} JSON object
|
19871 | */
|
19872 | TransactionOptions.prototype.toJSON = function toJSON() {
|
19873 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
19874 | };
|
19875 |
|
19876 | /**
|
19877 | * Gets the default type url for TransactionOptions
|
19878 | * @function getTypeUrl
|
19879 | * @memberof google.datastore.v1.TransactionOptions
|
19880 | * @static
|
19881 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
19882 | * @returns {string} The default type url
|
19883 | */
|
19884 | TransactionOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
19885 | if (typeUrlPrefix === undefined) {
|
19886 | typeUrlPrefix = "type.googleapis.com";
|
19887 | }
|
19888 | return typeUrlPrefix + "/google.datastore.v1.TransactionOptions";
|
19889 | };
|
19890 |
|
19891 | TransactionOptions.ReadWrite = (function() {
|
19892 |
|
19893 | /**
|
19894 | * Properties of a ReadWrite.
|
19895 | * @memberof google.datastore.v1.TransactionOptions
|
19896 | * @interface IReadWrite
|
19897 | * @property {Uint8Array|null} [previousTransaction] ReadWrite previousTransaction
|
19898 | */
|
19899 |
|
19900 | /**
|
19901 | * Constructs a new ReadWrite.
|
19902 | * @memberof google.datastore.v1.TransactionOptions
|
19903 | * @classdesc Represents a ReadWrite.
|
19904 | * @implements IReadWrite
|
19905 | * @constructor
|
19906 | * @param {google.datastore.v1.TransactionOptions.IReadWrite=} [properties] Properties to set
|
19907 | */
|
19908 | function ReadWrite(properties) {
|
19909 | if (properties)
|
19910 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
19911 | if (properties[keys[i]] != null)
|
19912 | this[keys[i]] = properties[keys[i]];
|
19913 | }
|
19914 |
|
19915 | /**
|
19916 | * ReadWrite previousTransaction.
|
19917 | * @member {Uint8Array} previousTransaction
|
19918 | * @memberof google.datastore.v1.TransactionOptions.ReadWrite
|
19919 | * @instance
|
19920 | */
|
19921 | ReadWrite.prototype.previousTransaction = $util.newBuffer([]);
|
19922 |
|
19923 | /**
|
19924 | * Creates a new ReadWrite instance using the specified properties.
|
19925 | * @function create
|
19926 | * @memberof google.datastore.v1.TransactionOptions.ReadWrite
|
19927 | * @static
|
19928 | * @param {google.datastore.v1.TransactionOptions.IReadWrite=} [properties] Properties to set
|
19929 | * @returns {google.datastore.v1.TransactionOptions.ReadWrite} ReadWrite instance
|
19930 | */
|
19931 | ReadWrite.create = function create(properties) {
|
19932 | return new ReadWrite(properties);
|
19933 | };
|
19934 |
|
19935 | /**
|
19936 | * Encodes the specified ReadWrite message. Does not implicitly {@link google.datastore.v1.TransactionOptions.ReadWrite.verify|verify} messages.
|
19937 | * @function encode
|
19938 | * @memberof google.datastore.v1.TransactionOptions.ReadWrite
|
19939 | * @static
|
19940 | * @param {google.datastore.v1.TransactionOptions.IReadWrite} message ReadWrite message or plain object to encode
|
19941 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
19942 | * @returns {$protobuf.Writer} Writer
|
19943 | */
|
19944 | ReadWrite.encode = function encode(message, writer) {
|
19945 | if (!writer)
|
19946 | writer = $Writer.create();
|
19947 | if (message.previousTransaction != null && Object.hasOwnProperty.call(message, "previousTransaction"))
|
19948 | writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.previousTransaction);
|
19949 | return writer;
|
19950 | };
|
19951 |
|
19952 | /**
|
19953 | * Encodes the specified ReadWrite message, length delimited. Does not implicitly {@link google.datastore.v1.TransactionOptions.ReadWrite.verify|verify} messages.
|
19954 | * @function encodeDelimited
|
19955 | * @memberof google.datastore.v1.TransactionOptions.ReadWrite
|
19956 | * @static
|
19957 | * @param {google.datastore.v1.TransactionOptions.IReadWrite} message ReadWrite message or plain object to encode
|
19958 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
19959 | * @returns {$protobuf.Writer} Writer
|
19960 | */
|
19961 | ReadWrite.encodeDelimited = function encodeDelimited(message, writer) {
|
19962 | return this.encode(message, writer).ldelim();
|
19963 | };
|
19964 |
|
19965 | /**
|
19966 | * Decodes a ReadWrite message from the specified reader or buffer.
|
19967 | * @function decode
|
19968 | * @memberof google.datastore.v1.TransactionOptions.ReadWrite
|
19969 | * @static
|
19970 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
19971 | * @param {number} [length] Message length if known beforehand
|
19972 | * @returns {google.datastore.v1.TransactionOptions.ReadWrite} ReadWrite
|
19973 | * @throws {Error} If the payload is not a reader or valid buffer
|
19974 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
19975 | */
|
19976 | ReadWrite.decode = function decode(reader, length) {
|
19977 | if (!(reader instanceof $Reader))
|
19978 | reader = $Reader.create(reader);
|
19979 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.TransactionOptions.ReadWrite();
|
19980 | while (reader.pos < end) {
|
19981 | var tag = reader.uint32();
|
19982 | switch (tag >>> 3) {
|
19983 | case 1: {
|
19984 | message.previousTransaction = reader.bytes();
|
19985 | break;
|
19986 | }
|
19987 | default:
|
19988 | reader.skipType(tag & 7);
|
19989 | break;
|
19990 | }
|
19991 | }
|
19992 | return message;
|
19993 | };
|
19994 |
|
19995 | /**
|
19996 | * Decodes a ReadWrite message from the specified reader or buffer, length delimited.
|
19997 | * @function decodeDelimited
|
19998 | * @memberof google.datastore.v1.TransactionOptions.ReadWrite
|
19999 | * @static
|
20000 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
20001 | * @returns {google.datastore.v1.TransactionOptions.ReadWrite} ReadWrite
|
20002 | * @throws {Error} If the payload is not a reader or valid buffer
|
20003 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
20004 | */
|
20005 | ReadWrite.decodeDelimited = function decodeDelimited(reader) {
|
20006 | if (!(reader instanceof $Reader))
|
20007 | reader = new $Reader(reader);
|
20008 | return this.decode(reader, reader.uint32());
|
20009 | };
|
20010 |
|
20011 | /**
|
20012 | * Verifies a ReadWrite message.
|
20013 | * @function verify
|
20014 | * @memberof google.datastore.v1.TransactionOptions.ReadWrite
|
20015 | * @static
|
20016 | * @param {Object.<string,*>} message Plain object to verify
|
20017 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
20018 | */
|
20019 | ReadWrite.verify = function verify(message) {
|
20020 | if (typeof message !== "object" || message === null)
|
20021 | return "object expected";
|
20022 | if (message.previousTransaction != null && message.hasOwnProperty("previousTransaction"))
|
20023 | if (!(message.previousTransaction && typeof message.previousTransaction.length === "number" || $util.isString(message.previousTransaction)))
|
20024 | return "previousTransaction: buffer expected";
|
20025 | return null;
|
20026 | };
|
20027 |
|
20028 | /**
|
20029 | * Creates a ReadWrite message from a plain object. Also converts values to their respective internal types.
|
20030 | * @function fromObject
|
20031 | * @memberof google.datastore.v1.TransactionOptions.ReadWrite
|
20032 | * @static
|
20033 | * @param {Object.<string,*>} object Plain object
|
20034 | * @returns {google.datastore.v1.TransactionOptions.ReadWrite} ReadWrite
|
20035 | */
|
20036 | ReadWrite.fromObject = function fromObject(object) {
|
20037 | if (object instanceof $root.google.datastore.v1.TransactionOptions.ReadWrite)
|
20038 | return object;
|
20039 | var message = new $root.google.datastore.v1.TransactionOptions.ReadWrite();
|
20040 | if (object.previousTransaction != null)
|
20041 | if (typeof object.previousTransaction === "string")
|
20042 | $util.base64.decode(object.previousTransaction, message.previousTransaction = $util.newBuffer($util.base64.length(object.previousTransaction)), 0);
|
20043 | else if (object.previousTransaction.length >= 0)
|
20044 | message.previousTransaction = object.previousTransaction;
|
20045 | return message;
|
20046 | };
|
20047 |
|
20048 | /**
|
20049 | * Creates a plain object from a ReadWrite message. Also converts values to other types if specified.
|
20050 | * @function toObject
|
20051 | * @memberof google.datastore.v1.TransactionOptions.ReadWrite
|
20052 | * @static
|
20053 | * @param {google.datastore.v1.TransactionOptions.ReadWrite} message ReadWrite
|
20054 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
20055 | * @returns {Object.<string,*>} Plain object
|
20056 | */
|
20057 | ReadWrite.toObject = function toObject(message, options) {
|
20058 | if (!options)
|
20059 | options = {};
|
20060 | var object = {};
|
20061 | if (options.defaults)
|
20062 | if (options.bytes === String)
|
20063 | object.previousTransaction = "";
|
20064 | else {
|
20065 | object.previousTransaction = [];
|
20066 | if (options.bytes !== Array)
|
20067 | object.previousTransaction = $util.newBuffer(object.previousTransaction);
|
20068 | }
|
20069 | if (message.previousTransaction != null && message.hasOwnProperty("previousTransaction"))
|
20070 | object.previousTransaction = options.bytes === String ? $util.base64.encode(message.previousTransaction, 0, message.previousTransaction.length) : options.bytes === Array ? Array.prototype.slice.call(message.previousTransaction) : message.previousTransaction;
|
20071 | return object;
|
20072 | };
|
20073 |
|
20074 | /**
|
20075 | * Converts this ReadWrite to JSON.
|
20076 | * @function toJSON
|
20077 | * @memberof google.datastore.v1.TransactionOptions.ReadWrite
|
20078 | * @instance
|
20079 | * @returns {Object.<string,*>} JSON object
|
20080 | */
|
20081 | ReadWrite.prototype.toJSON = function toJSON() {
|
20082 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
20083 | };
|
20084 |
|
20085 | /**
|
20086 | * Gets the default type url for ReadWrite
|
20087 | * @function getTypeUrl
|
20088 | * @memberof google.datastore.v1.TransactionOptions.ReadWrite
|
20089 | * @static
|
20090 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
20091 | * @returns {string} The default type url
|
20092 | */
|
20093 | ReadWrite.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
20094 | if (typeUrlPrefix === undefined) {
|
20095 | typeUrlPrefix = "type.googleapis.com";
|
20096 | }
|
20097 | return typeUrlPrefix + "/google.datastore.v1.TransactionOptions.ReadWrite";
|
20098 | };
|
20099 |
|
20100 | return ReadWrite;
|
20101 | })();
|
20102 |
|
20103 | TransactionOptions.ReadOnly = (function() {
|
20104 |
|
20105 | /**
|
20106 | * Properties of a ReadOnly.
|
20107 | * @memberof google.datastore.v1.TransactionOptions
|
20108 | * @interface IReadOnly
|
20109 | * @property {google.protobuf.ITimestamp|null} [readTime] ReadOnly readTime
|
20110 | */
|
20111 |
|
20112 | /**
|
20113 | * Constructs a new ReadOnly.
|
20114 | * @memberof google.datastore.v1.TransactionOptions
|
20115 | * @classdesc Represents a ReadOnly.
|
20116 | * @implements IReadOnly
|
20117 | * @constructor
|
20118 | * @param {google.datastore.v1.TransactionOptions.IReadOnly=} [properties] Properties to set
|
20119 | */
|
20120 | function ReadOnly(properties) {
|
20121 | if (properties)
|
20122 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
20123 | if (properties[keys[i]] != null)
|
20124 | this[keys[i]] = properties[keys[i]];
|
20125 | }
|
20126 |
|
20127 | /**
|
20128 | * ReadOnly readTime.
|
20129 | * @member {google.protobuf.ITimestamp|null|undefined} readTime
|
20130 | * @memberof google.datastore.v1.TransactionOptions.ReadOnly
|
20131 | * @instance
|
20132 | */
|
20133 | ReadOnly.prototype.readTime = null;
|
20134 |
|
20135 | /**
|
20136 | * Creates a new ReadOnly instance using the specified properties.
|
20137 | * @function create
|
20138 | * @memberof google.datastore.v1.TransactionOptions.ReadOnly
|
20139 | * @static
|
20140 | * @param {google.datastore.v1.TransactionOptions.IReadOnly=} [properties] Properties to set
|
20141 | * @returns {google.datastore.v1.TransactionOptions.ReadOnly} ReadOnly instance
|
20142 | */
|
20143 | ReadOnly.create = function create(properties) {
|
20144 | return new ReadOnly(properties);
|
20145 | };
|
20146 |
|
20147 | /**
|
20148 | * Encodes the specified ReadOnly message. Does not implicitly {@link google.datastore.v1.TransactionOptions.ReadOnly.verify|verify} messages.
|
20149 | * @function encode
|
20150 | * @memberof google.datastore.v1.TransactionOptions.ReadOnly
|
20151 | * @static
|
20152 | * @param {google.datastore.v1.TransactionOptions.IReadOnly} message ReadOnly message or plain object to encode
|
20153 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
20154 | * @returns {$protobuf.Writer} Writer
|
20155 | */
|
20156 | ReadOnly.encode = function encode(message, writer) {
|
20157 | if (!writer)
|
20158 | writer = $Writer.create();
|
20159 | if (message.readTime != null && Object.hasOwnProperty.call(message, "readTime"))
|
20160 | $root.google.protobuf.Timestamp.encode(message.readTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
20161 | return writer;
|
20162 | };
|
20163 |
|
20164 | /**
|
20165 | * Encodes the specified ReadOnly message, length delimited. Does not implicitly {@link google.datastore.v1.TransactionOptions.ReadOnly.verify|verify} messages.
|
20166 | * @function encodeDelimited
|
20167 | * @memberof google.datastore.v1.TransactionOptions.ReadOnly
|
20168 | * @static
|
20169 | * @param {google.datastore.v1.TransactionOptions.IReadOnly} message ReadOnly message or plain object to encode
|
20170 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
20171 | * @returns {$protobuf.Writer} Writer
|
20172 | */
|
20173 | ReadOnly.encodeDelimited = function encodeDelimited(message, writer) {
|
20174 | return this.encode(message, writer).ldelim();
|
20175 | };
|
20176 |
|
20177 | /**
|
20178 | * Decodes a ReadOnly message from the specified reader or buffer.
|
20179 | * @function decode
|
20180 | * @memberof google.datastore.v1.TransactionOptions.ReadOnly
|
20181 | * @static
|
20182 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
20183 | * @param {number} [length] Message length if known beforehand
|
20184 | * @returns {google.datastore.v1.TransactionOptions.ReadOnly} ReadOnly
|
20185 | * @throws {Error} If the payload is not a reader or valid buffer
|
20186 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
20187 | */
|
20188 | ReadOnly.decode = function decode(reader, length) {
|
20189 | if (!(reader instanceof $Reader))
|
20190 | reader = $Reader.create(reader);
|
20191 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.datastore.v1.TransactionOptions.ReadOnly();
|
20192 | while (reader.pos < end) {
|
20193 | var tag = reader.uint32();
|
20194 | switch (tag >>> 3) {
|
20195 | case 1: {
|
20196 | message.readTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
20197 | break;
|
20198 | }
|
20199 | default:
|
20200 | reader.skipType(tag & 7);
|
20201 | break;
|
20202 | }
|
20203 | }
|
20204 | return message;
|
20205 | };
|
20206 |
|
20207 | /**
|
20208 | * Decodes a ReadOnly message from the specified reader or buffer, length delimited.
|
20209 | * @function decodeDelimited
|
20210 | * @memberof google.datastore.v1.TransactionOptions.ReadOnly
|
20211 | * @static
|
20212 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
20213 | * @returns {google.datastore.v1.TransactionOptions.ReadOnly} ReadOnly
|
20214 | * @throws {Error} If the payload is not a reader or valid buffer
|
20215 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
20216 | */
|
20217 | ReadOnly.decodeDelimited = function decodeDelimited(reader) {
|
20218 | if (!(reader instanceof $Reader))
|
20219 | reader = new $Reader(reader);
|
20220 | return this.decode(reader, reader.uint32());
|
20221 | };
|
20222 |
|
20223 | /**
|
20224 | * Verifies a ReadOnly message.
|
20225 | * @function verify
|
20226 | * @memberof google.datastore.v1.TransactionOptions.ReadOnly
|
20227 | * @static
|
20228 | * @param {Object.<string,*>} message Plain object to verify
|
20229 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
20230 | */
|
20231 | ReadOnly.verify = function verify(message) {
|
20232 | if (typeof message !== "object" || message === null)
|
20233 | return "object expected";
|
20234 | if (message.readTime != null && message.hasOwnProperty("readTime")) {
|
20235 | var error = $root.google.protobuf.Timestamp.verify(message.readTime);
|
20236 | if (error)
|
20237 | return "readTime." + error;
|
20238 | }
|
20239 | return null;
|
20240 | };
|
20241 |
|
20242 | /**
|
20243 | * Creates a ReadOnly message from a plain object. Also converts values to their respective internal types.
|
20244 | * @function fromObject
|
20245 | * @memberof google.datastore.v1.TransactionOptions.ReadOnly
|
20246 | * @static
|
20247 | * @param {Object.<string,*>} object Plain object
|
20248 | * @returns {google.datastore.v1.TransactionOptions.ReadOnly} ReadOnly
|
20249 | */
|
20250 | ReadOnly.fromObject = function fromObject(object) {
|
20251 | if (object instanceof $root.google.datastore.v1.TransactionOptions.ReadOnly)
|
20252 | return object;
|
20253 | var message = new $root.google.datastore.v1.TransactionOptions.ReadOnly();
|
20254 | if (object.readTime != null) {
|
20255 | if (typeof object.readTime !== "object")
|
20256 | throw TypeError(".google.datastore.v1.TransactionOptions.ReadOnly.readTime: object expected");
|
20257 | message.readTime = $root.google.protobuf.Timestamp.fromObject(object.readTime);
|
20258 | }
|
20259 | return message;
|
20260 | };
|
20261 |
|
20262 | /**
|
20263 | * Creates a plain object from a ReadOnly message. Also converts values to other types if specified.
|
20264 | * @function toObject
|
20265 | * @memberof google.datastore.v1.TransactionOptions.ReadOnly
|
20266 | * @static
|
20267 | * @param {google.datastore.v1.TransactionOptions.ReadOnly} message ReadOnly
|
20268 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
20269 | * @returns {Object.<string,*>} Plain object
|
20270 | */
|
20271 | ReadOnly.toObject = function toObject(message, options) {
|
20272 | if (!options)
|
20273 | options = {};
|
20274 | var object = {};
|
20275 | if (options.defaults)
|
20276 | object.readTime = null;
|
20277 | if (message.readTime != null && message.hasOwnProperty("readTime"))
|
20278 | object.readTime = $root.google.protobuf.Timestamp.toObject(message.readTime, options);
|
20279 | return object;
|
20280 | };
|
20281 |
|
20282 | /**
|
20283 | * Converts this ReadOnly to JSON.
|
20284 | * @function toJSON
|
20285 | * @memberof google.datastore.v1.TransactionOptions.ReadOnly
|
20286 | * @instance
|
20287 | * @returns {Object.<string,*>} JSON object
|
20288 | */
|
20289 | ReadOnly.prototype.toJSON = function toJSON() {
|
20290 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
20291 | };
|
20292 |
|
20293 | /**
|
20294 | * Gets the default type url for ReadOnly
|
20295 | * @function getTypeUrl
|
20296 | * @memberof google.datastore.v1.TransactionOptions.ReadOnly
|
20297 | * @static
|
20298 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
20299 | * @returns {string} The default type url
|
20300 | */
|
20301 | ReadOnly.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
20302 | if (typeUrlPrefix === undefined) {
|
20303 | typeUrlPrefix = "type.googleapis.com";
|
20304 | }
|
20305 | return typeUrlPrefix + "/google.datastore.v1.TransactionOptions.ReadOnly";
|
20306 | };
|
20307 |
|
20308 | return ReadOnly;
|
20309 | })();
|
20310 |
|
20311 | return TransactionOptions;
|
20312 | })();
|
20313 |
|
20314 | return v1;
|
20315 | })();
|
20316 |
|
20317 | return datastore;
|
20318 | })();
|
20319 |
|
20320 | google.api = (function() {
|
20321 |
|
20322 | /**
|
20323 | * Namespace api.
|
20324 | * @memberof google
|
20325 | * @namespace
|
20326 | */
|
20327 | var api = {};
|
20328 |
|
20329 | api.Http = (function() {
|
20330 |
|
20331 | /**
|
20332 | * Properties of a Http.
|
20333 | * @memberof google.api
|
20334 | * @interface IHttp
|
20335 | * @property {Array.<google.api.IHttpRule>|null} [rules] Http rules
|
20336 | * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion
|
20337 | */
|
20338 |
|
20339 | /**
|
20340 | * Constructs a new Http.
|
20341 | * @memberof google.api
|
20342 | * @classdesc Represents a Http.
|
20343 | * @implements IHttp
|
20344 | * @constructor
|
20345 | * @param {google.api.IHttp=} [properties] Properties to set
|
20346 | */
|
20347 | function Http(properties) {
|
20348 | this.rules = [];
|
20349 | if (properties)
|
20350 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
20351 | if (properties[keys[i]] != null)
|
20352 | this[keys[i]] = properties[keys[i]];
|
20353 | }
|
20354 |
|
20355 | /**
|
20356 | * Http rules.
|
20357 | * @member {Array.<google.api.IHttpRule>} rules
|
20358 | * @memberof google.api.Http
|
20359 | * @instance
|
20360 | */
|
20361 | Http.prototype.rules = $util.emptyArray;
|
20362 |
|
20363 | /**
|
20364 | * Http fullyDecodeReservedExpansion.
|
20365 | * @member {boolean} fullyDecodeReservedExpansion
|
20366 | * @memberof google.api.Http
|
20367 | * @instance
|
20368 | */
|
20369 | Http.prototype.fullyDecodeReservedExpansion = false;
|
20370 |
|
20371 | /**
|
20372 | * Creates a new Http instance using the specified properties.
|
20373 | * @function create
|
20374 | * @memberof google.api.Http
|
20375 | * @static
|
20376 | * @param {google.api.IHttp=} [properties] Properties to set
|
20377 | * @returns {google.api.Http} Http instance
|
20378 | */
|
20379 | Http.create = function create(properties) {
|
20380 | return new Http(properties);
|
20381 | };
|
20382 |
|
20383 | /**
|
20384 | * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages.
|
20385 | * @function encode
|
20386 | * @memberof google.api.Http
|
20387 | * @static
|
20388 | * @param {google.api.IHttp} message Http message or plain object to encode
|
20389 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
20390 | * @returns {$protobuf.Writer} Writer
|
20391 | */
|
20392 | Http.encode = function encode(message, writer) {
|
20393 | if (!writer)
|
20394 | writer = $Writer.create();
|
20395 | if (message.rules != null && message.rules.length)
|
20396 | for (var i = 0; i < message.rules.length; ++i)
|
20397 | $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
20398 | if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion"))
|
20399 | writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion);
|
20400 | return writer;
|
20401 | };
|
20402 |
|
20403 | /**
|
20404 | * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages.
|
20405 | * @function encodeDelimited
|
20406 | * @memberof google.api.Http
|
20407 | * @static
|
20408 | * @param {google.api.IHttp} message Http message or plain object to encode
|
20409 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
20410 | * @returns {$protobuf.Writer} Writer
|
20411 | */
|
20412 | Http.encodeDelimited = function encodeDelimited(message, writer) {
|
20413 | return this.encode(message, writer).ldelim();
|
20414 | };
|
20415 |
|
20416 | /**
|
20417 | * Decodes a Http message from the specified reader or buffer.
|
20418 | * @function decode
|
20419 | * @memberof google.api.Http
|
20420 | * @static
|
20421 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
20422 | * @param {number} [length] Message length if known beforehand
|
20423 | * @returns {google.api.Http} Http
|
20424 | * @throws {Error} If the payload is not a reader or valid buffer
|
20425 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
20426 | */
|
20427 | Http.decode = function decode(reader, length) {
|
20428 | if (!(reader instanceof $Reader))
|
20429 | reader = $Reader.create(reader);
|
20430 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http();
|
20431 | while (reader.pos < end) {
|
20432 | var tag = reader.uint32();
|
20433 | switch (tag >>> 3) {
|
20434 | case 1: {
|
20435 | if (!(message.rules && message.rules.length))
|
20436 | message.rules = [];
|
20437 | message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
|
20438 | break;
|
20439 | }
|
20440 | case 2: {
|
20441 | message.fullyDecodeReservedExpansion = reader.bool();
|
20442 | break;
|
20443 | }
|
20444 | default:
|
20445 | reader.skipType(tag & 7);
|
20446 | break;
|
20447 | }
|
20448 | }
|
20449 | return message;
|
20450 | };
|
20451 |
|
20452 | /**
|
20453 | * Decodes a Http message from the specified reader or buffer, length delimited.
|
20454 | * @function decodeDelimited
|
20455 | * @memberof google.api.Http
|
20456 | * @static
|
20457 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
20458 | * @returns {google.api.Http} Http
|
20459 | * @throws {Error} If the payload is not a reader or valid buffer
|
20460 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
20461 | */
|
20462 | Http.decodeDelimited = function decodeDelimited(reader) {
|
20463 | if (!(reader instanceof $Reader))
|
20464 | reader = new $Reader(reader);
|
20465 | return this.decode(reader, reader.uint32());
|
20466 | };
|
20467 |
|
20468 | /**
|
20469 | * Verifies a Http message.
|
20470 | * @function verify
|
20471 | * @memberof google.api.Http
|
20472 | * @static
|
20473 | * @param {Object.<string,*>} message Plain object to verify
|
20474 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
20475 | */
|
20476 | Http.verify = function verify(message) {
|
20477 | if (typeof message !== "object" || message === null)
|
20478 | return "object expected";
|
20479 | if (message.rules != null && message.hasOwnProperty("rules")) {
|
20480 | if (!Array.isArray(message.rules))
|
20481 | return "rules: array expected";
|
20482 | for (var i = 0; i < message.rules.length; ++i) {
|
20483 | var error = $root.google.api.HttpRule.verify(message.rules[i]);
|
20484 | if (error)
|
20485 | return "rules." + error;
|
20486 | }
|
20487 | }
|
20488 | if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
|
20489 | if (typeof message.fullyDecodeReservedExpansion !== "boolean")
|
20490 | return "fullyDecodeReservedExpansion: boolean expected";
|
20491 | return null;
|
20492 | };
|
20493 |
|
20494 | /**
|
20495 | * Creates a Http message from a plain object. Also converts values to their respective internal types.
|
20496 | * @function fromObject
|
20497 | * @memberof google.api.Http
|
20498 | * @static
|
20499 | * @param {Object.<string,*>} object Plain object
|
20500 | * @returns {google.api.Http} Http
|
20501 | */
|
20502 | Http.fromObject = function fromObject(object) {
|
20503 | if (object instanceof $root.google.api.Http)
|
20504 | return object;
|
20505 | var message = new $root.google.api.Http();
|
20506 | if (object.rules) {
|
20507 | if (!Array.isArray(object.rules))
|
20508 | throw TypeError(".google.api.Http.rules: array expected");
|
20509 | message.rules = [];
|
20510 | for (var i = 0; i < object.rules.length; ++i) {
|
20511 | if (typeof object.rules[i] !== "object")
|
20512 | throw TypeError(".google.api.Http.rules: object expected");
|
20513 | message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]);
|
20514 | }
|
20515 | }
|
20516 | if (object.fullyDecodeReservedExpansion != null)
|
20517 | message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion);
|
20518 | return message;
|
20519 | };
|
20520 |
|
20521 | /**
|
20522 | * Creates a plain object from a Http message. Also converts values to other types if specified.
|
20523 | * @function toObject
|
20524 | * @memberof google.api.Http
|
20525 | * @static
|
20526 | * @param {google.api.Http} message Http
|
20527 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
20528 | * @returns {Object.<string,*>} Plain object
|
20529 | */
|
20530 | Http.toObject = function toObject(message, options) {
|
20531 | if (!options)
|
20532 | options = {};
|
20533 | var object = {};
|
20534 | if (options.arrays || options.defaults)
|
20535 | object.rules = [];
|
20536 | if (options.defaults)
|
20537 | object.fullyDecodeReservedExpansion = false;
|
20538 | if (message.rules && message.rules.length) {
|
20539 | object.rules = [];
|
20540 | for (var j = 0; j < message.rules.length; ++j)
|
20541 | object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options);
|
20542 | }
|
20543 | if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
|
20544 | object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion;
|
20545 | return object;
|
20546 | };
|
20547 |
|
20548 | /**
|
20549 | * Converts this Http to JSON.
|
20550 | * @function toJSON
|
20551 | * @memberof google.api.Http
|
20552 | * @instance
|
20553 | * @returns {Object.<string,*>} JSON object
|
20554 | */
|
20555 | Http.prototype.toJSON = function toJSON() {
|
20556 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
20557 | };
|
20558 |
|
20559 | /**
|
20560 | * Gets the default type url for Http
|
20561 | * @function getTypeUrl
|
20562 | * @memberof google.api.Http
|
20563 | * @static
|
20564 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
20565 | * @returns {string} The default type url
|
20566 | */
|
20567 | Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
20568 | if (typeUrlPrefix === undefined) {
|
20569 | typeUrlPrefix = "type.googleapis.com";
|
20570 | }
|
20571 | return typeUrlPrefix + "/google.api.Http";
|
20572 | };
|
20573 |
|
20574 | return Http;
|
20575 | })();
|
20576 |
|
20577 | api.HttpRule = (function() {
|
20578 |
|
20579 | /**
|
20580 | * Properties of a HttpRule.
|
20581 | * @memberof google.api
|
20582 | * @interface IHttpRule
|
20583 | * @property {string|null} [selector] HttpRule selector
|
20584 | * @property {string|null} [get] HttpRule get
|
20585 | * @property {string|null} [put] HttpRule put
|
20586 | * @property {string|null} [post] HttpRule post
|
20587 | * @property {string|null} ["delete"] HttpRule delete
|
20588 | * @property {string|null} [patch] HttpRule patch
|
20589 | * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom
|
20590 | * @property {string|null} [body] HttpRule body
|
20591 | * @property {string|null} [responseBody] HttpRule responseBody
|
20592 | * @property {Array.<google.api.IHttpRule>|null} [additionalBindings] HttpRule additionalBindings
|
20593 | */
|
20594 |
|
20595 | /**
|
20596 | * Constructs a new HttpRule.
|
20597 | * @memberof google.api
|
20598 | * @classdesc Represents a HttpRule.
|
20599 | * @implements IHttpRule
|
20600 | * @constructor
|
20601 | * @param {google.api.IHttpRule=} [properties] Properties to set
|
20602 | */
|
20603 | function HttpRule(properties) {
|
20604 | this.additionalBindings = [];
|
20605 | if (properties)
|
20606 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
20607 | if (properties[keys[i]] != null)
|
20608 | this[keys[i]] = properties[keys[i]];
|
20609 | }
|
20610 |
|
20611 | /**
|
20612 | * HttpRule selector.
|
20613 | * @member {string} selector
|
20614 | * @memberof google.api.HttpRule
|
20615 | * @instance
|
20616 | */
|
20617 | HttpRule.prototype.selector = "";
|
20618 |
|
20619 | /**
|
20620 | * HttpRule get.
|
20621 | * @member {string|null|undefined} get
|
20622 | * @memberof google.api.HttpRule
|
20623 | * @instance
|
20624 | */
|
20625 | HttpRule.prototype.get = null;
|
20626 |
|
20627 | /**
|
20628 | * HttpRule put.
|
20629 | * @member {string|null|undefined} put
|
20630 | * @memberof google.api.HttpRule
|
20631 | * @instance
|
20632 | */
|
20633 | HttpRule.prototype.put = null;
|
20634 |
|
20635 | /**
|
20636 | * HttpRule post.
|
20637 | * @member {string|null|undefined} post
|
20638 | * @memberof google.api.HttpRule
|
20639 | * @instance
|
20640 | */
|
20641 | HttpRule.prototype.post = null;
|
20642 |
|
20643 | /**
|
20644 | * HttpRule delete.
|
20645 | * @member {string|null|undefined} delete
|
20646 | * @memberof google.api.HttpRule
|
20647 | * @instance
|
20648 | */
|
20649 | HttpRule.prototype["delete"] = null;
|
20650 |
|
20651 | /**
|
20652 | * HttpRule patch.
|
20653 | * @member {string|null|undefined} patch
|
20654 | * @memberof google.api.HttpRule
|
20655 | * @instance
|
20656 | */
|
20657 | HttpRule.prototype.patch = null;
|
20658 |
|
20659 | /**
|
20660 | * HttpRule custom.
|
20661 | * @member {google.api.ICustomHttpPattern|null|undefined} custom
|
20662 | * @memberof google.api.HttpRule
|
20663 | * @instance
|
20664 | */
|
20665 | HttpRule.prototype.custom = null;
|
20666 |
|
20667 | /**
|
20668 | * HttpRule body.
|
20669 | * @member {string} body
|
20670 | * @memberof google.api.HttpRule
|
20671 | * @instance
|
20672 | */
|
20673 | HttpRule.prototype.body = "";
|
20674 |
|
20675 | /**
|
20676 | * HttpRule responseBody.
|
20677 | * @member {string} responseBody
|
20678 | * @memberof google.api.HttpRule
|
20679 | * @instance
|
20680 | */
|
20681 | HttpRule.prototype.responseBody = "";
|
20682 |
|
20683 | /**
|
20684 | * HttpRule additionalBindings.
|
20685 | * @member {Array.<google.api.IHttpRule>} additionalBindings
|
20686 | * @memberof google.api.HttpRule
|
20687 | * @instance
|
20688 | */
|
20689 | HttpRule.prototype.additionalBindings = $util.emptyArray;
|
20690 |
|
20691 | // OneOf field names bound to virtual getters and setters
|
20692 | var $oneOfFields;
|
20693 |
|
20694 | /**
|
20695 | * HttpRule pattern.
|
20696 | * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern
|
20697 | * @memberof google.api.HttpRule
|
20698 | * @instance
|
20699 | */
|
20700 | Object.defineProperty(HttpRule.prototype, "pattern", {
|
20701 | get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]),
|
20702 | set: $util.oneOfSetter($oneOfFields)
|
20703 | });
|
20704 |
|
20705 | /**
|
20706 | * Creates a new HttpRule instance using the specified properties.
|
20707 | * @function create
|
20708 | * @memberof google.api.HttpRule
|
20709 | * @static
|
20710 | * @param {google.api.IHttpRule=} [properties] Properties to set
|
20711 | * @returns {google.api.HttpRule} HttpRule instance
|
20712 | */
|
20713 | HttpRule.create = function create(properties) {
|
20714 | return new HttpRule(properties);
|
20715 | };
|
20716 |
|
20717 | /**
|
20718 | * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
|
20719 | * @function encode
|
20720 | * @memberof google.api.HttpRule
|
20721 | * @static
|
20722 | * @param {google.api.IHttpRule} message HttpRule message or plain object to encode
|
20723 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
20724 | * @returns {$protobuf.Writer} Writer
|
20725 | */
|
20726 | HttpRule.encode = function encode(message, writer) {
|
20727 | if (!writer)
|
20728 | writer = $Writer.create();
|
20729 | if (message.selector != null && Object.hasOwnProperty.call(message, "selector"))
|
20730 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector);
|
20731 | if (message.get != null && Object.hasOwnProperty.call(message, "get"))
|
20732 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.get);
|
20733 | if (message.put != null && Object.hasOwnProperty.call(message, "put"))
|
20734 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.put);
|
20735 | if (message.post != null && Object.hasOwnProperty.call(message, "post"))
|
20736 | writer.uint32(/* id 4, wireType 2 =*/34).string(message.post);
|
20737 | if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete"))
|
20738 | writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]);
|
20739 | if (message.patch != null && Object.hasOwnProperty.call(message, "patch"))
|
20740 | writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch);
|
20741 | if (message.body != null && Object.hasOwnProperty.call(message, "body"))
|
20742 | writer.uint32(/* id 7, wireType 2 =*/58).string(message.body);
|
20743 | if (message.custom != null && Object.hasOwnProperty.call(message, "custom"))
|
20744 | $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
20745 | if (message.additionalBindings != null && message.additionalBindings.length)
|
20746 | for (var i = 0; i < message.additionalBindings.length; ++i)
|
20747 | $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
|
20748 | if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody"))
|
20749 | writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody);
|
20750 | return writer;
|
20751 | };
|
20752 |
|
20753 | /**
|
20754 | * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
|
20755 | * @function encodeDelimited
|
20756 | * @memberof google.api.HttpRule
|
20757 | * @static
|
20758 | * @param {google.api.IHttpRule} message HttpRule message or plain object to encode
|
20759 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
20760 | * @returns {$protobuf.Writer} Writer
|
20761 | */
|
20762 | HttpRule.encodeDelimited = function encodeDelimited(message, writer) {
|
20763 | return this.encode(message, writer).ldelim();
|
20764 | };
|
20765 |
|
20766 | /**
|
20767 | * Decodes a HttpRule message from the specified reader or buffer.
|
20768 | * @function decode
|
20769 | * @memberof google.api.HttpRule
|
20770 | * @static
|
20771 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
20772 | * @param {number} [length] Message length if known beforehand
|
20773 | * @returns {google.api.HttpRule} HttpRule
|
20774 | * @throws {Error} If the payload is not a reader or valid buffer
|
20775 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
20776 | */
|
20777 | HttpRule.decode = function decode(reader, length) {
|
20778 | if (!(reader instanceof $Reader))
|
20779 | reader = $Reader.create(reader);
|
20780 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule();
|
20781 | while (reader.pos < end) {
|
20782 | var tag = reader.uint32();
|
20783 | switch (tag >>> 3) {
|
20784 | case 1: {
|
20785 | message.selector = reader.string();
|
20786 | break;
|
20787 | }
|
20788 | case 2: {
|
20789 | message.get = reader.string();
|
20790 | break;
|
20791 | }
|
20792 | case 3: {
|
20793 | message.put = reader.string();
|
20794 | break;
|
20795 | }
|
20796 | case 4: {
|
20797 | message.post = reader.string();
|
20798 | break;
|
20799 | }
|
20800 | case 5: {
|
20801 | message["delete"] = reader.string();
|
20802 | break;
|
20803 | }
|
20804 | case 6: {
|
20805 | message.patch = reader.string();
|
20806 | break;
|
20807 | }
|
20808 | case 8: {
|
20809 | message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32());
|
20810 | break;
|
20811 | }
|
20812 | case 7: {
|
20813 | message.body = reader.string();
|
20814 | break;
|
20815 | }
|
20816 | case 12: {
|
20817 | message.responseBody = reader.string();
|
20818 | break;
|
20819 | }
|
20820 | case 11: {
|
20821 | if (!(message.additionalBindings && message.additionalBindings.length))
|
20822 | message.additionalBindings = [];
|
20823 | message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
|
20824 | break;
|
20825 | }
|
20826 | default:
|
20827 | reader.skipType(tag & 7);
|
20828 | break;
|
20829 | }
|
20830 | }
|
20831 | return message;
|
20832 | };
|
20833 |
|
20834 | /**
|
20835 | * Decodes a HttpRule message from the specified reader or buffer, length delimited.
|
20836 | * @function decodeDelimited
|
20837 | * @memberof google.api.HttpRule
|
20838 | * @static
|
20839 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
20840 | * @returns {google.api.HttpRule} HttpRule
|
20841 | * @throws {Error} If the payload is not a reader or valid buffer
|
20842 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
20843 | */
|
20844 | HttpRule.decodeDelimited = function decodeDelimited(reader) {
|
20845 | if (!(reader instanceof $Reader))
|
20846 | reader = new $Reader(reader);
|
20847 | return this.decode(reader, reader.uint32());
|
20848 | };
|
20849 |
|
20850 | /**
|
20851 | * Verifies a HttpRule message.
|
20852 | * @function verify
|
20853 | * @memberof google.api.HttpRule
|
20854 | * @static
|
20855 | * @param {Object.<string,*>} message Plain object to verify
|
20856 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
20857 | */
|
20858 | HttpRule.verify = function verify(message) {
|
20859 | if (typeof message !== "object" || message === null)
|
20860 | return "object expected";
|
20861 | var properties = {};
|
20862 | if (message.selector != null && message.hasOwnProperty("selector"))
|
20863 | if (!$util.isString(message.selector))
|
20864 | return "selector: string expected";
|
20865 | if (message.get != null && message.hasOwnProperty("get")) {
|
20866 | properties.pattern = 1;
|
20867 | if (!$util.isString(message.get))
|
20868 | return "get: string expected";
|
20869 | }
|
20870 | if (message.put != null && message.hasOwnProperty("put")) {
|
20871 | if (properties.pattern === 1)
|
20872 | return "pattern: multiple values";
|
20873 | properties.pattern = 1;
|
20874 | if (!$util.isString(message.put))
|
20875 | return "put: string expected";
|
20876 | }
|
20877 | if (message.post != null && message.hasOwnProperty("post")) {
|
20878 | if (properties.pattern === 1)
|
20879 | return "pattern: multiple values";
|
20880 | properties.pattern = 1;
|
20881 | if (!$util.isString(message.post))
|
20882 | return "post: string expected";
|
20883 | }
|
20884 | if (message["delete"] != null && message.hasOwnProperty("delete")) {
|
20885 | if (properties.pattern === 1)
|
20886 | return "pattern: multiple values";
|
20887 | properties.pattern = 1;
|
20888 | if (!$util.isString(message["delete"]))
|
20889 | return "delete: string expected";
|
20890 | }
|
20891 | if (message.patch != null && message.hasOwnProperty("patch")) {
|
20892 | if (properties.pattern === 1)
|
20893 | return "pattern: multiple values";
|
20894 | properties.pattern = 1;
|
20895 | if (!$util.isString(message.patch))
|
20896 | return "patch: string expected";
|
20897 | }
|
20898 | if (message.custom != null && message.hasOwnProperty("custom")) {
|
20899 | if (properties.pattern === 1)
|
20900 | return "pattern: multiple values";
|
20901 | properties.pattern = 1;
|
20902 | {
|
20903 | var error = $root.google.api.CustomHttpPattern.verify(message.custom);
|
20904 | if (error)
|
20905 | return "custom." + error;
|
20906 | }
|
20907 | }
|
20908 | if (message.body != null && message.hasOwnProperty("body"))
|
20909 | if (!$util.isString(message.body))
|
20910 | return "body: string expected";
|
20911 | if (message.responseBody != null && message.hasOwnProperty("responseBody"))
|
20912 | if (!$util.isString(message.responseBody))
|
20913 | return "responseBody: string expected";
|
20914 | if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) {
|
20915 | if (!Array.isArray(message.additionalBindings))
|
20916 | return "additionalBindings: array expected";
|
20917 | for (var i = 0; i < message.additionalBindings.length; ++i) {
|
20918 | var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]);
|
20919 | if (error)
|
20920 | return "additionalBindings." + error;
|
20921 | }
|
20922 | }
|
20923 | return null;
|
20924 | };
|
20925 |
|
20926 | /**
|
20927 | * Creates a HttpRule message from a plain object. Also converts values to their respective internal types.
|
20928 | * @function fromObject
|
20929 | * @memberof google.api.HttpRule
|
20930 | * @static
|
20931 | * @param {Object.<string,*>} object Plain object
|
20932 | * @returns {google.api.HttpRule} HttpRule
|
20933 | */
|
20934 | HttpRule.fromObject = function fromObject(object) {
|
20935 | if (object instanceof $root.google.api.HttpRule)
|
20936 | return object;
|
20937 | var message = new $root.google.api.HttpRule();
|
20938 | if (object.selector != null)
|
20939 | message.selector = String(object.selector);
|
20940 | if (object.get != null)
|
20941 | message.get = String(object.get);
|
20942 | if (object.put != null)
|
20943 | message.put = String(object.put);
|
20944 | if (object.post != null)
|
20945 | message.post = String(object.post);
|
20946 | if (object["delete"] != null)
|
20947 | message["delete"] = String(object["delete"]);
|
20948 | if (object.patch != null)
|
20949 | message.patch = String(object.patch);
|
20950 | if (object.custom != null) {
|
20951 | if (typeof object.custom !== "object")
|
20952 | throw TypeError(".google.api.HttpRule.custom: object expected");
|
20953 | message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom);
|
20954 | }
|
20955 | if (object.body != null)
|
20956 | message.body = String(object.body);
|
20957 | if (object.responseBody != null)
|
20958 | message.responseBody = String(object.responseBody);
|
20959 | if (object.additionalBindings) {
|
20960 | if (!Array.isArray(object.additionalBindings))
|
20961 | throw TypeError(".google.api.HttpRule.additionalBindings: array expected");
|
20962 | message.additionalBindings = [];
|
20963 | for (var i = 0; i < object.additionalBindings.length; ++i) {
|
20964 | if (typeof object.additionalBindings[i] !== "object")
|
20965 | throw TypeError(".google.api.HttpRule.additionalBindings: object expected");
|
20966 | message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]);
|
20967 | }
|
20968 | }
|
20969 | return message;
|
20970 | };
|
20971 |
|
20972 | /**
|
20973 | * Creates a plain object from a HttpRule message. Also converts values to other types if specified.
|
20974 | * @function toObject
|
20975 | * @memberof google.api.HttpRule
|
20976 | * @static
|
20977 | * @param {google.api.HttpRule} message HttpRule
|
20978 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
20979 | * @returns {Object.<string,*>} Plain object
|
20980 | */
|
20981 | HttpRule.toObject = function toObject(message, options) {
|
20982 | if (!options)
|
20983 | options = {};
|
20984 | var object = {};
|
20985 | if (options.arrays || options.defaults)
|
20986 | object.additionalBindings = [];
|
20987 | if (options.defaults) {
|
20988 | object.selector = "";
|
20989 | object.body = "";
|
20990 | object.responseBody = "";
|
20991 | }
|
20992 | if (message.selector != null && message.hasOwnProperty("selector"))
|
20993 | object.selector = message.selector;
|
20994 | if (message.get != null && message.hasOwnProperty("get")) {
|
20995 | object.get = message.get;
|
20996 | if (options.oneofs)
|
20997 | object.pattern = "get";
|
20998 | }
|
20999 | if (message.put != null && message.hasOwnProperty("put")) {
|
21000 | object.put = message.put;
|
21001 | if (options.oneofs)
|
21002 | object.pattern = "put";
|
21003 | }
|
21004 | if (message.post != null && message.hasOwnProperty("post")) {
|
21005 | object.post = message.post;
|
21006 | if (options.oneofs)
|
21007 | object.pattern = "post";
|
21008 | }
|
21009 | if (message["delete"] != null && message.hasOwnProperty("delete")) {
|
21010 | object["delete"] = message["delete"];
|
21011 | if (options.oneofs)
|
21012 | object.pattern = "delete";
|
21013 | }
|
21014 | if (message.patch != null && message.hasOwnProperty("patch")) {
|
21015 | object.patch = message.patch;
|
21016 | if (options.oneofs)
|
21017 | object.pattern = "patch";
|
21018 | }
|
21019 | if (message.body != null && message.hasOwnProperty("body"))
|
21020 | object.body = message.body;
|
21021 | if (message.custom != null && message.hasOwnProperty("custom")) {
|
21022 | object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options);
|
21023 | if (options.oneofs)
|
21024 | object.pattern = "custom";
|
21025 | }
|
21026 | if (message.additionalBindings && message.additionalBindings.length) {
|
21027 | object.additionalBindings = [];
|
21028 | for (var j = 0; j < message.additionalBindings.length; ++j)
|
21029 | object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options);
|
21030 | }
|
21031 | if (message.responseBody != null && message.hasOwnProperty("responseBody"))
|
21032 | object.responseBody = message.responseBody;
|
21033 | return object;
|
21034 | };
|
21035 |
|
21036 | /**
|
21037 | * Converts this HttpRule to JSON.
|
21038 | * @function toJSON
|
21039 | * @memberof google.api.HttpRule
|
21040 | * @instance
|
21041 | * @returns {Object.<string,*>} JSON object
|
21042 | */
|
21043 | HttpRule.prototype.toJSON = function toJSON() {
|
21044 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
21045 | };
|
21046 |
|
21047 | /**
|
21048 | * Gets the default type url for HttpRule
|
21049 | * @function getTypeUrl
|
21050 | * @memberof google.api.HttpRule
|
21051 | * @static
|
21052 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
21053 | * @returns {string} The default type url
|
21054 | */
|
21055 | HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
21056 | if (typeUrlPrefix === undefined) {
|
21057 | typeUrlPrefix = "type.googleapis.com";
|
21058 | }
|
21059 | return typeUrlPrefix + "/google.api.HttpRule";
|
21060 | };
|
21061 |
|
21062 | return HttpRule;
|
21063 | })();
|
21064 |
|
21065 | api.CustomHttpPattern = (function() {
|
21066 |
|
21067 | /**
|
21068 | * Properties of a CustomHttpPattern.
|
21069 | * @memberof google.api
|
21070 | * @interface ICustomHttpPattern
|
21071 | * @property {string|null} [kind] CustomHttpPattern kind
|
21072 | * @property {string|null} [path] CustomHttpPattern path
|
21073 | */
|
21074 |
|
21075 | /**
|
21076 | * Constructs a new CustomHttpPattern.
|
21077 | * @memberof google.api
|
21078 | * @classdesc Represents a CustomHttpPattern.
|
21079 | * @implements ICustomHttpPattern
|
21080 | * @constructor
|
21081 | * @param {google.api.ICustomHttpPattern=} [properties] Properties to set
|
21082 | */
|
21083 | function CustomHttpPattern(properties) {
|
21084 | if (properties)
|
21085 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
21086 | if (properties[keys[i]] != null)
|
21087 | this[keys[i]] = properties[keys[i]];
|
21088 | }
|
21089 |
|
21090 | /**
|
21091 | * CustomHttpPattern kind.
|
21092 | * @member {string} kind
|
21093 | * @memberof google.api.CustomHttpPattern
|
21094 | * @instance
|
21095 | */
|
21096 | CustomHttpPattern.prototype.kind = "";
|
21097 |
|
21098 | /**
|
21099 | * CustomHttpPattern path.
|
21100 | * @member {string} path
|
21101 | * @memberof google.api.CustomHttpPattern
|
21102 | * @instance
|
21103 | */
|
21104 | CustomHttpPattern.prototype.path = "";
|
21105 |
|
21106 | /**
|
21107 | * Creates a new CustomHttpPattern instance using the specified properties.
|
21108 | * @function create
|
21109 | * @memberof google.api.CustomHttpPattern
|
21110 | * @static
|
21111 | * @param {google.api.ICustomHttpPattern=} [properties] Properties to set
|
21112 | * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance
|
21113 | */
|
21114 | CustomHttpPattern.create = function create(properties) {
|
21115 | return new CustomHttpPattern(properties);
|
21116 | };
|
21117 |
|
21118 | /**
|
21119 | * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
|
21120 | * @function encode
|
21121 | * @memberof google.api.CustomHttpPattern
|
21122 | * @static
|
21123 | * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
|
21124 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
21125 | * @returns {$protobuf.Writer} Writer
|
21126 | */
|
21127 | CustomHttpPattern.encode = function encode(message, writer) {
|
21128 | if (!writer)
|
21129 | writer = $Writer.create();
|
21130 | if (message.kind != null && Object.hasOwnProperty.call(message, "kind"))
|
21131 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind);
|
21132 | if (message.path != null && Object.hasOwnProperty.call(message, "path"))
|
21133 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.path);
|
21134 | return writer;
|
21135 | };
|
21136 |
|
21137 | /**
|
21138 | * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
|
21139 | * @function encodeDelimited
|
21140 | * @memberof google.api.CustomHttpPattern
|
21141 | * @static
|
21142 | * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
|
21143 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
21144 | * @returns {$protobuf.Writer} Writer
|
21145 | */
|
21146 | CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) {
|
21147 | return this.encode(message, writer).ldelim();
|
21148 | };
|
21149 |
|
21150 | /**
|
21151 | * Decodes a CustomHttpPattern message from the specified reader or buffer.
|
21152 | * @function decode
|
21153 | * @memberof google.api.CustomHttpPattern
|
21154 | * @static
|
21155 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
21156 | * @param {number} [length] Message length if known beforehand
|
21157 | * @returns {google.api.CustomHttpPattern} CustomHttpPattern
|
21158 | * @throws {Error} If the payload is not a reader or valid buffer
|
21159 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
21160 | */
|
21161 | CustomHttpPattern.decode = function decode(reader, length) {
|
21162 | if (!(reader instanceof $Reader))
|
21163 | reader = $Reader.create(reader);
|
21164 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern();
|
21165 | while (reader.pos < end) {
|
21166 | var tag = reader.uint32();
|
21167 | switch (tag >>> 3) {
|
21168 | case 1: {
|
21169 | message.kind = reader.string();
|
21170 | break;
|
21171 | }
|
21172 | case 2: {
|
21173 | message.path = reader.string();
|
21174 | break;
|
21175 | }
|
21176 | default:
|
21177 | reader.skipType(tag & 7);
|
21178 | break;
|
21179 | }
|
21180 | }
|
21181 | return message;
|
21182 | };
|
21183 |
|
21184 | /**
|
21185 | * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited.
|
21186 | * @function decodeDelimited
|
21187 | * @memberof google.api.CustomHttpPattern
|
21188 | * @static
|
21189 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
21190 | * @returns {google.api.CustomHttpPattern} CustomHttpPattern
|
21191 | * @throws {Error} If the payload is not a reader or valid buffer
|
21192 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
21193 | */
|
21194 | CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) {
|
21195 | if (!(reader instanceof $Reader))
|
21196 | reader = new $Reader(reader);
|
21197 | return this.decode(reader, reader.uint32());
|
21198 | };
|
21199 |
|
21200 | /**
|
21201 | * Verifies a CustomHttpPattern message.
|
21202 | * @function verify
|
21203 | * @memberof google.api.CustomHttpPattern
|
21204 | * @static
|
21205 | * @param {Object.<string,*>} message Plain object to verify
|
21206 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
21207 | */
|
21208 | CustomHttpPattern.verify = function verify(message) {
|
21209 | if (typeof message !== "object" || message === null)
|
21210 | return "object expected";
|
21211 | if (message.kind != null && message.hasOwnProperty("kind"))
|
21212 | if (!$util.isString(message.kind))
|
21213 | return "kind: string expected";
|
21214 | if (message.path != null && message.hasOwnProperty("path"))
|
21215 | if (!$util.isString(message.path))
|
21216 | return "path: string expected";
|
21217 | return null;
|
21218 | };
|
21219 |
|
21220 | /**
|
21221 | * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types.
|
21222 | * @function fromObject
|
21223 | * @memberof google.api.CustomHttpPattern
|
21224 | * @static
|
21225 | * @param {Object.<string,*>} object Plain object
|
21226 | * @returns {google.api.CustomHttpPattern} CustomHttpPattern
|
21227 | */
|
21228 | CustomHttpPattern.fromObject = function fromObject(object) {
|
21229 | if (object instanceof $root.google.api.CustomHttpPattern)
|
21230 | return object;
|
21231 | var message = new $root.google.api.CustomHttpPattern();
|
21232 | if (object.kind != null)
|
21233 | message.kind = String(object.kind);
|
21234 | if (object.path != null)
|
21235 | message.path = String(object.path);
|
21236 | return message;
|
21237 | };
|
21238 |
|
21239 | /**
|
21240 | * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified.
|
21241 | * @function toObject
|
21242 | * @memberof google.api.CustomHttpPattern
|
21243 | * @static
|
21244 | * @param {google.api.CustomHttpPattern} message CustomHttpPattern
|
21245 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
21246 | * @returns {Object.<string,*>} Plain object
|
21247 | */
|
21248 | CustomHttpPattern.toObject = function toObject(message, options) {
|
21249 | if (!options)
|
21250 | options = {};
|
21251 | var object = {};
|
21252 | if (options.defaults) {
|
21253 | object.kind = "";
|
21254 | object.path = "";
|
21255 | }
|
21256 | if (message.kind != null && message.hasOwnProperty("kind"))
|
21257 | object.kind = message.kind;
|
21258 | if (message.path != null && message.hasOwnProperty("path"))
|
21259 | object.path = message.path;
|
21260 | return object;
|
21261 | };
|
21262 |
|
21263 | /**
|
21264 | * Converts this CustomHttpPattern to JSON.
|
21265 | * @function toJSON
|
21266 | * @memberof google.api.CustomHttpPattern
|
21267 | * @instance
|
21268 | * @returns {Object.<string,*>} JSON object
|
21269 | */
|
21270 | CustomHttpPattern.prototype.toJSON = function toJSON() {
|
21271 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
21272 | };
|
21273 |
|
21274 | /**
|
21275 | * Gets the default type url for CustomHttpPattern
|
21276 | * @function getTypeUrl
|
21277 | * @memberof google.api.CustomHttpPattern
|
21278 | * @static
|
21279 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
21280 | * @returns {string} The default type url
|
21281 | */
|
21282 | CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
21283 | if (typeUrlPrefix === undefined) {
|
21284 | typeUrlPrefix = "type.googleapis.com";
|
21285 | }
|
21286 | return typeUrlPrefix + "/google.api.CustomHttpPattern";
|
21287 | };
|
21288 |
|
21289 | return CustomHttpPattern;
|
21290 | })();
|
21291 |
|
21292 | api.CommonLanguageSettings = (function() {
|
21293 |
|
21294 | /**
|
21295 | * Properties of a CommonLanguageSettings.
|
21296 | * @memberof google.api
|
21297 | * @interface ICommonLanguageSettings
|
21298 | * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri
|
21299 | * @property {Array.<google.api.ClientLibraryDestination>|null} [destinations] CommonLanguageSettings destinations
|
21300 | */
|
21301 |
|
21302 | /**
|
21303 | * Constructs a new CommonLanguageSettings.
|
21304 | * @memberof google.api
|
21305 | * @classdesc Represents a CommonLanguageSettings.
|
21306 | * @implements ICommonLanguageSettings
|
21307 | * @constructor
|
21308 | * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set
|
21309 | */
|
21310 | function CommonLanguageSettings(properties) {
|
21311 | this.destinations = [];
|
21312 | if (properties)
|
21313 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
21314 | if (properties[keys[i]] != null)
|
21315 | this[keys[i]] = properties[keys[i]];
|
21316 | }
|
21317 |
|
21318 | /**
|
21319 | * CommonLanguageSettings referenceDocsUri.
|
21320 | * @member {string} referenceDocsUri
|
21321 | * @memberof google.api.CommonLanguageSettings
|
21322 | * @instance
|
21323 | */
|
21324 | CommonLanguageSettings.prototype.referenceDocsUri = "";
|
21325 |
|
21326 | /**
|
21327 | * CommonLanguageSettings destinations.
|
21328 | * @member {Array.<google.api.ClientLibraryDestination>} destinations
|
21329 | * @memberof google.api.CommonLanguageSettings
|
21330 | * @instance
|
21331 | */
|
21332 | CommonLanguageSettings.prototype.destinations = $util.emptyArray;
|
21333 |
|
21334 | /**
|
21335 | * Creates a new CommonLanguageSettings instance using the specified properties.
|
21336 | * @function create
|
21337 | * @memberof google.api.CommonLanguageSettings
|
21338 | * @static
|
21339 | * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set
|
21340 | * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance
|
21341 | */
|
21342 | CommonLanguageSettings.create = function create(properties) {
|
21343 | return new CommonLanguageSettings(properties);
|
21344 | };
|
21345 |
|
21346 | /**
|
21347 | * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages.
|
21348 | * @function encode
|
21349 | * @memberof google.api.CommonLanguageSettings
|
21350 | * @static
|
21351 | * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode
|
21352 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
21353 | * @returns {$protobuf.Writer} Writer
|
21354 | */
|
21355 | CommonLanguageSettings.encode = function encode(message, writer) {
|
21356 | if (!writer)
|
21357 | writer = $Writer.create();
|
21358 | if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri"))
|
21359 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri);
|
21360 | if (message.destinations != null && message.destinations.length) {
|
21361 | writer.uint32(/* id 2, wireType 2 =*/18).fork();
|
21362 | for (var i = 0; i < message.destinations.length; ++i)
|
21363 | writer.int32(message.destinations[i]);
|
21364 | writer.ldelim();
|
21365 | }
|
21366 | return writer;
|
21367 | };
|
21368 |
|
21369 | /**
|
21370 | * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages.
|
21371 | * @function encodeDelimited
|
21372 | * @memberof google.api.CommonLanguageSettings
|
21373 | * @static
|
21374 | * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode
|
21375 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
21376 | * @returns {$protobuf.Writer} Writer
|
21377 | */
|
21378 | CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) {
|
21379 | return this.encode(message, writer).ldelim();
|
21380 | };
|
21381 |
|
21382 | /**
|
21383 | * Decodes a CommonLanguageSettings message from the specified reader or buffer.
|
21384 | * @function decode
|
21385 | * @memberof google.api.CommonLanguageSettings
|
21386 | * @static
|
21387 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
21388 | * @param {number} [length] Message length if known beforehand
|
21389 | * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings
|
21390 | * @throws {Error} If the payload is not a reader or valid buffer
|
21391 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
21392 | */
|
21393 | CommonLanguageSettings.decode = function decode(reader, length) {
|
21394 | if (!(reader instanceof $Reader))
|
21395 | reader = $Reader.create(reader);
|
21396 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings();
|
21397 | while (reader.pos < end) {
|
21398 | var tag = reader.uint32();
|
21399 | switch (tag >>> 3) {
|
21400 | case 1: {
|
21401 | message.referenceDocsUri = reader.string();
|
21402 | break;
|
21403 | }
|
21404 | case 2: {
|
21405 | if (!(message.destinations && message.destinations.length))
|
21406 | message.destinations = [];
|
21407 | if ((tag & 7) === 2) {
|
21408 | var end2 = reader.uint32() + reader.pos;
|
21409 | while (reader.pos < end2)
|
21410 | message.destinations.push(reader.int32());
|
21411 | } else
|
21412 | message.destinations.push(reader.int32());
|
21413 | break;
|
21414 | }
|
21415 | default:
|
21416 | reader.skipType(tag & 7);
|
21417 | break;
|
21418 | }
|
21419 | }
|
21420 | return message;
|
21421 | };
|
21422 |
|
21423 | /**
|
21424 | * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited.
|
21425 | * @function decodeDelimited
|
21426 | * @memberof google.api.CommonLanguageSettings
|
21427 | * @static
|
21428 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
21429 | * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings
|
21430 | * @throws {Error} If the payload is not a reader or valid buffer
|
21431 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
21432 | */
|
21433 | CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) {
|
21434 | if (!(reader instanceof $Reader))
|
21435 | reader = new $Reader(reader);
|
21436 | return this.decode(reader, reader.uint32());
|
21437 | };
|
21438 |
|
21439 | /**
|
21440 | * Verifies a CommonLanguageSettings message.
|
21441 | * @function verify
|
21442 | * @memberof google.api.CommonLanguageSettings
|
21443 | * @static
|
21444 | * @param {Object.<string,*>} message Plain object to verify
|
21445 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
21446 | */
|
21447 | CommonLanguageSettings.verify = function verify(message) {
|
21448 | if (typeof message !== "object" || message === null)
|
21449 | return "object expected";
|
21450 | if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri"))
|
21451 | if (!$util.isString(message.referenceDocsUri))
|
21452 | return "referenceDocsUri: string expected";
|
21453 | if (message.destinations != null && message.hasOwnProperty("destinations")) {
|
21454 | if (!Array.isArray(message.destinations))
|
21455 | return "destinations: array expected";
|
21456 | for (var i = 0; i < message.destinations.length; ++i)
|
21457 | switch (message.destinations[i]) {
|
21458 | default:
|
21459 | return "destinations: enum value[] expected";
|
21460 | case 0:
|
21461 | case 10:
|
21462 | case 20:
|
21463 | break;
|
21464 | }
|
21465 | }
|
21466 | return null;
|
21467 | };
|
21468 |
|
21469 | /**
|
21470 | * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types.
|
21471 | * @function fromObject
|
21472 | * @memberof google.api.CommonLanguageSettings
|
21473 | * @static
|
21474 | * @param {Object.<string,*>} object Plain object
|
21475 | * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings
|
21476 | */
|
21477 | CommonLanguageSettings.fromObject = function fromObject(object) {
|
21478 | if (object instanceof $root.google.api.CommonLanguageSettings)
|
21479 | return object;
|
21480 | var message = new $root.google.api.CommonLanguageSettings();
|
21481 | if (object.referenceDocsUri != null)
|
21482 | message.referenceDocsUri = String(object.referenceDocsUri);
|
21483 | if (object.destinations) {
|
21484 | if (!Array.isArray(object.destinations))
|
21485 | throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected");
|
21486 | message.destinations = [];
|
21487 | for (var i = 0; i < object.destinations.length; ++i)
|
21488 | switch (object.destinations[i]) {
|
21489 | default:
|
21490 | if (typeof object.destinations[i] === "number") {
|
21491 | message.destinations[i] = object.destinations[i];
|
21492 | break;
|
21493 | }
|
21494 | case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED":
|
21495 | case 0:
|
21496 | message.destinations[i] = 0;
|
21497 | break;
|
21498 | case "GITHUB":
|
21499 | case 10:
|
21500 | message.destinations[i] = 10;
|
21501 | break;
|
21502 | case "PACKAGE_MANAGER":
|
21503 | case 20:
|
21504 | message.destinations[i] = 20;
|
21505 | break;
|
21506 | }
|
21507 | }
|
21508 | return message;
|
21509 | };
|
21510 |
|
21511 | /**
|
21512 | * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified.
|
21513 | * @function toObject
|
21514 | * @memberof google.api.CommonLanguageSettings
|
21515 | * @static
|
21516 | * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings
|
21517 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
21518 | * @returns {Object.<string,*>} Plain object
|
21519 | */
|
21520 | CommonLanguageSettings.toObject = function toObject(message, options) {
|
21521 | if (!options)
|
21522 | options = {};
|
21523 | var object = {};
|
21524 | if (options.arrays || options.defaults)
|
21525 | object.destinations = [];
|
21526 | if (options.defaults)
|
21527 | object.referenceDocsUri = "";
|
21528 | if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri"))
|
21529 | object.referenceDocsUri = message.referenceDocsUri;
|
21530 | if (message.destinations && message.destinations.length) {
|
21531 | object.destinations = [];
|
21532 | for (var j = 0; j < message.destinations.length; ++j)
|
21533 | object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j];
|
21534 | }
|
21535 | return object;
|
21536 | };
|
21537 |
|
21538 | /**
|
21539 | * Converts this CommonLanguageSettings to JSON.
|
21540 | * @function toJSON
|
21541 | * @memberof google.api.CommonLanguageSettings
|
21542 | * @instance
|
21543 | * @returns {Object.<string,*>} JSON object
|
21544 | */
|
21545 | CommonLanguageSettings.prototype.toJSON = function toJSON() {
|
21546 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
21547 | };
|
21548 |
|
21549 | /**
|
21550 | * Gets the default type url for CommonLanguageSettings
|
21551 | * @function getTypeUrl
|
21552 | * @memberof google.api.CommonLanguageSettings
|
21553 | * @static
|
21554 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
21555 | * @returns {string} The default type url
|
21556 | */
|
21557 | CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
21558 | if (typeUrlPrefix === undefined) {
|
21559 | typeUrlPrefix = "type.googleapis.com";
|
21560 | }
|
21561 | return typeUrlPrefix + "/google.api.CommonLanguageSettings";
|
21562 | };
|
21563 |
|
21564 | return CommonLanguageSettings;
|
21565 | })();
|
21566 |
|
21567 | api.ClientLibrarySettings = (function() {
|
21568 |
|
21569 | /**
|
21570 | * Properties of a ClientLibrarySettings.
|
21571 | * @memberof google.api
|
21572 | * @interface IClientLibrarySettings
|
21573 | * @property {string|null} [version] ClientLibrarySettings version
|
21574 | * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage
|
21575 | * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums
|
21576 | * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings
|
21577 | * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings
|
21578 | * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings
|
21579 | * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings
|
21580 | * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings
|
21581 | * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings
|
21582 | * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings
|
21583 | * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings
|
21584 | */
|
21585 |
|
21586 | /**
|
21587 | * Constructs a new ClientLibrarySettings.
|
21588 | * @memberof google.api
|
21589 | * @classdesc Represents a ClientLibrarySettings.
|
21590 | * @implements IClientLibrarySettings
|
21591 | * @constructor
|
21592 | * @param {google.api.IClientLibrarySettings=} [properties] Properties to set
|
21593 | */
|
21594 | function ClientLibrarySettings(properties) {
|
21595 | if (properties)
|
21596 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
21597 | if (properties[keys[i]] != null)
|
21598 | this[keys[i]] = properties[keys[i]];
|
21599 | }
|
21600 |
|
21601 | /**
|
21602 | * ClientLibrarySettings version.
|
21603 | * @member {string} version
|
21604 | * @memberof google.api.ClientLibrarySettings
|
21605 | * @instance
|
21606 | */
|
21607 | ClientLibrarySettings.prototype.version = "";
|
21608 |
|
21609 | /**
|
21610 | * ClientLibrarySettings launchStage.
|
21611 | * @member {google.api.LaunchStage} launchStage
|
21612 | * @memberof google.api.ClientLibrarySettings
|
21613 | * @instance
|
21614 | */
|
21615 | ClientLibrarySettings.prototype.launchStage = 0;
|
21616 |
|
21617 | /**
|
21618 | * ClientLibrarySettings restNumericEnums.
|
21619 | * @member {boolean} restNumericEnums
|
21620 | * @memberof google.api.ClientLibrarySettings
|
21621 | * @instance
|
21622 | */
|
21623 | ClientLibrarySettings.prototype.restNumericEnums = false;
|
21624 |
|
21625 | /**
|
21626 | * ClientLibrarySettings javaSettings.
|
21627 | * @member {google.api.IJavaSettings|null|undefined} javaSettings
|
21628 | * @memberof google.api.ClientLibrarySettings
|
21629 | * @instance
|
21630 | */
|
21631 | ClientLibrarySettings.prototype.javaSettings = null;
|
21632 |
|
21633 | /**
|
21634 | * ClientLibrarySettings cppSettings.
|
21635 | * @member {google.api.ICppSettings|null|undefined} cppSettings
|
21636 | * @memberof google.api.ClientLibrarySettings
|
21637 | * @instance
|
21638 | */
|
21639 | ClientLibrarySettings.prototype.cppSettings = null;
|
21640 |
|
21641 | /**
|
21642 | * ClientLibrarySettings phpSettings.
|
21643 | * @member {google.api.IPhpSettings|null|undefined} phpSettings
|
21644 | * @memberof google.api.ClientLibrarySettings
|
21645 | * @instance
|
21646 | */
|
21647 | ClientLibrarySettings.prototype.phpSettings = null;
|
21648 |
|
21649 | /**
|
21650 | * ClientLibrarySettings pythonSettings.
|
21651 | * @member {google.api.IPythonSettings|null|undefined} pythonSettings
|
21652 | * @memberof google.api.ClientLibrarySettings
|
21653 | * @instance
|
21654 | */
|
21655 | ClientLibrarySettings.prototype.pythonSettings = null;
|
21656 |
|
21657 | /**
|
21658 | * ClientLibrarySettings nodeSettings.
|
21659 | * @member {google.api.INodeSettings|null|undefined} nodeSettings
|
21660 | * @memberof google.api.ClientLibrarySettings
|
21661 | * @instance
|
21662 | */
|
21663 | ClientLibrarySettings.prototype.nodeSettings = null;
|
21664 |
|
21665 | /**
|
21666 | * ClientLibrarySettings dotnetSettings.
|
21667 | * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings
|
21668 | * @memberof google.api.ClientLibrarySettings
|
21669 | * @instance
|
21670 | */
|
21671 | ClientLibrarySettings.prototype.dotnetSettings = null;
|
21672 |
|
21673 | /**
|
21674 | * ClientLibrarySettings rubySettings.
|
21675 | * @member {google.api.IRubySettings|null|undefined} rubySettings
|
21676 | * @memberof google.api.ClientLibrarySettings
|
21677 | * @instance
|
21678 | */
|
21679 | ClientLibrarySettings.prototype.rubySettings = null;
|
21680 |
|
21681 | /**
|
21682 | * ClientLibrarySettings goSettings.
|
21683 | * @member {google.api.IGoSettings|null|undefined} goSettings
|
21684 | * @memberof google.api.ClientLibrarySettings
|
21685 | * @instance
|
21686 | */
|
21687 | ClientLibrarySettings.prototype.goSettings = null;
|
21688 |
|
21689 | /**
|
21690 | * Creates a new ClientLibrarySettings instance using the specified properties.
|
21691 | * @function create
|
21692 | * @memberof google.api.ClientLibrarySettings
|
21693 | * @static
|
21694 | * @param {google.api.IClientLibrarySettings=} [properties] Properties to set
|
21695 | * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance
|
21696 | */
|
21697 | ClientLibrarySettings.create = function create(properties) {
|
21698 | return new ClientLibrarySettings(properties);
|
21699 | };
|
21700 |
|
21701 | /**
|
21702 | * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages.
|
21703 | * @function encode
|
21704 | * @memberof google.api.ClientLibrarySettings
|
21705 | * @static
|
21706 | * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode
|
21707 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
21708 | * @returns {$protobuf.Writer} Writer
|
21709 | */
|
21710 | ClientLibrarySettings.encode = function encode(message, writer) {
|
21711 | if (!writer)
|
21712 | writer = $Writer.create();
|
21713 | if (message.version != null && Object.hasOwnProperty.call(message, "version"))
|
21714 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.version);
|
21715 | if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage"))
|
21716 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage);
|
21717 | if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums"))
|
21718 | writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums);
|
21719 | if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings"))
|
21720 | $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
|
21721 | if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings"))
|
21722 | $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
|
21723 | if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings"))
|
21724 | $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
|
21725 | if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings"))
|
21726 | $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim();
|
21727 | if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings"))
|
21728 | $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim();
|
21729 | if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings"))
|
21730 | $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim();
|
21731 | if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings"))
|
21732 | $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim();
|
21733 | if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings"))
|
21734 | $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim();
|
21735 | return writer;
|
21736 | };
|
21737 |
|
21738 | /**
|
21739 | * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages.
|
21740 | * @function encodeDelimited
|
21741 | * @memberof google.api.ClientLibrarySettings
|
21742 | * @static
|
21743 | * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode
|
21744 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
21745 | * @returns {$protobuf.Writer} Writer
|
21746 | */
|
21747 | ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) {
|
21748 | return this.encode(message, writer).ldelim();
|
21749 | };
|
21750 |
|
21751 | /**
|
21752 | * Decodes a ClientLibrarySettings message from the specified reader or buffer.
|
21753 | * @function decode
|
21754 | * @memberof google.api.ClientLibrarySettings
|
21755 | * @static
|
21756 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
21757 | * @param {number} [length] Message length if known beforehand
|
21758 | * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings
|
21759 | * @throws {Error} If the payload is not a reader or valid buffer
|
21760 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
21761 | */
|
21762 | ClientLibrarySettings.decode = function decode(reader, length) {
|
21763 | if (!(reader instanceof $Reader))
|
21764 | reader = $Reader.create(reader);
|
21765 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings();
|
21766 | while (reader.pos < end) {
|
21767 | var tag = reader.uint32();
|
21768 | switch (tag >>> 3) {
|
21769 | case 1: {
|
21770 | message.version = reader.string();
|
21771 | break;
|
21772 | }
|
21773 | case 2: {
|
21774 | message.launchStage = reader.int32();
|
21775 | break;
|
21776 | }
|
21777 | case 3: {
|
21778 | message.restNumericEnums = reader.bool();
|
21779 | break;
|
21780 | }
|
21781 | case 21: {
|
21782 | message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32());
|
21783 | break;
|
21784 | }
|
21785 | case 22: {
|
21786 | message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32());
|
21787 | break;
|
21788 | }
|
21789 | case 23: {
|
21790 | message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32());
|
21791 | break;
|
21792 | }
|
21793 | case 24: {
|
21794 | message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32());
|
21795 | break;
|
21796 | }
|
21797 | case 25: {
|
21798 | message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32());
|
21799 | break;
|
21800 | }
|
21801 | case 26: {
|
21802 | message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32());
|
21803 | break;
|
21804 | }
|
21805 | case 27: {
|
21806 | message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32());
|
21807 | break;
|
21808 | }
|
21809 | case 28: {
|
21810 | message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32());
|
21811 | break;
|
21812 | }
|
21813 | default:
|
21814 | reader.skipType(tag & 7);
|
21815 | break;
|
21816 | }
|
21817 | }
|
21818 | return message;
|
21819 | };
|
21820 |
|
21821 | /**
|
21822 | * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited.
|
21823 | * @function decodeDelimited
|
21824 | * @memberof google.api.ClientLibrarySettings
|
21825 | * @static
|
21826 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
21827 | * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings
|
21828 | * @throws {Error} If the payload is not a reader or valid buffer
|
21829 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
21830 | */
|
21831 | ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) {
|
21832 | if (!(reader instanceof $Reader))
|
21833 | reader = new $Reader(reader);
|
21834 | return this.decode(reader, reader.uint32());
|
21835 | };
|
21836 |
|
21837 | /**
|
21838 | * Verifies a ClientLibrarySettings message.
|
21839 | * @function verify
|
21840 | * @memberof google.api.ClientLibrarySettings
|
21841 | * @static
|
21842 | * @param {Object.<string,*>} message Plain object to verify
|
21843 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
21844 | */
|
21845 | ClientLibrarySettings.verify = function verify(message) {
|
21846 | if (typeof message !== "object" || message === null)
|
21847 | return "object expected";
|
21848 | if (message.version != null && message.hasOwnProperty("version"))
|
21849 | if (!$util.isString(message.version))
|
21850 | return "version: string expected";
|
21851 | if (message.launchStage != null && message.hasOwnProperty("launchStage"))
|
21852 | switch (message.launchStage) {
|
21853 | default:
|
21854 | return "launchStage: enum value expected";
|
21855 | case 0:
|
21856 | case 6:
|
21857 | case 7:
|
21858 | case 1:
|
21859 | case 2:
|
21860 | case 3:
|
21861 | case 4:
|
21862 | case 5:
|
21863 | break;
|
21864 | }
|
21865 | if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums"))
|
21866 | if (typeof message.restNumericEnums !== "boolean")
|
21867 | return "restNumericEnums: boolean expected";
|
21868 | if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) {
|
21869 | var error = $root.google.api.JavaSettings.verify(message.javaSettings);
|
21870 | if (error)
|
21871 | return "javaSettings." + error;
|
21872 | }
|
21873 | if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) {
|
21874 | var error = $root.google.api.CppSettings.verify(message.cppSettings);
|
21875 | if (error)
|
21876 | return "cppSettings." + error;
|
21877 | }
|
21878 | if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) {
|
21879 | var error = $root.google.api.PhpSettings.verify(message.phpSettings);
|
21880 | if (error)
|
21881 | return "phpSettings." + error;
|
21882 | }
|
21883 | if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) {
|
21884 | var error = $root.google.api.PythonSettings.verify(message.pythonSettings);
|
21885 | if (error)
|
21886 | return "pythonSettings." + error;
|
21887 | }
|
21888 | if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) {
|
21889 | var error = $root.google.api.NodeSettings.verify(message.nodeSettings);
|
21890 | if (error)
|
21891 | return "nodeSettings." + error;
|
21892 | }
|
21893 | if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) {
|
21894 | var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings);
|
21895 | if (error)
|
21896 | return "dotnetSettings." + error;
|
21897 | }
|
21898 | if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) {
|
21899 | var error = $root.google.api.RubySettings.verify(message.rubySettings);
|
21900 | if (error)
|
21901 | return "rubySettings." + error;
|
21902 | }
|
21903 | if (message.goSettings != null && message.hasOwnProperty("goSettings")) {
|
21904 | var error = $root.google.api.GoSettings.verify(message.goSettings);
|
21905 | if (error)
|
21906 | return "goSettings." + error;
|
21907 | }
|
21908 | return null;
|
21909 | };
|
21910 |
|
21911 | /**
|
21912 | * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types.
|
21913 | * @function fromObject
|
21914 | * @memberof google.api.ClientLibrarySettings
|
21915 | * @static
|
21916 | * @param {Object.<string,*>} object Plain object
|
21917 | * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings
|
21918 | */
|
21919 | ClientLibrarySettings.fromObject = function fromObject(object) {
|
21920 | if (object instanceof $root.google.api.ClientLibrarySettings)
|
21921 | return object;
|
21922 | var message = new $root.google.api.ClientLibrarySettings();
|
21923 | if (object.version != null)
|
21924 | message.version = String(object.version);
|
21925 | switch (object.launchStage) {
|
21926 | default:
|
21927 | if (typeof object.launchStage === "number") {
|
21928 | message.launchStage = object.launchStage;
|
21929 | break;
|
21930 | }
|
21931 | break;
|
21932 | case "LAUNCH_STAGE_UNSPECIFIED":
|
21933 | case 0:
|
21934 | message.launchStage = 0;
|
21935 | break;
|
21936 | case "UNIMPLEMENTED":
|
21937 | case 6:
|
21938 | message.launchStage = 6;
|
21939 | break;
|
21940 | case "PRELAUNCH":
|
21941 | case 7:
|
21942 | message.launchStage = 7;
|
21943 | break;
|
21944 | case "EARLY_ACCESS":
|
21945 | case 1:
|
21946 | message.launchStage = 1;
|
21947 | break;
|
21948 | case "ALPHA":
|
21949 | case 2:
|
21950 | message.launchStage = 2;
|
21951 | break;
|
21952 | case "BETA":
|
21953 | case 3:
|
21954 | message.launchStage = 3;
|
21955 | break;
|
21956 | case "GA":
|
21957 | case 4:
|
21958 | message.launchStage = 4;
|
21959 | break;
|
21960 | case "DEPRECATED":
|
21961 | case 5:
|
21962 | message.launchStage = 5;
|
21963 | break;
|
21964 | }
|
21965 | if (object.restNumericEnums != null)
|
21966 | message.restNumericEnums = Boolean(object.restNumericEnums);
|
21967 | if (object.javaSettings != null) {
|
21968 | if (typeof object.javaSettings !== "object")
|
21969 | throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected");
|
21970 | message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings);
|
21971 | }
|
21972 | if (object.cppSettings != null) {
|
21973 | if (typeof object.cppSettings !== "object")
|
21974 | throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected");
|
21975 | message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings);
|
21976 | }
|
21977 | if (object.phpSettings != null) {
|
21978 | if (typeof object.phpSettings !== "object")
|
21979 | throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected");
|
21980 | message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings);
|
21981 | }
|
21982 | if (object.pythonSettings != null) {
|
21983 | if (typeof object.pythonSettings !== "object")
|
21984 | throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected");
|
21985 | message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings);
|
21986 | }
|
21987 | if (object.nodeSettings != null) {
|
21988 | if (typeof object.nodeSettings !== "object")
|
21989 | throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected");
|
21990 | message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings);
|
21991 | }
|
21992 | if (object.dotnetSettings != null) {
|
21993 | if (typeof object.dotnetSettings !== "object")
|
21994 | throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected");
|
21995 | message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings);
|
21996 | }
|
21997 | if (object.rubySettings != null) {
|
21998 | if (typeof object.rubySettings !== "object")
|
21999 | throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected");
|
22000 | message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings);
|
22001 | }
|
22002 | if (object.goSettings != null) {
|
22003 | if (typeof object.goSettings !== "object")
|
22004 | throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected");
|
22005 | message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings);
|
22006 | }
|
22007 | return message;
|
22008 | };
|
22009 |
|
22010 | /**
|
22011 | * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified.
|
22012 | * @function toObject
|
22013 | * @memberof google.api.ClientLibrarySettings
|
22014 | * @static
|
22015 | * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings
|
22016 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
22017 | * @returns {Object.<string,*>} Plain object
|
22018 | */
|
22019 | ClientLibrarySettings.toObject = function toObject(message, options) {
|
22020 | if (!options)
|
22021 | options = {};
|
22022 | var object = {};
|
22023 | if (options.defaults) {
|
22024 | object.version = "";
|
22025 | object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0;
|
22026 | object.restNumericEnums = false;
|
22027 | object.javaSettings = null;
|
22028 | object.cppSettings = null;
|
22029 | object.phpSettings = null;
|
22030 | object.pythonSettings = null;
|
22031 | object.nodeSettings = null;
|
22032 | object.dotnetSettings = null;
|
22033 | object.rubySettings = null;
|
22034 | object.goSettings = null;
|
22035 | }
|
22036 | if (message.version != null && message.hasOwnProperty("version"))
|
22037 | object.version = message.version;
|
22038 | if (message.launchStage != null && message.hasOwnProperty("launchStage"))
|
22039 | object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage;
|
22040 | if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums"))
|
22041 | object.restNumericEnums = message.restNumericEnums;
|
22042 | if (message.javaSettings != null && message.hasOwnProperty("javaSettings"))
|
22043 | object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options);
|
22044 | if (message.cppSettings != null && message.hasOwnProperty("cppSettings"))
|
22045 | object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options);
|
22046 | if (message.phpSettings != null && message.hasOwnProperty("phpSettings"))
|
22047 | object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options);
|
22048 | if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings"))
|
22049 | object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options);
|
22050 | if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings"))
|
22051 | object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options);
|
22052 | if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings"))
|
22053 | object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options);
|
22054 | if (message.rubySettings != null && message.hasOwnProperty("rubySettings"))
|
22055 | object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options);
|
22056 | if (message.goSettings != null && message.hasOwnProperty("goSettings"))
|
22057 | object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options);
|
22058 | return object;
|
22059 | };
|
22060 |
|
22061 | /**
|
22062 | * Converts this ClientLibrarySettings to JSON.
|
22063 | * @function toJSON
|
22064 | * @memberof google.api.ClientLibrarySettings
|
22065 | * @instance
|
22066 | * @returns {Object.<string,*>} JSON object
|
22067 | */
|
22068 | ClientLibrarySettings.prototype.toJSON = function toJSON() {
|
22069 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
22070 | };
|
22071 |
|
22072 | /**
|
22073 | * Gets the default type url for ClientLibrarySettings
|
22074 | * @function getTypeUrl
|
22075 | * @memberof google.api.ClientLibrarySettings
|
22076 | * @static
|
22077 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
22078 | * @returns {string} The default type url
|
22079 | */
|
22080 | ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
22081 | if (typeUrlPrefix === undefined) {
|
22082 | typeUrlPrefix = "type.googleapis.com";
|
22083 | }
|
22084 | return typeUrlPrefix + "/google.api.ClientLibrarySettings";
|
22085 | };
|
22086 |
|
22087 | return ClientLibrarySettings;
|
22088 | })();
|
22089 |
|
22090 | api.Publishing = (function() {
|
22091 |
|
22092 | /**
|
22093 | * Properties of a Publishing.
|
22094 | * @memberof google.api
|
22095 | * @interface IPublishing
|
22096 | * @property {Array.<google.api.IMethodSettings>|null} [methodSettings] Publishing methodSettings
|
22097 | * @property {string|null} [newIssueUri] Publishing newIssueUri
|
22098 | * @property {string|null} [documentationUri] Publishing documentationUri
|
22099 | * @property {string|null} [apiShortName] Publishing apiShortName
|
22100 | * @property {string|null} [githubLabel] Publishing githubLabel
|
22101 | * @property {Array.<string>|null} [codeownerGithubTeams] Publishing codeownerGithubTeams
|
22102 | * @property {string|null} [docTagPrefix] Publishing docTagPrefix
|
22103 | * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization
|
22104 | * @property {Array.<google.api.IClientLibrarySettings>|null} [librarySettings] Publishing librarySettings
|
22105 | * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri
|
22106 | */
|
22107 |
|
22108 | /**
|
22109 | * Constructs a new Publishing.
|
22110 | * @memberof google.api
|
22111 | * @classdesc Represents a Publishing.
|
22112 | * @implements IPublishing
|
22113 | * @constructor
|
22114 | * @param {google.api.IPublishing=} [properties] Properties to set
|
22115 | */
|
22116 | function Publishing(properties) {
|
22117 | this.methodSettings = [];
|
22118 | this.codeownerGithubTeams = [];
|
22119 | this.librarySettings = [];
|
22120 | if (properties)
|
22121 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
22122 | if (properties[keys[i]] != null)
|
22123 | this[keys[i]] = properties[keys[i]];
|
22124 | }
|
22125 |
|
22126 | /**
|
22127 | * Publishing methodSettings.
|
22128 | * @member {Array.<google.api.IMethodSettings>} methodSettings
|
22129 | * @memberof google.api.Publishing
|
22130 | * @instance
|
22131 | */
|
22132 | Publishing.prototype.methodSettings = $util.emptyArray;
|
22133 |
|
22134 | /**
|
22135 | * Publishing newIssueUri.
|
22136 | * @member {string} newIssueUri
|
22137 | * @memberof google.api.Publishing
|
22138 | * @instance
|
22139 | */
|
22140 | Publishing.prototype.newIssueUri = "";
|
22141 |
|
22142 | /**
|
22143 | * Publishing documentationUri.
|
22144 | * @member {string} documentationUri
|
22145 | * @memberof google.api.Publishing
|
22146 | * @instance
|
22147 | */
|
22148 | Publishing.prototype.documentationUri = "";
|
22149 |
|
22150 | /**
|
22151 | * Publishing apiShortName.
|
22152 | * @member {string} apiShortName
|
22153 | * @memberof google.api.Publishing
|
22154 | * @instance
|
22155 | */
|
22156 | Publishing.prototype.apiShortName = "";
|
22157 |
|
22158 | /**
|
22159 | * Publishing githubLabel.
|
22160 | * @member {string} githubLabel
|
22161 | * @memberof google.api.Publishing
|
22162 | * @instance
|
22163 | */
|
22164 | Publishing.prototype.githubLabel = "";
|
22165 |
|
22166 | /**
|
22167 | * Publishing codeownerGithubTeams.
|
22168 | * @member {Array.<string>} codeownerGithubTeams
|
22169 | * @memberof google.api.Publishing
|
22170 | * @instance
|
22171 | */
|
22172 | Publishing.prototype.codeownerGithubTeams = $util.emptyArray;
|
22173 |
|
22174 | /**
|
22175 | * Publishing docTagPrefix.
|
22176 | * @member {string} docTagPrefix
|
22177 | * @memberof google.api.Publishing
|
22178 | * @instance
|
22179 | */
|
22180 | Publishing.prototype.docTagPrefix = "";
|
22181 |
|
22182 | /**
|
22183 | * Publishing organization.
|
22184 | * @member {google.api.ClientLibraryOrganization} organization
|
22185 | * @memberof google.api.Publishing
|
22186 | * @instance
|
22187 | */
|
22188 | Publishing.prototype.organization = 0;
|
22189 |
|
22190 | /**
|
22191 | * Publishing librarySettings.
|
22192 | * @member {Array.<google.api.IClientLibrarySettings>} librarySettings
|
22193 | * @memberof google.api.Publishing
|
22194 | * @instance
|
22195 | */
|
22196 | Publishing.prototype.librarySettings = $util.emptyArray;
|
22197 |
|
22198 | /**
|
22199 | * Publishing protoReferenceDocumentationUri.
|
22200 | * @member {string} protoReferenceDocumentationUri
|
22201 | * @memberof google.api.Publishing
|
22202 | * @instance
|
22203 | */
|
22204 | Publishing.prototype.protoReferenceDocumentationUri = "";
|
22205 |
|
22206 | /**
|
22207 | * Creates a new Publishing instance using the specified properties.
|
22208 | * @function create
|
22209 | * @memberof google.api.Publishing
|
22210 | * @static
|
22211 | * @param {google.api.IPublishing=} [properties] Properties to set
|
22212 | * @returns {google.api.Publishing} Publishing instance
|
22213 | */
|
22214 | Publishing.create = function create(properties) {
|
22215 | return new Publishing(properties);
|
22216 | };
|
22217 |
|
22218 | /**
|
22219 | * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages.
|
22220 | * @function encode
|
22221 | * @memberof google.api.Publishing
|
22222 | * @static
|
22223 | * @param {google.api.IPublishing} message Publishing message or plain object to encode
|
22224 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
22225 | * @returns {$protobuf.Writer} Writer
|
22226 | */
|
22227 | Publishing.encode = function encode(message, writer) {
|
22228 | if (!writer)
|
22229 | writer = $Writer.create();
|
22230 | if (message.methodSettings != null && message.methodSettings.length)
|
22231 | for (var i = 0; i < message.methodSettings.length; ++i)
|
22232 | $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
22233 | if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri"))
|
22234 | writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri);
|
22235 | if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri"))
|
22236 | writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri);
|
22237 | if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName"))
|
22238 | writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName);
|
22239 | if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel"))
|
22240 | writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel);
|
22241 | if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length)
|
22242 | for (var i = 0; i < message.codeownerGithubTeams.length; ++i)
|
22243 | writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]);
|
22244 | if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix"))
|
22245 | writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix);
|
22246 | if (message.organization != null && Object.hasOwnProperty.call(message, "organization"))
|
22247 | writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization);
|
22248 | if (message.librarySettings != null && message.librarySettings.length)
|
22249 | for (var i = 0; i < message.librarySettings.length; ++i)
|
22250 | $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim();
|
22251 | if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri"))
|
22252 | writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri);
|
22253 | return writer;
|
22254 | };
|
22255 |
|
22256 | /**
|
22257 | * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages.
|
22258 | * @function encodeDelimited
|
22259 | * @memberof google.api.Publishing
|
22260 | * @static
|
22261 | * @param {google.api.IPublishing} message Publishing message or plain object to encode
|
22262 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
22263 | * @returns {$protobuf.Writer} Writer
|
22264 | */
|
22265 | Publishing.encodeDelimited = function encodeDelimited(message, writer) {
|
22266 | return this.encode(message, writer).ldelim();
|
22267 | };
|
22268 |
|
22269 | /**
|
22270 | * Decodes a Publishing message from the specified reader or buffer.
|
22271 | * @function decode
|
22272 | * @memberof google.api.Publishing
|
22273 | * @static
|
22274 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
22275 | * @param {number} [length] Message length if known beforehand
|
22276 | * @returns {google.api.Publishing} Publishing
|
22277 | * @throws {Error} If the payload is not a reader or valid buffer
|
22278 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
22279 | */
|
22280 | Publishing.decode = function decode(reader, length) {
|
22281 | if (!(reader instanceof $Reader))
|
22282 | reader = $Reader.create(reader);
|
22283 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing();
|
22284 | while (reader.pos < end) {
|
22285 | var tag = reader.uint32();
|
22286 | switch (tag >>> 3) {
|
22287 | case 2: {
|
22288 | if (!(message.methodSettings && message.methodSettings.length))
|
22289 | message.methodSettings = [];
|
22290 | message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32()));
|
22291 | break;
|
22292 | }
|
22293 | case 101: {
|
22294 | message.newIssueUri = reader.string();
|
22295 | break;
|
22296 | }
|
22297 | case 102: {
|
22298 | message.documentationUri = reader.string();
|
22299 | break;
|
22300 | }
|
22301 | case 103: {
|
22302 | message.apiShortName = reader.string();
|
22303 | break;
|
22304 | }
|
22305 | case 104: {
|
22306 | message.githubLabel = reader.string();
|
22307 | break;
|
22308 | }
|
22309 | case 105: {
|
22310 | if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length))
|
22311 | message.codeownerGithubTeams = [];
|
22312 | message.codeownerGithubTeams.push(reader.string());
|
22313 | break;
|
22314 | }
|
22315 | case 106: {
|
22316 | message.docTagPrefix = reader.string();
|
22317 | break;
|
22318 | }
|
22319 | case 107: {
|
22320 | message.organization = reader.int32();
|
22321 | break;
|
22322 | }
|
22323 | case 109: {
|
22324 | if (!(message.librarySettings && message.librarySettings.length))
|
22325 | message.librarySettings = [];
|
22326 | message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32()));
|
22327 | break;
|
22328 | }
|
22329 | case 110: {
|
22330 | message.protoReferenceDocumentationUri = reader.string();
|
22331 | break;
|
22332 | }
|
22333 | default:
|
22334 | reader.skipType(tag & 7);
|
22335 | break;
|
22336 | }
|
22337 | }
|
22338 | return message;
|
22339 | };
|
22340 |
|
22341 | /**
|
22342 | * Decodes a Publishing message from the specified reader or buffer, length delimited.
|
22343 | * @function decodeDelimited
|
22344 | * @memberof google.api.Publishing
|
22345 | * @static
|
22346 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
22347 | * @returns {google.api.Publishing} Publishing
|
22348 | * @throws {Error} If the payload is not a reader or valid buffer
|
22349 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
22350 | */
|
22351 | Publishing.decodeDelimited = function decodeDelimited(reader) {
|
22352 | if (!(reader instanceof $Reader))
|
22353 | reader = new $Reader(reader);
|
22354 | return this.decode(reader, reader.uint32());
|
22355 | };
|
22356 |
|
22357 | /**
|
22358 | * Verifies a Publishing message.
|
22359 | * @function verify
|
22360 | * @memberof google.api.Publishing
|
22361 | * @static
|
22362 | * @param {Object.<string,*>} message Plain object to verify
|
22363 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
22364 | */
|
22365 | Publishing.verify = function verify(message) {
|
22366 | if (typeof message !== "object" || message === null)
|
22367 | return "object expected";
|
22368 | if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) {
|
22369 | if (!Array.isArray(message.methodSettings))
|
22370 | return "methodSettings: array expected";
|
22371 | for (var i = 0; i < message.methodSettings.length; ++i) {
|
22372 | var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]);
|
22373 | if (error)
|
22374 | return "methodSettings." + error;
|
22375 | }
|
22376 | }
|
22377 | if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri"))
|
22378 | if (!$util.isString(message.newIssueUri))
|
22379 | return "newIssueUri: string expected";
|
22380 | if (message.documentationUri != null && message.hasOwnProperty("documentationUri"))
|
22381 | if (!$util.isString(message.documentationUri))
|
22382 | return "documentationUri: string expected";
|
22383 | if (message.apiShortName != null && message.hasOwnProperty("apiShortName"))
|
22384 | if (!$util.isString(message.apiShortName))
|
22385 | return "apiShortName: string expected";
|
22386 | if (message.githubLabel != null && message.hasOwnProperty("githubLabel"))
|
22387 | if (!$util.isString(message.githubLabel))
|
22388 | return "githubLabel: string expected";
|
22389 | if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) {
|
22390 | if (!Array.isArray(message.codeownerGithubTeams))
|
22391 | return "codeownerGithubTeams: array expected";
|
22392 | for (var i = 0; i < message.codeownerGithubTeams.length; ++i)
|
22393 | if (!$util.isString(message.codeownerGithubTeams[i]))
|
22394 | return "codeownerGithubTeams: string[] expected";
|
22395 | }
|
22396 | if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix"))
|
22397 | if (!$util.isString(message.docTagPrefix))
|
22398 | return "docTagPrefix: string expected";
|
22399 | if (message.organization != null && message.hasOwnProperty("organization"))
|
22400 | switch (message.organization) {
|
22401 | default:
|
22402 | return "organization: enum value expected";
|
22403 | case 0:
|
22404 | case 1:
|
22405 | case 2:
|
22406 | case 3:
|
22407 | case 4:
|
22408 | case 5:
|
22409 | case 6:
|
22410 | case 7:
|
22411 | break;
|
22412 | }
|
22413 | if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) {
|
22414 | if (!Array.isArray(message.librarySettings))
|
22415 | return "librarySettings: array expected";
|
22416 | for (var i = 0; i < message.librarySettings.length; ++i) {
|
22417 | var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]);
|
22418 | if (error)
|
22419 | return "librarySettings." + error;
|
22420 | }
|
22421 | }
|
22422 | if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri"))
|
22423 | if (!$util.isString(message.protoReferenceDocumentationUri))
|
22424 | return "protoReferenceDocumentationUri: string expected";
|
22425 | return null;
|
22426 | };
|
22427 |
|
22428 | /**
|
22429 | * Creates a Publishing message from a plain object. Also converts values to their respective internal types.
|
22430 | * @function fromObject
|
22431 | * @memberof google.api.Publishing
|
22432 | * @static
|
22433 | * @param {Object.<string,*>} object Plain object
|
22434 | * @returns {google.api.Publishing} Publishing
|
22435 | */
|
22436 | Publishing.fromObject = function fromObject(object) {
|
22437 | if (object instanceof $root.google.api.Publishing)
|
22438 | return object;
|
22439 | var message = new $root.google.api.Publishing();
|
22440 | if (object.methodSettings) {
|
22441 | if (!Array.isArray(object.methodSettings))
|
22442 | throw TypeError(".google.api.Publishing.methodSettings: array expected");
|
22443 | message.methodSettings = [];
|
22444 | for (var i = 0; i < object.methodSettings.length; ++i) {
|
22445 | if (typeof object.methodSettings[i] !== "object")
|
22446 | throw TypeError(".google.api.Publishing.methodSettings: object expected");
|
22447 | message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]);
|
22448 | }
|
22449 | }
|
22450 | if (object.newIssueUri != null)
|
22451 | message.newIssueUri = String(object.newIssueUri);
|
22452 | if (object.documentationUri != null)
|
22453 | message.documentationUri = String(object.documentationUri);
|
22454 | if (object.apiShortName != null)
|
22455 | message.apiShortName = String(object.apiShortName);
|
22456 | if (object.githubLabel != null)
|
22457 | message.githubLabel = String(object.githubLabel);
|
22458 | if (object.codeownerGithubTeams) {
|
22459 | if (!Array.isArray(object.codeownerGithubTeams))
|
22460 | throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected");
|
22461 | message.codeownerGithubTeams = [];
|
22462 | for (var i = 0; i < object.codeownerGithubTeams.length; ++i)
|
22463 | message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]);
|
22464 | }
|
22465 | if (object.docTagPrefix != null)
|
22466 | message.docTagPrefix = String(object.docTagPrefix);
|
22467 | switch (object.organization) {
|
22468 | default:
|
22469 | if (typeof object.organization === "number") {
|
22470 | message.organization = object.organization;
|
22471 | break;
|
22472 | }
|
22473 | break;
|
22474 | case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED":
|
22475 | case 0:
|
22476 | message.organization = 0;
|
22477 | break;
|
22478 | case "CLOUD":
|
22479 | case 1:
|
22480 | message.organization = 1;
|
22481 | break;
|
22482 | case "ADS":
|
22483 | case 2:
|
22484 | message.organization = 2;
|
22485 | break;
|
22486 | case "PHOTOS":
|
22487 | case 3:
|
22488 | message.organization = 3;
|
22489 | break;
|
22490 | case "STREET_VIEW":
|
22491 | case 4:
|
22492 | message.organization = 4;
|
22493 | break;
|
22494 | case "SHOPPING":
|
22495 | case 5:
|
22496 | message.organization = 5;
|
22497 | break;
|
22498 | case "GEO":
|
22499 | case 6:
|
22500 | message.organization = 6;
|
22501 | break;
|
22502 | case "GENERATIVE_AI":
|
22503 | case 7:
|
22504 | message.organization = 7;
|
22505 | break;
|
22506 | }
|
22507 | if (object.librarySettings) {
|
22508 | if (!Array.isArray(object.librarySettings))
|
22509 | throw TypeError(".google.api.Publishing.librarySettings: array expected");
|
22510 | message.librarySettings = [];
|
22511 | for (var i = 0; i < object.librarySettings.length; ++i) {
|
22512 | if (typeof object.librarySettings[i] !== "object")
|
22513 | throw TypeError(".google.api.Publishing.librarySettings: object expected");
|
22514 | message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]);
|
22515 | }
|
22516 | }
|
22517 | if (object.protoReferenceDocumentationUri != null)
|
22518 | message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri);
|
22519 | return message;
|
22520 | };
|
22521 |
|
22522 | /**
|
22523 | * Creates a plain object from a Publishing message. Also converts values to other types if specified.
|
22524 | * @function toObject
|
22525 | * @memberof google.api.Publishing
|
22526 | * @static
|
22527 | * @param {google.api.Publishing} message Publishing
|
22528 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
22529 | * @returns {Object.<string,*>} Plain object
|
22530 | */
|
22531 | Publishing.toObject = function toObject(message, options) {
|
22532 | if (!options)
|
22533 | options = {};
|
22534 | var object = {};
|
22535 | if (options.arrays || options.defaults) {
|
22536 | object.methodSettings = [];
|
22537 | object.codeownerGithubTeams = [];
|
22538 | object.librarySettings = [];
|
22539 | }
|
22540 | if (options.defaults) {
|
22541 | object.newIssueUri = "";
|
22542 | object.documentationUri = "";
|
22543 | object.apiShortName = "";
|
22544 | object.githubLabel = "";
|
22545 | object.docTagPrefix = "";
|
22546 | object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0;
|
22547 | object.protoReferenceDocumentationUri = "";
|
22548 | }
|
22549 | if (message.methodSettings && message.methodSettings.length) {
|
22550 | object.methodSettings = [];
|
22551 | for (var j = 0; j < message.methodSettings.length; ++j)
|
22552 | object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options);
|
22553 | }
|
22554 | if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri"))
|
22555 | object.newIssueUri = message.newIssueUri;
|
22556 | if (message.documentationUri != null && message.hasOwnProperty("documentationUri"))
|
22557 | object.documentationUri = message.documentationUri;
|
22558 | if (message.apiShortName != null && message.hasOwnProperty("apiShortName"))
|
22559 | object.apiShortName = message.apiShortName;
|
22560 | if (message.githubLabel != null && message.hasOwnProperty("githubLabel"))
|
22561 | object.githubLabel = message.githubLabel;
|
22562 | if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) {
|
22563 | object.codeownerGithubTeams = [];
|
22564 | for (var j = 0; j < message.codeownerGithubTeams.length; ++j)
|
22565 | object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j];
|
22566 | }
|
22567 | if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix"))
|
22568 | object.docTagPrefix = message.docTagPrefix;
|
22569 | if (message.organization != null && message.hasOwnProperty("organization"))
|
22570 | object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization;
|
22571 | if (message.librarySettings && message.librarySettings.length) {
|
22572 | object.librarySettings = [];
|
22573 | for (var j = 0; j < message.librarySettings.length; ++j)
|
22574 | object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options);
|
22575 | }
|
22576 | if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri"))
|
22577 | object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri;
|
22578 | return object;
|
22579 | };
|
22580 |
|
22581 | /**
|
22582 | * Converts this Publishing to JSON.
|
22583 | * @function toJSON
|
22584 | * @memberof google.api.Publishing
|
22585 | * @instance
|
22586 | * @returns {Object.<string,*>} JSON object
|
22587 | */
|
22588 | Publishing.prototype.toJSON = function toJSON() {
|
22589 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
22590 | };
|
22591 |
|
22592 | /**
|
22593 | * Gets the default type url for Publishing
|
22594 | * @function getTypeUrl
|
22595 | * @memberof google.api.Publishing
|
22596 | * @static
|
22597 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
22598 | * @returns {string} The default type url
|
22599 | */
|
22600 | Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
22601 | if (typeUrlPrefix === undefined) {
|
22602 | typeUrlPrefix = "type.googleapis.com";
|
22603 | }
|
22604 | return typeUrlPrefix + "/google.api.Publishing";
|
22605 | };
|
22606 |
|
22607 | return Publishing;
|
22608 | })();
|
22609 |
|
22610 | api.JavaSettings = (function() {
|
22611 |
|
22612 | /**
|
22613 | * Properties of a JavaSettings.
|
22614 | * @memberof google.api
|
22615 | * @interface IJavaSettings
|
22616 | * @property {string|null} [libraryPackage] JavaSettings libraryPackage
|
22617 | * @property {Object.<string,string>|null} [serviceClassNames] JavaSettings serviceClassNames
|
22618 | * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common
|
22619 | */
|
22620 |
|
22621 | /**
|
22622 | * Constructs a new JavaSettings.
|
22623 | * @memberof google.api
|
22624 | * @classdesc Represents a JavaSettings.
|
22625 | * @implements IJavaSettings
|
22626 | * @constructor
|
22627 | * @param {google.api.IJavaSettings=} [properties] Properties to set
|
22628 | */
|
22629 | function JavaSettings(properties) {
|
22630 | this.serviceClassNames = {};
|
22631 | if (properties)
|
22632 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
22633 | if (properties[keys[i]] != null)
|
22634 | this[keys[i]] = properties[keys[i]];
|
22635 | }
|
22636 |
|
22637 | /**
|
22638 | * JavaSettings libraryPackage.
|
22639 | * @member {string} libraryPackage
|
22640 | * @memberof google.api.JavaSettings
|
22641 | * @instance
|
22642 | */
|
22643 | JavaSettings.prototype.libraryPackage = "";
|
22644 |
|
22645 | /**
|
22646 | * JavaSettings serviceClassNames.
|
22647 | * @member {Object.<string,string>} serviceClassNames
|
22648 | * @memberof google.api.JavaSettings
|
22649 | * @instance
|
22650 | */
|
22651 | JavaSettings.prototype.serviceClassNames = $util.emptyObject;
|
22652 |
|
22653 | /**
|
22654 | * JavaSettings common.
|
22655 | * @member {google.api.ICommonLanguageSettings|null|undefined} common
|
22656 | * @memberof google.api.JavaSettings
|
22657 | * @instance
|
22658 | */
|
22659 | JavaSettings.prototype.common = null;
|
22660 |
|
22661 | /**
|
22662 | * Creates a new JavaSettings instance using the specified properties.
|
22663 | * @function create
|
22664 | * @memberof google.api.JavaSettings
|
22665 | * @static
|
22666 | * @param {google.api.IJavaSettings=} [properties] Properties to set
|
22667 | * @returns {google.api.JavaSettings} JavaSettings instance
|
22668 | */
|
22669 | JavaSettings.create = function create(properties) {
|
22670 | return new JavaSettings(properties);
|
22671 | };
|
22672 |
|
22673 | /**
|
22674 | * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages.
|
22675 | * @function encode
|
22676 | * @memberof google.api.JavaSettings
|
22677 | * @static
|
22678 | * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode
|
22679 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
22680 | * @returns {$protobuf.Writer} Writer
|
22681 | */
|
22682 | JavaSettings.encode = function encode(message, writer) {
|
22683 | if (!writer)
|
22684 | writer = $Writer.create();
|
22685 | if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage"))
|
22686 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage);
|
22687 | if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames"))
|
22688 | for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i)
|
22689 | writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim();
|
22690 | if (message.common != null && Object.hasOwnProperty.call(message, "common"))
|
22691 | $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
22692 | return writer;
|
22693 | };
|
22694 |
|
22695 | /**
|
22696 | * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages.
|
22697 | * @function encodeDelimited
|
22698 | * @memberof google.api.JavaSettings
|
22699 | * @static
|
22700 | * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode
|
22701 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
22702 | * @returns {$protobuf.Writer} Writer
|
22703 | */
|
22704 | JavaSettings.encodeDelimited = function encodeDelimited(message, writer) {
|
22705 | return this.encode(message, writer).ldelim();
|
22706 | };
|
22707 |
|
22708 | /**
|
22709 | * Decodes a JavaSettings message from the specified reader or buffer.
|
22710 | * @function decode
|
22711 | * @memberof google.api.JavaSettings
|
22712 | * @static
|
22713 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
22714 | * @param {number} [length] Message length if known beforehand
|
22715 | * @returns {google.api.JavaSettings} JavaSettings
|
22716 | * @throws {Error} If the payload is not a reader or valid buffer
|
22717 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
22718 | */
|
22719 | JavaSettings.decode = function decode(reader, length) {
|
22720 | if (!(reader instanceof $Reader))
|
22721 | reader = $Reader.create(reader);
|
22722 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value;
|
22723 | while (reader.pos < end) {
|
22724 | var tag = reader.uint32();
|
22725 | switch (tag >>> 3) {
|
22726 | case 1: {
|
22727 | message.libraryPackage = reader.string();
|
22728 | break;
|
22729 | }
|
22730 | case 2: {
|
22731 | if (message.serviceClassNames === $util.emptyObject)
|
22732 | message.serviceClassNames = {};
|
22733 | var end2 = reader.uint32() + reader.pos;
|
22734 | key = "";
|
22735 | value = "";
|
22736 | while (reader.pos < end2) {
|
22737 | var tag2 = reader.uint32();
|
22738 | switch (tag2 >>> 3) {
|
22739 | case 1:
|
22740 | key = reader.string();
|
22741 | break;
|
22742 | case 2:
|
22743 | value = reader.string();
|
22744 | break;
|
22745 | default:
|
22746 | reader.skipType(tag2 & 7);
|
22747 | break;
|
22748 | }
|
22749 | }
|
22750 | message.serviceClassNames[key] = value;
|
22751 | break;
|
22752 | }
|
22753 | case 3: {
|
22754 | message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32());
|
22755 | break;
|
22756 | }
|
22757 | default:
|
22758 | reader.skipType(tag & 7);
|
22759 | break;
|
22760 | }
|
22761 | }
|
22762 | return message;
|
22763 | };
|
22764 |
|
22765 | /**
|
22766 | * Decodes a JavaSettings message from the specified reader or buffer, length delimited.
|
22767 | * @function decodeDelimited
|
22768 | * @memberof google.api.JavaSettings
|
22769 | * @static
|
22770 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
22771 | * @returns {google.api.JavaSettings} JavaSettings
|
22772 | * @throws {Error} If the payload is not a reader or valid buffer
|
22773 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
22774 | */
|
22775 | JavaSettings.decodeDelimited = function decodeDelimited(reader) {
|
22776 | if (!(reader instanceof $Reader))
|
22777 | reader = new $Reader(reader);
|
22778 | return this.decode(reader, reader.uint32());
|
22779 | };
|
22780 |
|
22781 | /**
|
22782 | * Verifies a JavaSettings message.
|
22783 | * @function verify
|
22784 | * @memberof google.api.JavaSettings
|
22785 | * @static
|
22786 | * @param {Object.<string,*>} message Plain object to verify
|
22787 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
22788 | */
|
22789 | JavaSettings.verify = function verify(message) {
|
22790 | if (typeof message !== "object" || message === null)
|
22791 | return "object expected";
|
22792 | if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage"))
|
22793 | if (!$util.isString(message.libraryPackage))
|
22794 | return "libraryPackage: string expected";
|
22795 | if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) {
|
22796 | if (!$util.isObject(message.serviceClassNames))
|
22797 | return "serviceClassNames: object expected";
|
22798 | var key = Object.keys(message.serviceClassNames);
|
22799 | for (var i = 0; i < key.length; ++i)
|
22800 | if (!$util.isString(message.serviceClassNames[key[i]]))
|
22801 | return "serviceClassNames: string{k:string} expected";
|
22802 | }
|
22803 | if (message.common != null && message.hasOwnProperty("common")) {
|
22804 | var error = $root.google.api.CommonLanguageSettings.verify(message.common);
|
22805 | if (error)
|
22806 | return "common." + error;
|
22807 | }
|
22808 | return null;
|
22809 | };
|
22810 |
|
22811 | /**
|
22812 | * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types.
|
22813 | * @function fromObject
|
22814 | * @memberof google.api.JavaSettings
|
22815 | * @static
|
22816 | * @param {Object.<string,*>} object Plain object
|
22817 | * @returns {google.api.JavaSettings} JavaSettings
|
22818 | */
|
22819 | JavaSettings.fromObject = function fromObject(object) {
|
22820 | if (object instanceof $root.google.api.JavaSettings)
|
22821 | return object;
|
22822 | var message = new $root.google.api.JavaSettings();
|
22823 | if (object.libraryPackage != null)
|
22824 | message.libraryPackage = String(object.libraryPackage);
|
22825 | if (object.serviceClassNames) {
|
22826 | if (typeof object.serviceClassNames !== "object")
|
22827 | throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected");
|
22828 | message.serviceClassNames = {};
|
22829 | for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i)
|
22830 | message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]);
|
22831 | }
|
22832 | if (object.common != null) {
|
22833 | if (typeof object.common !== "object")
|
22834 | throw TypeError(".google.api.JavaSettings.common: object expected");
|
22835 | message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common);
|
22836 | }
|
22837 | return message;
|
22838 | };
|
22839 |
|
22840 | /**
|
22841 | * Creates a plain object from a JavaSettings message. Also converts values to other types if specified.
|
22842 | * @function toObject
|
22843 | * @memberof google.api.JavaSettings
|
22844 | * @static
|
22845 | * @param {google.api.JavaSettings} message JavaSettings
|
22846 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
22847 | * @returns {Object.<string,*>} Plain object
|
22848 | */
|
22849 | JavaSettings.toObject = function toObject(message, options) {
|
22850 | if (!options)
|
22851 | options = {};
|
22852 | var object = {};
|
22853 | if (options.objects || options.defaults)
|
22854 | object.serviceClassNames = {};
|
22855 | if (options.defaults) {
|
22856 | object.libraryPackage = "";
|
22857 | object.common = null;
|
22858 | }
|
22859 | if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage"))
|
22860 | object.libraryPackage = message.libraryPackage;
|
22861 | var keys2;
|
22862 | if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) {
|
22863 | object.serviceClassNames = {};
|
22864 | for (var j = 0; j < keys2.length; ++j)
|
22865 | object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]];
|
22866 | }
|
22867 | if (message.common != null && message.hasOwnProperty("common"))
|
22868 | object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options);
|
22869 | return object;
|
22870 | };
|
22871 |
|
22872 | /**
|
22873 | * Converts this JavaSettings to JSON.
|
22874 | * @function toJSON
|
22875 | * @memberof google.api.JavaSettings
|
22876 | * @instance
|
22877 | * @returns {Object.<string,*>} JSON object
|
22878 | */
|
22879 | JavaSettings.prototype.toJSON = function toJSON() {
|
22880 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
22881 | };
|
22882 |
|
22883 | /**
|
22884 | * Gets the default type url for JavaSettings
|
22885 | * @function getTypeUrl
|
22886 | * @memberof google.api.JavaSettings
|
22887 | * @static
|
22888 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
22889 | * @returns {string} The default type url
|
22890 | */
|
22891 | JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
22892 | if (typeUrlPrefix === undefined) {
|
22893 | typeUrlPrefix = "type.googleapis.com";
|
22894 | }
|
22895 | return typeUrlPrefix + "/google.api.JavaSettings";
|
22896 | };
|
22897 |
|
22898 | return JavaSettings;
|
22899 | })();
|
22900 |
|
22901 | api.CppSettings = (function() {
|
22902 |
|
22903 | /**
|
22904 | * Properties of a CppSettings.
|
22905 | * @memberof google.api
|
22906 | * @interface ICppSettings
|
22907 | * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common
|
22908 | */
|
22909 |
|
22910 | /**
|
22911 | * Constructs a new CppSettings.
|
22912 | * @memberof google.api
|
22913 | * @classdesc Represents a CppSettings.
|
22914 | * @implements ICppSettings
|
22915 | * @constructor
|
22916 | * @param {google.api.ICppSettings=} [properties] Properties to set
|
22917 | */
|
22918 | function CppSettings(properties) {
|
22919 | if (properties)
|
22920 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
22921 | if (properties[keys[i]] != null)
|
22922 | this[keys[i]] = properties[keys[i]];
|
22923 | }
|
22924 |
|
22925 | /**
|
22926 | * CppSettings common.
|
22927 | * @member {google.api.ICommonLanguageSettings|null|undefined} common
|
22928 | * @memberof google.api.CppSettings
|
22929 | * @instance
|
22930 | */
|
22931 | CppSettings.prototype.common = null;
|
22932 |
|
22933 | /**
|
22934 | * Creates a new CppSettings instance using the specified properties.
|
22935 | * @function create
|
22936 | * @memberof google.api.CppSettings
|
22937 | * @static
|
22938 | * @param {google.api.ICppSettings=} [properties] Properties to set
|
22939 | * @returns {google.api.CppSettings} CppSettings instance
|
22940 | */
|
22941 | CppSettings.create = function create(properties) {
|
22942 | return new CppSettings(properties);
|
22943 | };
|
22944 |
|
22945 | /**
|
22946 | * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages.
|
22947 | * @function encode
|
22948 | * @memberof google.api.CppSettings
|
22949 | * @static
|
22950 | * @param {google.api.ICppSettings} message CppSettings message or plain object to encode
|
22951 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
22952 | * @returns {$protobuf.Writer} Writer
|
22953 | */
|
22954 | CppSettings.encode = function encode(message, writer) {
|
22955 | if (!writer)
|
22956 | writer = $Writer.create();
|
22957 | if (message.common != null && Object.hasOwnProperty.call(message, "common"))
|
22958 | $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
22959 | return writer;
|
22960 | };
|
22961 |
|
22962 | /**
|
22963 | * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages.
|
22964 | * @function encodeDelimited
|
22965 | * @memberof google.api.CppSettings
|
22966 | * @static
|
22967 | * @param {google.api.ICppSettings} message CppSettings message or plain object to encode
|
22968 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
22969 | * @returns {$protobuf.Writer} Writer
|
22970 | */
|
22971 | CppSettings.encodeDelimited = function encodeDelimited(message, writer) {
|
22972 | return this.encode(message, writer).ldelim();
|
22973 | };
|
22974 |
|
22975 | /**
|
22976 | * Decodes a CppSettings message from the specified reader or buffer.
|
22977 | * @function decode
|
22978 | * @memberof google.api.CppSettings
|
22979 | * @static
|
22980 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
22981 | * @param {number} [length] Message length if known beforehand
|
22982 | * @returns {google.api.CppSettings} CppSettings
|
22983 | * @throws {Error} If the payload is not a reader or valid buffer
|
22984 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
22985 | */
|
22986 | CppSettings.decode = function decode(reader, length) {
|
22987 | if (!(reader instanceof $Reader))
|
22988 | reader = $Reader.create(reader);
|
22989 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings();
|
22990 | while (reader.pos < end) {
|
22991 | var tag = reader.uint32();
|
22992 | switch (tag >>> 3) {
|
22993 | case 1: {
|
22994 | message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32());
|
22995 | break;
|
22996 | }
|
22997 | default:
|
22998 | reader.skipType(tag & 7);
|
22999 | break;
|
23000 | }
|
23001 | }
|
23002 | return message;
|
23003 | };
|
23004 |
|
23005 | /**
|
23006 | * Decodes a CppSettings message from the specified reader or buffer, length delimited.
|
23007 | * @function decodeDelimited
|
23008 | * @memberof google.api.CppSettings
|
23009 | * @static
|
23010 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
23011 | * @returns {google.api.CppSettings} CppSettings
|
23012 | * @throws {Error} If the payload is not a reader or valid buffer
|
23013 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
23014 | */
|
23015 | CppSettings.decodeDelimited = function decodeDelimited(reader) {
|
23016 | if (!(reader instanceof $Reader))
|
23017 | reader = new $Reader(reader);
|
23018 | return this.decode(reader, reader.uint32());
|
23019 | };
|
23020 |
|
23021 | /**
|
23022 | * Verifies a CppSettings message.
|
23023 | * @function verify
|
23024 | * @memberof google.api.CppSettings
|
23025 | * @static
|
23026 | * @param {Object.<string,*>} message Plain object to verify
|
23027 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
23028 | */
|
23029 | CppSettings.verify = function verify(message) {
|
23030 | if (typeof message !== "object" || message === null)
|
23031 | return "object expected";
|
23032 | if (message.common != null && message.hasOwnProperty("common")) {
|
23033 | var error = $root.google.api.CommonLanguageSettings.verify(message.common);
|
23034 | if (error)
|
23035 | return "common." + error;
|
23036 | }
|
23037 | return null;
|
23038 | };
|
23039 |
|
23040 | /**
|
23041 | * Creates a CppSettings message from a plain object. Also converts values to their respective internal types.
|
23042 | * @function fromObject
|
23043 | * @memberof google.api.CppSettings
|
23044 | * @static
|
23045 | * @param {Object.<string,*>} object Plain object
|
23046 | * @returns {google.api.CppSettings} CppSettings
|
23047 | */
|
23048 | CppSettings.fromObject = function fromObject(object) {
|
23049 | if (object instanceof $root.google.api.CppSettings)
|
23050 | return object;
|
23051 | var message = new $root.google.api.CppSettings();
|
23052 | if (object.common != null) {
|
23053 | if (typeof object.common !== "object")
|
23054 | throw TypeError(".google.api.CppSettings.common: object expected");
|
23055 | message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common);
|
23056 | }
|
23057 | return message;
|
23058 | };
|
23059 |
|
23060 | /**
|
23061 | * Creates a plain object from a CppSettings message. Also converts values to other types if specified.
|
23062 | * @function toObject
|
23063 | * @memberof google.api.CppSettings
|
23064 | * @static
|
23065 | * @param {google.api.CppSettings} message CppSettings
|
23066 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
23067 | * @returns {Object.<string,*>} Plain object
|
23068 | */
|
23069 | CppSettings.toObject = function toObject(message, options) {
|
23070 | if (!options)
|
23071 | options = {};
|
23072 | var object = {};
|
23073 | if (options.defaults)
|
23074 | object.common = null;
|
23075 | if (message.common != null && message.hasOwnProperty("common"))
|
23076 | object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options);
|
23077 | return object;
|
23078 | };
|
23079 |
|
23080 | /**
|
23081 | * Converts this CppSettings to JSON.
|
23082 | * @function toJSON
|
23083 | * @memberof google.api.CppSettings
|
23084 | * @instance
|
23085 | * @returns {Object.<string,*>} JSON object
|
23086 | */
|
23087 | CppSettings.prototype.toJSON = function toJSON() {
|
23088 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
23089 | };
|
23090 |
|
23091 | /**
|
23092 | * Gets the default type url for CppSettings
|
23093 | * @function getTypeUrl
|
23094 | * @memberof google.api.CppSettings
|
23095 | * @static
|
23096 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
23097 | * @returns {string} The default type url
|
23098 | */
|
23099 | CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
23100 | if (typeUrlPrefix === undefined) {
|
23101 | typeUrlPrefix = "type.googleapis.com";
|
23102 | }
|
23103 | return typeUrlPrefix + "/google.api.CppSettings";
|
23104 | };
|
23105 |
|
23106 | return CppSettings;
|
23107 | })();
|
23108 |
|
23109 | api.PhpSettings = (function() {
|
23110 |
|
23111 | /**
|
23112 | * Properties of a PhpSettings.
|
23113 | * @memberof google.api
|
23114 | * @interface IPhpSettings
|
23115 | * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common
|
23116 | */
|
23117 |
|
23118 | /**
|
23119 | * Constructs a new PhpSettings.
|
23120 | * @memberof google.api
|
23121 | * @classdesc Represents a PhpSettings.
|
23122 | * @implements IPhpSettings
|
23123 | * @constructor
|
23124 | * @param {google.api.IPhpSettings=} [properties] Properties to set
|
23125 | */
|
23126 | function PhpSettings(properties) {
|
23127 | if (properties)
|
23128 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
23129 | if (properties[keys[i]] != null)
|
23130 | this[keys[i]] = properties[keys[i]];
|
23131 | }
|
23132 |
|
23133 | /**
|
23134 | * PhpSettings common.
|
23135 | * @member {google.api.ICommonLanguageSettings|null|undefined} common
|
23136 | * @memberof google.api.PhpSettings
|
23137 | * @instance
|
23138 | */
|
23139 | PhpSettings.prototype.common = null;
|
23140 |
|
23141 | /**
|
23142 | * Creates a new PhpSettings instance using the specified properties.
|
23143 | * @function create
|
23144 | * @memberof google.api.PhpSettings
|
23145 | * @static
|
23146 | * @param {google.api.IPhpSettings=} [properties] Properties to set
|
23147 | * @returns {google.api.PhpSettings} PhpSettings instance
|
23148 | */
|
23149 | PhpSettings.create = function create(properties) {
|
23150 | return new PhpSettings(properties);
|
23151 | };
|
23152 |
|
23153 | /**
|
23154 | * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages.
|
23155 | * @function encode
|
23156 | * @memberof google.api.PhpSettings
|
23157 | * @static
|
23158 | * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode
|
23159 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
23160 | * @returns {$protobuf.Writer} Writer
|
23161 | */
|
23162 | PhpSettings.encode = function encode(message, writer) {
|
23163 | if (!writer)
|
23164 | writer = $Writer.create();
|
23165 | if (message.common != null && Object.hasOwnProperty.call(message, "common"))
|
23166 | $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
23167 | return writer;
|
23168 | };
|
23169 |
|
23170 | /**
|
23171 | * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages.
|
23172 | * @function encodeDelimited
|
23173 | * @memberof google.api.PhpSettings
|
23174 | * @static
|
23175 | * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode
|
23176 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
23177 | * @returns {$protobuf.Writer} Writer
|
23178 | */
|
23179 | PhpSettings.encodeDelimited = function encodeDelimited(message, writer) {
|
23180 | return this.encode(message, writer).ldelim();
|
23181 | };
|
23182 |
|
23183 | /**
|
23184 | * Decodes a PhpSettings message from the specified reader or buffer.
|
23185 | * @function decode
|
23186 | * @memberof google.api.PhpSettings
|
23187 | * @static
|
23188 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
23189 | * @param {number} [length] Message length if known beforehand
|
23190 | * @returns {google.api.PhpSettings} PhpSettings
|
23191 | * @throws {Error} If the payload is not a reader or valid buffer
|
23192 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
23193 | */
|
23194 | PhpSettings.decode = function decode(reader, length) {
|
23195 | if (!(reader instanceof $Reader))
|
23196 | reader = $Reader.create(reader);
|
23197 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings();
|
23198 | while (reader.pos < end) {
|
23199 | var tag = reader.uint32();
|
23200 | switch (tag >>> 3) {
|
23201 | case 1: {
|
23202 | message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32());
|
23203 | break;
|
23204 | }
|
23205 | default:
|
23206 | reader.skipType(tag & 7);
|
23207 | break;
|
23208 | }
|
23209 | }
|
23210 | return message;
|
23211 | };
|
23212 |
|
23213 | /**
|
23214 | * Decodes a PhpSettings message from the specified reader or buffer, length delimited.
|
23215 | * @function decodeDelimited
|
23216 | * @memberof google.api.PhpSettings
|
23217 | * @static
|
23218 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
23219 | * @returns {google.api.PhpSettings} PhpSettings
|
23220 | * @throws {Error} If the payload is not a reader or valid buffer
|
23221 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
23222 | */
|
23223 | PhpSettings.decodeDelimited = function decodeDelimited(reader) {
|
23224 | if (!(reader instanceof $Reader))
|
23225 | reader = new $Reader(reader);
|
23226 | return this.decode(reader, reader.uint32());
|
23227 | };
|
23228 |
|
23229 | /**
|
23230 | * Verifies a PhpSettings message.
|
23231 | * @function verify
|
23232 | * @memberof google.api.PhpSettings
|
23233 | * @static
|
23234 | * @param {Object.<string,*>} message Plain object to verify
|
23235 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
23236 | */
|
23237 | PhpSettings.verify = function verify(message) {
|
23238 | if (typeof message !== "object" || message === null)
|
23239 | return "object expected";
|
23240 | if (message.common != null && message.hasOwnProperty("common")) {
|
23241 | var error = $root.google.api.CommonLanguageSettings.verify(message.common);
|
23242 | if (error)
|
23243 | return "common." + error;
|
23244 | }
|
23245 | return null;
|
23246 | };
|
23247 |
|
23248 | /**
|
23249 | * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types.
|
23250 | * @function fromObject
|
23251 | * @memberof google.api.PhpSettings
|
23252 | * @static
|
23253 | * @param {Object.<string,*>} object Plain object
|
23254 | * @returns {google.api.PhpSettings} PhpSettings
|
23255 | */
|
23256 | PhpSettings.fromObject = function fromObject(object) {
|
23257 | if (object instanceof $root.google.api.PhpSettings)
|
23258 | return object;
|
23259 | var message = new $root.google.api.PhpSettings();
|
23260 | if (object.common != null) {
|
23261 | if (typeof object.common !== "object")
|
23262 | throw TypeError(".google.api.PhpSettings.common: object expected");
|
23263 | message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common);
|
23264 | }
|
23265 | return message;
|
23266 | };
|
23267 |
|
23268 | /**
|
23269 | * Creates a plain object from a PhpSettings message. Also converts values to other types if specified.
|
23270 | * @function toObject
|
23271 | * @memberof google.api.PhpSettings
|
23272 | * @static
|
23273 | * @param {google.api.PhpSettings} message PhpSettings
|
23274 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
23275 | * @returns {Object.<string,*>} Plain object
|
23276 | */
|
23277 | PhpSettings.toObject = function toObject(message, options) {
|
23278 | if (!options)
|
23279 | options = {};
|
23280 | var object = {};
|
23281 | if (options.defaults)
|
23282 | object.common = null;
|
23283 | if (message.common != null && message.hasOwnProperty("common"))
|
23284 | object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options);
|
23285 | return object;
|
23286 | };
|
23287 |
|
23288 | /**
|
23289 | * Converts this PhpSettings to JSON.
|
23290 | * @function toJSON
|
23291 | * @memberof google.api.PhpSettings
|
23292 | * @instance
|
23293 | * @returns {Object.<string,*>} JSON object
|
23294 | */
|
23295 | PhpSettings.prototype.toJSON = function toJSON() {
|
23296 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
23297 | };
|
23298 |
|
23299 | /**
|
23300 | * Gets the default type url for PhpSettings
|
23301 | * @function getTypeUrl
|
23302 | * @memberof google.api.PhpSettings
|
23303 | * @static
|
23304 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
23305 | * @returns {string} The default type url
|
23306 | */
|
23307 | PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
23308 | if (typeUrlPrefix === undefined) {
|
23309 | typeUrlPrefix = "type.googleapis.com";
|
23310 | }
|
23311 | return typeUrlPrefix + "/google.api.PhpSettings";
|
23312 | };
|
23313 |
|
23314 | return PhpSettings;
|
23315 | })();
|
23316 |
|
23317 | api.PythonSettings = (function() {
|
23318 |
|
23319 | /**
|
23320 | * Properties of a PythonSettings.
|
23321 | * @memberof google.api
|
23322 | * @interface IPythonSettings
|
23323 | * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common
|
23324 | */
|
23325 |
|
23326 | /**
|
23327 | * Constructs a new PythonSettings.
|
23328 | * @memberof google.api
|
23329 | * @classdesc Represents a PythonSettings.
|
23330 | * @implements IPythonSettings
|
23331 | * @constructor
|
23332 | * @param {google.api.IPythonSettings=} [properties] Properties to set
|
23333 | */
|
23334 | function PythonSettings(properties) {
|
23335 | if (properties)
|
23336 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
23337 | if (properties[keys[i]] != null)
|
23338 | this[keys[i]] = properties[keys[i]];
|
23339 | }
|
23340 |
|
23341 | /**
|
23342 | * PythonSettings common.
|
23343 | * @member {google.api.ICommonLanguageSettings|null|undefined} common
|
23344 | * @memberof google.api.PythonSettings
|
23345 | * @instance
|
23346 | */
|
23347 | PythonSettings.prototype.common = null;
|
23348 |
|
23349 | /**
|
23350 | * Creates a new PythonSettings instance using the specified properties.
|
23351 | * @function create
|
23352 | * @memberof google.api.PythonSettings
|
23353 | * @static
|
23354 | * @param {google.api.IPythonSettings=} [properties] Properties to set
|
23355 | * @returns {google.api.PythonSettings} PythonSettings instance
|
23356 | */
|
23357 | PythonSettings.create = function create(properties) {
|
23358 | return new PythonSettings(properties);
|
23359 | };
|
23360 |
|
23361 | /**
|
23362 | * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages.
|
23363 | * @function encode
|
23364 | * @memberof google.api.PythonSettings
|
23365 | * @static
|
23366 | * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode
|
23367 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
23368 | * @returns {$protobuf.Writer} Writer
|
23369 | */
|
23370 | PythonSettings.encode = function encode(message, writer) {
|
23371 | if (!writer)
|
23372 | writer = $Writer.create();
|
23373 | if (message.common != null && Object.hasOwnProperty.call(message, "common"))
|
23374 | $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
23375 | return writer;
|
23376 | };
|
23377 |
|
23378 | /**
|
23379 | * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages.
|
23380 | * @function encodeDelimited
|
23381 | * @memberof google.api.PythonSettings
|
23382 | * @static
|
23383 | * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode
|
23384 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
23385 | * @returns {$protobuf.Writer} Writer
|
23386 | */
|
23387 | PythonSettings.encodeDelimited = function encodeDelimited(message, writer) {
|
23388 | return this.encode(message, writer).ldelim();
|
23389 | };
|
23390 |
|
23391 | /**
|
23392 | * Decodes a PythonSettings message from the specified reader or buffer.
|
23393 | * @function decode
|
23394 | * @memberof google.api.PythonSettings
|
23395 | * @static
|
23396 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
23397 | * @param {number} [length] Message length if known beforehand
|
23398 | * @returns {google.api.PythonSettings} PythonSettings
|
23399 | * @throws {Error} If the payload is not a reader or valid buffer
|
23400 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
23401 | */
|
23402 | PythonSettings.decode = function decode(reader, length) {
|
23403 | if (!(reader instanceof $Reader))
|
23404 | reader = $Reader.create(reader);
|
23405 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings();
|
23406 | while (reader.pos < end) {
|
23407 | var tag = reader.uint32();
|
23408 | switch (tag >>> 3) {
|
23409 | case 1: {
|
23410 | message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32());
|
23411 | break;
|
23412 | }
|
23413 | default:
|
23414 | reader.skipType(tag & 7);
|
23415 | break;
|
23416 | }
|
23417 | }
|
23418 | return message;
|
23419 | };
|
23420 |
|
23421 | /**
|
23422 | * Decodes a PythonSettings message from the specified reader or buffer, length delimited.
|
23423 | * @function decodeDelimited
|
23424 | * @memberof google.api.PythonSettings
|
23425 | * @static
|
23426 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
23427 | * @returns {google.api.PythonSettings} PythonSettings
|
23428 | * @throws {Error} If the payload is not a reader or valid buffer
|
23429 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
23430 | */
|
23431 | PythonSettings.decodeDelimited = function decodeDelimited(reader) {
|
23432 | if (!(reader instanceof $Reader))
|
23433 | reader = new $Reader(reader);
|
23434 | return this.decode(reader, reader.uint32());
|
23435 | };
|
23436 |
|
23437 | /**
|
23438 | * Verifies a PythonSettings message.
|
23439 | * @function verify
|
23440 | * @memberof google.api.PythonSettings
|
23441 | * @static
|
23442 | * @param {Object.<string,*>} message Plain object to verify
|
23443 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
23444 | */
|
23445 | PythonSettings.verify = function verify(message) {
|
23446 | if (typeof message !== "object" || message === null)
|
23447 | return "object expected";
|
23448 | if (message.common != null && message.hasOwnProperty("common")) {
|
23449 | var error = $root.google.api.CommonLanguageSettings.verify(message.common);
|
23450 | if (error)
|
23451 | return "common." + error;
|
23452 | }
|
23453 | return null;
|
23454 | };
|
23455 |
|
23456 | /**
|
23457 | * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types.
|
23458 | * @function fromObject
|
23459 | * @memberof google.api.PythonSettings
|
23460 | * @static
|
23461 | * @param {Object.<string,*>} object Plain object
|
23462 | * @returns {google.api.PythonSettings} PythonSettings
|
23463 | */
|
23464 | PythonSettings.fromObject = function fromObject(object) {
|
23465 | if (object instanceof $root.google.api.PythonSettings)
|
23466 | return object;
|
23467 | var message = new $root.google.api.PythonSettings();
|
23468 | if (object.common != null) {
|
23469 | if (typeof object.common !== "object")
|
23470 | throw TypeError(".google.api.PythonSettings.common: object expected");
|
23471 | message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common);
|
23472 | }
|
23473 | return message;
|
23474 | };
|
23475 |
|
23476 | /**
|
23477 | * Creates a plain object from a PythonSettings message. Also converts values to other types if specified.
|
23478 | * @function toObject
|
23479 | * @memberof google.api.PythonSettings
|
23480 | * @static
|
23481 | * @param {google.api.PythonSettings} message PythonSettings
|
23482 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
23483 | * @returns {Object.<string,*>} Plain object
|
23484 | */
|
23485 | PythonSettings.toObject = function toObject(message, options) {
|
23486 | if (!options)
|
23487 | options = {};
|
23488 | var object = {};
|
23489 | if (options.defaults)
|
23490 | object.common = null;
|
23491 | if (message.common != null && message.hasOwnProperty("common"))
|
23492 | object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options);
|
23493 | return object;
|
23494 | };
|
23495 |
|
23496 | /**
|
23497 | * Converts this PythonSettings to JSON.
|
23498 | * @function toJSON
|
23499 | * @memberof google.api.PythonSettings
|
23500 | * @instance
|
23501 | * @returns {Object.<string,*>} JSON object
|
23502 | */
|
23503 | PythonSettings.prototype.toJSON = function toJSON() {
|
23504 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
23505 | };
|
23506 |
|
23507 | /**
|
23508 | * Gets the default type url for PythonSettings
|
23509 | * @function getTypeUrl
|
23510 | * @memberof google.api.PythonSettings
|
23511 | * @static
|
23512 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
23513 | * @returns {string} The default type url
|
23514 | */
|
23515 | PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
23516 | if (typeUrlPrefix === undefined) {
|
23517 | typeUrlPrefix = "type.googleapis.com";
|
23518 | }
|
23519 | return typeUrlPrefix + "/google.api.PythonSettings";
|
23520 | };
|
23521 |
|
23522 | return PythonSettings;
|
23523 | })();
|
23524 |
|
23525 | api.NodeSettings = (function() {
|
23526 |
|
23527 | /**
|
23528 | * Properties of a NodeSettings.
|
23529 | * @memberof google.api
|
23530 | * @interface INodeSettings
|
23531 | * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common
|
23532 | */
|
23533 |
|
23534 | /**
|
23535 | * Constructs a new NodeSettings.
|
23536 | * @memberof google.api
|
23537 | * @classdesc Represents a NodeSettings.
|
23538 | * @implements INodeSettings
|
23539 | * @constructor
|
23540 | * @param {google.api.INodeSettings=} [properties] Properties to set
|
23541 | */
|
23542 | function NodeSettings(properties) {
|
23543 | if (properties)
|
23544 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
23545 | if (properties[keys[i]] != null)
|
23546 | this[keys[i]] = properties[keys[i]];
|
23547 | }
|
23548 |
|
23549 | /**
|
23550 | * NodeSettings common.
|
23551 | * @member {google.api.ICommonLanguageSettings|null|undefined} common
|
23552 | * @memberof google.api.NodeSettings
|
23553 | * @instance
|
23554 | */
|
23555 | NodeSettings.prototype.common = null;
|
23556 |
|
23557 | /**
|
23558 | * Creates a new NodeSettings instance using the specified properties.
|
23559 | * @function create
|
23560 | * @memberof google.api.NodeSettings
|
23561 | * @static
|
23562 | * @param {google.api.INodeSettings=} [properties] Properties to set
|
23563 | * @returns {google.api.NodeSettings} NodeSettings instance
|
23564 | */
|
23565 | NodeSettings.create = function create(properties) {
|
23566 | return new NodeSettings(properties);
|
23567 | };
|
23568 |
|
23569 | /**
|
23570 | * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages.
|
23571 | * @function encode
|
23572 | * @memberof google.api.NodeSettings
|
23573 | * @static
|
23574 | * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode
|
23575 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
23576 | * @returns {$protobuf.Writer} Writer
|
23577 | */
|
23578 | NodeSettings.encode = function encode(message, writer) {
|
23579 | if (!writer)
|
23580 | writer = $Writer.create();
|
23581 | if (message.common != null && Object.hasOwnProperty.call(message, "common"))
|
23582 | $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
23583 | return writer;
|
23584 | };
|
23585 |
|
23586 | /**
|
23587 | * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages.
|
23588 | * @function encodeDelimited
|
23589 | * @memberof google.api.NodeSettings
|
23590 | * @static
|
23591 | * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode
|
23592 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
23593 | * @returns {$protobuf.Writer} Writer
|
23594 | */
|
23595 | NodeSettings.encodeDelimited = function encodeDelimited(message, writer) {
|
23596 | return this.encode(message, writer).ldelim();
|
23597 | };
|
23598 |
|
23599 | /**
|
23600 | * Decodes a NodeSettings message from the specified reader or buffer.
|
23601 | * @function decode
|
23602 | * @memberof google.api.NodeSettings
|
23603 | * @static
|
23604 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
23605 | * @param {number} [length] Message length if known beforehand
|
23606 | * @returns {google.api.NodeSettings} NodeSettings
|
23607 | * @throws {Error} If the payload is not a reader or valid buffer
|
23608 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
23609 | */
|
23610 | NodeSettings.decode = function decode(reader, length) {
|
23611 | if (!(reader instanceof $Reader))
|
23612 | reader = $Reader.create(reader);
|
23613 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings();
|
23614 | while (reader.pos < end) {
|
23615 | var tag = reader.uint32();
|
23616 | switch (tag >>> 3) {
|
23617 | case 1: {
|
23618 | message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32());
|
23619 | break;
|
23620 | }
|
23621 | default:
|
23622 | reader.skipType(tag & 7);
|
23623 | break;
|
23624 | }
|
23625 | }
|
23626 | return message;
|
23627 | };
|
23628 |
|
23629 | /**
|
23630 | * Decodes a NodeSettings message from the specified reader or buffer, length delimited.
|
23631 | * @function decodeDelimited
|
23632 | * @memberof google.api.NodeSettings
|
23633 | * @static
|
23634 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
23635 | * @returns {google.api.NodeSettings} NodeSettings
|
23636 | * @throws {Error} If the payload is not a reader or valid buffer
|
23637 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
23638 | */
|
23639 | NodeSettings.decodeDelimited = function decodeDelimited(reader) {
|
23640 | if (!(reader instanceof $Reader))
|
23641 | reader = new $Reader(reader);
|
23642 | return this.decode(reader, reader.uint32());
|
23643 | };
|
23644 |
|
23645 | /**
|
23646 | * Verifies a NodeSettings message.
|
23647 | * @function verify
|
23648 | * @memberof google.api.NodeSettings
|
23649 | * @static
|
23650 | * @param {Object.<string,*>} message Plain object to verify
|
23651 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
23652 | */
|
23653 | NodeSettings.verify = function verify(message) {
|
23654 | if (typeof message !== "object" || message === null)
|
23655 | return "object expected";
|
23656 | if (message.common != null && message.hasOwnProperty("common")) {
|
23657 | var error = $root.google.api.CommonLanguageSettings.verify(message.common);
|
23658 | if (error)
|
23659 | return "common." + error;
|
23660 | }
|
23661 | return null;
|
23662 | };
|
23663 |
|
23664 | /**
|
23665 | * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types.
|
23666 | * @function fromObject
|
23667 | * @memberof google.api.NodeSettings
|
23668 | * @static
|
23669 | * @param {Object.<string,*>} object Plain object
|
23670 | * @returns {google.api.NodeSettings} NodeSettings
|
23671 | */
|
23672 | NodeSettings.fromObject = function fromObject(object) {
|
23673 | if (object instanceof $root.google.api.NodeSettings)
|
23674 | return object;
|
23675 | var message = new $root.google.api.NodeSettings();
|
23676 | if (object.common != null) {
|
23677 | if (typeof object.common !== "object")
|
23678 | throw TypeError(".google.api.NodeSettings.common: object expected");
|
23679 | message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common);
|
23680 | }
|
23681 | return message;
|
23682 | };
|
23683 |
|
23684 | /**
|
23685 | * Creates a plain object from a NodeSettings message. Also converts values to other types if specified.
|
23686 | * @function toObject
|
23687 | * @memberof google.api.NodeSettings
|
23688 | * @static
|
23689 | * @param {google.api.NodeSettings} message NodeSettings
|
23690 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
23691 | * @returns {Object.<string,*>} Plain object
|
23692 | */
|
23693 | NodeSettings.toObject = function toObject(message, options) {
|
23694 | if (!options)
|
23695 | options = {};
|
23696 | var object = {};
|
23697 | if (options.defaults)
|
23698 | object.common = null;
|
23699 | if (message.common != null && message.hasOwnProperty("common"))
|
23700 | object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options);
|
23701 | return object;
|
23702 | };
|
23703 |
|
23704 | /**
|
23705 | * Converts this NodeSettings to JSON.
|
23706 | * @function toJSON
|
23707 | * @memberof google.api.NodeSettings
|
23708 | * @instance
|
23709 | * @returns {Object.<string,*>} JSON object
|
23710 | */
|
23711 | NodeSettings.prototype.toJSON = function toJSON() {
|
23712 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
23713 | };
|
23714 |
|
23715 | /**
|
23716 | * Gets the default type url for NodeSettings
|
23717 | * @function getTypeUrl
|
23718 | * @memberof google.api.NodeSettings
|
23719 | * @static
|
23720 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
23721 | * @returns {string} The default type url
|
23722 | */
|
23723 | NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
23724 | if (typeUrlPrefix === undefined) {
|
23725 | typeUrlPrefix = "type.googleapis.com";
|
23726 | }
|
23727 | return typeUrlPrefix + "/google.api.NodeSettings";
|
23728 | };
|
23729 |
|
23730 | return NodeSettings;
|
23731 | })();
|
23732 |
|
23733 | api.DotnetSettings = (function() {
|
23734 |
|
23735 | /**
|
23736 | * Properties of a DotnetSettings.
|
23737 | * @memberof google.api
|
23738 | * @interface IDotnetSettings
|
23739 | * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common
|
23740 | * @property {Object.<string,string>|null} [renamedServices] DotnetSettings renamedServices
|
23741 | * @property {Object.<string,string>|null} [renamedResources] DotnetSettings renamedResources
|
23742 | * @property {Array.<string>|null} [ignoredResources] DotnetSettings ignoredResources
|
23743 | * @property {Array.<string>|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases
|
23744 | * @property {Array.<string>|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures
|
23745 | */
|
23746 |
|
23747 | /**
|
23748 | * Constructs a new DotnetSettings.
|
23749 | * @memberof google.api
|
23750 | * @classdesc Represents a DotnetSettings.
|
23751 | * @implements IDotnetSettings
|
23752 | * @constructor
|
23753 | * @param {google.api.IDotnetSettings=} [properties] Properties to set
|
23754 | */
|
23755 | function DotnetSettings(properties) {
|
23756 | this.renamedServices = {};
|
23757 | this.renamedResources = {};
|
23758 | this.ignoredResources = [];
|
23759 | this.forcedNamespaceAliases = [];
|
23760 | this.handwrittenSignatures = [];
|
23761 | if (properties)
|
23762 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
23763 | if (properties[keys[i]] != null)
|
23764 | this[keys[i]] = properties[keys[i]];
|
23765 | }
|
23766 |
|
23767 | /**
|
23768 | * DotnetSettings common.
|
23769 | * @member {google.api.ICommonLanguageSettings|null|undefined} common
|
23770 | * @memberof google.api.DotnetSettings
|
23771 | * @instance
|
23772 | */
|
23773 | DotnetSettings.prototype.common = null;
|
23774 |
|
23775 | /**
|
23776 | * DotnetSettings renamedServices.
|
23777 | * @member {Object.<string,string>} renamedServices
|
23778 | * @memberof google.api.DotnetSettings
|
23779 | * @instance
|
23780 | */
|
23781 | DotnetSettings.prototype.renamedServices = $util.emptyObject;
|
23782 |
|
23783 | /**
|
23784 | * DotnetSettings renamedResources.
|
23785 | * @member {Object.<string,string>} renamedResources
|
23786 | * @memberof google.api.DotnetSettings
|
23787 | * @instance
|
23788 | */
|
23789 | DotnetSettings.prototype.renamedResources = $util.emptyObject;
|
23790 |
|
23791 | /**
|
23792 | * DotnetSettings ignoredResources.
|
23793 | * @member {Array.<string>} ignoredResources
|
23794 | * @memberof google.api.DotnetSettings
|
23795 | * @instance
|
23796 | */
|
23797 | DotnetSettings.prototype.ignoredResources = $util.emptyArray;
|
23798 |
|
23799 | /**
|
23800 | * DotnetSettings forcedNamespaceAliases.
|
23801 | * @member {Array.<string>} forcedNamespaceAliases
|
23802 | * @memberof google.api.DotnetSettings
|
23803 | * @instance
|
23804 | */
|
23805 | DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray;
|
23806 |
|
23807 | /**
|
23808 | * DotnetSettings handwrittenSignatures.
|
23809 | * @member {Array.<string>} handwrittenSignatures
|
23810 | * @memberof google.api.DotnetSettings
|
23811 | * @instance
|
23812 | */
|
23813 | DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray;
|
23814 |
|
23815 | /**
|
23816 | * Creates a new DotnetSettings instance using the specified properties.
|
23817 | * @function create
|
23818 | * @memberof google.api.DotnetSettings
|
23819 | * @static
|
23820 | * @param {google.api.IDotnetSettings=} [properties] Properties to set
|
23821 | * @returns {google.api.DotnetSettings} DotnetSettings instance
|
23822 | */
|
23823 | DotnetSettings.create = function create(properties) {
|
23824 | return new DotnetSettings(properties);
|
23825 | };
|
23826 |
|
23827 | /**
|
23828 | * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages.
|
23829 | * @function encode
|
23830 | * @memberof google.api.DotnetSettings
|
23831 | * @static
|
23832 | * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode
|
23833 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
23834 | * @returns {$protobuf.Writer} Writer
|
23835 | */
|
23836 | DotnetSettings.encode = function encode(message, writer) {
|
23837 | if (!writer)
|
23838 | writer = $Writer.create();
|
23839 | if (message.common != null && Object.hasOwnProperty.call(message, "common"))
|
23840 | $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
23841 | if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices"))
|
23842 | for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i)
|
23843 | writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim();
|
23844 | if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources"))
|
23845 | for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i)
|
23846 | writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim();
|
23847 | if (message.ignoredResources != null && message.ignoredResources.length)
|
23848 | for (var i = 0; i < message.ignoredResources.length; ++i)
|
23849 | writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]);
|
23850 | if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length)
|
23851 | for (var i = 0; i < message.forcedNamespaceAliases.length; ++i)
|
23852 | writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]);
|
23853 | if (message.handwrittenSignatures != null && message.handwrittenSignatures.length)
|
23854 | for (var i = 0; i < message.handwrittenSignatures.length; ++i)
|
23855 | writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]);
|
23856 | return writer;
|
23857 | };
|
23858 |
|
23859 | /**
|
23860 | * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages.
|
23861 | * @function encodeDelimited
|
23862 | * @memberof google.api.DotnetSettings
|
23863 | * @static
|
23864 | * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode
|
23865 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
23866 | * @returns {$protobuf.Writer} Writer
|
23867 | */
|
23868 | DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) {
|
23869 | return this.encode(message, writer).ldelim();
|
23870 | };
|
23871 |
|
23872 | /**
|
23873 | * Decodes a DotnetSettings message from the specified reader or buffer.
|
23874 | * @function decode
|
23875 | * @memberof google.api.DotnetSettings
|
23876 | * @static
|
23877 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
23878 | * @param {number} [length] Message length if known beforehand
|
23879 | * @returns {google.api.DotnetSettings} DotnetSettings
|
23880 | * @throws {Error} If the payload is not a reader or valid buffer
|
23881 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
23882 | */
|
23883 | DotnetSettings.decode = function decode(reader, length) {
|
23884 | if (!(reader instanceof $Reader))
|
23885 | reader = $Reader.create(reader);
|
23886 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value;
|
23887 | while (reader.pos < end) {
|
23888 | var tag = reader.uint32();
|
23889 | switch (tag >>> 3) {
|
23890 | case 1: {
|
23891 | message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32());
|
23892 | break;
|
23893 | }
|
23894 | case 2: {
|
23895 | if (message.renamedServices === $util.emptyObject)
|
23896 | message.renamedServices = {};
|
23897 | var end2 = reader.uint32() + reader.pos;
|
23898 | key = "";
|
23899 | value = "";
|
23900 | while (reader.pos < end2) {
|
23901 | var tag2 = reader.uint32();
|
23902 | switch (tag2 >>> 3) {
|
23903 | case 1:
|
23904 | key = reader.string();
|
23905 | break;
|
23906 | case 2:
|
23907 | value = reader.string();
|
23908 | break;
|
23909 | default:
|
23910 | reader.skipType(tag2 & 7);
|
23911 | break;
|
23912 | }
|
23913 | }
|
23914 | message.renamedServices[key] = value;
|
23915 | break;
|
23916 | }
|
23917 | case 3: {
|
23918 | if (message.renamedResources === $util.emptyObject)
|
23919 | message.renamedResources = {};
|
23920 | var end2 = reader.uint32() + reader.pos;
|
23921 | key = "";
|
23922 | value = "";
|
23923 | while (reader.pos < end2) {
|
23924 | var tag2 = reader.uint32();
|
23925 | switch (tag2 >>> 3) {
|
23926 | case 1:
|
23927 | key = reader.string();
|
23928 | break;
|
23929 | case 2:
|
23930 | value = reader.string();
|
23931 | break;
|
23932 | default:
|
23933 | reader.skipType(tag2 & 7);
|
23934 | break;
|
23935 | }
|
23936 | }
|
23937 | message.renamedResources[key] = value;
|
23938 | break;
|
23939 | }
|
23940 | case 4: {
|
23941 | if (!(message.ignoredResources && message.ignoredResources.length))
|
23942 | message.ignoredResources = [];
|
23943 | message.ignoredResources.push(reader.string());
|
23944 | break;
|
23945 | }
|
23946 | case 5: {
|
23947 | if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length))
|
23948 | message.forcedNamespaceAliases = [];
|
23949 | message.forcedNamespaceAliases.push(reader.string());
|
23950 | break;
|
23951 | }
|
23952 | case 6: {
|
23953 | if (!(message.handwrittenSignatures && message.handwrittenSignatures.length))
|
23954 | message.handwrittenSignatures = [];
|
23955 | message.handwrittenSignatures.push(reader.string());
|
23956 | break;
|
23957 | }
|
23958 | default:
|
23959 | reader.skipType(tag & 7);
|
23960 | break;
|
23961 | }
|
23962 | }
|
23963 | return message;
|
23964 | };
|
23965 |
|
23966 | /**
|
23967 | * Decodes a DotnetSettings message from the specified reader or buffer, length delimited.
|
23968 | * @function decodeDelimited
|
23969 | * @memberof google.api.DotnetSettings
|
23970 | * @static
|
23971 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
23972 | * @returns {google.api.DotnetSettings} DotnetSettings
|
23973 | * @throws {Error} If the payload is not a reader or valid buffer
|
23974 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
23975 | */
|
23976 | DotnetSettings.decodeDelimited = function decodeDelimited(reader) {
|
23977 | if (!(reader instanceof $Reader))
|
23978 | reader = new $Reader(reader);
|
23979 | return this.decode(reader, reader.uint32());
|
23980 | };
|
23981 |
|
23982 | /**
|
23983 | * Verifies a DotnetSettings message.
|
23984 | * @function verify
|
23985 | * @memberof google.api.DotnetSettings
|
23986 | * @static
|
23987 | * @param {Object.<string,*>} message Plain object to verify
|
23988 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
23989 | */
|
23990 | DotnetSettings.verify = function verify(message) {
|
23991 | if (typeof message !== "object" || message === null)
|
23992 | return "object expected";
|
23993 | if (message.common != null && message.hasOwnProperty("common")) {
|
23994 | var error = $root.google.api.CommonLanguageSettings.verify(message.common);
|
23995 | if (error)
|
23996 | return "common." + error;
|
23997 | }
|
23998 | if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) {
|
23999 | if (!$util.isObject(message.renamedServices))
|
24000 | return "renamedServices: object expected";
|
24001 | var key = Object.keys(message.renamedServices);
|
24002 | for (var i = 0; i < key.length; ++i)
|
24003 | if (!$util.isString(message.renamedServices[key[i]]))
|
24004 | return "renamedServices: string{k:string} expected";
|
24005 | }
|
24006 | if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) {
|
24007 | if (!$util.isObject(message.renamedResources))
|
24008 | return "renamedResources: object expected";
|
24009 | var key = Object.keys(message.renamedResources);
|
24010 | for (var i = 0; i < key.length; ++i)
|
24011 | if (!$util.isString(message.renamedResources[key[i]]))
|
24012 | return "renamedResources: string{k:string} expected";
|
24013 | }
|
24014 | if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) {
|
24015 | if (!Array.isArray(message.ignoredResources))
|
24016 | return "ignoredResources: array expected";
|
24017 | for (var i = 0; i < message.ignoredResources.length; ++i)
|
24018 | if (!$util.isString(message.ignoredResources[i]))
|
24019 | return "ignoredResources: string[] expected";
|
24020 | }
|
24021 | if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) {
|
24022 | if (!Array.isArray(message.forcedNamespaceAliases))
|
24023 | return "forcedNamespaceAliases: array expected";
|
24024 | for (var i = 0; i < message.forcedNamespaceAliases.length; ++i)
|
24025 | if (!$util.isString(message.forcedNamespaceAliases[i]))
|
24026 | return "forcedNamespaceAliases: string[] expected";
|
24027 | }
|
24028 | if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) {
|
24029 | if (!Array.isArray(message.handwrittenSignatures))
|
24030 | return "handwrittenSignatures: array expected";
|
24031 | for (var i = 0; i < message.handwrittenSignatures.length; ++i)
|
24032 | if (!$util.isString(message.handwrittenSignatures[i]))
|
24033 | return "handwrittenSignatures: string[] expected";
|
24034 | }
|
24035 | return null;
|
24036 | };
|
24037 |
|
24038 | /**
|
24039 | * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types.
|
24040 | * @function fromObject
|
24041 | * @memberof google.api.DotnetSettings
|
24042 | * @static
|
24043 | * @param {Object.<string,*>} object Plain object
|
24044 | * @returns {google.api.DotnetSettings} DotnetSettings
|
24045 | */
|
24046 | DotnetSettings.fromObject = function fromObject(object) {
|
24047 | if (object instanceof $root.google.api.DotnetSettings)
|
24048 | return object;
|
24049 | var message = new $root.google.api.DotnetSettings();
|
24050 | if (object.common != null) {
|
24051 | if (typeof object.common !== "object")
|
24052 | throw TypeError(".google.api.DotnetSettings.common: object expected");
|
24053 | message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common);
|
24054 | }
|
24055 | if (object.renamedServices) {
|
24056 | if (typeof object.renamedServices !== "object")
|
24057 | throw TypeError(".google.api.DotnetSettings.renamedServices: object expected");
|
24058 | message.renamedServices = {};
|
24059 | for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i)
|
24060 | message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]);
|
24061 | }
|
24062 | if (object.renamedResources) {
|
24063 | if (typeof object.renamedResources !== "object")
|
24064 | throw TypeError(".google.api.DotnetSettings.renamedResources: object expected");
|
24065 | message.renamedResources = {};
|
24066 | for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i)
|
24067 | message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]);
|
24068 | }
|
24069 | if (object.ignoredResources) {
|
24070 | if (!Array.isArray(object.ignoredResources))
|
24071 | throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected");
|
24072 | message.ignoredResources = [];
|
24073 | for (var i = 0; i < object.ignoredResources.length; ++i)
|
24074 | message.ignoredResources[i] = String(object.ignoredResources[i]);
|
24075 | }
|
24076 | if (object.forcedNamespaceAliases) {
|
24077 | if (!Array.isArray(object.forcedNamespaceAliases))
|
24078 | throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected");
|
24079 | message.forcedNamespaceAliases = [];
|
24080 | for (var i = 0; i < object.forcedNamespaceAliases.length; ++i)
|
24081 | message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]);
|
24082 | }
|
24083 | if (object.handwrittenSignatures) {
|
24084 | if (!Array.isArray(object.handwrittenSignatures))
|
24085 | throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected");
|
24086 | message.handwrittenSignatures = [];
|
24087 | for (var i = 0; i < object.handwrittenSignatures.length; ++i)
|
24088 | message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]);
|
24089 | }
|
24090 | return message;
|
24091 | };
|
24092 |
|
24093 | /**
|
24094 | * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified.
|
24095 | * @function toObject
|
24096 | * @memberof google.api.DotnetSettings
|
24097 | * @static
|
24098 | * @param {google.api.DotnetSettings} message DotnetSettings
|
24099 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
24100 | * @returns {Object.<string,*>} Plain object
|
24101 | */
|
24102 | DotnetSettings.toObject = function toObject(message, options) {
|
24103 | if (!options)
|
24104 | options = {};
|
24105 | var object = {};
|
24106 | if (options.arrays || options.defaults) {
|
24107 | object.ignoredResources = [];
|
24108 | object.forcedNamespaceAliases = [];
|
24109 | object.handwrittenSignatures = [];
|
24110 | }
|
24111 | if (options.objects || options.defaults) {
|
24112 | object.renamedServices = {};
|
24113 | object.renamedResources = {};
|
24114 | }
|
24115 | if (options.defaults)
|
24116 | object.common = null;
|
24117 | if (message.common != null && message.hasOwnProperty("common"))
|
24118 | object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options);
|
24119 | var keys2;
|
24120 | if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) {
|
24121 | object.renamedServices = {};
|
24122 | for (var j = 0; j < keys2.length; ++j)
|
24123 | object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]];
|
24124 | }
|
24125 | if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) {
|
24126 | object.renamedResources = {};
|
24127 | for (var j = 0; j < keys2.length; ++j)
|
24128 | object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]];
|
24129 | }
|
24130 | if (message.ignoredResources && message.ignoredResources.length) {
|
24131 | object.ignoredResources = [];
|
24132 | for (var j = 0; j < message.ignoredResources.length; ++j)
|
24133 | object.ignoredResources[j] = message.ignoredResources[j];
|
24134 | }
|
24135 | if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) {
|
24136 | object.forcedNamespaceAliases = [];
|
24137 | for (var j = 0; j < message.forcedNamespaceAliases.length; ++j)
|
24138 | object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j];
|
24139 | }
|
24140 | if (message.handwrittenSignatures && message.handwrittenSignatures.length) {
|
24141 | object.handwrittenSignatures = [];
|
24142 | for (var j = 0; j < message.handwrittenSignatures.length; ++j)
|
24143 | object.handwrittenSignatures[j] = message.handwrittenSignatures[j];
|
24144 | }
|
24145 | return object;
|
24146 | };
|
24147 |
|
24148 | /**
|
24149 | * Converts this DotnetSettings to JSON.
|
24150 | * @function toJSON
|
24151 | * @memberof google.api.DotnetSettings
|
24152 | * @instance
|
24153 | * @returns {Object.<string,*>} JSON object
|
24154 | */
|
24155 | DotnetSettings.prototype.toJSON = function toJSON() {
|
24156 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
24157 | };
|
24158 |
|
24159 | /**
|
24160 | * Gets the default type url for DotnetSettings
|
24161 | * @function getTypeUrl
|
24162 | * @memberof google.api.DotnetSettings
|
24163 | * @static
|
24164 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
24165 | * @returns {string} The default type url
|
24166 | */
|
24167 | DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
24168 | if (typeUrlPrefix === undefined) {
|
24169 | typeUrlPrefix = "type.googleapis.com";
|
24170 | }
|
24171 | return typeUrlPrefix + "/google.api.DotnetSettings";
|
24172 | };
|
24173 |
|
24174 | return DotnetSettings;
|
24175 | })();
|
24176 |
|
24177 | api.RubySettings = (function() {
|
24178 |
|
24179 | /**
|
24180 | * Properties of a RubySettings.
|
24181 | * @memberof google.api
|
24182 | * @interface IRubySettings
|
24183 | * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common
|
24184 | */
|
24185 |
|
24186 | /**
|
24187 | * Constructs a new RubySettings.
|
24188 | * @memberof google.api
|
24189 | * @classdesc Represents a RubySettings.
|
24190 | * @implements IRubySettings
|
24191 | * @constructor
|
24192 | * @param {google.api.IRubySettings=} [properties] Properties to set
|
24193 | */
|
24194 | function RubySettings(properties) {
|
24195 | if (properties)
|
24196 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
24197 | if (properties[keys[i]] != null)
|
24198 | this[keys[i]] = properties[keys[i]];
|
24199 | }
|
24200 |
|
24201 | /**
|
24202 | * RubySettings common.
|
24203 | * @member {google.api.ICommonLanguageSettings|null|undefined} common
|
24204 | * @memberof google.api.RubySettings
|
24205 | * @instance
|
24206 | */
|
24207 | RubySettings.prototype.common = null;
|
24208 |
|
24209 | /**
|
24210 | * Creates a new RubySettings instance using the specified properties.
|
24211 | * @function create
|
24212 | * @memberof google.api.RubySettings
|
24213 | * @static
|
24214 | * @param {google.api.IRubySettings=} [properties] Properties to set
|
24215 | * @returns {google.api.RubySettings} RubySettings instance
|
24216 | */
|
24217 | RubySettings.create = function create(properties) {
|
24218 | return new RubySettings(properties);
|
24219 | };
|
24220 |
|
24221 | /**
|
24222 | * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages.
|
24223 | * @function encode
|
24224 | * @memberof google.api.RubySettings
|
24225 | * @static
|
24226 | * @param {google.api.IRubySettings} message RubySettings message or plain object to encode
|
24227 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
24228 | * @returns {$protobuf.Writer} Writer
|
24229 | */
|
24230 | RubySettings.encode = function encode(message, writer) {
|
24231 | if (!writer)
|
24232 | writer = $Writer.create();
|
24233 | if (message.common != null && Object.hasOwnProperty.call(message, "common"))
|
24234 | $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
24235 | return writer;
|
24236 | };
|
24237 |
|
24238 | /**
|
24239 | * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages.
|
24240 | * @function encodeDelimited
|
24241 | * @memberof google.api.RubySettings
|
24242 | * @static
|
24243 | * @param {google.api.IRubySettings} message RubySettings message or plain object to encode
|
24244 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
24245 | * @returns {$protobuf.Writer} Writer
|
24246 | */
|
24247 | RubySettings.encodeDelimited = function encodeDelimited(message, writer) {
|
24248 | return this.encode(message, writer).ldelim();
|
24249 | };
|
24250 |
|
24251 | /**
|
24252 | * Decodes a RubySettings message from the specified reader or buffer.
|
24253 | * @function decode
|
24254 | * @memberof google.api.RubySettings
|
24255 | * @static
|
24256 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
24257 | * @param {number} [length] Message length if known beforehand
|
24258 | * @returns {google.api.RubySettings} RubySettings
|
24259 | * @throws {Error} If the payload is not a reader or valid buffer
|
24260 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
24261 | */
|
24262 | RubySettings.decode = function decode(reader, length) {
|
24263 | if (!(reader instanceof $Reader))
|
24264 | reader = $Reader.create(reader);
|
24265 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings();
|
24266 | while (reader.pos < end) {
|
24267 | var tag = reader.uint32();
|
24268 | switch (tag >>> 3) {
|
24269 | case 1: {
|
24270 | message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32());
|
24271 | break;
|
24272 | }
|
24273 | default:
|
24274 | reader.skipType(tag & 7);
|
24275 | break;
|
24276 | }
|
24277 | }
|
24278 | return message;
|
24279 | };
|
24280 |
|
24281 | /**
|
24282 | * Decodes a RubySettings message from the specified reader or buffer, length delimited.
|
24283 | * @function decodeDelimited
|
24284 | * @memberof google.api.RubySettings
|
24285 | * @static
|
24286 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
24287 | * @returns {google.api.RubySettings} RubySettings
|
24288 | * @throws {Error} If the payload is not a reader or valid buffer
|
24289 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
24290 | */
|
24291 | RubySettings.decodeDelimited = function decodeDelimited(reader) {
|
24292 | if (!(reader instanceof $Reader))
|
24293 | reader = new $Reader(reader);
|
24294 | return this.decode(reader, reader.uint32());
|
24295 | };
|
24296 |
|
24297 | /**
|
24298 | * Verifies a RubySettings message.
|
24299 | * @function verify
|
24300 | * @memberof google.api.RubySettings
|
24301 | * @static
|
24302 | * @param {Object.<string,*>} message Plain object to verify
|
24303 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
24304 | */
|
24305 | RubySettings.verify = function verify(message) {
|
24306 | if (typeof message !== "object" || message === null)
|
24307 | return "object expected";
|
24308 | if (message.common != null && message.hasOwnProperty("common")) {
|
24309 | var error = $root.google.api.CommonLanguageSettings.verify(message.common);
|
24310 | if (error)
|
24311 | return "common." + error;
|
24312 | }
|
24313 | return null;
|
24314 | };
|
24315 |
|
24316 | /**
|
24317 | * Creates a RubySettings message from a plain object. Also converts values to their respective internal types.
|
24318 | * @function fromObject
|
24319 | * @memberof google.api.RubySettings
|
24320 | * @static
|
24321 | * @param {Object.<string,*>} object Plain object
|
24322 | * @returns {google.api.RubySettings} RubySettings
|
24323 | */
|
24324 | RubySettings.fromObject = function fromObject(object) {
|
24325 | if (object instanceof $root.google.api.RubySettings)
|
24326 | return object;
|
24327 | var message = new $root.google.api.RubySettings();
|
24328 | if (object.common != null) {
|
24329 | if (typeof object.common !== "object")
|
24330 | throw TypeError(".google.api.RubySettings.common: object expected");
|
24331 | message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common);
|
24332 | }
|
24333 | return message;
|
24334 | };
|
24335 |
|
24336 | /**
|
24337 | * Creates a plain object from a RubySettings message. Also converts values to other types if specified.
|
24338 | * @function toObject
|
24339 | * @memberof google.api.RubySettings
|
24340 | * @static
|
24341 | * @param {google.api.RubySettings} message RubySettings
|
24342 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
24343 | * @returns {Object.<string,*>} Plain object
|
24344 | */
|
24345 | RubySettings.toObject = function toObject(message, options) {
|
24346 | if (!options)
|
24347 | options = {};
|
24348 | var object = {};
|
24349 | if (options.defaults)
|
24350 | object.common = null;
|
24351 | if (message.common != null && message.hasOwnProperty("common"))
|
24352 | object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options);
|
24353 | return object;
|
24354 | };
|
24355 |
|
24356 | /**
|
24357 | * Converts this RubySettings to JSON.
|
24358 | * @function toJSON
|
24359 | * @memberof google.api.RubySettings
|
24360 | * @instance
|
24361 | * @returns {Object.<string,*>} JSON object
|
24362 | */
|
24363 | RubySettings.prototype.toJSON = function toJSON() {
|
24364 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
24365 | };
|
24366 |
|
24367 | /**
|
24368 | * Gets the default type url for RubySettings
|
24369 | * @function getTypeUrl
|
24370 | * @memberof google.api.RubySettings
|
24371 | * @static
|
24372 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
24373 | * @returns {string} The default type url
|
24374 | */
|
24375 | RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
24376 | if (typeUrlPrefix === undefined) {
|
24377 | typeUrlPrefix = "type.googleapis.com";
|
24378 | }
|
24379 | return typeUrlPrefix + "/google.api.RubySettings";
|
24380 | };
|
24381 |
|
24382 | return RubySettings;
|
24383 | })();
|
24384 |
|
24385 | api.GoSettings = (function() {
|
24386 |
|
24387 | /**
|
24388 | * Properties of a GoSettings.
|
24389 | * @memberof google.api
|
24390 | * @interface IGoSettings
|
24391 | * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common
|
24392 | */
|
24393 |
|
24394 | /**
|
24395 | * Constructs a new GoSettings.
|
24396 | * @memberof google.api
|
24397 | * @classdesc Represents a GoSettings.
|
24398 | * @implements IGoSettings
|
24399 | * @constructor
|
24400 | * @param {google.api.IGoSettings=} [properties] Properties to set
|
24401 | */
|
24402 | function GoSettings(properties) {
|
24403 | if (properties)
|
24404 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
24405 | if (properties[keys[i]] != null)
|
24406 | this[keys[i]] = properties[keys[i]];
|
24407 | }
|
24408 |
|
24409 | /**
|
24410 | * GoSettings common.
|
24411 | * @member {google.api.ICommonLanguageSettings|null|undefined} common
|
24412 | * @memberof google.api.GoSettings
|
24413 | * @instance
|
24414 | */
|
24415 | GoSettings.prototype.common = null;
|
24416 |
|
24417 | /**
|
24418 | * Creates a new GoSettings instance using the specified properties.
|
24419 | * @function create
|
24420 | * @memberof google.api.GoSettings
|
24421 | * @static
|
24422 | * @param {google.api.IGoSettings=} [properties] Properties to set
|
24423 | * @returns {google.api.GoSettings} GoSettings instance
|
24424 | */
|
24425 | GoSettings.create = function create(properties) {
|
24426 | return new GoSettings(properties);
|
24427 | };
|
24428 |
|
24429 | /**
|
24430 | * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages.
|
24431 | * @function encode
|
24432 | * @memberof google.api.GoSettings
|
24433 | * @static
|
24434 | * @param {google.api.IGoSettings} message GoSettings message or plain object to encode
|
24435 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
24436 | * @returns {$protobuf.Writer} Writer
|
24437 | */
|
24438 | GoSettings.encode = function encode(message, writer) {
|
24439 | if (!writer)
|
24440 | writer = $Writer.create();
|
24441 | if (message.common != null && Object.hasOwnProperty.call(message, "common"))
|
24442 | $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
24443 | return writer;
|
24444 | };
|
24445 |
|
24446 | /**
|
24447 | * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages.
|
24448 | * @function encodeDelimited
|
24449 | * @memberof google.api.GoSettings
|
24450 | * @static
|
24451 | * @param {google.api.IGoSettings} message GoSettings message or plain object to encode
|
24452 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
24453 | * @returns {$protobuf.Writer} Writer
|
24454 | */
|
24455 | GoSettings.encodeDelimited = function encodeDelimited(message, writer) {
|
24456 | return this.encode(message, writer).ldelim();
|
24457 | };
|
24458 |
|
24459 | /**
|
24460 | * Decodes a GoSettings message from the specified reader or buffer.
|
24461 | * @function decode
|
24462 | * @memberof google.api.GoSettings
|
24463 | * @static
|
24464 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
24465 | * @param {number} [length] Message length if known beforehand
|
24466 | * @returns {google.api.GoSettings} GoSettings
|
24467 | * @throws {Error} If the payload is not a reader or valid buffer
|
24468 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
24469 | */
|
24470 | GoSettings.decode = function decode(reader, length) {
|
24471 | if (!(reader instanceof $Reader))
|
24472 | reader = $Reader.create(reader);
|
24473 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings();
|
24474 | while (reader.pos < end) {
|
24475 | var tag = reader.uint32();
|
24476 | switch (tag >>> 3) {
|
24477 | case 1: {
|
24478 | message.common = $root.google.api.CommonLanguageSettings.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 GoSettings message from the specified reader or buffer, length delimited.
|
24491 | * @function decodeDelimited
|
24492 | * @memberof google.api.GoSettings
|
24493 | * @static
|
24494 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
24495 | * @returns {google.api.GoSettings} GoSettings
|
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 | GoSettings.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 GoSettings message.
|
24507 | * @function verify
|
24508 | * @memberof google.api.GoSettings
|
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 | GoSettings.verify = function verify(message) {
|
24514 | if (typeof message !== "object" || message === null)
|
24515 | return "object expected";
|
24516 | if (message.common != null && message.hasOwnProperty("common")) {
|
24517 | var error = $root.google.api.CommonLanguageSettings.verify(message.common);
|
24518 | if (error)
|
24519 | return "common." + error;
|
24520 | }
|
24521 | return null;
|
24522 | };
|
24523 |
|
24524 | /**
|
24525 | * Creates a GoSettings message from a plain object. Also converts values to their respective internal types.
|
24526 | * @function fromObject
|
24527 | * @memberof google.api.GoSettings
|
24528 | * @static
|
24529 | * @param {Object.<string,*>} object Plain object
|
24530 | * @returns {google.api.GoSettings} GoSettings
|
24531 | */
|
24532 | GoSettings.fromObject = function fromObject(object) {
|
24533 | if (object instanceof $root.google.api.GoSettings)
|
24534 | return object;
|
24535 | var message = new $root.google.api.GoSettings();
|
24536 | if (object.common != null) {
|
24537 | if (typeof object.common !== "object")
|
24538 | throw TypeError(".google.api.GoSettings.common: object expected");
|
24539 | message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common);
|
24540 | }
|
24541 | return message;
|
24542 | };
|
24543 |
|
24544 | /**
|
24545 | * Creates a plain object from a GoSettings message. Also converts values to other types if specified.
|
24546 | * @function toObject
|
24547 | * @memberof google.api.GoSettings
|
24548 | * @static
|
24549 | * @param {google.api.GoSettings} message GoSettings
|
24550 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
24551 | * @returns {Object.<string,*>} Plain object
|
24552 | */
|
24553 | GoSettings.toObject = function toObject(message, options) {
|
24554 | if (!options)
|
24555 | options = {};
|
24556 | var object = {};
|
24557 | if (options.defaults)
|
24558 | object.common = null;
|
24559 | if (message.common != null && message.hasOwnProperty("common"))
|
24560 | object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options);
|
24561 | return object;
|
24562 | };
|
24563 |
|
24564 | /**
|
24565 | * Converts this GoSettings to JSON.
|
24566 | * @function toJSON
|
24567 | * @memberof google.api.GoSettings
|
24568 | * @instance
|
24569 | * @returns {Object.<string,*>} JSON object
|
24570 | */
|
24571 | GoSettings.prototype.toJSON = function toJSON() {
|
24572 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
24573 | };
|
24574 |
|
24575 | /**
|
24576 | * Gets the default type url for GoSettings
|
24577 | * @function getTypeUrl
|
24578 | * @memberof google.api.GoSettings
|
24579 | * @static
|
24580 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
24581 | * @returns {string} The default type url
|
24582 | */
|
24583 | GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
24584 | if (typeUrlPrefix === undefined) {
|
24585 | typeUrlPrefix = "type.googleapis.com";
|
24586 | }
|
24587 | return typeUrlPrefix + "/google.api.GoSettings";
|
24588 | };
|
24589 |
|
24590 | return GoSettings;
|
24591 | })();
|
24592 |
|
24593 | api.MethodSettings = (function() {
|
24594 |
|
24595 | /**
|
24596 | * Properties of a MethodSettings.
|
24597 | * @memberof google.api
|
24598 | * @interface IMethodSettings
|
24599 | * @property {string|null} [selector] MethodSettings selector
|
24600 | * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning
|
24601 | */
|
24602 |
|
24603 | /**
|
24604 | * Constructs a new MethodSettings.
|
24605 | * @memberof google.api
|
24606 | * @classdesc Represents a MethodSettings.
|
24607 | * @implements IMethodSettings
|
24608 | * @constructor
|
24609 | * @param {google.api.IMethodSettings=} [properties] Properties to set
|
24610 | */
|
24611 | function MethodSettings(properties) {
|
24612 | if (properties)
|
24613 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
24614 | if (properties[keys[i]] != null)
|
24615 | this[keys[i]] = properties[keys[i]];
|
24616 | }
|
24617 |
|
24618 | /**
|
24619 | * MethodSettings selector.
|
24620 | * @member {string} selector
|
24621 | * @memberof google.api.MethodSettings
|
24622 | * @instance
|
24623 | */
|
24624 | MethodSettings.prototype.selector = "";
|
24625 |
|
24626 | /**
|
24627 | * MethodSettings longRunning.
|
24628 | * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning
|
24629 | * @memberof google.api.MethodSettings
|
24630 | * @instance
|
24631 | */
|
24632 | MethodSettings.prototype.longRunning = null;
|
24633 |
|
24634 | /**
|
24635 | * Creates a new MethodSettings instance using the specified properties.
|
24636 | * @function create
|
24637 | * @memberof google.api.MethodSettings
|
24638 | * @static
|
24639 | * @param {google.api.IMethodSettings=} [properties] Properties to set
|
24640 | * @returns {google.api.MethodSettings} MethodSettings instance
|
24641 | */
|
24642 | MethodSettings.create = function create(properties) {
|
24643 | return new MethodSettings(properties);
|
24644 | };
|
24645 |
|
24646 | /**
|
24647 | * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages.
|
24648 | * @function encode
|
24649 | * @memberof google.api.MethodSettings
|
24650 | * @static
|
24651 | * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode
|
24652 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
24653 | * @returns {$protobuf.Writer} Writer
|
24654 | */
|
24655 | MethodSettings.encode = function encode(message, writer) {
|
24656 | if (!writer)
|
24657 | writer = $Writer.create();
|
24658 | if (message.selector != null && Object.hasOwnProperty.call(message, "selector"))
|
24659 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector);
|
24660 | if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning"))
|
24661 | $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
24662 | return writer;
|
24663 | };
|
24664 |
|
24665 | /**
|
24666 | * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages.
|
24667 | * @function encodeDelimited
|
24668 | * @memberof google.api.MethodSettings
|
24669 | * @static
|
24670 | * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode
|
24671 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
24672 | * @returns {$protobuf.Writer} Writer
|
24673 | */
|
24674 | MethodSettings.encodeDelimited = function encodeDelimited(message, writer) {
|
24675 | return this.encode(message, writer).ldelim();
|
24676 | };
|
24677 |
|
24678 | /**
|
24679 | * Decodes a MethodSettings message from the specified reader or buffer.
|
24680 | * @function decode
|
24681 | * @memberof google.api.MethodSettings
|
24682 | * @static
|
24683 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
24684 | * @param {number} [length] Message length if known beforehand
|
24685 | * @returns {google.api.MethodSettings} MethodSettings
|
24686 | * @throws {Error} If the payload is not a reader or valid buffer
|
24687 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
24688 | */
|
24689 | MethodSettings.decode = function decode(reader, length) {
|
24690 | if (!(reader instanceof $Reader))
|
24691 | reader = $Reader.create(reader);
|
24692 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings();
|
24693 | while (reader.pos < end) {
|
24694 | var tag = reader.uint32();
|
24695 | switch (tag >>> 3) {
|
24696 | case 1: {
|
24697 | message.selector = reader.string();
|
24698 | break;
|
24699 | }
|
24700 | case 2: {
|
24701 | message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32());
|
24702 | break;
|
24703 | }
|
24704 | default:
|
24705 | reader.skipType(tag & 7);
|
24706 | break;
|
24707 | }
|
24708 | }
|
24709 | return message;
|
24710 | };
|
24711 |
|
24712 | /**
|
24713 | * Decodes a MethodSettings message from the specified reader or buffer, length delimited.
|
24714 | * @function decodeDelimited
|
24715 | * @memberof google.api.MethodSettings
|
24716 | * @static
|
24717 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
24718 | * @returns {google.api.MethodSettings} MethodSettings
|
24719 | * @throws {Error} If the payload is not a reader or valid buffer
|
24720 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
24721 | */
|
24722 | MethodSettings.decodeDelimited = function decodeDelimited(reader) {
|
24723 | if (!(reader instanceof $Reader))
|
24724 | reader = new $Reader(reader);
|
24725 | return this.decode(reader, reader.uint32());
|
24726 | };
|
24727 |
|
24728 | /**
|
24729 | * Verifies a MethodSettings message.
|
24730 | * @function verify
|
24731 | * @memberof google.api.MethodSettings
|
24732 | * @static
|
24733 | * @param {Object.<string,*>} message Plain object to verify
|
24734 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
24735 | */
|
24736 | MethodSettings.verify = function verify(message) {
|
24737 | if (typeof message !== "object" || message === null)
|
24738 | return "object expected";
|
24739 | if (message.selector != null && message.hasOwnProperty("selector"))
|
24740 | if (!$util.isString(message.selector))
|
24741 | return "selector: string expected";
|
24742 | if (message.longRunning != null && message.hasOwnProperty("longRunning")) {
|
24743 | var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning);
|
24744 | if (error)
|
24745 | return "longRunning." + error;
|
24746 | }
|
24747 | return null;
|
24748 | };
|
24749 |
|
24750 | /**
|
24751 | * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types.
|
24752 | * @function fromObject
|
24753 | * @memberof google.api.MethodSettings
|
24754 | * @static
|
24755 | * @param {Object.<string,*>} object Plain object
|
24756 | * @returns {google.api.MethodSettings} MethodSettings
|
24757 | */
|
24758 | MethodSettings.fromObject = function fromObject(object) {
|
24759 | if (object instanceof $root.google.api.MethodSettings)
|
24760 | return object;
|
24761 | var message = new $root.google.api.MethodSettings();
|
24762 | if (object.selector != null)
|
24763 | message.selector = String(object.selector);
|
24764 | if (object.longRunning != null) {
|
24765 | if (typeof object.longRunning !== "object")
|
24766 | throw TypeError(".google.api.MethodSettings.longRunning: object expected");
|
24767 | message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning);
|
24768 | }
|
24769 | return message;
|
24770 | };
|
24771 |
|
24772 | /**
|
24773 | * Creates a plain object from a MethodSettings message. Also converts values to other types if specified.
|
24774 | * @function toObject
|
24775 | * @memberof google.api.MethodSettings
|
24776 | * @static
|
24777 | * @param {google.api.MethodSettings} message MethodSettings
|
24778 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
24779 | * @returns {Object.<string,*>} Plain object
|
24780 | */
|
24781 | MethodSettings.toObject = function toObject(message, options) {
|
24782 | if (!options)
|
24783 | options = {};
|
24784 | var object = {};
|
24785 | if (options.defaults) {
|
24786 | object.selector = "";
|
24787 | object.longRunning = null;
|
24788 | }
|
24789 | if (message.selector != null && message.hasOwnProperty("selector"))
|
24790 | object.selector = message.selector;
|
24791 | if (message.longRunning != null && message.hasOwnProperty("longRunning"))
|
24792 | object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options);
|
24793 | return object;
|
24794 | };
|
24795 |
|
24796 | /**
|
24797 | * Converts this MethodSettings to JSON.
|
24798 | * @function toJSON
|
24799 | * @memberof google.api.MethodSettings
|
24800 | * @instance
|
24801 | * @returns {Object.<string,*>} JSON object
|
24802 | */
|
24803 | MethodSettings.prototype.toJSON = function toJSON() {
|
24804 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
24805 | };
|
24806 |
|
24807 | /**
|
24808 | * Gets the default type url for MethodSettings
|
24809 | * @function getTypeUrl
|
24810 | * @memberof google.api.MethodSettings
|
24811 | * @static
|
24812 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
24813 | * @returns {string} The default type url
|
24814 | */
|
24815 | MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
24816 | if (typeUrlPrefix === undefined) {
|
24817 | typeUrlPrefix = "type.googleapis.com";
|
24818 | }
|
24819 | return typeUrlPrefix + "/google.api.MethodSettings";
|
24820 | };
|
24821 |
|
24822 | MethodSettings.LongRunning = (function() {
|
24823 |
|
24824 | /**
|
24825 | * Properties of a LongRunning.
|
24826 | * @memberof google.api.MethodSettings
|
24827 | * @interface ILongRunning
|
24828 | * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay
|
24829 | * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier
|
24830 | * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay
|
24831 | * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout
|
24832 | */
|
24833 |
|
24834 | /**
|
24835 | * Constructs a new LongRunning.
|
24836 | * @memberof google.api.MethodSettings
|
24837 | * @classdesc Represents a LongRunning.
|
24838 | * @implements ILongRunning
|
24839 | * @constructor
|
24840 | * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set
|
24841 | */
|
24842 | function LongRunning(properties) {
|
24843 | if (properties)
|
24844 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
24845 | if (properties[keys[i]] != null)
|
24846 | this[keys[i]] = properties[keys[i]];
|
24847 | }
|
24848 |
|
24849 | /**
|
24850 | * LongRunning initialPollDelay.
|
24851 | * @member {google.protobuf.IDuration|null|undefined} initialPollDelay
|
24852 | * @memberof google.api.MethodSettings.LongRunning
|
24853 | * @instance
|
24854 | */
|
24855 | LongRunning.prototype.initialPollDelay = null;
|
24856 |
|
24857 | /**
|
24858 | * LongRunning pollDelayMultiplier.
|
24859 | * @member {number} pollDelayMultiplier
|
24860 | * @memberof google.api.MethodSettings.LongRunning
|
24861 | * @instance
|
24862 | */
|
24863 | LongRunning.prototype.pollDelayMultiplier = 0;
|
24864 |
|
24865 | /**
|
24866 | * LongRunning maxPollDelay.
|
24867 | * @member {google.protobuf.IDuration|null|undefined} maxPollDelay
|
24868 | * @memberof google.api.MethodSettings.LongRunning
|
24869 | * @instance
|
24870 | */
|
24871 | LongRunning.prototype.maxPollDelay = null;
|
24872 |
|
24873 | /**
|
24874 | * LongRunning totalPollTimeout.
|
24875 | * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout
|
24876 | * @memberof google.api.MethodSettings.LongRunning
|
24877 | * @instance
|
24878 | */
|
24879 | LongRunning.prototype.totalPollTimeout = null;
|
24880 |
|
24881 | /**
|
24882 | * Creates a new LongRunning instance using the specified properties.
|
24883 | * @function create
|
24884 | * @memberof google.api.MethodSettings.LongRunning
|
24885 | * @static
|
24886 | * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set
|
24887 | * @returns {google.api.MethodSettings.LongRunning} LongRunning instance
|
24888 | */
|
24889 | LongRunning.create = function create(properties) {
|
24890 | return new LongRunning(properties);
|
24891 | };
|
24892 |
|
24893 | /**
|
24894 | * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages.
|
24895 | * @function encode
|
24896 | * @memberof google.api.MethodSettings.LongRunning
|
24897 | * @static
|
24898 | * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode
|
24899 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
24900 | * @returns {$protobuf.Writer} Writer
|
24901 | */
|
24902 | LongRunning.encode = function encode(message, writer) {
|
24903 | if (!writer)
|
24904 | writer = $Writer.create();
|
24905 | if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay"))
|
24906 | $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
24907 | if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier"))
|
24908 | writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier);
|
24909 | if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay"))
|
24910 | $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
24911 | if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout"))
|
24912 | $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
24913 | return writer;
|
24914 | };
|
24915 |
|
24916 | /**
|
24917 | * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages.
|
24918 | * @function encodeDelimited
|
24919 | * @memberof google.api.MethodSettings.LongRunning
|
24920 | * @static
|
24921 | * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode
|
24922 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
24923 | * @returns {$protobuf.Writer} Writer
|
24924 | */
|
24925 | LongRunning.encodeDelimited = function encodeDelimited(message, writer) {
|
24926 | return this.encode(message, writer).ldelim();
|
24927 | };
|
24928 |
|
24929 | /**
|
24930 | * Decodes a LongRunning message from the specified reader or buffer.
|
24931 | * @function decode
|
24932 | * @memberof google.api.MethodSettings.LongRunning
|
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.api.MethodSettings.LongRunning} LongRunning
|
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 | LongRunning.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.api.MethodSettings.LongRunning();
|
24944 | while (reader.pos < end) {
|
24945 | var tag = reader.uint32();
|
24946 | switch (tag >>> 3) {
|
24947 | case 1: {
|
24948 | message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32());
|
24949 | break;
|
24950 | }
|
24951 | case 2: {
|
24952 | message.pollDelayMultiplier = reader.float();
|
24953 | break;
|
24954 | }
|
24955 | case 3: {
|
24956 | message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32());
|
24957 | break;
|
24958 | }
|
24959 | case 4: {
|
24960 | message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32());
|
24961 | break;
|
24962 | }
|
24963 | default:
|
24964 | reader.skipType(tag & 7);
|
24965 | break;
|
24966 | }
|
24967 | }
|
24968 | return message;
|
24969 | };
|
24970 |
|
24971 | /**
|
24972 | * Decodes a LongRunning message from the specified reader or buffer, length delimited.
|
24973 | * @function decodeDelimited
|
24974 | * @memberof google.api.MethodSettings.LongRunning
|
24975 | * @static
|
24976 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
24977 | * @returns {google.api.MethodSettings.LongRunning} LongRunning
|
24978 | * @throws {Error} If the payload is not a reader or valid buffer
|
24979 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
24980 | */
|
24981 | LongRunning.decodeDelimited = function decodeDelimited(reader) {
|
24982 | if (!(reader instanceof $Reader))
|
24983 | reader = new $Reader(reader);
|
24984 | return this.decode(reader, reader.uint32());
|
24985 | };
|
24986 |
|
24987 | /**
|
24988 | * Verifies a LongRunning message.
|
24989 | * @function verify
|
24990 | * @memberof google.api.MethodSettings.LongRunning
|
24991 | * @static
|
24992 | * @param {Object.<string,*>} message Plain object to verify
|
24993 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
24994 | */
|
24995 | LongRunning.verify = function verify(message) {
|
24996 | if (typeof message !== "object" || message === null)
|
24997 | return "object expected";
|
24998 | if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) {
|
24999 | var error = $root.google.protobuf.Duration.verify(message.initialPollDelay);
|
25000 | if (error)
|
25001 | return "initialPollDelay." + error;
|
25002 | }
|
25003 | if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier"))
|
25004 | if (typeof message.pollDelayMultiplier !== "number")
|
25005 | return "pollDelayMultiplier: number expected";
|
25006 | if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) {
|
25007 | var error = $root.google.protobuf.Duration.verify(message.maxPollDelay);
|
25008 | if (error)
|
25009 | return "maxPollDelay." + error;
|
25010 | }
|
25011 | if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) {
|
25012 | var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout);
|
25013 | if (error)
|
25014 | return "totalPollTimeout." + error;
|
25015 | }
|
25016 | return null;
|
25017 | };
|
25018 |
|
25019 | /**
|
25020 | * Creates a LongRunning message from a plain object. Also converts values to their respective internal types.
|
25021 | * @function fromObject
|
25022 | * @memberof google.api.MethodSettings.LongRunning
|
25023 | * @static
|
25024 | * @param {Object.<string,*>} object Plain object
|
25025 | * @returns {google.api.MethodSettings.LongRunning} LongRunning
|
25026 | */
|
25027 | LongRunning.fromObject = function fromObject(object) {
|
25028 | if (object instanceof $root.google.api.MethodSettings.LongRunning)
|
25029 | return object;
|
25030 | var message = new $root.google.api.MethodSettings.LongRunning();
|
25031 | if (object.initialPollDelay != null) {
|
25032 | if (typeof object.initialPollDelay !== "object")
|
25033 | throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected");
|
25034 | message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay);
|
25035 | }
|
25036 | if (object.pollDelayMultiplier != null)
|
25037 | message.pollDelayMultiplier = Number(object.pollDelayMultiplier);
|
25038 | if (object.maxPollDelay != null) {
|
25039 | if (typeof object.maxPollDelay !== "object")
|
25040 | throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected");
|
25041 | message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay);
|
25042 | }
|
25043 | if (object.totalPollTimeout != null) {
|
25044 | if (typeof object.totalPollTimeout !== "object")
|
25045 | throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected");
|
25046 | message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout);
|
25047 | }
|
25048 | return message;
|
25049 | };
|
25050 |
|
25051 | /**
|
25052 | * Creates a plain object from a LongRunning message. Also converts values to other types if specified.
|
25053 | * @function toObject
|
25054 | * @memberof google.api.MethodSettings.LongRunning
|
25055 | * @static
|
25056 | * @param {google.api.MethodSettings.LongRunning} message LongRunning
|
25057 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
25058 | * @returns {Object.<string,*>} Plain object
|
25059 | */
|
25060 | LongRunning.toObject = function toObject(message, options) {
|
25061 | if (!options)
|
25062 | options = {};
|
25063 | var object = {};
|
25064 | if (options.defaults) {
|
25065 | object.initialPollDelay = null;
|
25066 | object.pollDelayMultiplier = 0;
|
25067 | object.maxPollDelay = null;
|
25068 | object.totalPollTimeout = null;
|
25069 | }
|
25070 | if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay"))
|
25071 | object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options);
|
25072 | if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier"))
|
25073 | object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier;
|
25074 | if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay"))
|
25075 | object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options);
|
25076 | if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout"))
|
25077 | object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options);
|
25078 | return object;
|
25079 | };
|
25080 |
|
25081 | /**
|
25082 | * Converts this LongRunning to JSON.
|
25083 | * @function toJSON
|
25084 | * @memberof google.api.MethodSettings.LongRunning
|
25085 | * @instance
|
25086 | * @returns {Object.<string,*>} JSON object
|
25087 | */
|
25088 | LongRunning.prototype.toJSON = function toJSON() {
|
25089 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
25090 | };
|
25091 |
|
25092 | /**
|
25093 | * Gets the default type url for LongRunning
|
25094 | * @function getTypeUrl
|
25095 | * @memberof google.api.MethodSettings.LongRunning
|
25096 | * @static
|
25097 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
25098 | * @returns {string} The default type url
|
25099 | */
|
25100 | LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
25101 | if (typeUrlPrefix === undefined) {
|
25102 | typeUrlPrefix = "type.googleapis.com";
|
25103 | }
|
25104 | return typeUrlPrefix + "/google.api.MethodSettings.LongRunning";
|
25105 | };
|
25106 |
|
25107 | return LongRunning;
|
25108 | })();
|
25109 |
|
25110 | return MethodSettings;
|
25111 | })();
|
25112 |
|
25113 | /**
|
25114 | * ClientLibraryOrganization enum.
|
25115 | * @name google.api.ClientLibraryOrganization
|
25116 | * @enum {number}
|
25117 | * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value
|
25118 | * @property {number} CLOUD=1 CLOUD value
|
25119 | * @property {number} ADS=2 ADS value
|
25120 | * @property {number} PHOTOS=3 PHOTOS value
|
25121 | * @property {number} STREET_VIEW=4 STREET_VIEW value
|
25122 | * @property {number} SHOPPING=5 SHOPPING value
|
25123 | * @property {number} GEO=6 GEO value
|
25124 | * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value
|
25125 | */
|
25126 | api.ClientLibraryOrganization = (function() {
|
25127 | var valuesById = {}, values = Object.create(valuesById);
|
25128 | values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0;
|
25129 | values[valuesById[1] = "CLOUD"] = 1;
|
25130 | values[valuesById[2] = "ADS"] = 2;
|
25131 | values[valuesById[3] = "PHOTOS"] = 3;
|
25132 | values[valuesById[4] = "STREET_VIEW"] = 4;
|
25133 | values[valuesById[5] = "SHOPPING"] = 5;
|
25134 | values[valuesById[6] = "GEO"] = 6;
|
25135 | values[valuesById[7] = "GENERATIVE_AI"] = 7;
|
25136 | return values;
|
25137 | })();
|
25138 |
|
25139 | /**
|
25140 | * ClientLibraryDestination enum.
|
25141 | * @name google.api.ClientLibraryDestination
|
25142 | * @enum {number}
|
25143 | * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value
|
25144 | * @property {number} GITHUB=10 GITHUB value
|
25145 | * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value
|
25146 | */
|
25147 | api.ClientLibraryDestination = (function() {
|
25148 | var valuesById = {}, values = Object.create(valuesById);
|
25149 | values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0;
|
25150 | values[valuesById[10] = "GITHUB"] = 10;
|
25151 | values[valuesById[20] = "PACKAGE_MANAGER"] = 20;
|
25152 | return values;
|
25153 | })();
|
25154 |
|
25155 | /**
|
25156 | * LaunchStage enum.
|
25157 | * @name google.api.LaunchStage
|
25158 | * @enum {number}
|
25159 | * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value
|
25160 | * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value
|
25161 | * @property {number} PRELAUNCH=7 PRELAUNCH value
|
25162 | * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value
|
25163 | * @property {number} ALPHA=2 ALPHA value
|
25164 | * @property {number} BETA=3 BETA value
|
25165 | * @property {number} GA=4 GA value
|
25166 | * @property {number} DEPRECATED=5 DEPRECATED value
|
25167 | */
|
25168 | api.LaunchStage = (function() {
|
25169 | var valuesById = {}, values = Object.create(valuesById);
|
25170 | values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0;
|
25171 | values[valuesById[6] = "UNIMPLEMENTED"] = 6;
|
25172 | values[valuesById[7] = "PRELAUNCH"] = 7;
|
25173 | values[valuesById[1] = "EARLY_ACCESS"] = 1;
|
25174 | values[valuesById[2] = "ALPHA"] = 2;
|
25175 | values[valuesById[3] = "BETA"] = 3;
|
25176 | values[valuesById[4] = "GA"] = 4;
|
25177 | values[valuesById[5] = "DEPRECATED"] = 5;
|
25178 | return values;
|
25179 | })();
|
25180 |
|
25181 | /**
|
25182 | * FieldBehavior enum.
|
25183 | * @name google.api.FieldBehavior
|
25184 | * @enum {number}
|
25185 | * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value
|
25186 | * @property {number} OPTIONAL=1 OPTIONAL value
|
25187 | * @property {number} REQUIRED=2 REQUIRED value
|
25188 | * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value
|
25189 | * @property {number} INPUT_ONLY=4 INPUT_ONLY value
|
25190 | * @property {number} IMMUTABLE=5 IMMUTABLE value
|
25191 | * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value
|
25192 | * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value
|
25193 | */
|
25194 | api.FieldBehavior = (function() {
|
25195 | var valuesById = {}, values = Object.create(valuesById);
|
25196 | values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0;
|
25197 | values[valuesById[1] = "OPTIONAL"] = 1;
|
25198 | values[valuesById[2] = "REQUIRED"] = 2;
|
25199 | values[valuesById[3] = "OUTPUT_ONLY"] = 3;
|
25200 | values[valuesById[4] = "INPUT_ONLY"] = 4;
|
25201 | values[valuesById[5] = "IMMUTABLE"] = 5;
|
25202 | values[valuesById[6] = "UNORDERED_LIST"] = 6;
|
25203 | values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7;
|
25204 | return values;
|
25205 | })();
|
25206 |
|
25207 | api.RoutingRule = (function() {
|
25208 |
|
25209 | /**
|
25210 | * Properties of a RoutingRule.
|
25211 | * @memberof google.api
|
25212 | * @interface IRoutingRule
|
25213 | * @property {Array.<google.api.IRoutingParameter>|null} [routingParameters] RoutingRule routingParameters
|
25214 | */
|
25215 |
|
25216 | /**
|
25217 | * Constructs a new RoutingRule.
|
25218 | * @memberof google.api
|
25219 | * @classdesc Represents a RoutingRule.
|
25220 | * @implements IRoutingRule
|
25221 | * @constructor
|
25222 | * @param {google.api.IRoutingRule=} [properties] Properties to set
|
25223 | */
|
25224 | function RoutingRule(properties) {
|
25225 | this.routingParameters = [];
|
25226 | if (properties)
|
25227 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
25228 | if (properties[keys[i]] != null)
|
25229 | this[keys[i]] = properties[keys[i]];
|
25230 | }
|
25231 |
|
25232 | /**
|
25233 | * RoutingRule routingParameters.
|
25234 | * @member {Array.<google.api.IRoutingParameter>} routingParameters
|
25235 | * @memberof google.api.RoutingRule
|
25236 | * @instance
|
25237 | */
|
25238 | RoutingRule.prototype.routingParameters = $util.emptyArray;
|
25239 |
|
25240 | /**
|
25241 | * Creates a new RoutingRule instance using the specified properties.
|
25242 | * @function create
|
25243 | * @memberof google.api.RoutingRule
|
25244 | * @static
|
25245 | * @param {google.api.IRoutingRule=} [properties] Properties to set
|
25246 | * @returns {google.api.RoutingRule} RoutingRule instance
|
25247 | */
|
25248 | RoutingRule.create = function create(properties) {
|
25249 | return new RoutingRule(properties);
|
25250 | };
|
25251 |
|
25252 | /**
|
25253 | * Encodes the specified RoutingRule message. Does not implicitly {@link google.api.RoutingRule.verify|verify} messages.
|
25254 | * @function encode
|
25255 | * @memberof google.api.RoutingRule
|
25256 | * @static
|
25257 | * @param {google.api.IRoutingRule} message RoutingRule message or plain object to encode
|
25258 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
25259 | * @returns {$protobuf.Writer} Writer
|
25260 | */
|
25261 | RoutingRule.encode = function encode(message, writer) {
|
25262 | if (!writer)
|
25263 | writer = $Writer.create();
|
25264 | if (message.routingParameters != null && message.routingParameters.length)
|
25265 | for (var i = 0; i < message.routingParameters.length; ++i)
|
25266 | $root.google.api.RoutingParameter.encode(message.routingParameters[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
25267 | return writer;
|
25268 | };
|
25269 |
|
25270 | /**
|
25271 | * Encodes the specified RoutingRule message, length delimited. Does not implicitly {@link google.api.RoutingRule.verify|verify} messages.
|
25272 | * @function encodeDelimited
|
25273 | * @memberof google.api.RoutingRule
|
25274 | * @static
|
25275 | * @param {google.api.IRoutingRule} message RoutingRule message or plain object to encode
|
25276 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
25277 | * @returns {$protobuf.Writer} Writer
|
25278 | */
|
25279 | RoutingRule.encodeDelimited = function encodeDelimited(message, writer) {
|
25280 | return this.encode(message, writer).ldelim();
|
25281 | };
|
25282 |
|
25283 | /**
|
25284 | * Decodes a RoutingRule message from the specified reader or buffer.
|
25285 | * @function decode
|
25286 | * @memberof google.api.RoutingRule
|
25287 | * @static
|
25288 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
25289 | * @param {number} [length] Message length if known beforehand
|
25290 | * @returns {google.api.RoutingRule} RoutingRule
|
25291 | * @throws {Error} If the payload is not a reader or valid buffer
|
25292 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
25293 | */
|
25294 | RoutingRule.decode = function decode(reader, length) {
|
25295 | if (!(reader instanceof $Reader))
|
25296 | reader = $Reader.create(reader);
|
25297 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RoutingRule();
|
25298 | while (reader.pos < end) {
|
25299 | var tag = reader.uint32();
|
25300 | switch (tag >>> 3) {
|
25301 | case 2: {
|
25302 | if (!(message.routingParameters && message.routingParameters.length))
|
25303 | message.routingParameters = [];
|
25304 | message.routingParameters.push($root.google.api.RoutingParameter.decode(reader, reader.uint32()));
|
25305 | break;
|
25306 | }
|
25307 | default:
|
25308 | reader.skipType(tag & 7);
|
25309 | break;
|
25310 | }
|
25311 | }
|
25312 | return message;
|
25313 | };
|
25314 |
|
25315 | /**
|
25316 | * Decodes a RoutingRule message from the specified reader or buffer, length delimited.
|
25317 | * @function decodeDelimited
|
25318 | * @memberof google.api.RoutingRule
|
25319 | * @static
|
25320 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
25321 | * @returns {google.api.RoutingRule} RoutingRule
|
25322 | * @throws {Error} If the payload is not a reader or valid buffer
|
25323 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
25324 | */
|
25325 | RoutingRule.decodeDelimited = function decodeDelimited(reader) {
|
25326 | if (!(reader instanceof $Reader))
|
25327 | reader = new $Reader(reader);
|
25328 | return this.decode(reader, reader.uint32());
|
25329 | };
|
25330 |
|
25331 | /**
|
25332 | * Verifies a RoutingRule message.
|
25333 | * @function verify
|
25334 | * @memberof google.api.RoutingRule
|
25335 | * @static
|
25336 | * @param {Object.<string,*>} message Plain object to verify
|
25337 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
25338 | */
|
25339 | RoutingRule.verify = function verify(message) {
|
25340 | if (typeof message !== "object" || message === null)
|
25341 | return "object expected";
|
25342 | if (message.routingParameters != null && message.hasOwnProperty("routingParameters")) {
|
25343 | if (!Array.isArray(message.routingParameters))
|
25344 | return "routingParameters: array expected";
|
25345 | for (var i = 0; i < message.routingParameters.length; ++i) {
|
25346 | var error = $root.google.api.RoutingParameter.verify(message.routingParameters[i]);
|
25347 | if (error)
|
25348 | return "routingParameters." + error;
|
25349 | }
|
25350 | }
|
25351 | return null;
|
25352 | };
|
25353 |
|
25354 | /**
|
25355 | * Creates a RoutingRule message from a plain object. Also converts values to their respective internal types.
|
25356 | * @function fromObject
|
25357 | * @memberof google.api.RoutingRule
|
25358 | * @static
|
25359 | * @param {Object.<string,*>} object Plain object
|
25360 | * @returns {google.api.RoutingRule} RoutingRule
|
25361 | */
|
25362 | RoutingRule.fromObject = function fromObject(object) {
|
25363 | if (object instanceof $root.google.api.RoutingRule)
|
25364 | return object;
|
25365 | var message = new $root.google.api.RoutingRule();
|
25366 | if (object.routingParameters) {
|
25367 | if (!Array.isArray(object.routingParameters))
|
25368 | throw TypeError(".google.api.RoutingRule.routingParameters: array expected");
|
25369 | message.routingParameters = [];
|
25370 | for (var i = 0; i < object.routingParameters.length; ++i) {
|
25371 | if (typeof object.routingParameters[i] !== "object")
|
25372 | throw TypeError(".google.api.RoutingRule.routingParameters: object expected");
|
25373 | message.routingParameters[i] = $root.google.api.RoutingParameter.fromObject(object.routingParameters[i]);
|
25374 | }
|
25375 | }
|
25376 | return message;
|
25377 | };
|
25378 |
|
25379 | /**
|
25380 | * Creates a plain object from a RoutingRule message. Also converts values to other types if specified.
|
25381 | * @function toObject
|
25382 | * @memberof google.api.RoutingRule
|
25383 | * @static
|
25384 | * @param {google.api.RoutingRule} message RoutingRule
|
25385 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
25386 | * @returns {Object.<string,*>} Plain object
|
25387 | */
|
25388 | RoutingRule.toObject = function toObject(message, options) {
|
25389 | if (!options)
|
25390 | options = {};
|
25391 | var object = {};
|
25392 | if (options.arrays || options.defaults)
|
25393 | object.routingParameters = [];
|
25394 | if (message.routingParameters && message.routingParameters.length) {
|
25395 | object.routingParameters = [];
|
25396 | for (var j = 0; j < message.routingParameters.length; ++j)
|
25397 | object.routingParameters[j] = $root.google.api.RoutingParameter.toObject(message.routingParameters[j], options);
|
25398 | }
|
25399 | return object;
|
25400 | };
|
25401 |
|
25402 | /**
|
25403 | * Converts this RoutingRule to JSON.
|
25404 | * @function toJSON
|
25405 | * @memberof google.api.RoutingRule
|
25406 | * @instance
|
25407 | * @returns {Object.<string,*>} JSON object
|
25408 | */
|
25409 | RoutingRule.prototype.toJSON = function toJSON() {
|
25410 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
25411 | };
|
25412 |
|
25413 | /**
|
25414 | * Gets the default type url for RoutingRule
|
25415 | * @function getTypeUrl
|
25416 | * @memberof google.api.RoutingRule
|
25417 | * @static
|
25418 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
25419 | * @returns {string} The default type url
|
25420 | */
|
25421 | RoutingRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
25422 | if (typeUrlPrefix === undefined) {
|
25423 | typeUrlPrefix = "type.googleapis.com";
|
25424 | }
|
25425 | return typeUrlPrefix + "/google.api.RoutingRule";
|
25426 | };
|
25427 |
|
25428 | return RoutingRule;
|
25429 | })();
|
25430 |
|
25431 | api.RoutingParameter = (function() {
|
25432 |
|
25433 | /**
|
25434 | * Properties of a RoutingParameter.
|
25435 | * @memberof google.api
|
25436 | * @interface IRoutingParameter
|
25437 | * @property {string|null} [field] RoutingParameter field
|
25438 | * @property {string|null} [pathTemplate] RoutingParameter pathTemplate
|
25439 | */
|
25440 |
|
25441 | /**
|
25442 | * Constructs a new RoutingParameter.
|
25443 | * @memberof google.api
|
25444 | * @classdesc Represents a RoutingParameter.
|
25445 | * @implements IRoutingParameter
|
25446 | * @constructor
|
25447 | * @param {google.api.IRoutingParameter=} [properties] Properties to set
|
25448 | */
|
25449 | function RoutingParameter(properties) {
|
25450 | if (properties)
|
25451 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
25452 | if (properties[keys[i]] != null)
|
25453 | this[keys[i]] = properties[keys[i]];
|
25454 | }
|
25455 |
|
25456 | /**
|
25457 | * RoutingParameter field.
|
25458 | * @member {string} field
|
25459 | * @memberof google.api.RoutingParameter
|
25460 | * @instance
|
25461 | */
|
25462 | RoutingParameter.prototype.field = "";
|
25463 |
|
25464 | /**
|
25465 | * RoutingParameter pathTemplate.
|
25466 | * @member {string} pathTemplate
|
25467 | * @memberof google.api.RoutingParameter
|
25468 | * @instance
|
25469 | */
|
25470 | RoutingParameter.prototype.pathTemplate = "";
|
25471 |
|
25472 | /**
|
25473 | * Creates a new RoutingParameter instance using the specified properties.
|
25474 | * @function create
|
25475 | * @memberof google.api.RoutingParameter
|
25476 | * @static
|
25477 | * @param {google.api.IRoutingParameter=} [properties] Properties to set
|
25478 | * @returns {google.api.RoutingParameter} RoutingParameter instance
|
25479 | */
|
25480 | RoutingParameter.create = function create(properties) {
|
25481 | return new RoutingParameter(properties);
|
25482 | };
|
25483 |
|
25484 | /**
|
25485 | * Encodes the specified RoutingParameter message. Does not implicitly {@link google.api.RoutingParameter.verify|verify} messages.
|
25486 | * @function encode
|
25487 | * @memberof google.api.RoutingParameter
|
25488 | * @static
|
25489 | * @param {google.api.IRoutingParameter} message RoutingParameter message or plain object to encode
|
25490 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
25491 | * @returns {$protobuf.Writer} Writer
|
25492 | */
|
25493 | RoutingParameter.encode = function encode(message, writer) {
|
25494 | if (!writer)
|
25495 | writer = $Writer.create();
|
25496 | if (message.field != null && Object.hasOwnProperty.call(message, "field"))
|
25497 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.field);
|
25498 | if (message.pathTemplate != null && Object.hasOwnProperty.call(message, "pathTemplate"))
|
25499 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.pathTemplate);
|
25500 | return writer;
|
25501 | };
|
25502 |
|
25503 | /**
|
25504 | * Encodes the specified RoutingParameter message, length delimited. Does not implicitly {@link google.api.RoutingParameter.verify|verify} messages.
|
25505 | * @function encodeDelimited
|
25506 | * @memberof google.api.RoutingParameter
|
25507 | * @static
|
25508 | * @param {google.api.IRoutingParameter} message RoutingParameter message or plain object to encode
|
25509 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
25510 | * @returns {$protobuf.Writer} Writer
|
25511 | */
|
25512 | RoutingParameter.encodeDelimited = function encodeDelimited(message, writer) {
|
25513 | return this.encode(message, writer).ldelim();
|
25514 | };
|
25515 |
|
25516 | /**
|
25517 | * Decodes a RoutingParameter message from the specified reader or buffer.
|
25518 | * @function decode
|
25519 | * @memberof google.api.RoutingParameter
|
25520 | * @static
|
25521 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
25522 | * @param {number} [length] Message length if known beforehand
|
25523 | * @returns {google.api.RoutingParameter} RoutingParameter
|
25524 | * @throws {Error} If the payload is not a reader or valid buffer
|
25525 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
25526 | */
|
25527 | RoutingParameter.decode = function decode(reader, length) {
|
25528 | if (!(reader instanceof $Reader))
|
25529 | reader = $Reader.create(reader);
|
25530 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RoutingParameter();
|
25531 | while (reader.pos < end) {
|
25532 | var tag = reader.uint32();
|
25533 | switch (tag >>> 3) {
|
25534 | case 1: {
|
25535 | message.field = reader.string();
|
25536 | break;
|
25537 | }
|
25538 | case 2: {
|
25539 | message.pathTemplate = reader.string();
|
25540 | break;
|
25541 | }
|
25542 | default:
|
25543 | reader.skipType(tag & 7);
|
25544 | break;
|
25545 | }
|
25546 | }
|
25547 | return message;
|
25548 | };
|
25549 |
|
25550 | /**
|
25551 | * Decodes a RoutingParameter message from the specified reader or buffer, length delimited.
|
25552 | * @function decodeDelimited
|
25553 | * @memberof google.api.RoutingParameter
|
25554 | * @static
|
25555 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
25556 | * @returns {google.api.RoutingParameter} RoutingParameter
|
25557 | * @throws {Error} If the payload is not a reader or valid buffer
|
25558 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
25559 | */
|
25560 | RoutingParameter.decodeDelimited = function decodeDelimited(reader) {
|
25561 | if (!(reader instanceof $Reader))
|
25562 | reader = new $Reader(reader);
|
25563 | return this.decode(reader, reader.uint32());
|
25564 | };
|
25565 |
|
25566 | /**
|
25567 | * Verifies a RoutingParameter message.
|
25568 | * @function verify
|
25569 | * @memberof google.api.RoutingParameter
|
25570 | * @static
|
25571 | * @param {Object.<string,*>} message Plain object to verify
|
25572 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
25573 | */
|
25574 | RoutingParameter.verify = function verify(message) {
|
25575 | if (typeof message !== "object" || message === null)
|
25576 | return "object expected";
|
25577 | if (message.field != null && message.hasOwnProperty("field"))
|
25578 | if (!$util.isString(message.field))
|
25579 | return "field: string expected";
|
25580 | if (message.pathTemplate != null && message.hasOwnProperty("pathTemplate"))
|
25581 | if (!$util.isString(message.pathTemplate))
|
25582 | return "pathTemplate: string expected";
|
25583 | return null;
|
25584 | };
|
25585 |
|
25586 | /**
|
25587 | * Creates a RoutingParameter message from a plain object. Also converts values to their respective internal types.
|
25588 | * @function fromObject
|
25589 | * @memberof google.api.RoutingParameter
|
25590 | * @static
|
25591 | * @param {Object.<string,*>} object Plain object
|
25592 | * @returns {google.api.RoutingParameter} RoutingParameter
|
25593 | */
|
25594 | RoutingParameter.fromObject = function fromObject(object) {
|
25595 | if (object instanceof $root.google.api.RoutingParameter)
|
25596 | return object;
|
25597 | var message = new $root.google.api.RoutingParameter();
|
25598 | if (object.field != null)
|
25599 | message.field = String(object.field);
|
25600 | if (object.pathTemplate != null)
|
25601 | message.pathTemplate = String(object.pathTemplate);
|
25602 | return message;
|
25603 | };
|
25604 |
|
25605 | /**
|
25606 | * Creates a plain object from a RoutingParameter message. Also converts values to other types if specified.
|
25607 | * @function toObject
|
25608 | * @memberof google.api.RoutingParameter
|
25609 | * @static
|
25610 | * @param {google.api.RoutingParameter} message RoutingParameter
|
25611 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
25612 | * @returns {Object.<string,*>} Plain object
|
25613 | */
|
25614 | RoutingParameter.toObject = function toObject(message, options) {
|
25615 | if (!options)
|
25616 | options = {};
|
25617 | var object = {};
|
25618 | if (options.defaults) {
|
25619 | object.field = "";
|
25620 | object.pathTemplate = "";
|
25621 | }
|
25622 | if (message.field != null && message.hasOwnProperty("field"))
|
25623 | object.field = message.field;
|
25624 | if (message.pathTemplate != null && message.hasOwnProperty("pathTemplate"))
|
25625 | object.pathTemplate = message.pathTemplate;
|
25626 | return object;
|
25627 | };
|
25628 |
|
25629 | /**
|
25630 | * Converts this RoutingParameter to JSON.
|
25631 | * @function toJSON
|
25632 | * @memberof google.api.RoutingParameter
|
25633 | * @instance
|
25634 | * @returns {Object.<string,*>} JSON object
|
25635 | */
|
25636 | RoutingParameter.prototype.toJSON = function toJSON() {
|
25637 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
25638 | };
|
25639 |
|
25640 | /**
|
25641 | * Gets the default type url for RoutingParameter
|
25642 | * @function getTypeUrl
|
25643 | * @memberof google.api.RoutingParameter
|
25644 | * @static
|
25645 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
25646 | * @returns {string} The default type url
|
25647 | */
|
25648 | RoutingParameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
25649 | if (typeUrlPrefix === undefined) {
|
25650 | typeUrlPrefix = "type.googleapis.com";
|
25651 | }
|
25652 | return typeUrlPrefix + "/google.api.RoutingParameter";
|
25653 | };
|
25654 |
|
25655 | return RoutingParameter;
|
25656 | })();
|
25657 |
|
25658 | return api;
|
25659 | })();
|
25660 |
|
25661 | google.protobuf = (function() {
|
25662 |
|
25663 | /**
|
25664 | * Namespace protobuf.
|
25665 | * @memberof google
|
25666 | * @namespace
|
25667 | */
|
25668 | var protobuf = {};
|
25669 |
|
25670 | protobuf.FileDescriptorSet = (function() {
|
25671 |
|
25672 | /**
|
25673 | * Properties of a FileDescriptorSet.
|
25674 | * @memberof google.protobuf
|
25675 | * @interface IFileDescriptorSet
|
25676 | * @property {Array.<google.protobuf.IFileDescriptorProto>|null} [file] FileDescriptorSet file
|
25677 | */
|
25678 |
|
25679 | /**
|
25680 | * Constructs a new FileDescriptorSet.
|
25681 | * @memberof google.protobuf
|
25682 | * @classdesc Represents a FileDescriptorSet.
|
25683 | * @implements IFileDescriptorSet
|
25684 | * @constructor
|
25685 | * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set
|
25686 | */
|
25687 | function FileDescriptorSet(properties) {
|
25688 | this.file = [];
|
25689 | if (properties)
|
25690 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
25691 | if (properties[keys[i]] != null)
|
25692 | this[keys[i]] = properties[keys[i]];
|
25693 | }
|
25694 |
|
25695 | /**
|
25696 | * FileDescriptorSet file.
|
25697 | * @member {Array.<google.protobuf.IFileDescriptorProto>} file
|
25698 | * @memberof google.protobuf.FileDescriptorSet
|
25699 | * @instance
|
25700 | */
|
25701 | FileDescriptorSet.prototype.file = $util.emptyArray;
|
25702 |
|
25703 | /**
|
25704 | * Creates a new FileDescriptorSet instance using the specified properties.
|
25705 | * @function create
|
25706 | * @memberof google.protobuf.FileDescriptorSet
|
25707 | * @static
|
25708 | * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set
|
25709 | * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance
|
25710 | */
|
25711 | FileDescriptorSet.create = function create(properties) {
|
25712 | return new FileDescriptorSet(properties);
|
25713 | };
|
25714 |
|
25715 | /**
|
25716 | * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
|
25717 | * @function encode
|
25718 | * @memberof google.protobuf.FileDescriptorSet
|
25719 | * @static
|
25720 | * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode
|
25721 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
25722 | * @returns {$protobuf.Writer} Writer
|
25723 | */
|
25724 | FileDescriptorSet.encode = function encode(message, writer) {
|
25725 | if (!writer)
|
25726 | writer = $Writer.create();
|
25727 | if (message.file != null && message.file.length)
|
25728 | for (var i = 0; i < message.file.length; ++i)
|
25729 | $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
25730 | return writer;
|
25731 | };
|
25732 |
|
25733 | /**
|
25734 | * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
|
25735 | * @function encodeDelimited
|
25736 | * @memberof google.protobuf.FileDescriptorSet
|
25737 | * @static
|
25738 | * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode
|
25739 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
25740 | * @returns {$protobuf.Writer} Writer
|
25741 | */
|
25742 | FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) {
|
25743 | return this.encode(message, writer).ldelim();
|
25744 | };
|
25745 |
|
25746 | /**
|
25747 | * Decodes a FileDescriptorSet message from the specified reader or buffer.
|
25748 | * @function decode
|
25749 | * @memberof google.protobuf.FileDescriptorSet
|
25750 | * @static
|
25751 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
25752 | * @param {number} [length] Message length if known beforehand
|
25753 | * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
|
25754 | * @throws {Error} If the payload is not a reader or valid buffer
|
25755 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
25756 | */
|
25757 | FileDescriptorSet.decode = function decode(reader, length) {
|
25758 | if (!(reader instanceof $Reader))
|
25759 | reader = $Reader.create(reader);
|
25760 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet();
|
25761 | while (reader.pos < end) {
|
25762 | var tag = reader.uint32();
|
25763 | switch (tag >>> 3) {
|
25764 | case 1: {
|
25765 | if (!(message.file && message.file.length))
|
25766 | message.file = [];
|
25767 | message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32()));
|
25768 | break;
|
25769 | }
|
25770 | default:
|
25771 | reader.skipType(tag & 7);
|
25772 | break;
|
25773 | }
|
25774 | }
|
25775 | return message;
|
25776 | };
|
25777 |
|
25778 | /**
|
25779 | * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited.
|
25780 | * @function decodeDelimited
|
25781 | * @memberof google.protobuf.FileDescriptorSet
|
25782 | * @static
|
25783 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
25784 | * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
|
25785 | * @throws {Error} If the payload is not a reader or valid buffer
|
25786 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
25787 | */
|
25788 | FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) {
|
25789 | if (!(reader instanceof $Reader))
|
25790 | reader = new $Reader(reader);
|
25791 | return this.decode(reader, reader.uint32());
|
25792 | };
|
25793 |
|
25794 | /**
|
25795 | * Verifies a FileDescriptorSet message.
|
25796 | * @function verify
|
25797 | * @memberof google.protobuf.FileDescriptorSet
|
25798 | * @static
|
25799 | * @param {Object.<string,*>} message Plain object to verify
|
25800 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
25801 | */
|
25802 | FileDescriptorSet.verify = function verify(message) {
|
25803 | if (typeof message !== "object" || message === null)
|
25804 | return "object expected";
|
25805 | if (message.file != null && message.hasOwnProperty("file")) {
|
25806 | if (!Array.isArray(message.file))
|
25807 | return "file: array expected";
|
25808 | for (var i = 0; i < message.file.length; ++i) {
|
25809 | var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]);
|
25810 | if (error)
|
25811 | return "file." + error;
|
25812 | }
|
25813 | }
|
25814 | return null;
|
25815 | };
|
25816 |
|
25817 | /**
|
25818 | * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types.
|
25819 | * @function fromObject
|
25820 | * @memberof google.protobuf.FileDescriptorSet
|
25821 | * @static
|
25822 | * @param {Object.<string,*>} object Plain object
|
25823 | * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
|
25824 | */
|
25825 | FileDescriptorSet.fromObject = function fromObject(object) {
|
25826 | if (object instanceof $root.google.protobuf.FileDescriptorSet)
|
25827 | return object;
|
25828 | var message = new $root.google.protobuf.FileDescriptorSet();
|
25829 | if (object.file) {
|
25830 | if (!Array.isArray(object.file))
|
25831 | throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected");
|
25832 | message.file = [];
|
25833 | for (var i = 0; i < object.file.length; ++i) {
|
25834 | if (typeof object.file[i] !== "object")
|
25835 | throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected");
|
25836 | message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]);
|
25837 | }
|
25838 | }
|
25839 | return message;
|
25840 | };
|
25841 |
|
25842 | /**
|
25843 | * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified.
|
25844 | * @function toObject
|
25845 | * @memberof google.protobuf.FileDescriptorSet
|
25846 | * @static
|
25847 | * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet
|
25848 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
25849 | * @returns {Object.<string,*>} Plain object
|
25850 | */
|
25851 | FileDescriptorSet.toObject = function toObject(message, options) {
|
25852 | if (!options)
|
25853 | options = {};
|
25854 | var object = {};
|
25855 | if (options.arrays || options.defaults)
|
25856 | object.file = [];
|
25857 | if (message.file && message.file.length) {
|
25858 | object.file = [];
|
25859 | for (var j = 0; j < message.file.length; ++j)
|
25860 | object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options);
|
25861 | }
|
25862 | return object;
|
25863 | };
|
25864 |
|
25865 | /**
|
25866 | * Converts this FileDescriptorSet to JSON.
|
25867 | * @function toJSON
|
25868 | * @memberof google.protobuf.FileDescriptorSet
|
25869 | * @instance
|
25870 | * @returns {Object.<string,*>} JSON object
|
25871 | */
|
25872 | FileDescriptorSet.prototype.toJSON = function toJSON() {
|
25873 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
25874 | };
|
25875 |
|
25876 | /**
|
25877 | * Gets the default type url for FileDescriptorSet
|
25878 | * @function getTypeUrl
|
25879 | * @memberof google.protobuf.FileDescriptorSet
|
25880 | * @static
|
25881 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
25882 | * @returns {string} The default type url
|
25883 | */
|
25884 | FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
25885 | if (typeUrlPrefix === undefined) {
|
25886 | typeUrlPrefix = "type.googleapis.com";
|
25887 | }
|
25888 | return typeUrlPrefix + "/google.protobuf.FileDescriptorSet";
|
25889 | };
|
25890 |
|
25891 | return FileDescriptorSet;
|
25892 | })();
|
25893 |
|
25894 | protobuf.FileDescriptorProto = (function() {
|
25895 |
|
25896 | /**
|
25897 | * Properties of a FileDescriptorProto.
|
25898 | * @memberof google.protobuf
|
25899 | * @interface IFileDescriptorProto
|
25900 | * @property {string|null} [name] FileDescriptorProto name
|
25901 | * @property {string|null} ["package"] FileDescriptorProto package
|
25902 | * @property {Array.<string>|null} [dependency] FileDescriptorProto dependency
|
25903 | * @property {Array.<number>|null} [publicDependency] FileDescriptorProto publicDependency
|
25904 | * @property {Array.<number>|null} [weakDependency] FileDescriptorProto weakDependency
|
25905 | * @property {Array.<google.protobuf.IDescriptorProto>|null} [messageType] FileDescriptorProto messageType
|
25906 | * @property {Array.<google.protobuf.IEnumDescriptorProto>|null} [enumType] FileDescriptorProto enumType
|
25907 | * @property {Array.<google.protobuf.IServiceDescriptorProto>|null} [service] FileDescriptorProto service
|
25908 | * @property {Array.<google.protobuf.IFieldDescriptorProto>|null} [extension] FileDescriptorProto extension
|
25909 | * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options
|
25910 | * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo
|
25911 | * @property {string|null} [syntax] FileDescriptorProto syntax
|
25912 | * @property {string|null} [edition] FileDescriptorProto edition
|
25913 | */
|
25914 |
|
25915 | /**
|
25916 | * Constructs a new FileDescriptorProto.
|
25917 | * @memberof google.protobuf
|
25918 | * @classdesc Represents a FileDescriptorProto.
|
25919 | * @implements IFileDescriptorProto
|
25920 | * @constructor
|
25921 | * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set
|
25922 | */
|
25923 | function FileDescriptorProto(properties) {
|
25924 | this.dependency = [];
|
25925 | this.publicDependency = [];
|
25926 | this.weakDependency = [];
|
25927 | this.messageType = [];
|
25928 | this.enumType = [];
|
25929 | this.service = [];
|
25930 | this.extension = [];
|
25931 | if (properties)
|
25932 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
25933 | if (properties[keys[i]] != null)
|
25934 | this[keys[i]] = properties[keys[i]];
|
25935 | }
|
25936 |
|
25937 | /**
|
25938 | * FileDescriptorProto name.
|
25939 | * @member {string} name
|
25940 | * @memberof google.protobuf.FileDescriptorProto
|
25941 | * @instance
|
25942 | */
|
25943 | FileDescriptorProto.prototype.name = "";
|
25944 |
|
25945 | /**
|
25946 | * FileDescriptorProto package.
|
25947 | * @member {string} package
|
25948 | * @memberof google.protobuf.FileDescriptorProto
|
25949 | * @instance
|
25950 | */
|
25951 | FileDescriptorProto.prototype["package"] = "";
|
25952 |
|
25953 | /**
|
25954 | * FileDescriptorProto dependency.
|
25955 | * @member {Array.<string>} dependency
|
25956 | * @memberof google.protobuf.FileDescriptorProto
|
25957 | * @instance
|
25958 | */
|
25959 | FileDescriptorProto.prototype.dependency = $util.emptyArray;
|
25960 |
|
25961 | /**
|
25962 | * FileDescriptorProto publicDependency.
|
25963 | * @member {Array.<number>} publicDependency
|
25964 | * @memberof google.protobuf.FileDescriptorProto
|
25965 | * @instance
|
25966 | */
|
25967 | FileDescriptorProto.prototype.publicDependency = $util.emptyArray;
|
25968 |
|
25969 | /**
|
25970 | * FileDescriptorProto weakDependency.
|
25971 | * @member {Array.<number>} weakDependency
|
25972 | * @memberof google.protobuf.FileDescriptorProto
|
25973 | * @instance
|
25974 | */
|
25975 | FileDescriptorProto.prototype.weakDependency = $util.emptyArray;
|
25976 |
|
25977 | /**
|
25978 | * FileDescriptorProto messageType.
|
25979 | * @member {Array.<google.protobuf.IDescriptorProto>} messageType
|
25980 | * @memberof google.protobuf.FileDescriptorProto
|
25981 | * @instance
|
25982 | */
|
25983 | FileDescriptorProto.prototype.messageType = $util.emptyArray;
|
25984 |
|
25985 | /**
|
25986 | * FileDescriptorProto enumType.
|
25987 | * @member {Array.<google.protobuf.IEnumDescriptorProto>} enumType
|
25988 | * @memberof google.protobuf.FileDescriptorProto
|
25989 | * @instance
|
25990 | */
|
25991 | FileDescriptorProto.prototype.enumType = $util.emptyArray;
|
25992 |
|
25993 | /**
|
25994 | * FileDescriptorProto service.
|
25995 | * @member {Array.<google.protobuf.IServiceDescriptorProto>} service
|
25996 | * @memberof google.protobuf.FileDescriptorProto
|
25997 | * @instance
|
25998 | */
|
25999 | FileDescriptorProto.prototype.service = $util.emptyArray;
|
26000 |
|
26001 | /**
|
26002 | * FileDescriptorProto extension.
|
26003 | * @member {Array.<google.protobuf.IFieldDescriptorProto>} extension
|
26004 | * @memberof google.protobuf.FileDescriptorProto
|
26005 | * @instance
|
26006 | */
|
26007 | FileDescriptorProto.prototype.extension = $util.emptyArray;
|
26008 |
|
26009 | /**
|
26010 | * FileDescriptorProto options.
|
26011 | * @member {google.protobuf.IFileOptions|null|undefined} options
|
26012 | * @memberof google.protobuf.FileDescriptorProto
|
26013 | * @instance
|
26014 | */
|
26015 | FileDescriptorProto.prototype.options = null;
|
26016 |
|
26017 | /**
|
26018 | * FileDescriptorProto sourceCodeInfo.
|
26019 | * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo
|
26020 | * @memberof google.protobuf.FileDescriptorProto
|
26021 | * @instance
|
26022 | */
|
26023 | FileDescriptorProto.prototype.sourceCodeInfo = null;
|
26024 |
|
26025 | /**
|
26026 | * FileDescriptorProto syntax.
|
26027 | * @member {string} syntax
|
26028 | * @memberof google.protobuf.FileDescriptorProto
|
26029 | * @instance
|
26030 | */
|
26031 | FileDescriptorProto.prototype.syntax = "";
|
26032 |
|
26033 | /**
|
26034 | * FileDescriptorProto edition.
|
26035 | * @member {string} edition
|
26036 | * @memberof google.protobuf.FileDescriptorProto
|
26037 | * @instance
|
26038 | */
|
26039 | FileDescriptorProto.prototype.edition = "";
|
26040 |
|
26041 | /**
|
26042 | * Creates a new FileDescriptorProto instance using the specified properties.
|
26043 | * @function create
|
26044 | * @memberof google.protobuf.FileDescriptorProto
|
26045 | * @static
|
26046 | * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set
|
26047 | * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance
|
26048 | */
|
26049 | FileDescriptorProto.create = function create(properties) {
|
26050 | return new FileDescriptorProto(properties);
|
26051 | };
|
26052 |
|
26053 | /**
|
26054 | * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
|
26055 | * @function encode
|
26056 | * @memberof google.protobuf.FileDescriptorProto
|
26057 | * @static
|
26058 | * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode
|
26059 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
26060 | * @returns {$protobuf.Writer} Writer
|
26061 | */
|
26062 | FileDescriptorProto.encode = function encode(message, writer) {
|
26063 | if (!writer)
|
26064 | writer = $Writer.create();
|
26065 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
26066 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
26067 | if (message["package"] != null && Object.hasOwnProperty.call(message, "package"))
|
26068 | writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]);
|
26069 | if (message.dependency != null && message.dependency.length)
|
26070 | for (var i = 0; i < message.dependency.length; ++i)
|
26071 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]);
|
26072 | if (message.messageType != null && message.messageType.length)
|
26073 | for (var i = 0; i < message.messageType.length; ++i)
|
26074 | $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
26075 | if (message.enumType != null && message.enumType.length)
|
26076 | for (var i = 0; i < message.enumType.length; ++i)
|
26077 | $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
26078 | if (message.service != null && message.service.length)
|
26079 | for (var i = 0; i < message.service.length; ++i)
|
26080 | $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
26081 | if (message.extension != null && message.extension.length)
|
26082 | for (var i = 0; i < message.extension.length; ++i)
|
26083 | $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
26084 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
26085 | $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
26086 | if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo"))
|
26087 | $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
26088 | if (message.publicDependency != null && message.publicDependency.length)
|
26089 | for (var i = 0; i < message.publicDependency.length; ++i)
|
26090 | writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]);
|
26091 | if (message.weakDependency != null && message.weakDependency.length)
|
26092 | for (var i = 0; i < message.weakDependency.length; ++i)
|
26093 | writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]);
|
26094 | if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax"))
|
26095 | writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax);
|
26096 | if (message.edition != null && Object.hasOwnProperty.call(message, "edition"))
|
26097 | writer.uint32(/* id 13, wireType 2 =*/106).string(message.edition);
|
26098 | return writer;
|
26099 | };
|
26100 |
|
26101 | /**
|
26102 | * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
|
26103 | * @function encodeDelimited
|
26104 | * @memberof google.protobuf.FileDescriptorProto
|
26105 | * @static
|
26106 | * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode
|
26107 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
26108 | * @returns {$protobuf.Writer} Writer
|
26109 | */
|
26110 | FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
26111 | return this.encode(message, writer).ldelim();
|
26112 | };
|
26113 |
|
26114 | /**
|
26115 | * Decodes a FileDescriptorProto message from the specified reader or buffer.
|
26116 | * @function decode
|
26117 | * @memberof google.protobuf.FileDescriptorProto
|
26118 | * @static
|
26119 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
26120 | * @param {number} [length] Message length if known beforehand
|
26121 | * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto
|
26122 | * @throws {Error} If the payload is not a reader or valid buffer
|
26123 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
26124 | */
|
26125 | FileDescriptorProto.decode = function decode(reader, length) {
|
26126 | if (!(reader instanceof $Reader))
|
26127 | reader = $Reader.create(reader);
|
26128 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto();
|
26129 | while (reader.pos < end) {
|
26130 | var tag = reader.uint32();
|
26131 | switch (tag >>> 3) {
|
26132 | case 1: {
|
26133 | message.name = reader.string();
|
26134 | break;
|
26135 | }
|
26136 | case 2: {
|
26137 | message["package"] = reader.string();
|
26138 | break;
|
26139 | }
|
26140 | case 3: {
|
26141 | if (!(message.dependency && message.dependency.length))
|
26142 | message.dependency = [];
|
26143 | message.dependency.push(reader.string());
|
26144 | break;
|
26145 | }
|
26146 | case 10: {
|
26147 | if (!(message.publicDependency && message.publicDependency.length))
|
26148 | message.publicDependency = [];
|
26149 | if ((tag & 7) === 2) {
|
26150 | var end2 = reader.uint32() + reader.pos;
|
26151 | while (reader.pos < end2)
|
26152 | message.publicDependency.push(reader.int32());
|
26153 | } else
|
26154 | message.publicDependency.push(reader.int32());
|
26155 | break;
|
26156 | }
|
26157 | case 11: {
|
26158 | if (!(message.weakDependency && message.weakDependency.length))
|
26159 | message.weakDependency = [];
|
26160 | if ((tag & 7) === 2) {
|
26161 | var end2 = reader.uint32() + reader.pos;
|
26162 | while (reader.pos < end2)
|
26163 | message.weakDependency.push(reader.int32());
|
26164 | } else
|
26165 | message.weakDependency.push(reader.int32());
|
26166 | break;
|
26167 | }
|
26168 | case 4: {
|
26169 | if (!(message.messageType && message.messageType.length))
|
26170 | message.messageType = [];
|
26171 | message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32()));
|
26172 | break;
|
26173 | }
|
26174 | case 5: {
|
26175 | if (!(message.enumType && message.enumType.length))
|
26176 | message.enumType = [];
|
26177 | message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32()));
|
26178 | break;
|
26179 | }
|
26180 | case 6: {
|
26181 | if (!(message.service && message.service.length))
|
26182 | message.service = [];
|
26183 | message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32()));
|
26184 | break;
|
26185 | }
|
26186 | case 7: {
|
26187 | if (!(message.extension && message.extension.length))
|
26188 | message.extension = [];
|
26189 | message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32()));
|
26190 | break;
|
26191 | }
|
26192 | case 8: {
|
26193 | message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32());
|
26194 | break;
|
26195 | }
|
26196 | case 9: {
|
26197 | message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32());
|
26198 | break;
|
26199 | }
|
26200 | case 12: {
|
26201 | message.syntax = reader.string();
|
26202 | break;
|
26203 | }
|
26204 | case 13: {
|
26205 | message.edition = reader.string();
|
26206 | break;
|
26207 | }
|
26208 | default:
|
26209 | reader.skipType(tag & 7);
|
26210 | break;
|
26211 | }
|
26212 | }
|
26213 | return message;
|
26214 | };
|
26215 |
|
26216 | /**
|
26217 | * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited.
|
26218 | * @function decodeDelimited
|
26219 | * @memberof google.protobuf.FileDescriptorProto
|
26220 | * @static
|
26221 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
26222 | * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto
|
26223 | * @throws {Error} If the payload is not a reader or valid buffer
|
26224 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
26225 | */
|
26226 | FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
26227 | if (!(reader instanceof $Reader))
|
26228 | reader = new $Reader(reader);
|
26229 | return this.decode(reader, reader.uint32());
|
26230 | };
|
26231 |
|
26232 | /**
|
26233 | * Verifies a FileDescriptorProto message.
|
26234 | * @function verify
|
26235 | * @memberof google.protobuf.FileDescriptorProto
|
26236 | * @static
|
26237 | * @param {Object.<string,*>} message Plain object to verify
|
26238 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
26239 | */
|
26240 | FileDescriptorProto.verify = function verify(message) {
|
26241 | if (typeof message !== "object" || message === null)
|
26242 | return "object expected";
|
26243 | if (message.name != null && message.hasOwnProperty("name"))
|
26244 | if (!$util.isString(message.name))
|
26245 | return "name: string expected";
|
26246 | if (message["package"] != null && message.hasOwnProperty("package"))
|
26247 | if (!$util.isString(message["package"]))
|
26248 | return "package: string expected";
|
26249 | if (message.dependency != null && message.hasOwnProperty("dependency")) {
|
26250 | if (!Array.isArray(message.dependency))
|
26251 | return "dependency: array expected";
|
26252 | for (var i = 0; i < message.dependency.length; ++i)
|
26253 | if (!$util.isString(message.dependency[i]))
|
26254 | return "dependency: string[] expected";
|
26255 | }
|
26256 | if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) {
|
26257 | if (!Array.isArray(message.publicDependency))
|
26258 | return "publicDependency: array expected";
|
26259 | for (var i = 0; i < message.publicDependency.length; ++i)
|
26260 | if (!$util.isInteger(message.publicDependency[i]))
|
26261 | return "publicDependency: integer[] expected";
|
26262 | }
|
26263 | if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) {
|
26264 | if (!Array.isArray(message.weakDependency))
|
26265 | return "weakDependency: array expected";
|
26266 | for (var i = 0; i < message.weakDependency.length; ++i)
|
26267 | if (!$util.isInteger(message.weakDependency[i]))
|
26268 | return "weakDependency: integer[] expected";
|
26269 | }
|
26270 | if (message.messageType != null && message.hasOwnProperty("messageType")) {
|
26271 | if (!Array.isArray(message.messageType))
|
26272 | return "messageType: array expected";
|
26273 | for (var i = 0; i < message.messageType.length; ++i) {
|
26274 | var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]);
|
26275 | if (error)
|
26276 | return "messageType." + error;
|
26277 | }
|
26278 | }
|
26279 | if (message.enumType != null && message.hasOwnProperty("enumType")) {
|
26280 | if (!Array.isArray(message.enumType))
|
26281 | return "enumType: array expected";
|
26282 | for (var i = 0; i < message.enumType.length; ++i) {
|
26283 | var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]);
|
26284 | if (error)
|
26285 | return "enumType." + error;
|
26286 | }
|
26287 | }
|
26288 | if (message.service != null && message.hasOwnProperty("service")) {
|
26289 | if (!Array.isArray(message.service))
|
26290 | return "service: array expected";
|
26291 | for (var i = 0; i < message.service.length; ++i) {
|
26292 | var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]);
|
26293 | if (error)
|
26294 | return "service." + error;
|
26295 | }
|
26296 | }
|
26297 | if (message.extension != null && message.hasOwnProperty("extension")) {
|
26298 | if (!Array.isArray(message.extension))
|
26299 | return "extension: array expected";
|
26300 | for (var i = 0; i < message.extension.length; ++i) {
|
26301 | var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]);
|
26302 | if (error)
|
26303 | return "extension." + error;
|
26304 | }
|
26305 | }
|
26306 | if (message.options != null && message.hasOwnProperty("options")) {
|
26307 | var error = $root.google.protobuf.FileOptions.verify(message.options);
|
26308 | if (error)
|
26309 | return "options." + error;
|
26310 | }
|
26311 | if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) {
|
26312 | var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo);
|
26313 | if (error)
|
26314 | return "sourceCodeInfo." + error;
|
26315 | }
|
26316 | if (message.syntax != null && message.hasOwnProperty("syntax"))
|
26317 | if (!$util.isString(message.syntax))
|
26318 | return "syntax: string expected";
|
26319 | if (message.edition != null && message.hasOwnProperty("edition"))
|
26320 | if (!$util.isString(message.edition))
|
26321 | return "edition: string expected";
|
26322 | return null;
|
26323 | };
|
26324 |
|
26325 | /**
|
26326 | * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types.
|
26327 | * @function fromObject
|
26328 | * @memberof google.protobuf.FileDescriptorProto
|
26329 | * @static
|
26330 | * @param {Object.<string,*>} object Plain object
|
26331 | * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto
|
26332 | */
|
26333 | FileDescriptorProto.fromObject = function fromObject(object) {
|
26334 | if (object instanceof $root.google.protobuf.FileDescriptorProto)
|
26335 | return object;
|
26336 | var message = new $root.google.protobuf.FileDescriptorProto();
|
26337 | if (object.name != null)
|
26338 | message.name = String(object.name);
|
26339 | if (object["package"] != null)
|
26340 | message["package"] = String(object["package"]);
|
26341 | if (object.dependency) {
|
26342 | if (!Array.isArray(object.dependency))
|
26343 | throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected");
|
26344 | message.dependency = [];
|
26345 | for (var i = 0; i < object.dependency.length; ++i)
|
26346 | message.dependency[i] = String(object.dependency[i]);
|
26347 | }
|
26348 | if (object.publicDependency) {
|
26349 | if (!Array.isArray(object.publicDependency))
|
26350 | throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected");
|
26351 | message.publicDependency = [];
|
26352 | for (var i = 0; i < object.publicDependency.length; ++i)
|
26353 | message.publicDependency[i] = object.publicDependency[i] | 0;
|
26354 | }
|
26355 | if (object.weakDependency) {
|
26356 | if (!Array.isArray(object.weakDependency))
|
26357 | throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected");
|
26358 | message.weakDependency = [];
|
26359 | for (var i = 0; i < object.weakDependency.length; ++i)
|
26360 | message.weakDependency[i] = object.weakDependency[i] | 0;
|
26361 | }
|
26362 | if (object.messageType) {
|
26363 | if (!Array.isArray(object.messageType))
|
26364 | throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected");
|
26365 | message.messageType = [];
|
26366 | for (var i = 0; i < object.messageType.length; ++i) {
|
26367 | if (typeof object.messageType[i] !== "object")
|
26368 | throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected");
|
26369 | message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]);
|
26370 | }
|
26371 | }
|
26372 | if (object.enumType) {
|
26373 | if (!Array.isArray(object.enumType))
|
26374 | throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected");
|
26375 | message.enumType = [];
|
26376 | for (var i = 0; i < object.enumType.length; ++i) {
|
26377 | if (typeof object.enumType[i] !== "object")
|
26378 | throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected");
|
26379 | message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]);
|
26380 | }
|
26381 | }
|
26382 | if (object.service) {
|
26383 | if (!Array.isArray(object.service))
|
26384 | throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected");
|
26385 | message.service = [];
|
26386 | for (var i = 0; i < object.service.length; ++i) {
|
26387 | if (typeof object.service[i] !== "object")
|
26388 | throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected");
|
26389 | message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]);
|
26390 | }
|
26391 | }
|
26392 | if (object.extension) {
|
26393 | if (!Array.isArray(object.extension))
|
26394 | throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected");
|
26395 | message.extension = [];
|
26396 | for (var i = 0; i < object.extension.length; ++i) {
|
26397 | if (typeof object.extension[i] !== "object")
|
26398 | throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected");
|
26399 | message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]);
|
26400 | }
|
26401 | }
|
26402 | if (object.options != null) {
|
26403 | if (typeof object.options !== "object")
|
26404 | throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected");
|
26405 | message.options = $root.google.protobuf.FileOptions.fromObject(object.options);
|
26406 | }
|
26407 | if (object.sourceCodeInfo != null) {
|
26408 | if (typeof object.sourceCodeInfo !== "object")
|
26409 | throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected");
|
26410 | message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo);
|
26411 | }
|
26412 | if (object.syntax != null)
|
26413 | message.syntax = String(object.syntax);
|
26414 | if (object.edition != null)
|
26415 | message.edition = String(object.edition);
|
26416 | return message;
|
26417 | };
|
26418 |
|
26419 | /**
|
26420 | * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified.
|
26421 | * @function toObject
|
26422 | * @memberof google.protobuf.FileDescriptorProto
|
26423 | * @static
|
26424 | * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto
|
26425 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
26426 | * @returns {Object.<string,*>} Plain object
|
26427 | */
|
26428 | FileDescriptorProto.toObject = function toObject(message, options) {
|
26429 | if (!options)
|
26430 | options = {};
|
26431 | var object = {};
|
26432 | if (options.arrays || options.defaults) {
|
26433 | object.dependency = [];
|
26434 | object.messageType = [];
|
26435 | object.enumType = [];
|
26436 | object.service = [];
|
26437 | object.extension = [];
|
26438 | object.publicDependency = [];
|
26439 | object.weakDependency = [];
|
26440 | }
|
26441 | if (options.defaults) {
|
26442 | object.name = "";
|
26443 | object["package"] = "";
|
26444 | object.options = null;
|
26445 | object.sourceCodeInfo = null;
|
26446 | object.syntax = "";
|
26447 | object.edition = "";
|
26448 | }
|
26449 | if (message.name != null && message.hasOwnProperty("name"))
|
26450 | object.name = message.name;
|
26451 | if (message["package"] != null && message.hasOwnProperty("package"))
|
26452 | object["package"] = message["package"];
|
26453 | if (message.dependency && message.dependency.length) {
|
26454 | object.dependency = [];
|
26455 | for (var j = 0; j < message.dependency.length; ++j)
|
26456 | object.dependency[j] = message.dependency[j];
|
26457 | }
|
26458 | if (message.messageType && message.messageType.length) {
|
26459 | object.messageType = [];
|
26460 | for (var j = 0; j < message.messageType.length; ++j)
|
26461 | object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options);
|
26462 | }
|
26463 | if (message.enumType && message.enumType.length) {
|
26464 | object.enumType = [];
|
26465 | for (var j = 0; j < message.enumType.length; ++j)
|
26466 | object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options);
|
26467 | }
|
26468 | if (message.service && message.service.length) {
|
26469 | object.service = [];
|
26470 | for (var j = 0; j < message.service.length; ++j)
|
26471 | object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options);
|
26472 | }
|
26473 | if (message.extension && message.extension.length) {
|
26474 | object.extension = [];
|
26475 | for (var j = 0; j < message.extension.length; ++j)
|
26476 | object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options);
|
26477 | }
|
26478 | if (message.options != null && message.hasOwnProperty("options"))
|
26479 | object.options = $root.google.protobuf.FileOptions.toObject(message.options, options);
|
26480 | if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo"))
|
26481 | object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options);
|
26482 | if (message.publicDependency && message.publicDependency.length) {
|
26483 | object.publicDependency = [];
|
26484 | for (var j = 0; j < message.publicDependency.length; ++j)
|
26485 | object.publicDependency[j] = message.publicDependency[j];
|
26486 | }
|
26487 | if (message.weakDependency && message.weakDependency.length) {
|
26488 | object.weakDependency = [];
|
26489 | for (var j = 0; j < message.weakDependency.length; ++j)
|
26490 | object.weakDependency[j] = message.weakDependency[j];
|
26491 | }
|
26492 | if (message.syntax != null && message.hasOwnProperty("syntax"))
|
26493 | object.syntax = message.syntax;
|
26494 | if (message.edition != null && message.hasOwnProperty("edition"))
|
26495 | object.edition = message.edition;
|
26496 | return object;
|
26497 | };
|
26498 |
|
26499 | /**
|
26500 | * Converts this FileDescriptorProto to JSON.
|
26501 | * @function toJSON
|
26502 | * @memberof google.protobuf.FileDescriptorProto
|
26503 | * @instance
|
26504 | * @returns {Object.<string,*>} JSON object
|
26505 | */
|
26506 | FileDescriptorProto.prototype.toJSON = function toJSON() {
|
26507 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
26508 | };
|
26509 |
|
26510 | /**
|
26511 | * Gets the default type url for FileDescriptorProto
|
26512 | * @function getTypeUrl
|
26513 | * @memberof google.protobuf.FileDescriptorProto
|
26514 | * @static
|
26515 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
26516 | * @returns {string} The default type url
|
26517 | */
|
26518 | FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
26519 | if (typeUrlPrefix === undefined) {
|
26520 | typeUrlPrefix = "type.googleapis.com";
|
26521 | }
|
26522 | return typeUrlPrefix + "/google.protobuf.FileDescriptorProto";
|
26523 | };
|
26524 |
|
26525 | return FileDescriptorProto;
|
26526 | })();
|
26527 |
|
26528 | protobuf.DescriptorProto = (function() {
|
26529 |
|
26530 | /**
|
26531 | * Properties of a DescriptorProto.
|
26532 | * @memberof google.protobuf
|
26533 | * @interface IDescriptorProto
|
26534 | * @property {string|null} [name] DescriptorProto name
|
26535 | * @property {Array.<google.protobuf.IFieldDescriptorProto>|null} [field] DescriptorProto field
|
26536 | * @property {Array.<google.protobuf.IFieldDescriptorProto>|null} [extension] DescriptorProto extension
|
26537 | * @property {Array.<google.protobuf.IDescriptorProto>|null} [nestedType] DescriptorProto nestedType
|
26538 | * @property {Array.<google.protobuf.IEnumDescriptorProto>|null} [enumType] DescriptorProto enumType
|
26539 | * @property {Array.<google.protobuf.DescriptorProto.IExtensionRange>|null} [extensionRange] DescriptorProto extensionRange
|
26540 | * @property {Array.<google.protobuf.IOneofDescriptorProto>|null} [oneofDecl] DescriptorProto oneofDecl
|
26541 | * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options
|
26542 | * @property {Array.<google.protobuf.DescriptorProto.IReservedRange>|null} [reservedRange] DescriptorProto reservedRange
|
26543 | * @property {Array.<string>|null} [reservedName] DescriptorProto reservedName
|
26544 | */
|
26545 |
|
26546 | /**
|
26547 | * Constructs a new DescriptorProto.
|
26548 | * @memberof google.protobuf
|
26549 | * @classdesc Represents a DescriptorProto.
|
26550 | * @implements IDescriptorProto
|
26551 | * @constructor
|
26552 | * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set
|
26553 | */
|
26554 | function DescriptorProto(properties) {
|
26555 | this.field = [];
|
26556 | this.extension = [];
|
26557 | this.nestedType = [];
|
26558 | this.enumType = [];
|
26559 | this.extensionRange = [];
|
26560 | this.oneofDecl = [];
|
26561 | this.reservedRange = [];
|
26562 | this.reservedName = [];
|
26563 | if (properties)
|
26564 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
26565 | if (properties[keys[i]] != null)
|
26566 | this[keys[i]] = properties[keys[i]];
|
26567 | }
|
26568 |
|
26569 | /**
|
26570 | * DescriptorProto name.
|
26571 | * @member {string} name
|
26572 | * @memberof google.protobuf.DescriptorProto
|
26573 | * @instance
|
26574 | */
|
26575 | DescriptorProto.prototype.name = "";
|
26576 |
|
26577 | /**
|
26578 | * DescriptorProto field.
|
26579 | * @member {Array.<google.protobuf.IFieldDescriptorProto>} field
|
26580 | * @memberof google.protobuf.DescriptorProto
|
26581 | * @instance
|
26582 | */
|
26583 | DescriptorProto.prototype.field = $util.emptyArray;
|
26584 |
|
26585 | /**
|
26586 | * DescriptorProto extension.
|
26587 | * @member {Array.<google.protobuf.IFieldDescriptorProto>} extension
|
26588 | * @memberof google.protobuf.DescriptorProto
|
26589 | * @instance
|
26590 | */
|
26591 | DescriptorProto.prototype.extension = $util.emptyArray;
|
26592 |
|
26593 | /**
|
26594 | * DescriptorProto nestedType.
|
26595 | * @member {Array.<google.protobuf.IDescriptorProto>} nestedType
|
26596 | * @memberof google.protobuf.DescriptorProto
|
26597 | * @instance
|
26598 | */
|
26599 | DescriptorProto.prototype.nestedType = $util.emptyArray;
|
26600 |
|
26601 | /**
|
26602 | * DescriptorProto enumType.
|
26603 | * @member {Array.<google.protobuf.IEnumDescriptorProto>} enumType
|
26604 | * @memberof google.protobuf.DescriptorProto
|
26605 | * @instance
|
26606 | */
|
26607 | DescriptorProto.prototype.enumType = $util.emptyArray;
|
26608 |
|
26609 | /**
|
26610 | * DescriptorProto extensionRange.
|
26611 | * @member {Array.<google.protobuf.DescriptorProto.IExtensionRange>} extensionRange
|
26612 | * @memberof google.protobuf.DescriptorProto
|
26613 | * @instance
|
26614 | */
|
26615 | DescriptorProto.prototype.extensionRange = $util.emptyArray;
|
26616 |
|
26617 | /**
|
26618 | * DescriptorProto oneofDecl.
|
26619 | * @member {Array.<google.protobuf.IOneofDescriptorProto>} oneofDecl
|
26620 | * @memberof google.protobuf.DescriptorProto
|
26621 | * @instance
|
26622 | */
|
26623 | DescriptorProto.prototype.oneofDecl = $util.emptyArray;
|
26624 |
|
26625 | /**
|
26626 | * DescriptorProto options.
|
26627 | * @member {google.protobuf.IMessageOptions|null|undefined} options
|
26628 | * @memberof google.protobuf.DescriptorProto
|
26629 | * @instance
|
26630 | */
|
26631 | DescriptorProto.prototype.options = null;
|
26632 |
|
26633 | /**
|
26634 | * DescriptorProto reservedRange.
|
26635 | * @member {Array.<google.protobuf.DescriptorProto.IReservedRange>} reservedRange
|
26636 | * @memberof google.protobuf.DescriptorProto
|
26637 | * @instance
|
26638 | */
|
26639 | DescriptorProto.prototype.reservedRange = $util.emptyArray;
|
26640 |
|
26641 | /**
|
26642 | * DescriptorProto reservedName.
|
26643 | * @member {Array.<string>} reservedName
|
26644 | * @memberof google.protobuf.DescriptorProto
|
26645 | * @instance
|
26646 | */
|
26647 | DescriptorProto.prototype.reservedName = $util.emptyArray;
|
26648 |
|
26649 | /**
|
26650 | * Creates a new DescriptorProto instance using the specified properties.
|
26651 | * @function create
|
26652 | * @memberof google.protobuf.DescriptorProto
|
26653 | * @static
|
26654 | * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set
|
26655 | * @returns {google.protobuf.DescriptorProto} DescriptorProto instance
|
26656 | */
|
26657 | DescriptorProto.create = function create(properties) {
|
26658 | return new DescriptorProto(properties);
|
26659 | };
|
26660 |
|
26661 | /**
|
26662 | * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages.
|
26663 | * @function encode
|
26664 | * @memberof google.protobuf.DescriptorProto
|
26665 | * @static
|
26666 | * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode
|
26667 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
26668 | * @returns {$protobuf.Writer} Writer
|
26669 | */
|
26670 | DescriptorProto.encode = function encode(message, writer) {
|
26671 | if (!writer)
|
26672 | writer = $Writer.create();
|
26673 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
26674 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
26675 | if (message.field != null && message.field.length)
|
26676 | for (var i = 0; i < message.field.length; ++i)
|
26677 | $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
26678 | if (message.nestedType != null && message.nestedType.length)
|
26679 | for (var i = 0; i < message.nestedType.length; ++i)
|
26680 | $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
26681 | if (message.enumType != null && message.enumType.length)
|
26682 | for (var i = 0; i < message.enumType.length; ++i)
|
26683 | $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
26684 | if (message.extensionRange != null && message.extensionRange.length)
|
26685 | for (var i = 0; i < message.extensionRange.length; ++i)
|
26686 | $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
26687 | if (message.extension != null && message.extension.length)
|
26688 | for (var i = 0; i < message.extension.length; ++i)
|
26689 | $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
26690 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
26691 | $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
26692 | if (message.oneofDecl != null && message.oneofDecl.length)
|
26693 | for (var i = 0; i < message.oneofDecl.length; ++i)
|
26694 | $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
26695 | if (message.reservedRange != null && message.reservedRange.length)
|
26696 | for (var i = 0; i < message.reservedRange.length; ++i)
|
26697 | $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
|
26698 | if (message.reservedName != null && message.reservedName.length)
|
26699 | for (var i = 0; i < message.reservedName.length; ++i)
|
26700 | writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]);
|
26701 | return writer;
|
26702 | };
|
26703 |
|
26704 | /**
|
26705 | * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages.
|
26706 | * @function encodeDelimited
|
26707 | * @memberof google.protobuf.DescriptorProto
|
26708 | * @static
|
26709 | * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode
|
26710 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
26711 | * @returns {$protobuf.Writer} Writer
|
26712 | */
|
26713 | DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
26714 | return this.encode(message, writer).ldelim();
|
26715 | };
|
26716 |
|
26717 | /**
|
26718 | * Decodes a DescriptorProto message from the specified reader or buffer.
|
26719 | * @function decode
|
26720 | * @memberof google.protobuf.DescriptorProto
|
26721 | * @static
|
26722 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
26723 | * @param {number} [length] Message length if known beforehand
|
26724 | * @returns {google.protobuf.DescriptorProto} DescriptorProto
|
26725 | * @throws {Error} If the payload is not a reader or valid buffer
|
26726 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
26727 | */
|
26728 | DescriptorProto.decode = function decode(reader, length) {
|
26729 | if (!(reader instanceof $Reader))
|
26730 | reader = $Reader.create(reader);
|
26731 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto();
|
26732 | while (reader.pos < end) {
|
26733 | var tag = reader.uint32();
|
26734 | switch (tag >>> 3) {
|
26735 | case 1: {
|
26736 | message.name = reader.string();
|
26737 | break;
|
26738 | }
|
26739 | case 2: {
|
26740 | if (!(message.field && message.field.length))
|
26741 | message.field = [];
|
26742 | message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32()));
|
26743 | break;
|
26744 | }
|
26745 | case 6: {
|
26746 | if (!(message.extension && message.extension.length))
|
26747 | message.extension = [];
|
26748 | message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32()));
|
26749 | break;
|
26750 | }
|
26751 | case 3: {
|
26752 | if (!(message.nestedType && message.nestedType.length))
|
26753 | message.nestedType = [];
|
26754 | message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32()));
|
26755 | break;
|
26756 | }
|
26757 | case 4: {
|
26758 | if (!(message.enumType && message.enumType.length))
|
26759 | message.enumType = [];
|
26760 | message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32()));
|
26761 | break;
|
26762 | }
|
26763 | case 5: {
|
26764 | if (!(message.extensionRange && message.extensionRange.length))
|
26765 | message.extensionRange = [];
|
26766 | message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32()));
|
26767 | break;
|
26768 | }
|
26769 | case 8: {
|
26770 | if (!(message.oneofDecl && message.oneofDecl.length))
|
26771 | message.oneofDecl = [];
|
26772 | message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32()));
|
26773 | break;
|
26774 | }
|
26775 | case 7: {
|
26776 | message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32());
|
26777 | break;
|
26778 | }
|
26779 | case 9: {
|
26780 | if (!(message.reservedRange && message.reservedRange.length))
|
26781 | message.reservedRange = [];
|
26782 | message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32()));
|
26783 | break;
|
26784 | }
|
26785 | case 10: {
|
26786 | if (!(message.reservedName && message.reservedName.length))
|
26787 | message.reservedName = [];
|
26788 | message.reservedName.push(reader.string());
|
26789 | break;
|
26790 | }
|
26791 | default:
|
26792 | reader.skipType(tag & 7);
|
26793 | break;
|
26794 | }
|
26795 | }
|
26796 | return message;
|
26797 | };
|
26798 |
|
26799 | /**
|
26800 | * Decodes a DescriptorProto message from the specified reader or buffer, length delimited.
|
26801 | * @function decodeDelimited
|
26802 | * @memberof google.protobuf.DescriptorProto
|
26803 | * @static
|
26804 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
26805 | * @returns {google.protobuf.DescriptorProto} DescriptorProto
|
26806 | * @throws {Error} If the payload is not a reader or valid buffer
|
26807 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
26808 | */
|
26809 | DescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
26810 | if (!(reader instanceof $Reader))
|
26811 | reader = new $Reader(reader);
|
26812 | return this.decode(reader, reader.uint32());
|
26813 | };
|
26814 |
|
26815 | /**
|
26816 | * Verifies a DescriptorProto message.
|
26817 | * @function verify
|
26818 | * @memberof google.protobuf.DescriptorProto
|
26819 | * @static
|
26820 | * @param {Object.<string,*>} message Plain object to verify
|
26821 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
26822 | */
|
26823 | DescriptorProto.verify = function verify(message) {
|
26824 | if (typeof message !== "object" || message === null)
|
26825 | return "object expected";
|
26826 | if (message.name != null && message.hasOwnProperty("name"))
|
26827 | if (!$util.isString(message.name))
|
26828 | return "name: string expected";
|
26829 | if (message.field != null && message.hasOwnProperty("field")) {
|
26830 | if (!Array.isArray(message.field))
|
26831 | return "field: array expected";
|
26832 | for (var i = 0; i < message.field.length; ++i) {
|
26833 | var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]);
|
26834 | if (error)
|
26835 | return "field." + error;
|
26836 | }
|
26837 | }
|
26838 | if (message.extension != null && message.hasOwnProperty("extension")) {
|
26839 | if (!Array.isArray(message.extension))
|
26840 | return "extension: array expected";
|
26841 | for (var i = 0; i < message.extension.length; ++i) {
|
26842 | var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]);
|
26843 | if (error)
|
26844 | return "extension." + error;
|
26845 | }
|
26846 | }
|
26847 | if (message.nestedType != null && message.hasOwnProperty("nestedType")) {
|
26848 | if (!Array.isArray(message.nestedType))
|
26849 | return "nestedType: array expected";
|
26850 | for (var i = 0; i < message.nestedType.length; ++i) {
|
26851 | var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]);
|
26852 | if (error)
|
26853 | return "nestedType." + error;
|
26854 | }
|
26855 | }
|
26856 | if (message.enumType != null && message.hasOwnProperty("enumType")) {
|
26857 | if (!Array.isArray(message.enumType))
|
26858 | return "enumType: array expected";
|
26859 | for (var i = 0; i < message.enumType.length; ++i) {
|
26860 | var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]);
|
26861 | if (error)
|
26862 | return "enumType." + error;
|
26863 | }
|
26864 | }
|
26865 | if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) {
|
26866 | if (!Array.isArray(message.extensionRange))
|
26867 | return "extensionRange: array expected";
|
26868 | for (var i = 0; i < message.extensionRange.length; ++i) {
|
26869 | var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]);
|
26870 | if (error)
|
26871 | return "extensionRange." + error;
|
26872 | }
|
26873 | }
|
26874 | if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) {
|
26875 | if (!Array.isArray(message.oneofDecl))
|
26876 | return "oneofDecl: array expected";
|
26877 | for (var i = 0; i < message.oneofDecl.length; ++i) {
|
26878 | var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]);
|
26879 | if (error)
|
26880 | return "oneofDecl." + error;
|
26881 | }
|
26882 | }
|
26883 | if (message.options != null && message.hasOwnProperty("options")) {
|
26884 | var error = $root.google.protobuf.MessageOptions.verify(message.options);
|
26885 | if (error)
|
26886 | return "options." + error;
|
26887 | }
|
26888 | if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) {
|
26889 | if (!Array.isArray(message.reservedRange))
|
26890 | return "reservedRange: array expected";
|
26891 | for (var i = 0; i < message.reservedRange.length; ++i) {
|
26892 | var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]);
|
26893 | if (error)
|
26894 | return "reservedRange." + error;
|
26895 | }
|
26896 | }
|
26897 | if (message.reservedName != null && message.hasOwnProperty("reservedName")) {
|
26898 | if (!Array.isArray(message.reservedName))
|
26899 | return "reservedName: array expected";
|
26900 | for (var i = 0; i < message.reservedName.length; ++i)
|
26901 | if (!$util.isString(message.reservedName[i]))
|
26902 | return "reservedName: string[] expected";
|
26903 | }
|
26904 | return null;
|
26905 | };
|
26906 |
|
26907 | /**
|
26908 | * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types.
|
26909 | * @function fromObject
|
26910 | * @memberof google.protobuf.DescriptorProto
|
26911 | * @static
|
26912 | * @param {Object.<string,*>} object Plain object
|
26913 | * @returns {google.protobuf.DescriptorProto} DescriptorProto
|
26914 | */
|
26915 | DescriptorProto.fromObject = function fromObject(object) {
|
26916 | if (object instanceof $root.google.protobuf.DescriptorProto)
|
26917 | return object;
|
26918 | var message = new $root.google.protobuf.DescriptorProto();
|
26919 | if (object.name != null)
|
26920 | message.name = String(object.name);
|
26921 | if (object.field) {
|
26922 | if (!Array.isArray(object.field))
|
26923 | throw TypeError(".google.protobuf.DescriptorProto.field: array expected");
|
26924 | message.field = [];
|
26925 | for (var i = 0; i < object.field.length; ++i) {
|
26926 | if (typeof object.field[i] !== "object")
|
26927 | throw TypeError(".google.protobuf.DescriptorProto.field: object expected");
|
26928 | message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]);
|
26929 | }
|
26930 | }
|
26931 | if (object.extension) {
|
26932 | if (!Array.isArray(object.extension))
|
26933 | throw TypeError(".google.protobuf.DescriptorProto.extension: array expected");
|
26934 | message.extension = [];
|
26935 | for (var i = 0; i < object.extension.length; ++i) {
|
26936 | if (typeof object.extension[i] !== "object")
|
26937 | throw TypeError(".google.protobuf.DescriptorProto.extension: object expected");
|
26938 | message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]);
|
26939 | }
|
26940 | }
|
26941 | if (object.nestedType) {
|
26942 | if (!Array.isArray(object.nestedType))
|
26943 | throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected");
|
26944 | message.nestedType = [];
|
26945 | for (var i = 0; i < object.nestedType.length; ++i) {
|
26946 | if (typeof object.nestedType[i] !== "object")
|
26947 | throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected");
|
26948 | message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]);
|
26949 | }
|
26950 | }
|
26951 | if (object.enumType) {
|
26952 | if (!Array.isArray(object.enumType))
|
26953 | throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected");
|
26954 | message.enumType = [];
|
26955 | for (var i = 0; i < object.enumType.length; ++i) {
|
26956 | if (typeof object.enumType[i] !== "object")
|
26957 | throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected");
|
26958 | message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]);
|
26959 | }
|
26960 | }
|
26961 | if (object.extensionRange) {
|
26962 | if (!Array.isArray(object.extensionRange))
|
26963 | throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected");
|
26964 | message.extensionRange = [];
|
26965 | for (var i = 0; i < object.extensionRange.length; ++i) {
|
26966 | if (typeof object.extensionRange[i] !== "object")
|
26967 | throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected");
|
26968 | message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]);
|
26969 | }
|
26970 | }
|
26971 | if (object.oneofDecl) {
|
26972 | if (!Array.isArray(object.oneofDecl))
|
26973 | throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected");
|
26974 | message.oneofDecl = [];
|
26975 | for (var i = 0; i < object.oneofDecl.length; ++i) {
|
26976 | if (typeof object.oneofDecl[i] !== "object")
|
26977 | throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected");
|
26978 | message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]);
|
26979 | }
|
26980 | }
|
26981 | if (object.options != null) {
|
26982 | if (typeof object.options !== "object")
|
26983 | throw TypeError(".google.protobuf.DescriptorProto.options: object expected");
|
26984 | message.options = $root.google.protobuf.MessageOptions.fromObject(object.options);
|
26985 | }
|
26986 | if (object.reservedRange) {
|
26987 | if (!Array.isArray(object.reservedRange))
|
26988 | throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected");
|
26989 | message.reservedRange = [];
|
26990 | for (var i = 0; i < object.reservedRange.length; ++i) {
|
26991 | if (typeof object.reservedRange[i] !== "object")
|
26992 | throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected");
|
26993 | message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]);
|
26994 | }
|
26995 | }
|
26996 | if (object.reservedName) {
|
26997 | if (!Array.isArray(object.reservedName))
|
26998 | throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected");
|
26999 | message.reservedName = [];
|
27000 | for (var i = 0; i < object.reservedName.length; ++i)
|
27001 | message.reservedName[i] = String(object.reservedName[i]);
|
27002 | }
|
27003 | return message;
|
27004 | };
|
27005 |
|
27006 | /**
|
27007 | * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified.
|
27008 | * @function toObject
|
27009 | * @memberof google.protobuf.DescriptorProto
|
27010 | * @static
|
27011 | * @param {google.protobuf.DescriptorProto} message DescriptorProto
|
27012 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
27013 | * @returns {Object.<string,*>} Plain object
|
27014 | */
|
27015 | DescriptorProto.toObject = function toObject(message, options) {
|
27016 | if (!options)
|
27017 | options = {};
|
27018 | var object = {};
|
27019 | if (options.arrays || options.defaults) {
|
27020 | object.field = [];
|
27021 | object.nestedType = [];
|
27022 | object.enumType = [];
|
27023 | object.extensionRange = [];
|
27024 | object.extension = [];
|
27025 | object.oneofDecl = [];
|
27026 | object.reservedRange = [];
|
27027 | object.reservedName = [];
|
27028 | }
|
27029 | if (options.defaults) {
|
27030 | object.name = "";
|
27031 | object.options = null;
|
27032 | }
|
27033 | if (message.name != null && message.hasOwnProperty("name"))
|
27034 | object.name = message.name;
|
27035 | if (message.field && message.field.length) {
|
27036 | object.field = [];
|
27037 | for (var j = 0; j < message.field.length; ++j)
|
27038 | object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options);
|
27039 | }
|
27040 | if (message.nestedType && message.nestedType.length) {
|
27041 | object.nestedType = [];
|
27042 | for (var j = 0; j < message.nestedType.length; ++j)
|
27043 | object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options);
|
27044 | }
|
27045 | if (message.enumType && message.enumType.length) {
|
27046 | object.enumType = [];
|
27047 | for (var j = 0; j < message.enumType.length; ++j)
|
27048 | object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options);
|
27049 | }
|
27050 | if (message.extensionRange && message.extensionRange.length) {
|
27051 | object.extensionRange = [];
|
27052 | for (var j = 0; j < message.extensionRange.length; ++j)
|
27053 | object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options);
|
27054 | }
|
27055 | if (message.extension && message.extension.length) {
|
27056 | object.extension = [];
|
27057 | for (var j = 0; j < message.extension.length; ++j)
|
27058 | object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options);
|
27059 | }
|
27060 | if (message.options != null && message.hasOwnProperty("options"))
|
27061 | object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options);
|
27062 | if (message.oneofDecl && message.oneofDecl.length) {
|
27063 | object.oneofDecl = [];
|
27064 | for (var j = 0; j < message.oneofDecl.length; ++j)
|
27065 | object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options);
|
27066 | }
|
27067 | if (message.reservedRange && message.reservedRange.length) {
|
27068 | object.reservedRange = [];
|
27069 | for (var j = 0; j < message.reservedRange.length; ++j)
|
27070 | object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options);
|
27071 | }
|
27072 | if (message.reservedName && message.reservedName.length) {
|
27073 | object.reservedName = [];
|
27074 | for (var j = 0; j < message.reservedName.length; ++j)
|
27075 | object.reservedName[j] = message.reservedName[j];
|
27076 | }
|
27077 | return object;
|
27078 | };
|
27079 |
|
27080 | /**
|
27081 | * Converts this DescriptorProto to JSON.
|
27082 | * @function toJSON
|
27083 | * @memberof google.protobuf.DescriptorProto
|
27084 | * @instance
|
27085 | * @returns {Object.<string,*>} JSON object
|
27086 | */
|
27087 | DescriptorProto.prototype.toJSON = function toJSON() {
|
27088 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
27089 | };
|
27090 |
|
27091 | /**
|
27092 | * Gets the default type url for DescriptorProto
|
27093 | * @function getTypeUrl
|
27094 | * @memberof google.protobuf.DescriptorProto
|
27095 | * @static
|
27096 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
27097 | * @returns {string} The default type url
|
27098 | */
|
27099 | DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
27100 | if (typeUrlPrefix === undefined) {
|
27101 | typeUrlPrefix = "type.googleapis.com";
|
27102 | }
|
27103 | return typeUrlPrefix + "/google.protobuf.DescriptorProto";
|
27104 | };
|
27105 |
|
27106 | DescriptorProto.ExtensionRange = (function() {
|
27107 |
|
27108 | /**
|
27109 | * Properties of an ExtensionRange.
|
27110 | * @memberof google.protobuf.DescriptorProto
|
27111 | * @interface IExtensionRange
|
27112 | * @property {number|null} [start] ExtensionRange start
|
27113 | * @property {number|null} [end] ExtensionRange end
|
27114 | * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options
|
27115 | */
|
27116 |
|
27117 | /**
|
27118 | * Constructs a new ExtensionRange.
|
27119 | * @memberof google.protobuf.DescriptorProto
|
27120 | * @classdesc Represents an ExtensionRange.
|
27121 | * @implements IExtensionRange
|
27122 | * @constructor
|
27123 | * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set
|
27124 | */
|
27125 | function ExtensionRange(properties) {
|
27126 | if (properties)
|
27127 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
27128 | if (properties[keys[i]] != null)
|
27129 | this[keys[i]] = properties[keys[i]];
|
27130 | }
|
27131 |
|
27132 | /**
|
27133 | * ExtensionRange start.
|
27134 | * @member {number} start
|
27135 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
27136 | * @instance
|
27137 | */
|
27138 | ExtensionRange.prototype.start = 0;
|
27139 |
|
27140 | /**
|
27141 | * ExtensionRange end.
|
27142 | * @member {number} end
|
27143 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
27144 | * @instance
|
27145 | */
|
27146 | ExtensionRange.prototype.end = 0;
|
27147 |
|
27148 | /**
|
27149 | * ExtensionRange options.
|
27150 | * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options
|
27151 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
27152 | * @instance
|
27153 | */
|
27154 | ExtensionRange.prototype.options = null;
|
27155 |
|
27156 | /**
|
27157 | * Creates a new ExtensionRange instance using the specified properties.
|
27158 | * @function create
|
27159 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
27160 | * @static
|
27161 | * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set
|
27162 | * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance
|
27163 | */
|
27164 | ExtensionRange.create = function create(properties) {
|
27165 | return new ExtensionRange(properties);
|
27166 | };
|
27167 |
|
27168 | /**
|
27169 | * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages.
|
27170 | * @function encode
|
27171 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
27172 | * @static
|
27173 | * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode
|
27174 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
27175 | * @returns {$protobuf.Writer} Writer
|
27176 | */
|
27177 | ExtensionRange.encode = function encode(message, writer) {
|
27178 | if (!writer)
|
27179 | writer = $Writer.create();
|
27180 | if (message.start != null && Object.hasOwnProperty.call(message, "start"))
|
27181 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start);
|
27182 | if (message.end != null && Object.hasOwnProperty.call(message, "end"))
|
27183 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end);
|
27184 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
27185 | $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
27186 | return writer;
|
27187 | };
|
27188 |
|
27189 | /**
|
27190 | * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages.
|
27191 | * @function encodeDelimited
|
27192 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
27193 | * @static
|
27194 | * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode
|
27195 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
27196 | * @returns {$protobuf.Writer} Writer
|
27197 | */
|
27198 | ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) {
|
27199 | return this.encode(message, writer).ldelim();
|
27200 | };
|
27201 |
|
27202 | /**
|
27203 | * Decodes an ExtensionRange message from the specified reader or buffer.
|
27204 | * @function decode
|
27205 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
27206 | * @static
|
27207 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
27208 | * @param {number} [length] Message length if known beforehand
|
27209 | * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange
|
27210 | * @throws {Error} If the payload is not a reader or valid buffer
|
27211 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
27212 | */
|
27213 | ExtensionRange.decode = function decode(reader, length) {
|
27214 | if (!(reader instanceof $Reader))
|
27215 | reader = $Reader.create(reader);
|
27216 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange();
|
27217 | while (reader.pos < end) {
|
27218 | var tag = reader.uint32();
|
27219 | switch (tag >>> 3) {
|
27220 | case 1: {
|
27221 | message.start = reader.int32();
|
27222 | break;
|
27223 | }
|
27224 | case 2: {
|
27225 | message.end = reader.int32();
|
27226 | break;
|
27227 | }
|
27228 | case 3: {
|
27229 | message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32());
|
27230 | break;
|
27231 | }
|
27232 | default:
|
27233 | reader.skipType(tag & 7);
|
27234 | break;
|
27235 | }
|
27236 | }
|
27237 | return message;
|
27238 | };
|
27239 |
|
27240 | /**
|
27241 | * Decodes an ExtensionRange message from the specified reader or buffer, length delimited.
|
27242 | * @function decodeDelimited
|
27243 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
27244 | * @static
|
27245 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
27246 | * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange
|
27247 | * @throws {Error} If the payload is not a reader or valid buffer
|
27248 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
27249 | */
|
27250 | ExtensionRange.decodeDelimited = function decodeDelimited(reader) {
|
27251 | if (!(reader instanceof $Reader))
|
27252 | reader = new $Reader(reader);
|
27253 | return this.decode(reader, reader.uint32());
|
27254 | };
|
27255 |
|
27256 | /**
|
27257 | * Verifies an ExtensionRange message.
|
27258 | * @function verify
|
27259 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
27260 | * @static
|
27261 | * @param {Object.<string,*>} message Plain object to verify
|
27262 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
27263 | */
|
27264 | ExtensionRange.verify = function verify(message) {
|
27265 | if (typeof message !== "object" || message === null)
|
27266 | return "object expected";
|
27267 | if (message.start != null && message.hasOwnProperty("start"))
|
27268 | if (!$util.isInteger(message.start))
|
27269 | return "start: integer expected";
|
27270 | if (message.end != null && message.hasOwnProperty("end"))
|
27271 | if (!$util.isInteger(message.end))
|
27272 | return "end: integer expected";
|
27273 | if (message.options != null && message.hasOwnProperty("options")) {
|
27274 | var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options);
|
27275 | if (error)
|
27276 | return "options." + error;
|
27277 | }
|
27278 | return null;
|
27279 | };
|
27280 |
|
27281 | /**
|
27282 | * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types.
|
27283 | * @function fromObject
|
27284 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
27285 | * @static
|
27286 | * @param {Object.<string,*>} object Plain object
|
27287 | * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange
|
27288 | */
|
27289 | ExtensionRange.fromObject = function fromObject(object) {
|
27290 | if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange)
|
27291 | return object;
|
27292 | var message = new $root.google.protobuf.DescriptorProto.ExtensionRange();
|
27293 | if (object.start != null)
|
27294 | message.start = object.start | 0;
|
27295 | if (object.end != null)
|
27296 | message.end = object.end | 0;
|
27297 | if (object.options != null) {
|
27298 | if (typeof object.options !== "object")
|
27299 | throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected");
|
27300 | message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options);
|
27301 | }
|
27302 | return message;
|
27303 | };
|
27304 |
|
27305 | /**
|
27306 | * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified.
|
27307 | * @function toObject
|
27308 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
27309 | * @static
|
27310 | * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange
|
27311 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
27312 | * @returns {Object.<string,*>} Plain object
|
27313 | */
|
27314 | ExtensionRange.toObject = function toObject(message, options) {
|
27315 | if (!options)
|
27316 | options = {};
|
27317 | var object = {};
|
27318 | if (options.defaults) {
|
27319 | object.start = 0;
|
27320 | object.end = 0;
|
27321 | object.options = null;
|
27322 | }
|
27323 | if (message.start != null && message.hasOwnProperty("start"))
|
27324 | object.start = message.start;
|
27325 | if (message.end != null && message.hasOwnProperty("end"))
|
27326 | object.end = message.end;
|
27327 | if (message.options != null && message.hasOwnProperty("options"))
|
27328 | object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options);
|
27329 | return object;
|
27330 | };
|
27331 |
|
27332 | /**
|
27333 | * Converts this ExtensionRange to JSON.
|
27334 | * @function toJSON
|
27335 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
27336 | * @instance
|
27337 | * @returns {Object.<string,*>} JSON object
|
27338 | */
|
27339 | ExtensionRange.prototype.toJSON = function toJSON() {
|
27340 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
27341 | };
|
27342 |
|
27343 | /**
|
27344 | * Gets the default type url for ExtensionRange
|
27345 | * @function getTypeUrl
|
27346 | * @memberof google.protobuf.DescriptorProto.ExtensionRange
|
27347 | * @static
|
27348 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
27349 | * @returns {string} The default type url
|
27350 | */
|
27351 | ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
27352 | if (typeUrlPrefix === undefined) {
|
27353 | typeUrlPrefix = "type.googleapis.com";
|
27354 | }
|
27355 | return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange";
|
27356 | };
|
27357 |
|
27358 | return ExtensionRange;
|
27359 | })();
|
27360 |
|
27361 | DescriptorProto.ReservedRange = (function() {
|
27362 |
|
27363 | /**
|
27364 | * Properties of a ReservedRange.
|
27365 | * @memberof google.protobuf.DescriptorProto
|
27366 | * @interface IReservedRange
|
27367 | * @property {number|null} [start] ReservedRange start
|
27368 | * @property {number|null} [end] ReservedRange end
|
27369 | */
|
27370 |
|
27371 | /**
|
27372 | * Constructs a new ReservedRange.
|
27373 | * @memberof google.protobuf.DescriptorProto
|
27374 | * @classdesc Represents a ReservedRange.
|
27375 | * @implements IReservedRange
|
27376 | * @constructor
|
27377 | * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set
|
27378 | */
|
27379 | function ReservedRange(properties) {
|
27380 | if (properties)
|
27381 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
27382 | if (properties[keys[i]] != null)
|
27383 | this[keys[i]] = properties[keys[i]];
|
27384 | }
|
27385 |
|
27386 | /**
|
27387 | * ReservedRange start.
|
27388 | * @member {number} start
|
27389 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
27390 | * @instance
|
27391 | */
|
27392 | ReservedRange.prototype.start = 0;
|
27393 |
|
27394 | /**
|
27395 | * ReservedRange end.
|
27396 | * @member {number} end
|
27397 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
27398 | * @instance
|
27399 | */
|
27400 | ReservedRange.prototype.end = 0;
|
27401 |
|
27402 | /**
|
27403 | * Creates a new ReservedRange instance using the specified properties.
|
27404 | * @function create
|
27405 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
27406 | * @static
|
27407 | * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set
|
27408 | * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance
|
27409 | */
|
27410 | ReservedRange.create = function create(properties) {
|
27411 | return new ReservedRange(properties);
|
27412 | };
|
27413 |
|
27414 | /**
|
27415 | * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages.
|
27416 | * @function encode
|
27417 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
27418 | * @static
|
27419 | * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode
|
27420 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
27421 | * @returns {$protobuf.Writer} Writer
|
27422 | */
|
27423 | ReservedRange.encode = function encode(message, writer) {
|
27424 | if (!writer)
|
27425 | writer = $Writer.create();
|
27426 | if (message.start != null && Object.hasOwnProperty.call(message, "start"))
|
27427 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start);
|
27428 | if (message.end != null && Object.hasOwnProperty.call(message, "end"))
|
27429 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end);
|
27430 | return writer;
|
27431 | };
|
27432 |
|
27433 | /**
|
27434 | * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages.
|
27435 | * @function encodeDelimited
|
27436 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
27437 | * @static
|
27438 | * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode
|
27439 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
27440 | * @returns {$protobuf.Writer} Writer
|
27441 | */
|
27442 | ReservedRange.encodeDelimited = function encodeDelimited(message, writer) {
|
27443 | return this.encode(message, writer).ldelim();
|
27444 | };
|
27445 |
|
27446 | /**
|
27447 | * Decodes a ReservedRange message from the specified reader or buffer.
|
27448 | * @function decode
|
27449 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
27450 | * @static
|
27451 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
27452 | * @param {number} [length] Message length if known beforehand
|
27453 | * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange
|
27454 | * @throws {Error} If the payload is not a reader or valid buffer
|
27455 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
27456 | */
|
27457 | ReservedRange.decode = function decode(reader, length) {
|
27458 | if (!(reader instanceof $Reader))
|
27459 | reader = $Reader.create(reader);
|
27460 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange();
|
27461 | while (reader.pos < end) {
|
27462 | var tag = reader.uint32();
|
27463 | switch (tag >>> 3) {
|
27464 | case 1: {
|
27465 | message.start = reader.int32();
|
27466 | break;
|
27467 | }
|
27468 | case 2: {
|
27469 | message.end = reader.int32();
|
27470 | break;
|
27471 | }
|
27472 | default:
|
27473 | reader.skipType(tag & 7);
|
27474 | break;
|
27475 | }
|
27476 | }
|
27477 | return message;
|
27478 | };
|
27479 |
|
27480 | /**
|
27481 | * Decodes a ReservedRange message from the specified reader or buffer, length delimited.
|
27482 | * @function decodeDelimited
|
27483 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
27484 | * @static
|
27485 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
27486 | * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange
|
27487 | * @throws {Error} If the payload is not a reader or valid buffer
|
27488 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
27489 | */
|
27490 | ReservedRange.decodeDelimited = function decodeDelimited(reader) {
|
27491 | if (!(reader instanceof $Reader))
|
27492 | reader = new $Reader(reader);
|
27493 | return this.decode(reader, reader.uint32());
|
27494 | };
|
27495 |
|
27496 | /**
|
27497 | * Verifies a ReservedRange message.
|
27498 | * @function verify
|
27499 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
27500 | * @static
|
27501 | * @param {Object.<string,*>} message Plain object to verify
|
27502 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
27503 | */
|
27504 | ReservedRange.verify = function verify(message) {
|
27505 | if (typeof message !== "object" || message === null)
|
27506 | return "object expected";
|
27507 | if (message.start != null && message.hasOwnProperty("start"))
|
27508 | if (!$util.isInteger(message.start))
|
27509 | return "start: integer expected";
|
27510 | if (message.end != null && message.hasOwnProperty("end"))
|
27511 | if (!$util.isInteger(message.end))
|
27512 | return "end: integer expected";
|
27513 | return null;
|
27514 | };
|
27515 |
|
27516 | /**
|
27517 | * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types.
|
27518 | * @function fromObject
|
27519 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
27520 | * @static
|
27521 | * @param {Object.<string,*>} object Plain object
|
27522 | * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange
|
27523 | */
|
27524 | ReservedRange.fromObject = function fromObject(object) {
|
27525 | if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange)
|
27526 | return object;
|
27527 | var message = new $root.google.protobuf.DescriptorProto.ReservedRange();
|
27528 | if (object.start != null)
|
27529 | message.start = object.start | 0;
|
27530 | if (object.end != null)
|
27531 | message.end = object.end | 0;
|
27532 | return message;
|
27533 | };
|
27534 |
|
27535 | /**
|
27536 | * Creates a plain object from a ReservedRange message. Also converts values to other types if specified.
|
27537 | * @function toObject
|
27538 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
27539 | * @static
|
27540 | * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange
|
27541 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
27542 | * @returns {Object.<string,*>} Plain object
|
27543 | */
|
27544 | ReservedRange.toObject = function toObject(message, options) {
|
27545 | if (!options)
|
27546 | options = {};
|
27547 | var object = {};
|
27548 | if (options.defaults) {
|
27549 | object.start = 0;
|
27550 | object.end = 0;
|
27551 | }
|
27552 | if (message.start != null && message.hasOwnProperty("start"))
|
27553 | object.start = message.start;
|
27554 | if (message.end != null && message.hasOwnProperty("end"))
|
27555 | object.end = message.end;
|
27556 | return object;
|
27557 | };
|
27558 |
|
27559 | /**
|
27560 | * Converts this ReservedRange to JSON.
|
27561 | * @function toJSON
|
27562 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
27563 | * @instance
|
27564 | * @returns {Object.<string,*>} JSON object
|
27565 | */
|
27566 | ReservedRange.prototype.toJSON = function toJSON() {
|
27567 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
27568 | };
|
27569 |
|
27570 | /**
|
27571 | * Gets the default type url for ReservedRange
|
27572 | * @function getTypeUrl
|
27573 | * @memberof google.protobuf.DescriptorProto.ReservedRange
|
27574 | * @static
|
27575 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
27576 | * @returns {string} The default type url
|
27577 | */
|
27578 | ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
27579 | if (typeUrlPrefix === undefined) {
|
27580 | typeUrlPrefix = "type.googleapis.com";
|
27581 | }
|
27582 | return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange";
|
27583 | };
|
27584 |
|
27585 | return ReservedRange;
|
27586 | })();
|
27587 |
|
27588 | return DescriptorProto;
|
27589 | })();
|
27590 |
|
27591 | protobuf.ExtensionRangeOptions = (function() {
|
27592 |
|
27593 | /**
|
27594 | * Properties of an ExtensionRangeOptions.
|
27595 | * @memberof google.protobuf
|
27596 | * @interface IExtensionRangeOptions
|
27597 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption
|
27598 | * @property {Array.<google.protobuf.ExtensionRangeOptions.IDeclaration>|null} [declaration] ExtensionRangeOptions declaration
|
27599 | * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features
|
27600 | * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification
|
27601 | */
|
27602 |
|
27603 | /**
|
27604 | * Constructs a new ExtensionRangeOptions.
|
27605 | * @memberof google.protobuf
|
27606 | * @classdesc Represents an ExtensionRangeOptions.
|
27607 | * @implements IExtensionRangeOptions
|
27608 | * @constructor
|
27609 | * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set
|
27610 | */
|
27611 | function ExtensionRangeOptions(properties) {
|
27612 | this.uninterpretedOption = [];
|
27613 | this.declaration = [];
|
27614 | if (properties)
|
27615 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
27616 | if (properties[keys[i]] != null)
|
27617 | this[keys[i]] = properties[keys[i]];
|
27618 | }
|
27619 |
|
27620 | /**
|
27621 | * ExtensionRangeOptions uninterpretedOption.
|
27622 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
27623 | * @memberof google.protobuf.ExtensionRangeOptions
|
27624 | * @instance
|
27625 | */
|
27626 | ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray;
|
27627 |
|
27628 | /**
|
27629 | * ExtensionRangeOptions declaration.
|
27630 | * @member {Array.<google.protobuf.ExtensionRangeOptions.IDeclaration>} declaration
|
27631 | * @memberof google.protobuf.ExtensionRangeOptions
|
27632 | * @instance
|
27633 | */
|
27634 | ExtensionRangeOptions.prototype.declaration = $util.emptyArray;
|
27635 |
|
27636 | /**
|
27637 | * ExtensionRangeOptions features.
|
27638 | * @member {google.protobuf.IFeatureSet|null|undefined} features
|
27639 | * @memberof google.protobuf.ExtensionRangeOptions
|
27640 | * @instance
|
27641 | */
|
27642 | ExtensionRangeOptions.prototype.features = null;
|
27643 |
|
27644 | /**
|
27645 | * ExtensionRangeOptions verification.
|
27646 | * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification
|
27647 | * @memberof google.protobuf.ExtensionRangeOptions
|
27648 | * @instance
|
27649 | */
|
27650 | ExtensionRangeOptions.prototype.verification = 1;
|
27651 |
|
27652 | /**
|
27653 | * Creates a new ExtensionRangeOptions instance using the specified properties.
|
27654 | * @function create
|
27655 | * @memberof google.protobuf.ExtensionRangeOptions
|
27656 | * @static
|
27657 | * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set
|
27658 | * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance
|
27659 | */
|
27660 | ExtensionRangeOptions.create = function create(properties) {
|
27661 | return new ExtensionRangeOptions(properties);
|
27662 | };
|
27663 |
|
27664 | /**
|
27665 | * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages.
|
27666 | * @function encode
|
27667 | * @memberof google.protobuf.ExtensionRangeOptions
|
27668 | * @static
|
27669 | * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode
|
27670 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
27671 | * @returns {$protobuf.Writer} Writer
|
27672 | */
|
27673 | ExtensionRangeOptions.encode = function encode(message, writer) {
|
27674 | if (!writer)
|
27675 | writer = $Writer.create();
|
27676 | if (message.declaration != null && message.declaration.length)
|
27677 | for (var i = 0; i < message.declaration.length; ++i)
|
27678 | $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
27679 | if (message.verification != null && Object.hasOwnProperty.call(message, "verification"))
|
27680 | writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification);
|
27681 | if (message.features != null && Object.hasOwnProperty.call(message, "features"))
|
27682 | $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim();
|
27683 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
27684 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
27685 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
27686 | return writer;
|
27687 | };
|
27688 |
|
27689 | /**
|
27690 | * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages.
|
27691 | * @function encodeDelimited
|
27692 | * @memberof google.protobuf.ExtensionRangeOptions
|
27693 | * @static
|
27694 | * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode
|
27695 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
27696 | * @returns {$protobuf.Writer} Writer
|
27697 | */
|
27698 | ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
27699 | return this.encode(message, writer).ldelim();
|
27700 | };
|
27701 |
|
27702 | /**
|
27703 | * Decodes an ExtensionRangeOptions message from the specified reader or buffer.
|
27704 | * @function decode
|
27705 | * @memberof google.protobuf.ExtensionRangeOptions
|
27706 | * @static
|
27707 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
27708 | * @param {number} [length] Message length if known beforehand
|
27709 | * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions
|
27710 | * @throws {Error} If the payload is not a reader or valid buffer
|
27711 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
27712 | */
|
27713 | ExtensionRangeOptions.decode = function decode(reader, length) {
|
27714 | if (!(reader instanceof $Reader))
|
27715 | reader = $Reader.create(reader);
|
27716 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions();
|
27717 | while (reader.pos < end) {
|
27718 | var tag = reader.uint32();
|
27719 | switch (tag >>> 3) {
|
27720 | case 999: {
|
27721 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
27722 | message.uninterpretedOption = [];
|
27723 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
27724 | break;
|
27725 | }
|
27726 | case 2: {
|
27727 | if (!(message.declaration && message.declaration.length))
|
27728 | message.declaration = [];
|
27729 | message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32()));
|
27730 | break;
|
27731 | }
|
27732 | case 50: {
|
27733 | message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
|
27734 | break;
|
27735 | }
|
27736 | case 3: {
|
27737 | message.verification = reader.int32();
|
27738 | break;
|
27739 | }
|
27740 | default:
|
27741 | reader.skipType(tag & 7);
|
27742 | break;
|
27743 | }
|
27744 | }
|
27745 | return message;
|
27746 | };
|
27747 |
|
27748 | /**
|
27749 | * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited.
|
27750 | * @function decodeDelimited
|
27751 | * @memberof google.protobuf.ExtensionRangeOptions
|
27752 | * @static
|
27753 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
27754 | * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions
|
27755 | * @throws {Error} If the payload is not a reader or valid buffer
|
27756 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
27757 | */
|
27758 | ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) {
|
27759 | if (!(reader instanceof $Reader))
|
27760 | reader = new $Reader(reader);
|
27761 | return this.decode(reader, reader.uint32());
|
27762 | };
|
27763 |
|
27764 | /**
|
27765 | * Verifies an ExtensionRangeOptions message.
|
27766 | * @function verify
|
27767 | * @memberof google.protobuf.ExtensionRangeOptions
|
27768 | * @static
|
27769 | * @param {Object.<string,*>} message Plain object to verify
|
27770 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
27771 | */
|
27772 | ExtensionRangeOptions.verify = function verify(message) {
|
27773 | if (typeof message !== "object" || message === null)
|
27774 | return "object expected";
|
27775 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
27776 | if (!Array.isArray(message.uninterpretedOption))
|
27777 | return "uninterpretedOption: array expected";
|
27778 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
27779 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
27780 | if (error)
|
27781 | return "uninterpretedOption." + error;
|
27782 | }
|
27783 | }
|
27784 | if (message.declaration != null && message.hasOwnProperty("declaration")) {
|
27785 | if (!Array.isArray(message.declaration))
|
27786 | return "declaration: array expected";
|
27787 | for (var i = 0; i < message.declaration.length; ++i) {
|
27788 | var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]);
|
27789 | if (error)
|
27790 | return "declaration." + error;
|
27791 | }
|
27792 | }
|
27793 | if (message.features != null && message.hasOwnProperty("features")) {
|
27794 | var error = $root.google.protobuf.FeatureSet.verify(message.features);
|
27795 | if (error)
|
27796 | return "features." + error;
|
27797 | }
|
27798 | if (message.verification != null && message.hasOwnProperty("verification"))
|
27799 | switch (message.verification) {
|
27800 | default:
|
27801 | return "verification: enum value expected";
|
27802 | case 0:
|
27803 | case 1:
|
27804 | break;
|
27805 | }
|
27806 | return null;
|
27807 | };
|
27808 |
|
27809 | /**
|
27810 | * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types.
|
27811 | * @function fromObject
|
27812 | * @memberof google.protobuf.ExtensionRangeOptions
|
27813 | * @static
|
27814 | * @param {Object.<string,*>} object Plain object
|
27815 | * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions
|
27816 | */
|
27817 | ExtensionRangeOptions.fromObject = function fromObject(object) {
|
27818 | if (object instanceof $root.google.protobuf.ExtensionRangeOptions)
|
27819 | return object;
|
27820 | var message = new $root.google.protobuf.ExtensionRangeOptions();
|
27821 | if (object.uninterpretedOption) {
|
27822 | if (!Array.isArray(object.uninterpretedOption))
|
27823 | throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected");
|
27824 | message.uninterpretedOption = [];
|
27825 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
27826 | if (typeof object.uninterpretedOption[i] !== "object")
|
27827 | throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected");
|
27828 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
27829 | }
|
27830 | }
|
27831 | if (object.declaration) {
|
27832 | if (!Array.isArray(object.declaration))
|
27833 | throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected");
|
27834 | message.declaration = [];
|
27835 | for (var i = 0; i < object.declaration.length; ++i) {
|
27836 | if (typeof object.declaration[i] !== "object")
|
27837 | throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected");
|
27838 | message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]);
|
27839 | }
|
27840 | }
|
27841 | if (object.features != null) {
|
27842 | if (typeof object.features !== "object")
|
27843 | throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected");
|
27844 | message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
|
27845 | }
|
27846 | switch (object.verification) {
|
27847 | case "DECLARATION":
|
27848 | case 0:
|
27849 | message.verification = 0;
|
27850 | break;
|
27851 | default:
|
27852 | if (typeof object.verification === "number") {
|
27853 | message.verification = object.verification;
|
27854 | break;
|
27855 | }
|
27856 | break;
|
27857 | case "UNVERIFIED":
|
27858 | case 1:
|
27859 | message.verification = 1;
|
27860 | break;
|
27861 | }
|
27862 | return message;
|
27863 | };
|
27864 |
|
27865 | /**
|
27866 | * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified.
|
27867 | * @function toObject
|
27868 | * @memberof google.protobuf.ExtensionRangeOptions
|
27869 | * @static
|
27870 | * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions
|
27871 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
27872 | * @returns {Object.<string,*>} Plain object
|
27873 | */
|
27874 | ExtensionRangeOptions.toObject = function toObject(message, options) {
|
27875 | if (!options)
|
27876 | options = {};
|
27877 | var object = {};
|
27878 | if (options.arrays || options.defaults) {
|
27879 | object.declaration = [];
|
27880 | object.uninterpretedOption = [];
|
27881 | }
|
27882 | if (options.defaults) {
|
27883 | object.verification = options.enums === String ? "UNVERIFIED" : 1;
|
27884 | object.features = null;
|
27885 | }
|
27886 | if (message.declaration && message.declaration.length) {
|
27887 | object.declaration = [];
|
27888 | for (var j = 0; j < message.declaration.length; ++j)
|
27889 | object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options);
|
27890 | }
|
27891 | if (message.verification != null && message.hasOwnProperty("verification"))
|
27892 | object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification;
|
27893 | if (message.features != null && message.hasOwnProperty("features"))
|
27894 | object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
|
27895 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
27896 | object.uninterpretedOption = [];
|
27897 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
27898 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
27899 | }
|
27900 | return object;
|
27901 | };
|
27902 |
|
27903 | /**
|
27904 | * Converts this ExtensionRangeOptions to JSON.
|
27905 | * @function toJSON
|
27906 | * @memberof google.protobuf.ExtensionRangeOptions
|
27907 | * @instance
|
27908 | * @returns {Object.<string,*>} JSON object
|
27909 | */
|
27910 | ExtensionRangeOptions.prototype.toJSON = function toJSON() {
|
27911 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
27912 | };
|
27913 |
|
27914 | /**
|
27915 | * Gets the default type url for ExtensionRangeOptions
|
27916 | * @function getTypeUrl
|
27917 | * @memberof google.protobuf.ExtensionRangeOptions
|
27918 | * @static
|
27919 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
27920 | * @returns {string} The default type url
|
27921 | */
|
27922 | ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
27923 | if (typeUrlPrefix === undefined) {
|
27924 | typeUrlPrefix = "type.googleapis.com";
|
27925 | }
|
27926 | return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions";
|
27927 | };
|
27928 |
|
27929 | ExtensionRangeOptions.Declaration = (function() {
|
27930 |
|
27931 | /**
|
27932 | * Properties of a Declaration.
|
27933 | * @memberof google.protobuf.ExtensionRangeOptions
|
27934 | * @interface IDeclaration
|
27935 | * @property {number|null} [number] Declaration number
|
27936 | * @property {string|null} [fullName] Declaration fullName
|
27937 | * @property {string|null} [type] Declaration type
|
27938 | * @property {boolean|null} [reserved] Declaration reserved
|
27939 | * @property {boolean|null} [repeated] Declaration repeated
|
27940 | */
|
27941 |
|
27942 | /**
|
27943 | * Constructs a new Declaration.
|
27944 | * @memberof google.protobuf.ExtensionRangeOptions
|
27945 | * @classdesc Represents a Declaration.
|
27946 | * @implements IDeclaration
|
27947 | * @constructor
|
27948 | * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set
|
27949 | */
|
27950 | function Declaration(properties) {
|
27951 | if (properties)
|
27952 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
27953 | if (properties[keys[i]] != null)
|
27954 | this[keys[i]] = properties[keys[i]];
|
27955 | }
|
27956 |
|
27957 | /**
|
27958 | * Declaration number.
|
27959 | * @member {number} number
|
27960 | * @memberof google.protobuf.ExtensionRangeOptions.Declaration
|
27961 | * @instance
|
27962 | */
|
27963 | Declaration.prototype.number = 0;
|
27964 |
|
27965 | /**
|
27966 | * Declaration fullName.
|
27967 | * @member {string} fullName
|
27968 | * @memberof google.protobuf.ExtensionRangeOptions.Declaration
|
27969 | * @instance
|
27970 | */
|
27971 | Declaration.prototype.fullName = "";
|
27972 |
|
27973 | /**
|
27974 | * Declaration type.
|
27975 | * @member {string} type
|
27976 | * @memberof google.protobuf.ExtensionRangeOptions.Declaration
|
27977 | * @instance
|
27978 | */
|
27979 | Declaration.prototype.type = "";
|
27980 |
|
27981 | /**
|
27982 | * Declaration reserved.
|
27983 | * @member {boolean} reserved
|
27984 | * @memberof google.protobuf.ExtensionRangeOptions.Declaration
|
27985 | * @instance
|
27986 | */
|
27987 | Declaration.prototype.reserved = false;
|
27988 |
|
27989 | /**
|
27990 | * Declaration repeated.
|
27991 | * @member {boolean} repeated
|
27992 | * @memberof google.protobuf.ExtensionRangeOptions.Declaration
|
27993 | * @instance
|
27994 | */
|
27995 | Declaration.prototype.repeated = false;
|
27996 |
|
27997 | /**
|
27998 | * Creates a new Declaration instance using the specified properties.
|
27999 | * @function create
|
28000 | * @memberof google.protobuf.ExtensionRangeOptions.Declaration
|
28001 | * @static
|
28002 | * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set
|
28003 | * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance
|
28004 | */
|
28005 | Declaration.create = function create(properties) {
|
28006 | return new Declaration(properties);
|
28007 | };
|
28008 |
|
28009 | /**
|
28010 | * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages.
|
28011 | * @function encode
|
28012 | * @memberof google.protobuf.ExtensionRangeOptions.Declaration
|
28013 | * @static
|
28014 | * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode
|
28015 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
28016 | * @returns {$protobuf.Writer} Writer
|
28017 | */
|
28018 | Declaration.encode = function encode(message, writer) {
|
28019 | if (!writer)
|
28020 | writer = $Writer.create();
|
28021 | if (message.number != null && Object.hasOwnProperty.call(message, "number"))
|
28022 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number);
|
28023 | if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName"))
|
28024 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName);
|
28025 | if (message.type != null && Object.hasOwnProperty.call(message, "type"))
|
28026 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.type);
|
28027 | if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved"))
|
28028 | writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved);
|
28029 | if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated"))
|
28030 | writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated);
|
28031 | return writer;
|
28032 | };
|
28033 |
|
28034 | /**
|
28035 | * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages.
|
28036 | * @function encodeDelimited
|
28037 | * @memberof google.protobuf.ExtensionRangeOptions.Declaration
|
28038 | * @static
|
28039 | * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode
|
28040 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
28041 | * @returns {$protobuf.Writer} Writer
|
28042 | */
|
28043 | Declaration.encodeDelimited = function encodeDelimited(message, writer) {
|
28044 | return this.encode(message, writer).ldelim();
|
28045 | };
|
28046 |
|
28047 | /**
|
28048 | * Decodes a Declaration message from the specified reader or buffer.
|
28049 | * @function decode
|
28050 | * @memberof google.protobuf.ExtensionRangeOptions.Declaration
|
28051 | * @static
|
28052 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
28053 | * @param {number} [length] Message length if known beforehand
|
28054 | * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration
|
28055 | * @throws {Error} If the payload is not a reader or valid buffer
|
28056 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
28057 | */
|
28058 | Declaration.decode = function decode(reader, length) {
|
28059 | if (!(reader instanceof $Reader))
|
28060 | reader = $Reader.create(reader);
|
28061 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration();
|
28062 | while (reader.pos < end) {
|
28063 | var tag = reader.uint32();
|
28064 | switch (tag >>> 3) {
|
28065 | case 1: {
|
28066 | message.number = reader.int32();
|
28067 | break;
|
28068 | }
|
28069 | case 2: {
|
28070 | message.fullName = reader.string();
|
28071 | break;
|
28072 | }
|
28073 | case 3: {
|
28074 | message.type = reader.string();
|
28075 | break;
|
28076 | }
|
28077 | case 5: {
|
28078 | message.reserved = reader.bool();
|
28079 | break;
|
28080 | }
|
28081 | case 6: {
|
28082 | message.repeated = reader.bool();
|
28083 | break;
|
28084 | }
|
28085 | default:
|
28086 | reader.skipType(tag & 7);
|
28087 | break;
|
28088 | }
|
28089 | }
|
28090 | return message;
|
28091 | };
|
28092 |
|
28093 | /**
|
28094 | * Decodes a Declaration message from the specified reader or buffer, length delimited.
|
28095 | * @function decodeDelimited
|
28096 | * @memberof google.protobuf.ExtensionRangeOptions.Declaration
|
28097 | * @static
|
28098 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
28099 | * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration
|
28100 | * @throws {Error} If the payload is not a reader or valid buffer
|
28101 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
28102 | */
|
28103 | Declaration.decodeDelimited = function decodeDelimited(reader) {
|
28104 | if (!(reader instanceof $Reader))
|
28105 | reader = new $Reader(reader);
|
28106 | return this.decode(reader, reader.uint32());
|
28107 | };
|
28108 |
|
28109 | /**
|
28110 | * Verifies a Declaration message.
|
28111 | * @function verify
|
28112 | * @memberof google.protobuf.ExtensionRangeOptions.Declaration
|
28113 | * @static
|
28114 | * @param {Object.<string,*>} message Plain object to verify
|
28115 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
28116 | */
|
28117 | Declaration.verify = function verify(message) {
|
28118 | if (typeof message !== "object" || message === null)
|
28119 | return "object expected";
|
28120 | if (message.number != null && message.hasOwnProperty("number"))
|
28121 | if (!$util.isInteger(message.number))
|
28122 | return "number: integer expected";
|
28123 | if (message.fullName != null && message.hasOwnProperty("fullName"))
|
28124 | if (!$util.isString(message.fullName))
|
28125 | return "fullName: string expected";
|
28126 | if (message.type != null && message.hasOwnProperty("type"))
|
28127 | if (!$util.isString(message.type))
|
28128 | return "type: string expected";
|
28129 | if (message.reserved != null && message.hasOwnProperty("reserved"))
|
28130 | if (typeof message.reserved !== "boolean")
|
28131 | return "reserved: boolean expected";
|
28132 | if (message.repeated != null && message.hasOwnProperty("repeated"))
|
28133 | if (typeof message.repeated !== "boolean")
|
28134 | return "repeated: boolean expected";
|
28135 | return null;
|
28136 | };
|
28137 |
|
28138 | /**
|
28139 | * Creates a Declaration message from a plain object. Also converts values to their respective internal types.
|
28140 | * @function fromObject
|
28141 | * @memberof google.protobuf.ExtensionRangeOptions.Declaration
|
28142 | * @static
|
28143 | * @param {Object.<string,*>} object Plain object
|
28144 | * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration
|
28145 | */
|
28146 | Declaration.fromObject = function fromObject(object) {
|
28147 | if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration)
|
28148 | return object;
|
28149 | var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration();
|
28150 | if (object.number != null)
|
28151 | message.number = object.number | 0;
|
28152 | if (object.fullName != null)
|
28153 | message.fullName = String(object.fullName);
|
28154 | if (object.type != null)
|
28155 | message.type = String(object.type);
|
28156 | if (object.reserved != null)
|
28157 | message.reserved = Boolean(object.reserved);
|
28158 | if (object.repeated != null)
|
28159 | message.repeated = Boolean(object.repeated);
|
28160 | return message;
|
28161 | };
|
28162 |
|
28163 | /**
|
28164 | * Creates a plain object from a Declaration message. Also converts values to other types if specified.
|
28165 | * @function toObject
|
28166 | * @memberof google.protobuf.ExtensionRangeOptions.Declaration
|
28167 | * @static
|
28168 | * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration
|
28169 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
28170 | * @returns {Object.<string,*>} Plain object
|
28171 | */
|
28172 | Declaration.toObject = function toObject(message, options) {
|
28173 | if (!options)
|
28174 | options = {};
|
28175 | var object = {};
|
28176 | if (options.defaults) {
|
28177 | object.number = 0;
|
28178 | object.fullName = "";
|
28179 | object.type = "";
|
28180 | object.reserved = false;
|
28181 | object.repeated = false;
|
28182 | }
|
28183 | if (message.number != null && message.hasOwnProperty("number"))
|
28184 | object.number = message.number;
|
28185 | if (message.fullName != null && message.hasOwnProperty("fullName"))
|
28186 | object.fullName = message.fullName;
|
28187 | if (message.type != null && message.hasOwnProperty("type"))
|
28188 | object.type = message.type;
|
28189 | if (message.reserved != null && message.hasOwnProperty("reserved"))
|
28190 | object.reserved = message.reserved;
|
28191 | if (message.repeated != null && message.hasOwnProperty("repeated"))
|
28192 | object.repeated = message.repeated;
|
28193 | return object;
|
28194 | };
|
28195 |
|
28196 | /**
|
28197 | * Converts this Declaration to JSON.
|
28198 | * @function toJSON
|
28199 | * @memberof google.protobuf.ExtensionRangeOptions.Declaration
|
28200 | * @instance
|
28201 | * @returns {Object.<string,*>} JSON object
|
28202 | */
|
28203 | Declaration.prototype.toJSON = function toJSON() {
|
28204 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
28205 | };
|
28206 |
|
28207 | /**
|
28208 | * Gets the default type url for Declaration
|
28209 | * @function getTypeUrl
|
28210 | * @memberof google.protobuf.ExtensionRangeOptions.Declaration
|
28211 | * @static
|
28212 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
28213 | * @returns {string} The default type url
|
28214 | */
|
28215 | Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
28216 | if (typeUrlPrefix === undefined) {
|
28217 | typeUrlPrefix = "type.googleapis.com";
|
28218 | }
|
28219 | return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration";
|
28220 | };
|
28221 |
|
28222 | return Declaration;
|
28223 | })();
|
28224 |
|
28225 | /**
|
28226 | * VerificationState enum.
|
28227 | * @name google.protobuf.ExtensionRangeOptions.VerificationState
|
28228 | * @enum {number}
|
28229 | * @property {number} DECLARATION=0 DECLARATION value
|
28230 | * @property {number} UNVERIFIED=1 UNVERIFIED value
|
28231 | */
|
28232 | ExtensionRangeOptions.VerificationState = (function() {
|
28233 | var valuesById = {}, values = Object.create(valuesById);
|
28234 | values[valuesById[0] = "DECLARATION"] = 0;
|
28235 | values[valuesById[1] = "UNVERIFIED"] = 1;
|
28236 | return values;
|
28237 | })();
|
28238 |
|
28239 | return ExtensionRangeOptions;
|
28240 | })();
|
28241 |
|
28242 | protobuf.FieldDescriptorProto = (function() {
|
28243 |
|
28244 | /**
|
28245 | * Properties of a FieldDescriptorProto.
|
28246 | * @memberof google.protobuf
|
28247 | * @interface IFieldDescriptorProto
|
28248 | * @property {string|null} [name] FieldDescriptorProto name
|
28249 | * @property {number|null} [number] FieldDescriptorProto number
|
28250 | * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label
|
28251 | * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type
|
28252 | * @property {string|null} [typeName] FieldDescriptorProto typeName
|
28253 | * @property {string|null} [extendee] FieldDescriptorProto extendee
|
28254 | * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue
|
28255 | * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex
|
28256 | * @property {string|null} [jsonName] FieldDescriptorProto jsonName
|
28257 | * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options
|
28258 | * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional
|
28259 | */
|
28260 |
|
28261 | /**
|
28262 | * Constructs a new FieldDescriptorProto.
|
28263 | * @memberof google.protobuf
|
28264 | * @classdesc Represents a FieldDescriptorProto.
|
28265 | * @implements IFieldDescriptorProto
|
28266 | * @constructor
|
28267 | * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set
|
28268 | */
|
28269 | function FieldDescriptorProto(properties) {
|
28270 | if (properties)
|
28271 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
28272 | if (properties[keys[i]] != null)
|
28273 | this[keys[i]] = properties[keys[i]];
|
28274 | }
|
28275 |
|
28276 | /**
|
28277 | * FieldDescriptorProto name.
|
28278 | * @member {string} name
|
28279 | * @memberof google.protobuf.FieldDescriptorProto
|
28280 | * @instance
|
28281 | */
|
28282 | FieldDescriptorProto.prototype.name = "";
|
28283 |
|
28284 | /**
|
28285 | * FieldDescriptorProto number.
|
28286 | * @member {number} number
|
28287 | * @memberof google.protobuf.FieldDescriptorProto
|
28288 | * @instance
|
28289 | */
|
28290 | FieldDescriptorProto.prototype.number = 0;
|
28291 |
|
28292 | /**
|
28293 | * FieldDescriptorProto label.
|
28294 | * @member {google.protobuf.FieldDescriptorProto.Label} label
|
28295 | * @memberof google.protobuf.FieldDescriptorProto
|
28296 | * @instance
|
28297 | */
|
28298 | FieldDescriptorProto.prototype.label = 1;
|
28299 |
|
28300 | /**
|
28301 | * FieldDescriptorProto type.
|
28302 | * @member {google.protobuf.FieldDescriptorProto.Type} type
|
28303 | * @memberof google.protobuf.FieldDescriptorProto
|
28304 | * @instance
|
28305 | */
|
28306 | FieldDescriptorProto.prototype.type = 1;
|
28307 |
|
28308 | /**
|
28309 | * FieldDescriptorProto typeName.
|
28310 | * @member {string} typeName
|
28311 | * @memberof google.protobuf.FieldDescriptorProto
|
28312 | * @instance
|
28313 | */
|
28314 | FieldDescriptorProto.prototype.typeName = "";
|
28315 |
|
28316 | /**
|
28317 | * FieldDescriptorProto extendee.
|
28318 | * @member {string} extendee
|
28319 | * @memberof google.protobuf.FieldDescriptorProto
|
28320 | * @instance
|
28321 | */
|
28322 | FieldDescriptorProto.prototype.extendee = "";
|
28323 |
|
28324 | /**
|
28325 | * FieldDescriptorProto defaultValue.
|
28326 | * @member {string} defaultValue
|
28327 | * @memberof google.protobuf.FieldDescriptorProto
|
28328 | * @instance
|
28329 | */
|
28330 | FieldDescriptorProto.prototype.defaultValue = "";
|
28331 |
|
28332 | /**
|
28333 | * FieldDescriptorProto oneofIndex.
|
28334 | * @member {number} oneofIndex
|
28335 | * @memberof google.protobuf.FieldDescriptorProto
|
28336 | * @instance
|
28337 | */
|
28338 | FieldDescriptorProto.prototype.oneofIndex = 0;
|
28339 |
|
28340 | /**
|
28341 | * FieldDescriptorProto jsonName.
|
28342 | * @member {string} jsonName
|
28343 | * @memberof google.protobuf.FieldDescriptorProto
|
28344 | * @instance
|
28345 | */
|
28346 | FieldDescriptorProto.prototype.jsonName = "";
|
28347 |
|
28348 | /**
|
28349 | * FieldDescriptorProto options.
|
28350 | * @member {google.protobuf.IFieldOptions|null|undefined} options
|
28351 | * @memberof google.protobuf.FieldDescriptorProto
|
28352 | * @instance
|
28353 | */
|
28354 | FieldDescriptorProto.prototype.options = null;
|
28355 |
|
28356 | /**
|
28357 | * FieldDescriptorProto proto3Optional.
|
28358 | * @member {boolean} proto3Optional
|
28359 | * @memberof google.protobuf.FieldDescriptorProto
|
28360 | * @instance
|
28361 | */
|
28362 | FieldDescriptorProto.prototype.proto3Optional = false;
|
28363 |
|
28364 | /**
|
28365 | * Creates a new FieldDescriptorProto instance using the specified properties.
|
28366 | * @function create
|
28367 | * @memberof google.protobuf.FieldDescriptorProto
|
28368 | * @static
|
28369 | * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set
|
28370 | * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance
|
28371 | */
|
28372 | FieldDescriptorProto.create = function create(properties) {
|
28373 | return new FieldDescriptorProto(properties);
|
28374 | };
|
28375 |
|
28376 | /**
|
28377 | * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.
|
28378 | * @function encode
|
28379 | * @memberof google.protobuf.FieldDescriptorProto
|
28380 | * @static
|
28381 | * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode
|
28382 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
28383 | * @returns {$protobuf.Writer} Writer
|
28384 | */
|
28385 | FieldDescriptorProto.encode = function encode(message, writer) {
|
28386 | if (!writer)
|
28387 | writer = $Writer.create();
|
28388 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
28389 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
28390 | if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee"))
|
28391 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee);
|
28392 | if (message.number != null && Object.hasOwnProperty.call(message, "number"))
|
28393 | writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number);
|
28394 | if (message.label != null && Object.hasOwnProperty.call(message, "label"))
|
28395 | writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label);
|
28396 | if (message.type != null && Object.hasOwnProperty.call(message, "type"))
|
28397 | writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type);
|
28398 | if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName"))
|
28399 | writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName);
|
28400 | if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue"))
|
28401 | writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue);
|
28402 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
28403 | $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
|
28404 | if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex"))
|
28405 | writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex);
|
28406 | if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName"))
|
28407 | writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName);
|
28408 | if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional"))
|
28409 | writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional);
|
28410 | return writer;
|
28411 | };
|
28412 |
|
28413 | /**
|
28414 | * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.
|
28415 | * @function encodeDelimited
|
28416 | * @memberof google.protobuf.FieldDescriptorProto
|
28417 | * @static
|
28418 | * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode
|
28419 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
28420 | * @returns {$protobuf.Writer} Writer
|
28421 | */
|
28422 | FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
28423 | return this.encode(message, writer).ldelim();
|
28424 | };
|
28425 |
|
28426 | /**
|
28427 | * Decodes a FieldDescriptorProto message from the specified reader or buffer.
|
28428 | * @function decode
|
28429 | * @memberof google.protobuf.FieldDescriptorProto
|
28430 | * @static
|
28431 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
28432 | * @param {number} [length] Message length if known beforehand
|
28433 | * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto
|
28434 | * @throws {Error} If the payload is not a reader or valid buffer
|
28435 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
28436 | */
|
28437 | FieldDescriptorProto.decode = function decode(reader, length) {
|
28438 | if (!(reader instanceof $Reader))
|
28439 | reader = $Reader.create(reader);
|
28440 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto();
|
28441 | while (reader.pos < end) {
|
28442 | var tag = reader.uint32();
|
28443 | switch (tag >>> 3) {
|
28444 | case 1: {
|
28445 | message.name = reader.string();
|
28446 | break;
|
28447 | }
|
28448 | case 3: {
|
28449 | message.number = reader.int32();
|
28450 | break;
|
28451 | }
|
28452 | case 4: {
|
28453 | message.label = reader.int32();
|
28454 | break;
|
28455 | }
|
28456 | case 5: {
|
28457 | message.type = reader.int32();
|
28458 | break;
|
28459 | }
|
28460 | case 6: {
|
28461 | message.typeName = reader.string();
|
28462 | break;
|
28463 | }
|
28464 | case 2: {
|
28465 | message.extendee = reader.string();
|
28466 | break;
|
28467 | }
|
28468 | case 7: {
|
28469 | message.defaultValue = reader.string();
|
28470 | break;
|
28471 | }
|
28472 | case 9: {
|
28473 | message.oneofIndex = reader.int32();
|
28474 | break;
|
28475 | }
|
28476 | case 10: {
|
28477 | message.jsonName = reader.string();
|
28478 | break;
|
28479 | }
|
28480 | case 8: {
|
28481 | message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32());
|
28482 | break;
|
28483 | }
|
28484 | case 17: {
|
28485 | message.proto3Optional = reader.bool();
|
28486 | break;
|
28487 | }
|
28488 | default:
|
28489 | reader.skipType(tag & 7);
|
28490 | break;
|
28491 | }
|
28492 | }
|
28493 | return message;
|
28494 | };
|
28495 |
|
28496 | /**
|
28497 | * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited.
|
28498 | * @function decodeDelimited
|
28499 | * @memberof google.protobuf.FieldDescriptorProto
|
28500 | * @static
|
28501 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
28502 | * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto
|
28503 | * @throws {Error} If the payload is not a reader or valid buffer
|
28504 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
28505 | */
|
28506 | FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
28507 | if (!(reader instanceof $Reader))
|
28508 | reader = new $Reader(reader);
|
28509 | return this.decode(reader, reader.uint32());
|
28510 | };
|
28511 |
|
28512 | /**
|
28513 | * Verifies a FieldDescriptorProto message.
|
28514 | * @function verify
|
28515 | * @memberof google.protobuf.FieldDescriptorProto
|
28516 | * @static
|
28517 | * @param {Object.<string,*>} message Plain object to verify
|
28518 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
28519 | */
|
28520 | FieldDescriptorProto.verify = function verify(message) {
|
28521 | if (typeof message !== "object" || message === null)
|
28522 | return "object expected";
|
28523 | if (message.name != null && message.hasOwnProperty("name"))
|
28524 | if (!$util.isString(message.name))
|
28525 | return "name: string expected";
|
28526 | if (message.number != null && message.hasOwnProperty("number"))
|
28527 | if (!$util.isInteger(message.number))
|
28528 | return "number: integer expected";
|
28529 | if (message.label != null && message.hasOwnProperty("label"))
|
28530 | switch (message.label) {
|
28531 | default:
|
28532 | return "label: enum value expected";
|
28533 | case 1:
|
28534 | case 2:
|
28535 | case 3:
|
28536 | break;
|
28537 | }
|
28538 | if (message.type != null && message.hasOwnProperty("type"))
|
28539 | switch (message.type) {
|
28540 | default:
|
28541 | return "type: enum value expected";
|
28542 | case 1:
|
28543 | case 2:
|
28544 | case 3:
|
28545 | case 4:
|
28546 | case 5:
|
28547 | case 6:
|
28548 | case 7:
|
28549 | case 8:
|
28550 | case 9:
|
28551 | case 10:
|
28552 | case 11:
|
28553 | case 12:
|
28554 | case 13:
|
28555 | case 14:
|
28556 | case 15:
|
28557 | case 16:
|
28558 | case 17:
|
28559 | case 18:
|
28560 | break;
|
28561 | }
|
28562 | if (message.typeName != null && message.hasOwnProperty("typeName"))
|
28563 | if (!$util.isString(message.typeName))
|
28564 | return "typeName: string expected";
|
28565 | if (message.extendee != null && message.hasOwnProperty("extendee"))
|
28566 | if (!$util.isString(message.extendee))
|
28567 | return "extendee: string expected";
|
28568 | if (message.defaultValue != null && message.hasOwnProperty("defaultValue"))
|
28569 | if (!$util.isString(message.defaultValue))
|
28570 | return "defaultValue: string expected";
|
28571 | if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex"))
|
28572 | if (!$util.isInteger(message.oneofIndex))
|
28573 | return "oneofIndex: integer expected";
|
28574 | if (message.jsonName != null && message.hasOwnProperty("jsonName"))
|
28575 | if (!$util.isString(message.jsonName))
|
28576 | return "jsonName: string expected";
|
28577 | if (message.options != null && message.hasOwnProperty("options")) {
|
28578 | var error = $root.google.protobuf.FieldOptions.verify(message.options);
|
28579 | if (error)
|
28580 | return "options." + error;
|
28581 | }
|
28582 | if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional"))
|
28583 | if (typeof message.proto3Optional !== "boolean")
|
28584 | return "proto3Optional: boolean expected";
|
28585 | return null;
|
28586 | };
|
28587 |
|
28588 | /**
|
28589 | * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types.
|
28590 | * @function fromObject
|
28591 | * @memberof google.protobuf.FieldDescriptorProto
|
28592 | * @static
|
28593 | * @param {Object.<string,*>} object Plain object
|
28594 | * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto
|
28595 | */
|
28596 | FieldDescriptorProto.fromObject = function fromObject(object) {
|
28597 | if (object instanceof $root.google.protobuf.FieldDescriptorProto)
|
28598 | return object;
|
28599 | var message = new $root.google.protobuf.FieldDescriptorProto();
|
28600 | if (object.name != null)
|
28601 | message.name = String(object.name);
|
28602 | if (object.number != null)
|
28603 | message.number = object.number | 0;
|
28604 | switch (object.label) {
|
28605 | default:
|
28606 | if (typeof object.label === "number") {
|
28607 | message.label = object.label;
|
28608 | break;
|
28609 | }
|
28610 | break;
|
28611 | case "LABEL_OPTIONAL":
|
28612 | case 1:
|
28613 | message.label = 1;
|
28614 | break;
|
28615 | case "LABEL_REQUIRED":
|
28616 | case 2:
|
28617 | message.label = 2;
|
28618 | break;
|
28619 | case "LABEL_REPEATED":
|
28620 | case 3:
|
28621 | message.label = 3;
|
28622 | break;
|
28623 | }
|
28624 | switch (object.type) {
|
28625 | default:
|
28626 | if (typeof object.type === "number") {
|
28627 | message.type = object.type;
|
28628 | break;
|
28629 | }
|
28630 | break;
|
28631 | case "TYPE_DOUBLE":
|
28632 | case 1:
|
28633 | message.type = 1;
|
28634 | break;
|
28635 | case "TYPE_FLOAT":
|
28636 | case 2:
|
28637 | message.type = 2;
|
28638 | break;
|
28639 | case "TYPE_INT64":
|
28640 | case 3:
|
28641 | message.type = 3;
|
28642 | break;
|
28643 | case "TYPE_UINT64":
|
28644 | case 4:
|
28645 | message.type = 4;
|
28646 | break;
|
28647 | case "TYPE_INT32":
|
28648 | case 5:
|
28649 | message.type = 5;
|
28650 | break;
|
28651 | case "TYPE_FIXED64":
|
28652 | case 6:
|
28653 | message.type = 6;
|
28654 | break;
|
28655 | case "TYPE_FIXED32":
|
28656 | case 7:
|
28657 | message.type = 7;
|
28658 | break;
|
28659 | case "TYPE_BOOL":
|
28660 | case 8:
|
28661 | message.type = 8;
|
28662 | break;
|
28663 | case "TYPE_STRING":
|
28664 | case 9:
|
28665 | message.type = 9;
|
28666 | break;
|
28667 | case "TYPE_GROUP":
|
28668 | case 10:
|
28669 | message.type = 10;
|
28670 | break;
|
28671 | case "TYPE_MESSAGE":
|
28672 | case 11:
|
28673 | message.type = 11;
|
28674 | break;
|
28675 | case "TYPE_BYTES":
|
28676 | case 12:
|
28677 | message.type = 12;
|
28678 | break;
|
28679 | case "TYPE_UINT32":
|
28680 | case 13:
|
28681 | message.type = 13;
|
28682 | break;
|
28683 | case "TYPE_ENUM":
|
28684 | case 14:
|
28685 | message.type = 14;
|
28686 | break;
|
28687 | case "TYPE_SFIXED32":
|
28688 | case 15:
|
28689 | message.type = 15;
|
28690 | break;
|
28691 | case "TYPE_SFIXED64":
|
28692 | case 16:
|
28693 | message.type = 16;
|
28694 | break;
|
28695 | case "TYPE_SINT32":
|
28696 | case 17:
|
28697 | message.type = 17;
|
28698 | break;
|
28699 | case "TYPE_SINT64":
|
28700 | case 18:
|
28701 | message.type = 18;
|
28702 | break;
|
28703 | }
|
28704 | if (object.typeName != null)
|
28705 | message.typeName = String(object.typeName);
|
28706 | if (object.extendee != null)
|
28707 | message.extendee = String(object.extendee);
|
28708 | if (object.defaultValue != null)
|
28709 | message.defaultValue = String(object.defaultValue);
|
28710 | if (object.oneofIndex != null)
|
28711 | message.oneofIndex = object.oneofIndex | 0;
|
28712 | if (object.jsonName != null)
|
28713 | message.jsonName = String(object.jsonName);
|
28714 | if (object.options != null) {
|
28715 | if (typeof object.options !== "object")
|
28716 | throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected");
|
28717 | message.options = $root.google.protobuf.FieldOptions.fromObject(object.options);
|
28718 | }
|
28719 | if (object.proto3Optional != null)
|
28720 | message.proto3Optional = Boolean(object.proto3Optional);
|
28721 | return message;
|
28722 | };
|
28723 |
|
28724 | /**
|
28725 | * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified.
|
28726 | * @function toObject
|
28727 | * @memberof google.protobuf.FieldDescriptorProto
|
28728 | * @static
|
28729 | * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto
|
28730 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
28731 | * @returns {Object.<string,*>} Plain object
|
28732 | */
|
28733 | FieldDescriptorProto.toObject = function toObject(message, options) {
|
28734 | if (!options)
|
28735 | options = {};
|
28736 | var object = {};
|
28737 | if (options.defaults) {
|
28738 | object.name = "";
|
28739 | object.extendee = "";
|
28740 | object.number = 0;
|
28741 | object.label = options.enums === String ? "LABEL_OPTIONAL" : 1;
|
28742 | object.type = options.enums === String ? "TYPE_DOUBLE" : 1;
|
28743 | object.typeName = "";
|
28744 | object.defaultValue = "";
|
28745 | object.options = null;
|
28746 | object.oneofIndex = 0;
|
28747 | object.jsonName = "";
|
28748 | object.proto3Optional = false;
|
28749 | }
|
28750 | if (message.name != null && message.hasOwnProperty("name"))
|
28751 | object.name = message.name;
|
28752 | if (message.extendee != null && message.hasOwnProperty("extendee"))
|
28753 | object.extendee = message.extendee;
|
28754 | if (message.number != null && message.hasOwnProperty("number"))
|
28755 | object.number = message.number;
|
28756 | if (message.label != null && message.hasOwnProperty("label"))
|
28757 | object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label;
|
28758 | if (message.type != null && message.hasOwnProperty("type"))
|
28759 | object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type;
|
28760 | if (message.typeName != null && message.hasOwnProperty("typeName"))
|
28761 | object.typeName = message.typeName;
|
28762 | if (message.defaultValue != null && message.hasOwnProperty("defaultValue"))
|
28763 | object.defaultValue = message.defaultValue;
|
28764 | if (message.options != null && message.hasOwnProperty("options"))
|
28765 | object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options);
|
28766 | if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex"))
|
28767 | object.oneofIndex = message.oneofIndex;
|
28768 | if (message.jsonName != null && message.hasOwnProperty("jsonName"))
|
28769 | object.jsonName = message.jsonName;
|
28770 | if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional"))
|
28771 | object.proto3Optional = message.proto3Optional;
|
28772 | return object;
|
28773 | };
|
28774 |
|
28775 | /**
|
28776 | * Converts this FieldDescriptorProto to JSON.
|
28777 | * @function toJSON
|
28778 | * @memberof google.protobuf.FieldDescriptorProto
|
28779 | * @instance
|
28780 | * @returns {Object.<string,*>} JSON object
|
28781 | */
|
28782 | FieldDescriptorProto.prototype.toJSON = function toJSON() {
|
28783 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
28784 | };
|
28785 |
|
28786 | /**
|
28787 | * Gets the default type url for FieldDescriptorProto
|
28788 | * @function getTypeUrl
|
28789 | * @memberof google.protobuf.FieldDescriptorProto
|
28790 | * @static
|
28791 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
28792 | * @returns {string} The default type url
|
28793 | */
|
28794 | FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
28795 | if (typeUrlPrefix === undefined) {
|
28796 | typeUrlPrefix = "type.googleapis.com";
|
28797 | }
|
28798 | return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto";
|
28799 | };
|
28800 |
|
28801 | /**
|
28802 | * Type enum.
|
28803 | * @name google.protobuf.FieldDescriptorProto.Type
|
28804 | * @enum {number}
|
28805 | * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value
|
28806 | * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value
|
28807 | * @property {number} TYPE_INT64=3 TYPE_INT64 value
|
28808 | * @property {number} TYPE_UINT64=4 TYPE_UINT64 value
|
28809 | * @property {number} TYPE_INT32=5 TYPE_INT32 value
|
28810 | * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value
|
28811 | * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value
|
28812 | * @property {number} TYPE_BOOL=8 TYPE_BOOL value
|
28813 | * @property {number} TYPE_STRING=9 TYPE_STRING value
|
28814 | * @property {number} TYPE_GROUP=10 TYPE_GROUP value
|
28815 | * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value
|
28816 | * @property {number} TYPE_BYTES=12 TYPE_BYTES value
|
28817 | * @property {number} TYPE_UINT32=13 TYPE_UINT32 value
|
28818 | * @property {number} TYPE_ENUM=14 TYPE_ENUM value
|
28819 | * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value
|
28820 | * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value
|
28821 | * @property {number} TYPE_SINT32=17 TYPE_SINT32 value
|
28822 | * @property {number} TYPE_SINT64=18 TYPE_SINT64 value
|
28823 | */
|
28824 | FieldDescriptorProto.Type = (function() {
|
28825 | var valuesById = {}, values = Object.create(valuesById);
|
28826 | values[valuesById[1] = "TYPE_DOUBLE"] = 1;
|
28827 | values[valuesById[2] = "TYPE_FLOAT"] = 2;
|
28828 | values[valuesById[3] = "TYPE_INT64"] = 3;
|
28829 | values[valuesById[4] = "TYPE_UINT64"] = 4;
|
28830 | values[valuesById[5] = "TYPE_INT32"] = 5;
|
28831 | values[valuesById[6] = "TYPE_FIXED64"] = 6;
|
28832 | values[valuesById[7] = "TYPE_FIXED32"] = 7;
|
28833 | values[valuesById[8] = "TYPE_BOOL"] = 8;
|
28834 | values[valuesById[9] = "TYPE_STRING"] = 9;
|
28835 | values[valuesById[10] = "TYPE_GROUP"] = 10;
|
28836 | values[valuesById[11] = "TYPE_MESSAGE"] = 11;
|
28837 | values[valuesById[12] = "TYPE_BYTES"] = 12;
|
28838 | values[valuesById[13] = "TYPE_UINT32"] = 13;
|
28839 | values[valuesById[14] = "TYPE_ENUM"] = 14;
|
28840 | values[valuesById[15] = "TYPE_SFIXED32"] = 15;
|
28841 | values[valuesById[16] = "TYPE_SFIXED64"] = 16;
|
28842 | values[valuesById[17] = "TYPE_SINT32"] = 17;
|
28843 | values[valuesById[18] = "TYPE_SINT64"] = 18;
|
28844 | return values;
|
28845 | })();
|
28846 |
|
28847 | /**
|
28848 | * Label enum.
|
28849 | * @name google.protobuf.FieldDescriptorProto.Label
|
28850 | * @enum {number}
|
28851 | * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value
|
28852 | * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value
|
28853 | * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value
|
28854 | */
|
28855 | FieldDescriptorProto.Label = (function() {
|
28856 | var valuesById = {}, values = Object.create(valuesById);
|
28857 | values[valuesById[1] = "LABEL_OPTIONAL"] = 1;
|
28858 | values[valuesById[2] = "LABEL_REQUIRED"] = 2;
|
28859 | values[valuesById[3] = "LABEL_REPEATED"] = 3;
|
28860 | return values;
|
28861 | })();
|
28862 |
|
28863 | return FieldDescriptorProto;
|
28864 | })();
|
28865 |
|
28866 | protobuf.OneofDescriptorProto = (function() {
|
28867 |
|
28868 | /**
|
28869 | * Properties of an OneofDescriptorProto.
|
28870 | * @memberof google.protobuf
|
28871 | * @interface IOneofDescriptorProto
|
28872 | * @property {string|null} [name] OneofDescriptorProto name
|
28873 | * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options
|
28874 | */
|
28875 |
|
28876 | /**
|
28877 | * Constructs a new OneofDescriptorProto.
|
28878 | * @memberof google.protobuf
|
28879 | * @classdesc Represents an OneofDescriptorProto.
|
28880 | * @implements IOneofDescriptorProto
|
28881 | * @constructor
|
28882 | * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set
|
28883 | */
|
28884 | function OneofDescriptorProto(properties) {
|
28885 | if (properties)
|
28886 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
28887 | if (properties[keys[i]] != null)
|
28888 | this[keys[i]] = properties[keys[i]];
|
28889 | }
|
28890 |
|
28891 | /**
|
28892 | * OneofDescriptorProto name.
|
28893 | * @member {string} name
|
28894 | * @memberof google.protobuf.OneofDescriptorProto
|
28895 | * @instance
|
28896 | */
|
28897 | OneofDescriptorProto.prototype.name = "";
|
28898 |
|
28899 | /**
|
28900 | * OneofDescriptorProto options.
|
28901 | * @member {google.protobuf.IOneofOptions|null|undefined} options
|
28902 | * @memberof google.protobuf.OneofDescriptorProto
|
28903 | * @instance
|
28904 | */
|
28905 | OneofDescriptorProto.prototype.options = null;
|
28906 |
|
28907 | /**
|
28908 | * Creates a new OneofDescriptorProto instance using the specified properties.
|
28909 | * @function create
|
28910 | * @memberof google.protobuf.OneofDescriptorProto
|
28911 | * @static
|
28912 | * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set
|
28913 | * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance
|
28914 | */
|
28915 | OneofDescriptorProto.create = function create(properties) {
|
28916 | return new OneofDescriptorProto(properties);
|
28917 | };
|
28918 |
|
28919 | /**
|
28920 | * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages.
|
28921 | * @function encode
|
28922 | * @memberof google.protobuf.OneofDescriptorProto
|
28923 | * @static
|
28924 | * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode
|
28925 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
28926 | * @returns {$protobuf.Writer} Writer
|
28927 | */
|
28928 | OneofDescriptorProto.encode = function encode(message, writer) {
|
28929 | if (!writer)
|
28930 | writer = $Writer.create();
|
28931 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
28932 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
28933 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
28934 | $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
28935 | return writer;
|
28936 | };
|
28937 |
|
28938 | /**
|
28939 | * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages.
|
28940 | * @function encodeDelimited
|
28941 | * @memberof google.protobuf.OneofDescriptorProto
|
28942 | * @static
|
28943 | * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode
|
28944 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
28945 | * @returns {$protobuf.Writer} Writer
|
28946 | */
|
28947 | OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
28948 | return this.encode(message, writer).ldelim();
|
28949 | };
|
28950 |
|
28951 | /**
|
28952 | * Decodes an OneofDescriptorProto message from the specified reader or buffer.
|
28953 | * @function decode
|
28954 | * @memberof google.protobuf.OneofDescriptorProto
|
28955 | * @static
|
28956 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
28957 | * @param {number} [length] Message length if known beforehand
|
28958 | * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto
|
28959 | * @throws {Error} If the payload is not a reader or valid buffer
|
28960 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
28961 | */
|
28962 | OneofDescriptorProto.decode = function decode(reader, length) {
|
28963 | if (!(reader instanceof $Reader))
|
28964 | reader = $Reader.create(reader);
|
28965 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto();
|
28966 | while (reader.pos < end) {
|
28967 | var tag = reader.uint32();
|
28968 | switch (tag >>> 3) {
|
28969 | case 1: {
|
28970 | message.name = reader.string();
|
28971 | break;
|
28972 | }
|
28973 | case 2: {
|
28974 | message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32());
|
28975 | break;
|
28976 | }
|
28977 | default:
|
28978 | reader.skipType(tag & 7);
|
28979 | break;
|
28980 | }
|
28981 | }
|
28982 | return message;
|
28983 | };
|
28984 |
|
28985 | /**
|
28986 | * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited.
|
28987 | * @function decodeDelimited
|
28988 | * @memberof google.protobuf.OneofDescriptorProto
|
28989 | * @static
|
28990 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
28991 | * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto
|
28992 | * @throws {Error} If the payload is not a reader or valid buffer
|
28993 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
28994 | */
|
28995 | OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
28996 | if (!(reader instanceof $Reader))
|
28997 | reader = new $Reader(reader);
|
28998 | return this.decode(reader, reader.uint32());
|
28999 | };
|
29000 |
|
29001 | /**
|
29002 | * Verifies an OneofDescriptorProto message.
|
29003 | * @function verify
|
29004 | * @memberof google.protobuf.OneofDescriptorProto
|
29005 | * @static
|
29006 | * @param {Object.<string,*>} message Plain object to verify
|
29007 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
29008 | */
|
29009 | OneofDescriptorProto.verify = function verify(message) {
|
29010 | if (typeof message !== "object" || message === null)
|
29011 | return "object expected";
|
29012 | if (message.name != null && message.hasOwnProperty("name"))
|
29013 | if (!$util.isString(message.name))
|
29014 | return "name: string expected";
|
29015 | if (message.options != null && message.hasOwnProperty("options")) {
|
29016 | var error = $root.google.protobuf.OneofOptions.verify(message.options);
|
29017 | if (error)
|
29018 | return "options." + error;
|
29019 | }
|
29020 | return null;
|
29021 | };
|
29022 |
|
29023 | /**
|
29024 | * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types.
|
29025 | * @function fromObject
|
29026 | * @memberof google.protobuf.OneofDescriptorProto
|
29027 | * @static
|
29028 | * @param {Object.<string,*>} object Plain object
|
29029 | * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto
|
29030 | */
|
29031 | OneofDescriptorProto.fromObject = function fromObject(object) {
|
29032 | if (object instanceof $root.google.protobuf.OneofDescriptorProto)
|
29033 | return object;
|
29034 | var message = new $root.google.protobuf.OneofDescriptorProto();
|
29035 | if (object.name != null)
|
29036 | message.name = String(object.name);
|
29037 | if (object.options != null) {
|
29038 | if (typeof object.options !== "object")
|
29039 | throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected");
|
29040 | message.options = $root.google.protobuf.OneofOptions.fromObject(object.options);
|
29041 | }
|
29042 | return message;
|
29043 | };
|
29044 |
|
29045 | /**
|
29046 | * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified.
|
29047 | * @function toObject
|
29048 | * @memberof google.protobuf.OneofDescriptorProto
|
29049 | * @static
|
29050 | * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto
|
29051 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
29052 | * @returns {Object.<string,*>} Plain object
|
29053 | */
|
29054 | OneofDescriptorProto.toObject = function toObject(message, options) {
|
29055 | if (!options)
|
29056 | options = {};
|
29057 | var object = {};
|
29058 | if (options.defaults) {
|
29059 | object.name = "";
|
29060 | object.options = null;
|
29061 | }
|
29062 | if (message.name != null && message.hasOwnProperty("name"))
|
29063 | object.name = message.name;
|
29064 | if (message.options != null && message.hasOwnProperty("options"))
|
29065 | object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options);
|
29066 | return object;
|
29067 | };
|
29068 |
|
29069 | /**
|
29070 | * Converts this OneofDescriptorProto to JSON.
|
29071 | * @function toJSON
|
29072 | * @memberof google.protobuf.OneofDescriptorProto
|
29073 | * @instance
|
29074 | * @returns {Object.<string,*>} JSON object
|
29075 | */
|
29076 | OneofDescriptorProto.prototype.toJSON = function toJSON() {
|
29077 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
29078 | };
|
29079 |
|
29080 | /**
|
29081 | * Gets the default type url for OneofDescriptorProto
|
29082 | * @function getTypeUrl
|
29083 | * @memberof google.protobuf.OneofDescriptorProto
|
29084 | * @static
|
29085 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
29086 | * @returns {string} The default type url
|
29087 | */
|
29088 | OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
29089 | if (typeUrlPrefix === undefined) {
|
29090 | typeUrlPrefix = "type.googleapis.com";
|
29091 | }
|
29092 | return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto";
|
29093 | };
|
29094 |
|
29095 | return OneofDescriptorProto;
|
29096 | })();
|
29097 |
|
29098 | protobuf.EnumDescriptorProto = (function() {
|
29099 |
|
29100 | /**
|
29101 | * Properties of an EnumDescriptorProto.
|
29102 | * @memberof google.protobuf
|
29103 | * @interface IEnumDescriptorProto
|
29104 | * @property {string|null} [name] EnumDescriptorProto name
|
29105 | * @property {Array.<google.protobuf.IEnumValueDescriptorProto>|null} [value] EnumDescriptorProto value
|
29106 | * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options
|
29107 | * @property {Array.<google.protobuf.EnumDescriptorProto.IEnumReservedRange>|null} [reservedRange] EnumDescriptorProto reservedRange
|
29108 | * @property {Array.<string>|null} [reservedName] EnumDescriptorProto reservedName
|
29109 | */
|
29110 |
|
29111 | /**
|
29112 | * Constructs a new EnumDescriptorProto.
|
29113 | * @memberof google.protobuf
|
29114 | * @classdesc Represents an EnumDescriptorProto.
|
29115 | * @implements IEnumDescriptorProto
|
29116 | * @constructor
|
29117 | * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set
|
29118 | */
|
29119 | function EnumDescriptorProto(properties) {
|
29120 | this.value = [];
|
29121 | this.reservedRange = [];
|
29122 | this.reservedName = [];
|
29123 | if (properties)
|
29124 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
29125 | if (properties[keys[i]] != null)
|
29126 | this[keys[i]] = properties[keys[i]];
|
29127 | }
|
29128 |
|
29129 | /**
|
29130 | * EnumDescriptorProto name.
|
29131 | * @member {string} name
|
29132 | * @memberof google.protobuf.EnumDescriptorProto
|
29133 | * @instance
|
29134 | */
|
29135 | EnumDescriptorProto.prototype.name = "";
|
29136 |
|
29137 | /**
|
29138 | * EnumDescriptorProto value.
|
29139 | * @member {Array.<google.protobuf.IEnumValueDescriptorProto>} value
|
29140 | * @memberof google.protobuf.EnumDescriptorProto
|
29141 | * @instance
|
29142 | */
|
29143 | EnumDescriptorProto.prototype.value = $util.emptyArray;
|
29144 |
|
29145 | /**
|
29146 | * EnumDescriptorProto options.
|
29147 | * @member {google.protobuf.IEnumOptions|null|undefined} options
|
29148 | * @memberof google.protobuf.EnumDescriptorProto
|
29149 | * @instance
|
29150 | */
|
29151 | EnumDescriptorProto.prototype.options = null;
|
29152 |
|
29153 | /**
|
29154 | * EnumDescriptorProto reservedRange.
|
29155 | * @member {Array.<google.protobuf.EnumDescriptorProto.IEnumReservedRange>} reservedRange
|
29156 | * @memberof google.protobuf.EnumDescriptorProto
|
29157 | * @instance
|
29158 | */
|
29159 | EnumDescriptorProto.prototype.reservedRange = $util.emptyArray;
|
29160 |
|
29161 | /**
|
29162 | * EnumDescriptorProto reservedName.
|
29163 | * @member {Array.<string>} reservedName
|
29164 | * @memberof google.protobuf.EnumDescriptorProto
|
29165 | * @instance
|
29166 | */
|
29167 | EnumDescriptorProto.prototype.reservedName = $util.emptyArray;
|
29168 |
|
29169 | /**
|
29170 | * Creates a new EnumDescriptorProto instance using the specified properties.
|
29171 | * @function create
|
29172 | * @memberof google.protobuf.EnumDescriptorProto
|
29173 | * @static
|
29174 | * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set
|
29175 | * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance
|
29176 | */
|
29177 | EnumDescriptorProto.create = function create(properties) {
|
29178 | return new EnumDescriptorProto(properties);
|
29179 | };
|
29180 |
|
29181 | /**
|
29182 | * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages.
|
29183 | * @function encode
|
29184 | * @memberof google.protobuf.EnumDescriptorProto
|
29185 | * @static
|
29186 | * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode
|
29187 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
29188 | * @returns {$protobuf.Writer} Writer
|
29189 | */
|
29190 | EnumDescriptorProto.encode = function encode(message, writer) {
|
29191 | if (!writer)
|
29192 | writer = $Writer.create();
|
29193 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
29194 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
29195 | if (message.value != null && message.value.length)
|
29196 | for (var i = 0; i < message.value.length; ++i)
|
29197 | $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
29198 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
29199 | $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
29200 | if (message.reservedRange != null && message.reservedRange.length)
|
29201 | for (var i = 0; i < message.reservedRange.length; ++i)
|
29202 | $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
29203 | if (message.reservedName != null && message.reservedName.length)
|
29204 | for (var i = 0; i < message.reservedName.length; ++i)
|
29205 | writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]);
|
29206 | return writer;
|
29207 | };
|
29208 |
|
29209 | /**
|
29210 | * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages.
|
29211 | * @function encodeDelimited
|
29212 | * @memberof google.protobuf.EnumDescriptorProto
|
29213 | * @static
|
29214 | * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode
|
29215 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
29216 | * @returns {$protobuf.Writer} Writer
|
29217 | */
|
29218 | EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
29219 | return this.encode(message, writer).ldelim();
|
29220 | };
|
29221 |
|
29222 | /**
|
29223 | * Decodes an EnumDescriptorProto message from the specified reader or buffer.
|
29224 | * @function decode
|
29225 | * @memberof google.protobuf.EnumDescriptorProto
|
29226 | * @static
|
29227 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
29228 | * @param {number} [length] Message length if known beforehand
|
29229 | * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto
|
29230 | * @throws {Error} If the payload is not a reader or valid buffer
|
29231 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
29232 | */
|
29233 | EnumDescriptorProto.decode = function decode(reader, length) {
|
29234 | if (!(reader instanceof $Reader))
|
29235 | reader = $Reader.create(reader);
|
29236 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto();
|
29237 | while (reader.pos < end) {
|
29238 | var tag = reader.uint32();
|
29239 | switch (tag >>> 3) {
|
29240 | case 1: {
|
29241 | message.name = reader.string();
|
29242 | break;
|
29243 | }
|
29244 | case 2: {
|
29245 | if (!(message.value && message.value.length))
|
29246 | message.value = [];
|
29247 | message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32()));
|
29248 | break;
|
29249 | }
|
29250 | case 3: {
|
29251 | message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32());
|
29252 | break;
|
29253 | }
|
29254 | case 4: {
|
29255 | if (!(message.reservedRange && message.reservedRange.length))
|
29256 | message.reservedRange = [];
|
29257 | message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32()));
|
29258 | break;
|
29259 | }
|
29260 | case 5: {
|
29261 | if (!(message.reservedName && message.reservedName.length))
|
29262 | message.reservedName = [];
|
29263 | message.reservedName.push(reader.string());
|
29264 | break;
|
29265 | }
|
29266 | default:
|
29267 | reader.skipType(tag & 7);
|
29268 | break;
|
29269 | }
|
29270 | }
|
29271 | return message;
|
29272 | };
|
29273 |
|
29274 | /**
|
29275 | * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited.
|
29276 | * @function decodeDelimited
|
29277 | * @memberof google.protobuf.EnumDescriptorProto
|
29278 | * @static
|
29279 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
29280 | * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto
|
29281 | * @throws {Error} If the payload is not a reader or valid buffer
|
29282 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
29283 | */
|
29284 | EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
29285 | if (!(reader instanceof $Reader))
|
29286 | reader = new $Reader(reader);
|
29287 | return this.decode(reader, reader.uint32());
|
29288 | };
|
29289 |
|
29290 | /**
|
29291 | * Verifies an EnumDescriptorProto message.
|
29292 | * @function verify
|
29293 | * @memberof google.protobuf.EnumDescriptorProto
|
29294 | * @static
|
29295 | * @param {Object.<string,*>} message Plain object to verify
|
29296 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
29297 | */
|
29298 | EnumDescriptorProto.verify = function verify(message) {
|
29299 | if (typeof message !== "object" || message === null)
|
29300 | return "object expected";
|
29301 | if (message.name != null && message.hasOwnProperty("name"))
|
29302 | if (!$util.isString(message.name))
|
29303 | return "name: string expected";
|
29304 | if (message.value != null && message.hasOwnProperty("value")) {
|
29305 | if (!Array.isArray(message.value))
|
29306 | return "value: array expected";
|
29307 | for (var i = 0; i < message.value.length; ++i) {
|
29308 | var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]);
|
29309 | if (error)
|
29310 | return "value." + error;
|
29311 | }
|
29312 | }
|
29313 | if (message.options != null && message.hasOwnProperty("options")) {
|
29314 | var error = $root.google.protobuf.EnumOptions.verify(message.options);
|
29315 | if (error)
|
29316 | return "options." + error;
|
29317 | }
|
29318 | if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) {
|
29319 | if (!Array.isArray(message.reservedRange))
|
29320 | return "reservedRange: array expected";
|
29321 | for (var i = 0; i < message.reservedRange.length; ++i) {
|
29322 | var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]);
|
29323 | if (error)
|
29324 | return "reservedRange." + error;
|
29325 | }
|
29326 | }
|
29327 | if (message.reservedName != null && message.hasOwnProperty("reservedName")) {
|
29328 | if (!Array.isArray(message.reservedName))
|
29329 | return "reservedName: array expected";
|
29330 | for (var i = 0; i < message.reservedName.length; ++i)
|
29331 | if (!$util.isString(message.reservedName[i]))
|
29332 | return "reservedName: string[] expected";
|
29333 | }
|
29334 | return null;
|
29335 | };
|
29336 |
|
29337 | /**
|
29338 | * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types.
|
29339 | * @function fromObject
|
29340 | * @memberof google.protobuf.EnumDescriptorProto
|
29341 | * @static
|
29342 | * @param {Object.<string,*>} object Plain object
|
29343 | * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto
|
29344 | */
|
29345 | EnumDescriptorProto.fromObject = function fromObject(object) {
|
29346 | if (object instanceof $root.google.protobuf.EnumDescriptorProto)
|
29347 | return object;
|
29348 | var message = new $root.google.protobuf.EnumDescriptorProto();
|
29349 | if (object.name != null)
|
29350 | message.name = String(object.name);
|
29351 | if (object.value) {
|
29352 | if (!Array.isArray(object.value))
|
29353 | throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected");
|
29354 | message.value = [];
|
29355 | for (var i = 0; i < object.value.length; ++i) {
|
29356 | if (typeof object.value[i] !== "object")
|
29357 | throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected");
|
29358 | message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]);
|
29359 | }
|
29360 | }
|
29361 | if (object.options != null) {
|
29362 | if (typeof object.options !== "object")
|
29363 | throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected");
|
29364 | message.options = $root.google.protobuf.EnumOptions.fromObject(object.options);
|
29365 | }
|
29366 | if (object.reservedRange) {
|
29367 | if (!Array.isArray(object.reservedRange))
|
29368 | throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected");
|
29369 | message.reservedRange = [];
|
29370 | for (var i = 0; i < object.reservedRange.length; ++i) {
|
29371 | if (typeof object.reservedRange[i] !== "object")
|
29372 | throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected");
|
29373 | message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]);
|
29374 | }
|
29375 | }
|
29376 | if (object.reservedName) {
|
29377 | if (!Array.isArray(object.reservedName))
|
29378 | throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected");
|
29379 | message.reservedName = [];
|
29380 | for (var i = 0; i < object.reservedName.length; ++i)
|
29381 | message.reservedName[i] = String(object.reservedName[i]);
|
29382 | }
|
29383 | return message;
|
29384 | };
|
29385 |
|
29386 | /**
|
29387 | * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified.
|
29388 | * @function toObject
|
29389 | * @memberof google.protobuf.EnumDescriptorProto
|
29390 | * @static
|
29391 | * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto
|
29392 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
29393 | * @returns {Object.<string,*>} Plain object
|
29394 | */
|
29395 | EnumDescriptorProto.toObject = function toObject(message, options) {
|
29396 | if (!options)
|
29397 | options = {};
|
29398 | var object = {};
|
29399 | if (options.arrays || options.defaults) {
|
29400 | object.value = [];
|
29401 | object.reservedRange = [];
|
29402 | object.reservedName = [];
|
29403 | }
|
29404 | if (options.defaults) {
|
29405 | object.name = "";
|
29406 | object.options = null;
|
29407 | }
|
29408 | if (message.name != null && message.hasOwnProperty("name"))
|
29409 | object.name = message.name;
|
29410 | if (message.value && message.value.length) {
|
29411 | object.value = [];
|
29412 | for (var j = 0; j < message.value.length; ++j)
|
29413 | object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options);
|
29414 | }
|
29415 | if (message.options != null && message.hasOwnProperty("options"))
|
29416 | object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options);
|
29417 | if (message.reservedRange && message.reservedRange.length) {
|
29418 | object.reservedRange = [];
|
29419 | for (var j = 0; j < message.reservedRange.length; ++j)
|
29420 | object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options);
|
29421 | }
|
29422 | if (message.reservedName && message.reservedName.length) {
|
29423 | object.reservedName = [];
|
29424 | for (var j = 0; j < message.reservedName.length; ++j)
|
29425 | object.reservedName[j] = message.reservedName[j];
|
29426 | }
|
29427 | return object;
|
29428 | };
|
29429 |
|
29430 | /**
|
29431 | * Converts this EnumDescriptorProto to JSON.
|
29432 | * @function toJSON
|
29433 | * @memberof google.protobuf.EnumDescriptorProto
|
29434 | * @instance
|
29435 | * @returns {Object.<string,*>} JSON object
|
29436 | */
|
29437 | EnumDescriptorProto.prototype.toJSON = function toJSON() {
|
29438 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
29439 | };
|
29440 |
|
29441 | /**
|
29442 | * Gets the default type url for EnumDescriptorProto
|
29443 | * @function getTypeUrl
|
29444 | * @memberof google.protobuf.EnumDescriptorProto
|
29445 | * @static
|
29446 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
29447 | * @returns {string} The default type url
|
29448 | */
|
29449 | EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
29450 | if (typeUrlPrefix === undefined) {
|
29451 | typeUrlPrefix = "type.googleapis.com";
|
29452 | }
|
29453 | return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto";
|
29454 | };
|
29455 |
|
29456 | EnumDescriptorProto.EnumReservedRange = (function() {
|
29457 |
|
29458 | /**
|
29459 | * Properties of an EnumReservedRange.
|
29460 | * @memberof google.protobuf.EnumDescriptorProto
|
29461 | * @interface IEnumReservedRange
|
29462 | * @property {number|null} [start] EnumReservedRange start
|
29463 | * @property {number|null} [end] EnumReservedRange end
|
29464 | */
|
29465 |
|
29466 | /**
|
29467 | * Constructs a new EnumReservedRange.
|
29468 | * @memberof google.protobuf.EnumDescriptorProto
|
29469 | * @classdesc Represents an EnumReservedRange.
|
29470 | * @implements IEnumReservedRange
|
29471 | * @constructor
|
29472 | * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set
|
29473 | */
|
29474 | function EnumReservedRange(properties) {
|
29475 | if (properties)
|
29476 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
29477 | if (properties[keys[i]] != null)
|
29478 | this[keys[i]] = properties[keys[i]];
|
29479 | }
|
29480 |
|
29481 | /**
|
29482 | * EnumReservedRange start.
|
29483 | * @member {number} start
|
29484 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
29485 | * @instance
|
29486 | */
|
29487 | EnumReservedRange.prototype.start = 0;
|
29488 |
|
29489 | /**
|
29490 | * EnumReservedRange end.
|
29491 | * @member {number} end
|
29492 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
29493 | * @instance
|
29494 | */
|
29495 | EnumReservedRange.prototype.end = 0;
|
29496 |
|
29497 | /**
|
29498 | * Creates a new EnumReservedRange instance using the specified properties.
|
29499 | * @function create
|
29500 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
29501 | * @static
|
29502 | * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set
|
29503 | * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance
|
29504 | */
|
29505 | EnumReservedRange.create = function create(properties) {
|
29506 | return new EnumReservedRange(properties);
|
29507 | };
|
29508 |
|
29509 | /**
|
29510 | * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages.
|
29511 | * @function encode
|
29512 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
29513 | * @static
|
29514 | * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode
|
29515 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
29516 | * @returns {$protobuf.Writer} Writer
|
29517 | */
|
29518 | EnumReservedRange.encode = function encode(message, writer) {
|
29519 | if (!writer)
|
29520 | writer = $Writer.create();
|
29521 | if (message.start != null && Object.hasOwnProperty.call(message, "start"))
|
29522 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start);
|
29523 | if (message.end != null && Object.hasOwnProperty.call(message, "end"))
|
29524 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end);
|
29525 | return writer;
|
29526 | };
|
29527 |
|
29528 | /**
|
29529 | * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages.
|
29530 | * @function encodeDelimited
|
29531 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
29532 | * @static
|
29533 | * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode
|
29534 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
29535 | * @returns {$protobuf.Writer} Writer
|
29536 | */
|
29537 | EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) {
|
29538 | return this.encode(message, writer).ldelim();
|
29539 | };
|
29540 |
|
29541 | /**
|
29542 | * Decodes an EnumReservedRange message from the specified reader or buffer.
|
29543 | * @function decode
|
29544 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
29545 | * @static
|
29546 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
29547 | * @param {number} [length] Message length if known beforehand
|
29548 | * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange
|
29549 | * @throws {Error} If the payload is not a reader or valid buffer
|
29550 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
29551 | */
|
29552 | EnumReservedRange.decode = function decode(reader, length) {
|
29553 | if (!(reader instanceof $Reader))
|
29554 | reader = $Reader.create(reader);
|
29555 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange();
|
29556 | while (reader.pos < end) {
|
29557 | var tag = reader.uint32();
|
29558 | switch (tag >>> 3) {
|
29559 | case 1: {
|
29560 | message.start = reader.int32();
|
29561 | break;
|
29562 | }
|
29563 | case 2: {
|
29564 | message.end = reader.int32();
|
29565 | break;
|
29566 | }
|
29567 | default:
|
29568 | reader.skipType(tag & 7);
|
29569 | break;
|
29570 | }
|
29571 | }
|
29572 | return message;
|
29573 | };
|
29574 |
|
29575 | /**
|
29576 | * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited.
|
29577 | * @function decodeDelimited
|
29578 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
29579 | * @static
|
29580 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
29581 | * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange
|
29582 | * @throws {Error} If the payload is not a reader or valid buffer
|
29583 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
29584 | */
|
29585 | EnumReservedRange.decodeDelimited = function decodeDelimited(reader) {
|
29586 | if (!(reader instanceof $Reader))
|
29587 | reader = new $Reader(reader);
|
29588 | return this.decode(reader, reader.uint32());
|
29589 | };
|
29590 |
|
29591 | /**
|
29592 | * Verifies an EnumReservedRange message.
|
29593 | * @function verify
|
29594 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
29595 | * @static
|
29596 | * @param {Object.<string,*>} message Plain object to verify
|
29597 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
29598 | */
|
29599 | EnumReservedRange.verify = function verify(message) {
|
29600 | if (typeof message !== "object" || message === null)
|
29601 | return "object expected";
|
29602 | if (message.start != null && message.hasOwnProperty("start"))
|
29603 | if (!$util.isInteger(message.start))
|
29604 | return "start: integer expected";
|
29605 | if (message.end != null && message.hasOwnProperty("end"))
|
29606 | if (!$util.isInteger(message.end))
|
29607 | return "end: integer expected";
|
29608 | return null;
|
29609 | };
|
29610 |
|
29611 | /**
|
29612 | * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types.
|
29613 | * @function fromObject
|
29614 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
29615 | * @static
|
29616 | * @param {Object.<string,*>} object Plain object
|
29617 | * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange
|
29618 | */
|
29619 | EnumReservedRange.fromObject = function fromObject(object) {
|
29620 | if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange)
|
29621 | return object;
|
29622 | var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange();
|
29623 | if (object.start != null)
|
29624 | message.start = object.start | 0;
|
29625 | if (object.end != null)
|
29626 | message.end = object.end | 0;
|
29627 | return message;
|
29628 | };
|
29629 |
|
29630 | /**
|
29631 | * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified.
|
29632 | * @function toObject
|
29633 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
29634 | * @static
|
29635 | * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange
|
29636 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
29637 | * @returns {Object.<string,*>} Plain object
|
29638 | */
|
29639 | EnumReservedRange.toObject = function toObject(message, options) {
|
29640 | if (!options)
|
29641 | options = {};
|
29642 | var object = {};
|
29643 | if (options.defaults) {
|
29644 | object.start = 0;
|
29645 | object.end = 0;
|
29646 | }
|
29647 | if (message.start != null && message.hasOwnProperty("start"))
|
29648 | object.start = message.start;
|
29649 | if (message.end != null && message.hasOwnProperty("end"))
|
29650 | object.end = message.end;
|
29651 | return object;
|
29652 | };
|
29653 |
|
29654 | /**
|
29655 | * Converts this EnumReservedRange to JSON.
|
29656 | * @function toJSON
|
29657 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
29658 | * @instance
|
29659 | * @returns {Object.<string,*>} JSON object
|
29660 | */
|
29661 | EnumReservedRange.prototype.toJSON = function toJSON() {
|
29662 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
29663 | };
|
29664 |
|
29665 | /**
|
29666 | * Gets the default type url for EnumReservedRange
|
29667 | * @function getTypeUrl
|
29668 | * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
|
29669 | * @static
|
29670 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
29671 | * @returns {string} The default type url
|
29672 | */
|
29673 | EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
29674 | if (typeUrlPrefix === undefined) {
|
29675 | typeUrlPrefix = "type.googleapis.com";
|
29676 | }
|
29677 | return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange";
|
29678 | };
|
29679 |
|
29680 | return EnumReservedRange;
|
29681 | })();
|
29682 |
|
29683 | return EnumDescriptorProto;
|
29684 | })();
|
29685 |
|
29686 | protobuf.EnumValueDescriptorProto = (function() {
|
29687 |
|
29688 | /**
|
29689 | * Properties of an EnumValueDescriptorProto.
|
29690 | * @memberof google.protobuf
|
29691 | * @interface IEnumValueDescriptorProto
|
29692 | * @property {string|null} [name] EnumValueDescriptorProto name
|
29693 | * @property {number|null} [number] EnumValueDescriptorProto number
|
29694 | * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options
|
29695 | */
|
29696 |
|
29697 | /**
|
29698 | * Constructs a new EnumValueDescriptorProto.
|
29699 | * @memberof google.protobuf
|
29700 | * @classdesc Represents an EnumValueDescriptorProto.
|
29701 | * @implements IEnumValueDescriptorProto
|
29702 | * @constructor
|
29703 | * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set
|
29704 | */
|
29705 | function EnumValueDescriptorProto(properties) {
|
29706 | if (properties)
|
29707 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
29708 | if (properties[keys[i]] != null)
|
29709 | this[keys[i]] = properties[keys[i]];
|
29710 | }
|
29711 |
|
29712 | /**
|
29713 | * EnumValueDescriptorProto name.
|
29714 | * @member {string} name
|
29715 | * @memberof google.protobuf.EnumValueDescriptorProto
|
29716 | * @instance
|
29717 | */
|
29718 | EnumValueDescriptorProto.prototype.name = "";
|
29719 |
|
29720 | /**
|
29721 | * EnumValueDescriptorProto number.
|
29722 | * @member {number} number
|
29723 | * @memberof google.protobuf.EnumValueDescriptorProto
|
29724 | * @instance
|
29725 | */
|
29726 | EnumValueDescriptorProto.prototype.number = 0;
|
29727 |
|
29728 | /**
|
29729 | * EnumValueDescriptorProto options.
|
29730 | * @member {google.protobuf.IEnumValueOptions|null|undefined} options
|
29731 | * @memberof google.protobuf.EnumValueDescriptorProto
|
29732 | * @instance
|
29733 | */
|
29734 | EnumValueDescriptorProto.prototype.options = null;
|
29735 |
|
29736 | /**
|
29737 | * Creates a new EnumValueDescriptorProto instance using the specified properties.
|
29738 | * @function create
|
29739 | * @memberof google.protobuf.EnumValueDescriptorProto
|
29740 | * @static
|
29741 | * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set
|
29742 | * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance
|
29743 | */
|
29744 | EnumValueDescriptorProto.create = function create(properties) {
|
29745 | return new EnumValueDescriptorProto(properties);
|
29746 | };
|
29747 |
|
29748 | /**
|
29749 | * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages.
|
29750 | * @function encode
|
29751 | * @memberof google.protobuf.EnumValueDescriptorProto
|
29752 | * @static
|
29753 | * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode
|
29754 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
29755 | * @returns {$protobuf.Writer} Writer
|
29756 | */
|
29757 | EnumValueDescriptorProto.encode = function encode(message, writer) {
|
29758 | if (!writer)
|
29759 | writer = $Writer.create();
|
29760 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
29761 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
29762 | if (message.number != null && Object.hasOwnProperty.call(message, "number"))
|
29763 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number);
|
29764 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
29765 | $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
29766 | return writer;
|
29767 | };
|
29768 |
|
29769 | /**
|
29770 | * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages.
|
29771 | * @function encodeDelimited
|
29772 | * @memberof google.protobuf.EnumValueDescriptorProto
|
29773 | * @static
|
29774 | * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode
|
29775 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
29776 | * @returns {$protobuf.Writer} Writer
|
29777 | */
|
29778 | EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
29779 | return this.encode(message, writer).ldelim();
|
29780 | };
|
29781 |
|
29782 | /**
|
29783 | * Decodes an EnumValueDescriptorProto message from the specified reader or buffer.
|
29784 | * @function decode
|
29785 | * @memberof google.protobuf.EnumValueDescriptorProto
|
29786 | * @static
|
29787 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
29788 | * @param {number} [length] Message length if known beforehand
|
29789 | * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto
|
29790 | * @throws {Error} If the payload is not a reader or valid buffer
|
29791 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
29792 | */
|
29793 | EnumValueDescriptorProto.decode = function decode(reader, length) {
|
29794 | if (!(reader instanceof $Reader))
|
29795 | reader = $Reader.create(reader);
|
29796 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto();
|
29797 | while (reader.pos < end) {
|
29798 | var tag = reader.uint32();
|
29799 | switch (tag >>> 3) {
|
29800 | case 1: {
|
29801 | message.name = reader.string();
|
29802 | break;
|
29803 | }
|
29804 | case 2: {
|
29805 | message.number = reader.int32();
|
29806 | break;
|
29807 | }
|
29808 | case 3: {
|
29809 | message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32());
|
29810 | break;
|
29811 | }
|
29812 | default:
|
29813 | reader.skipType(tag & 7);
|
29814 | break;
|
29815 | }
|
29816 | }
|
29817 | return message;
|
29818 | };
|
29819 |
|
29820 | /**
|
29821 | * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited.
|
29822 | * @function decodeDelimited
|
29823 | * @memberof google.protobuf.EnumValueDescriptorProto
|
29824 | * @static
|
29825 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
29826 | * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto
|
29827 | * @throws {Error} If the payload is not a reader or valid buffer
|
29828 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
29829 | */
|
29830 | EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
29831 | if (!(reader instanceof $Reader))
|
29832 | reader = new $Reader(reader);
|
29833 | return this.decode(reader, reader.uint32());
|
29834 | };
|
29835 |
|
29836 | /**
|
29837 | * Verifies an EnumValueDescriptorProto message.
|
29838 | * @function verify
|
29839 | * @memberof google.protobuf.EnumValueDescriptorProto
|
29840 | * @static
|
29841 | * @param {Object.<string,*>} message Plain object to verify
|
29842 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
29843 | */
|
29844 | EnumValueDescriptorProto.verify = function verify(message) {
|
29845 | if (typeof message !== "object" || message === null)
|
29846 | return "object expected";
|
29847 | if (message.name != null && message.hasOwnProperty("name"))
|
29848 | if (!$util.isString(message.name))
|
29849 | return "name: string expected";
|
29850 | if (message.number != null && message.hasOwnProperty("number"))
|
29851 | if (!$util.isInteger(message.number))
|
29852 | return "number: integer expected";
|
29853 | if (message.options != null && message.hasOwnProperty("options")) {
|
29854 | var error = $root.google.protobuf.EnumValueOptions.verify(message.options);
|
29855 | if (error)
|
29856 | return "options." + error;
|
29857 | }
|
29858 | return null;
|
29859 | };
|
29860 |
|
29861 | /**
|
29862 | * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types.
|
29863 | * @function fromObject
|
29864 | * @memberof google.protobuf.EnumValueDescriptorProto
|
29865 | * @static
|
29866 | * @param {Object.<string,*>} object Plain object
|
29867 | * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto
|
29868 | */
|
29869 | EnumValueDescriptorProto.fromObject = function fromObject(object) {
|
29870 | if (object instanceof $root.google.protobuf.EnumValueDescriptorProto)
|
29871 | return object;
|
29872 | var message = new $root.google.protobuf.EnumValueDescriptorProto();
|
29873 | if (object.name != null)
|
29874 | message.name = String(object.name);
|
29875 | if (object.number != null)
|
29876 | message.number = object.number | 0;
|
29877 | if (object.options != null) {
|
29878 | if (typeof object.options !== "object")
|
29879 | throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected");
|
29880 | message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options);
|
29881 | }
|
29882 | return message;
|
29883 | };
|
29884 |
|
29885 | /**
|
29886 | * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified.
|
29887 | * @function toObject
|
29888 | * @memberof google.protobuf.EnumValueDescriptorProto
|
29889 | * @static
|
29890 | * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto
|
29891 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
29892 | * @returns {Object.<string,*>} Plain object
|
29893 | */
|
29894 | EnumValueDescriptorProto.toObject = function toObject(message, options) {
|
29895 | if (!options)
|
29896 | options = {};
|
29897 | var object = {};
|
29898 | if (options.defaults) {
|
29899 | object.name = "";
|
29900 | object.number = 0;
|
29901 | object.options = null;
|
29902 | }
|
29903 | if (message.name != null && message.hasOwnProperty("name"))
|
29904 | object.name = message.name;
|
29905 | if (message.number != null && message.hasOwnProperty("number"))
|
29906 | object.number = message.number;
|
29907 | if (message.options != null && message.hasOwnProperty("options"))
|
29908 | object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options);
|
29909 | return object;
|
29910 | };
|
29911 |
|
29912 | /**
|
29913 | * Converts this EnumValueDescriptorProto to JSON.
|
29914 | * @function toJSON
|
29915 | * @memberof google.protobuf.EnumValueDescriptorProto
|
29916 | * @instance
|
29917 | * @returns {Object.<string,*>} JSON object
|
29918 | */
|
29919 | EnumValueDescriptorProto.prototype.toJSON = function toJSON() {
|
29920 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
29921 | };
|
29922 |
|
29923 | /**
|
29924 | * Gets the default type url for EnumValueDescriptorProto
|
29925 | * @function getTypeUrl
|
29926 | * @memberof google.protobuf.EnumValueDescriptorProto
|
29927 | * @static
|
29928 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
29929 | * @returns {string} The default type url
|
29930 | */
|
29931 | EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
29932 | if (typeUrlPrefix === undefined) {
|
29933 | typeUrlPrefix = "type.googleapis.com";
|
29934 | }
|
29935 | return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto";
|
29936 | };
|
29937 |
|
29938 | return EnumValueDescriptorProto;
|
29939 | })();
|
29940 |
|
29941 | protobuf.ServiceDescriptorProto = (function() {
|
29942 |
|
29943 | /**
|
29944 | * Properties of a ServiceDescriptorProto.
|
29945 | * @memberof google.protobuf
|
29946 | * @interface IServiceDescriptorProto
|
29947 | * @property {string|null} [name] ServiceDescriptorProto name
|
29948 | * @property {Array.<google.protobuf.IMethodDescriptorProto>|null} [method] ServiceDescriptorProto method
|
29949 | * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options
|
29950 | */
|
29951 |
|
29952 | /**
|
29953 | * Constructs a new ServiceDescriptorProto.
|
29954 | * @memberof google.protobuf
|
29955 | * @classdesc Represents a ServiceDescriptorProto.
|
29956 | * @implements IServiceDescriptorProto
|
29957 | * @constructor
|
29958 | * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set
|
29959 | */
|
29960 | function ServiceDescriptorProto(properties) {
|
29961 | this.method = [];
|
29962 | if (properties)
|
29963 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
29964 | if (properties[keys[i]] != null)
|
29965 | this[keys[i]] = properties[keys[i]];
|
29966 | }
|
29967 |
|
29968 | /**
|
29969 | * ServiceDescriptorProto name.
|
29970 | * @member {string} name
|
29971 | * @memberof google.protobuf.ServiceDescriptorProto
|
29972 | * @instance
|
29973 | */
|
29974 | ServiceDescriptorProto.prototype.name = "";
|
29975 |
|
29976 | /**
|
29977 | * ServiceDescriptorProto method.
|
29978 | * @member {Array.<google.protobuf.IMethodDescriptorProto>} method
|
29979 | * @memberof google.protobuf.ServiceDescriptorProto
|
29980 | * @instance
|
29981 | */
|
29982 | ServiceDescriptorProto.prototype.method = $util.emptyArray;
|
29983 |
|
29984 | /**
|
29985 | * ServiceDescriptorProto options.
|
29986 | * @member {google.protobuf.IServiceOptions|null|undefined} options
|
29987 | * @memberof google.protobuf.ServiceDescriptorProto
|
29988 | * @instance
|
29989 | */
|
29990 | ServiceDescriptorProto.prototype.options = null;
|
29991 |
|
29992 | /**
|
29993 | * Creates a new ServiceDescriptorProto instance using the specified properties.
|
29994 | * @function create
|
29995 | * @memberof google.protobuf.ServiceDescriptorProto
|
29996 | * @static
|
29997 | * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set
|
29998 | * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance
|
29999 | */
|
30000 | ServiceDescriptorProto.create = function create(properties) {
|
30001 | return new ServiceDescriptorProto(properties);
|
30002 | };
|
30003 |
|
30004 | /**
|
30005 | * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages.
|
30006 | * @function encode
|
30007 | * @memberof google.protobuf.ServiceDescriptorProto
|
30008 | * @static
|
30009 | * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode
|
30010 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
30011 | * @returns {$protobuf.Writer} Writer
|
30012 | */
|
30013 | ServiceDescriptorProto.encode = function encode(message, writer) {
|
30014 | if (!writer)
|
30015 | writer = $Writer.create();
|
30016 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
30017 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
30018 | if (message.method != null && message.method.length)
|
30019 | for (var i = 0; i < message.method.length; ++i)
|
30020 | $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
30021 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
30022 | $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
30023 | return writer;
|
30024 | };
|
30025 |
|
30026 | /**
|
30027 | * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages.
|
30028 | * @function encodeDelimited
|
30029 | * @memberof google.protobuf.ServiceDescriptorProto
|
30030 | * @static
|
30031 | * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode
|
30032 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
30033 | * @returns {$protobuf.Writer} Writer
|
30034 | */
|
30035 | ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
30036 | return this.encode(message, writer).ldelim();
|
30037 | };
|
30038 |
|
30039 | /**
|
30040 | * Decodes a ServiceDescriptorProto message from the specified reader or buffer.
|
30041 | * @function decode
|
30042 | * @memberof google.protobuf.ServiceDescriptorProto
|
30043 | * @static
|
30044 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
30045 | * @param {number} [length] Message length if known beforehand
|
30046 | * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto
|
30047 | * @throws {Error} If the payload is not a reader or valid buffer
|
30048 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
30049 | */
|
30050 | ServiceDescriptorProto.decode = function decode(reader, length) {
|
30051 | if (!(reader instanceof $Reader))
|
30052 | reader = $Reader.create(reader);
|
30053 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto();
|
30054 | while (reader.pos < end) {
|
30055 | var tag = reader.uint32();
|
30056 | switch (tag >>> 3) {
|
30057 | case 1: {
|
30058 | message.name = reader.string();
|
30059 | break;
|
30060 | }
|
30061 | case 2: {
|
30062 | if (!(message.method && message.method.length))
|
30063 | message.method = [];
|
30064 | message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32()));
|
30065 | break;
|
30066 | }
|
30067 | case 3: {
|
30068 | message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32());
|
30069 | break;
|
30070 | }
|
30071 | default:
|
30072 | reader.skipType(tag & 7);
|
30073 | break;
|
30074 | }
|
30075 | }
|
30076 | return message;
|
30077 | };
|
30078 |
|
30079 | /**
|
30080 | * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited.
|
30081 | * @function decodeDelimited
|
30082 | * @memberof google.protobuf.ServiceDescriptorProto
|
30083 | * @static
|
30084 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
30085 | * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto
|
30086 | * @throws {Error} If the payload is not a reader or valid buffer
|
30087 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
30088 | */
|
30089 | ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
30090 | if (!(reader instanceof $Reader))
|
30091 | reader = new $Reader(reader);
|
30092 | return this.decode(reader, reader.uint32());
|
30093 | };
|
30094 |
|
30095 | /**
|
30096 | * Verifies a ServiceDescriptorProto message.
|
30097 | * @function verify
|
30098 | * @memberof google.protobuf.ServiceDescriptorProto
|
30099 | * @static
|
30100 | * @param {Object.<string,*>} message Plain object to verify
|
30101 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
30102 | */
|
30103 | ServiceDescriptorProto.verify = function verify(message) {
|
30104 | if (typeof message !== "object" || message === null)
|
30105 | return "object expected";
|
30106 | if (message.name != null && message.hasOwnProperty("name"))
|
30107 | if (!$util.isString(message.name))
|
30108 | return "name: string expected";
|
30109 | if (message.method != null && message.hasOwnProperty("method")) {
|
30110 | if (!Array.isArray(message.method))
|
30111 | return "method: array expected";
|
30112 | for (var i = 0; i < message.method.length; ++i) {
|
30113 | var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]);
|
30114 | if (error)
|
30115 | return "method." + error;
|
30116 | }
|
30117 | }
|
30118 | if (message.options != null && message.hasOwnProperty("options")) {
|
30119 | var error = $root.google.protobuf.ServiceOptions.verify(message.options);
|
30120 | if (error)
|
30121 | return "options." + error;
|
30122 | }
|
30123 | return null;
|
30124 | };
|
30125 |
|
30126 | /**
|
30127 | * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types.
|
30128 | * @function fromObject
|
30129 | * @memberof google.protobuf.ServiceDescriptorProto
|
30130 | * @static
|
30131 | * @param {Object.<string,*>} object Plain object
|
30132 | * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto
|
30133 | */
|
30134 | ServiceDescriptorProto.fromObject = function fromObject(object) {
|
30135 | if (object instanceof $root.google.protobuf.ServiceDescriptorProto)
|
30136 | return object;
|
30137 | var message = new $root.google.protobuf.ServiceDescriptorProto();
|
30138 | if (object.name != null)
|
30139 | message.name = String(object.name);
|
30140 | if (object.method) {
|
30141 | if (!Array.isArray(object.method))
|
30142 | throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected");
|
30143 | message.method = [];
|
30144 | for (var i = 0; i < object.method.length; ++i) {
|
30145 | if (typeof object.method[i] !== "object")
|
30146 | throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected");
|
30147 | message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]);
|
30148 | }
|
30149 | }
|
30150 | if (object.options != null) {
|
30151 | if (typeof object.options !== "object")
|
30152 | throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected");
|
30153 | message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options);
|
30154 | }
|
30155 | return message;
|
30156 | };
|
30157 |
|
30158 | /**
|
30159 | * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified.
|
30160 | * @function toObject
|
30161 | * @memberof google.protobuf.ServiceDescriptorProto
|
30162 | * @static
|
30163 | * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto
|
30164 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
30165 | * @returns {Object.<string,*>} Plain object
|
30166 | */
|
30167 | ServiceDescriptorProto.toObject = function toObject(message, options) {
|
30168 | if (!options)
|
30169 | options = {};
|
30170 | var object = {};
|
30171 | if (options.arrays || options.defaults)
|
30172 | object.method = [];
|
30173 | if (options.defaults) {
|
30174 | object.name = "";
|
30175 | object.options = null;
|
30176 | }
|
30177 | if (message.name != null && message.hasOwnProperty("name"))
|
30178 | object.name = message.name;
|
30179 | if (message.method && message.method.length) {
|
30180 | object.method = [];
|
30181 | for (var j = 0; j < message.method.length; ++j)
|
30182 | object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options);
|
30183 | }
|
30184 | if (message.options != null && message.hasOwnProperty("options"))
|
30185 | object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options);
|
30186 | return object;
|
30187 | };
|
30188 |
|
30189 | /**
|
30190 | * Converts this ServiceDescriptorProto to JSON.
|
30191 | * @function toJSON
|
30192 | * @memberof google.protobuf.ServiceDescriptorProto
|
30193 | * @instance
|
30194 | * @returns {Object.<string,*>} JSON object
|
30195 | */
|
30196 | ServiceDescriptorProto.prototype.toJSON = function toJSON() {
|
30197 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
30198 | };
|
30199 |
|
30200 | /**
|
30201 | * Gets the default type url for ServiceDescriptorProto
|
30202 | * @function getTypeUrl
|
30203 | * @memberof google.protobuf.ServiceDescriptorProto
|
30204 | * @static
|
30205 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
30206 | * @returns {string} The default type url
|
30207 | */
|
30208 | ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
30209 | if (typeUrlPrefix === undefined) {
|
30210 | typeUrlPrefix = "type.googleapis.com";
|
30211 | }
|
30212 | return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto";
|
30213 | };
|
30214 |
|
30215 | return ServiceDescriptorProto;
|
30216 | })();
|
30217 |
|
30218 | protobuf.MethodDescriptorProto = (function() {
|
30219 |
|
30220 | /**
|
30221 | * Properties of a MethodDescriptorProto.
|
30222 | * @memberof google.protobuf
|
30223 | * @interface IMethodDescriptorProto
|
30224 | * @property {string|null} [name] MethodDescriptorProto name
|
30225 | * @property {string|null} [inputType] MethodDescriptorProto inputType
|
30226 | * @property {string|null} [outputType] MethodDescriptorProto outputType
|
30227 | * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options
|
30228 | * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming
|
30229 | * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming
|
30230 | */
|
30231 |
|
30232 | /**
|
30233 | * Constructs a new MethodDescriptorProto.
|
30234 | * @memberof google.protobuf
|
30235 | * @classdesc Represents a MethodDescriptorProto.
|
30236 | * @implements IMethodDescriptorProto
|
30237 | * @constructor
|
30238 | * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set
|
30239 | */
|
30240 | function MethodDescriptorProto(properties) {
|
30241 | if (properties)
|
30242 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
30243 | if (properties[keys[i]] != null)
|
30244 | this[keys[i]] = properties[keys[i]];
|
30245 | }
|
30246 |
|
30247 | /**
|
30248 | * MethodDescriptorProto name.
|
30249 | * @member {string} name
|
30250 | * @memberof google.protobuf.MethodDescriptorProto
|
30251 | * @instance
|
30252 | */
|
30253 | MethodDescriptorProto.prototype.name = "";
|
30254 |
|
30255 | /**
|
30256 | * MethodDescriptorProto inputType.
|
30257 | * @member {string} inputType
|
30258 | * @memberof google.protobuf.MethodDescriptorProto
|
30259 | * @instance
|
30260 | */
|
30261 | MethodDescriptorProto.prototype.inputType = "";
|
30262 |
|
30263 | /**
|
30264 | * MethodDescriptorProto outputType.
|
30265 | * @member {string} outputType
|
30266 | * @memberof google.protobuf.MethodDescriptorProto
|
30267 | * @instance
|
30268 | */
|
30269 | MethodDescriptorProto.prototype.outputType = "";
|
30270 |
|
30271 | /**
|
30272 | * MethodDescriptorProto options.
|
30273 | * @member {google.protobuf.IMethodOptions|null|undefined} options
|
30274 | * @memberof google.protobuf.MethodDescriptorProto
|
30275 | * @instance
|
30276 | */
|
30277 | MethodDescriptorProto.prototype.options = null;
|
30278 |
|
30279 | /**
|
30280 | * MethodDescriptorProto clientStreaming.
|
30281 | * @member {boolean} clientStreaming
|
30282 | * @memberof google.protobuf.MethodDescriptorProto
|
30283 | * @instance
|
30284 | */
|
30285 | MethodDescriptorProto.prototype.clientStreaming = false;
|
30286 |
|
30287 | /**
|
30288 | * MethodDescriptorProto serverStreaming.
|
30289 | * @member {boolean} serverStreaming
|
30290 | * @memberof google.protobuf.MethodDescriptorProto
|
30291 | * @instance
|
30292 | */
|
30293 | MethodDescriptorProto.prototype.serverStreaming = false;
|
30294 |
|
30295 | /**
|
30296 | * Creates a new MethodDescriptorProto instance using the specified properties.
|
30297 | * @function create
|
30298 | * @memberof google.protobuf.MethodDescriptorProto
|
30299 | * @static
|
30300 | * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set
|
30301 | * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance
|
30302 | */
|
30303 | MethodDescriptorProto.create = function create(properties) {
|
30304 | return new MethodDescriptorProto(properties);
|
30305 | };
|
30306 |
|
30307 | /**
|
30308 | * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages.
|
30309 | * @function encode
|
30310 | * @memberof google.protobuf.MethodDescriptorProto
|
30311 | * @static
|
30312 | * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode
|
30313 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
30314 | * @returns {$protobuf.Writer} Writer
|
30315 | */
|
30316 | MethodDescriptorProto.encode = function encode(message, writer) {
|
30317 | if (!writer)
|
30318 | writer = $Writer.create();
|
30319 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
30320 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
30321 | if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType"))
|
30322 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType);
|
30323 | if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType"))
|
30324 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType);
|
30325 | if (message.options != null && Object.hasOwnProperty.call(message, "options"))
|
30326 | $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
30327 | if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming"))
|
30328 | writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming);
|
30329 | if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming"))
|
30330 | writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming);
|
30331 | return writer;
|
30332 | };
|
30333 |
|
30334 | /**
|
30335 | * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages.
|
30336 | * @function encodeDelimited
|
30337 | * @memberof google.protobuf.MethodDescriptorProto
|
30338 | * @static
|
30339 | * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode
|
30340 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
30341 | * @returns {$protobuf.Writer} Writer
|
30342 | */
|
30343 | MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
|
30344 | return this.encode(message, writer).ldelim();
|
30345 | };
|
30346 |
|
30347 | /**
|
30348 | * Decodes a MethodDescriptorProto message from the specified reader or buffer.
|
30349 | * @function decode
|
30350 | * @memberof google.protobuf.MethodDescriptorProto
|
30351 | * @static
|
30352 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
30353 | * @param {number} [length] Message length if known beforehand
|
30354 | * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto
|
30355 | * @throws {Error} If the payload is not a reader or valid buffer
|
30356 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
30357 | */
|
30358 | MethodDescriptorProto.decode = function decode(reader, length) {
|
30359 | if (!(reader instanceof $Reader))
|
30360 | reader = $Reader.create(reader);
|
30361 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto();
|
30362 | while (reader.pos < end) {
|
30363 | var tag = reader.uint32();
|
30364 | switch (tag >>> 3) {
|
30365 | case 1: {
|
30366 | message.name = reader.string();
|
30367 | break;
|
30368 | }
|
30369 | case 2: {
|
30370 | message.inputType = reader.string();
|
30371 | break;
|
30372 | }
|
30373 | case 3: {
|
30374 | message.outputType = reader.string();
|
30375 | break;
|
30376 | }
|
30377 | case 4: {
|
30378 | message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32());
|
30379 | break;
|
30380 | }
|
30381 | case 5: {
|
30382 | message.clientStreaming = reader.bool();
|
30383 | break;
|
30384 | }
|
30385 | case 6: {
|
30386 | message.serverStreaming = reader.bool();
|
30387 | break;
|
30388 | }
|
30389 | default:
|
30390 | reader.skipType(tag & 7);
|
30391 | break;
|
30392 | }
|
30393 | }
|
30394 | return message;
|
30395 | };
|
30396 |
|
30397 | /**
|
30398 | * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited.
|
30399 | * @function decodeDelimited
|
30400 | * @memberof google.protobuf.MethodDescriptorProto
|
30401 | * @static
|
30402 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
30403 | * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto
|
30404 | * @throws {Error} If the payload is not a reader or valid buffer
|
30405 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
30406 | */
|
30407 | MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
|
30408 | if (!(reader instanceof $Reader))
|
30409 | reader = new $Reader(reader);
|
30410 | return this.decode(reader, reader.uint32());
|
30411 | };
|
30412 |
|
30413 | /**
|
30414 | * Verifies a MethodDescriptorProto message.
|
30415 | * @function verify
|
30416 | * @memberof google.protobuf.MethodDescriptorProto
|
30417 | * @static
|
30418 | * @param {Object.<string,*>} message Plain object to verify
|
30419 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
30420 | */
|
30421 | MethodDescriptorProto.verify = function verify(message) {
|
30422 | if (typeof message !== "object" || message === null)
|
30423 | return "object expected";
|
30424 | if (message.name != null && message.hasOwnProperty("name"))
|
30425 | if (!$util.isString(message.name))
|
30426 | return "name: string expected";
|
30427 | if (message.inputType != null && message.hasOwnProperty("inputType"))
|
30428 | if (!$util.isString(message.inputType))
|
30429 | return "inputType: string expected";
|
30430 | if (message.outputType != null && message.hasOwnProperty("outputType"))
|
30431 | if (!$util.isString(message.outputType))
|
30432 | return "outputType: string expected";
|
30433 | if (message.options != null && message.hasOwnProperty("options")) {
|
30434 | var error = $root.google.protobuf.MethodOptions.verify(message.options);
|
30435 | if (error)
|
30436 | return "options." + error;
|
30437 | }
|
30438 | if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming"))
|
30439 | if (typeof message.clientStreaming !== "boolean")
|
30440 | return "clientStreaming: boolean expected";
|
30441 | if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming"))
|
30442 | if (typeof message.serverStreaming !== "boolean")
|
30443 | return "serverStreaming: boolean expected";
|
30444 | return null;
|
30445 | };
|
30446 |
|
30447 | /**
|
30448 | * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types.
|
30449 | * @function fromObject
|
30450 | * @memberof google.protobuf.MethodDescriptorProto
|
30451 | * @static
|
30452 | * @param {Object.<string,*>} object Plain object
|
30453 | * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto
|
30454 | */
|
30455 | MethodDescriptorProto.fromObject = function fromObject(object) {
|
30456 | if (object instanceof $root.google.protobuf.MethodDescriptorProto)
|
30457 | return object;
|
30458 | var message = new $root.google.protobuf.MethodDescriptorProto();
|
30459 | if (object.name != null)
|
30460 | message.name = String(object.name);
|
30461 | if (object.inputType != null)
|
30462 | message.inputType = String(object.inputType);
|
30463 | if (object.outputType != null)
|
30464 | message.outputType = String(object.outputType);
|
30465 | if (object.options != null) {
|
30466 | if (typeof object.options !== "object")
|
30467 | throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected");
|
30468 | message.options = $root.google.protobuf.MethodOptions.fromObject(object.options);
|
30469 | }
|
30470 | if (object.clientStreaming != null)
|
30471 | message.clientStreaming = Boolean(object.clientStreaming);
|
30472 | if (object.serverStreaming != null)
|
30473 | message.serverStreaming = Boolean(object.serverStreaming);
|
30474 | return message;
|
30475 | };
|
30476 |
|
30477 | /**
|
30478 | * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified.
|
30479 | * @function toObject
|
30480 | * @memberof google.protobuf.MethodDescriptorProto
|
30481 | * @static
|
30482 | * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto
|
30483 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
30484 | * @returns {Object.<string,*>} Plain object
|
30485 | */
|
30486 | MethodDescriptorProto.toObject = function toObject(message, options) {
|
30487 | if (!options)
|
30488 | options = {};
|
30489 | var object = {};
|
30490 | if (options.defaults) {
|
30491 | object.name = "";
|
30492 | object.inputType = "";
|
30493 | object.outputType = "";
|
30494 | object.options = null;
|
30495 | object.clientStreaming = false;
|
30496 | object.serverStreaming = false;
|
30497 | }
|
30498 | if (message.name != null && message.hasOwnProperty("name"))
|
30499 | object.name = message.name;
|
30500 | if (message.inputType != null && message.hasOwnProperty("inputType"))
|
30501 | object.inputType = message.inputType;
|
30502 | if (message.outputType != null && message.hasOwnProperty("outputType"))
|
30503 | object.outputType = message.outputType;
|
30504 | if (message.options != null && message.hasOwnProperty("options"))
|
30505 | object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options);
|
30506 | if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming"))
|
30507 | object.clientStreaming = message.clientStreaming;
|
30508 | if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming"))
|
30509 | object.serverStreaming = message.serverStreaming;
|
30510 | return object;
|
30511 | };
|
30512 |
|
30513 | /**
|
30514 | * Converts this MethodDescriptorProto to JSON.
|
30515 | * @function toJSON
|
30516 | * @memberof google.protobuf.MethodDescriptorProto
|
30517 | * @instance
|
30518 | * @returns {Object.<string,*>} JSON object
|
30519 | */
|
30520 | MethodDescriptorProto.prototype.toJSON = function toJSON() {
|
30521 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
30522 | };
|
30523 |
|
30524 | /**
|
30525 | * Gets the default type url for MethodDescriptorProto
|
30526 | * @function getTypeUrl
|
30527 | * @memberof google.protobuf.MethodDescriptorProto
|
30528 | * @static
|
30529 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
30530 | * @returns {string} The default type url
|
30531 | */
|
30532 | MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
30533 | if (typeUrlPrefix === undefined) {
|
30534 | typeUrlPrefix = "type.googleapis.com";
|
30535 | }
|
30536 | return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto";
|
30537 | };
|
30538 |
|
30539 | return MethodDescriptorProto;
|
30540 | })();
|
30541 |
|
30542 | protobuf.FileOptions = (function() {
|
30543 |
|
30544 | /**
|
30545 | * Properties of a FileOptions.
|
30546 | * @memberof google.protobuf
|
30547 | * @interface IFileOptions
|
30548 | * @property {string|null} [javaPackage] FileOptions javaPackage
|
30549 | * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname
|
30550 | * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles
|
30551 | * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash
|
30552 | * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8
|
30553 | * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor
|
30554 | * @property {string|null} [goPackage] FileOptions goPackage
|
30555 | * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices
|
30556 | * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices
|
30557 | * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices
|
30558 | * @property {boolean|null} [phpGenericServices] FileOptions phpGenericServices
|
30559 | * @property {boolean|null} [deprecated] FileOptions deprecated
|
30560 | * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas
|
30561 | * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix
|
30562 | * @property {string|null} [csharpNamespace] FileOptions csharpNamespace
|
30563 | * @property {string|null} [swiftPrefix] FileOptions swiftPrefix
|
30564 | * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix
|
30565 | * @property {string|null} [phpNamespace] FileOptions phpNamespace
|
30566 | * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace
|
30567 | * @property {string|null} [rubyPackage] FileOptions rubyPackage
|
30568 | * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features
|
30569 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] FileOptions uninterpretedOption
|
30570 | */
|
30571 |
|
30572 | /**
|
30573 | * Constructs a new FileOptions.
|
30574 | * @memberof google.protobuf
|
30575 | * @classdesc Represents a FileOptions.
|
30576 | * @implements IFileOptions
|
30577 | * @constructor
|
30578 | * @param {google.protobuf.IFileOptions=} [properties] Properties to set
|
30579 | */
|
30580 | function FileOptions(properties) {
|
30581 | this.uninterpretedOption = [];
|
30582 | if (properties)
|
30583 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
30584 | if (properties[keys[i]] != null)
|
30585 | this[keys[i]] = properties[keys[i]];
|
30586 | }
|
30587 |
|
30588 | /**
|
30589 | * FileOptions javaPackage.
|
30590 | * @member {string} javaPackage
|
30591 | * @memberof google.protobuf.FileOptions
|
30592 | * @instance
|
30593 | */
|
30594 | FileOptions.prototype.javaPackage = "";
|
30595 |
|
30596 | /**
|
30597 | * FileOptions javaOuterClassname.
|
30598 | * @member {string} javaOuterClassname
|
30599 | * @memberof google.protobuf.FileOptions
|
30600 | * @instance
|
30601 | */
|
30602 | FileOptions.prototype.javaOuterClassname = "";
|
30603 |
|
30604 | /**
|
30605 | * FileOptions javaMultipleFiles.
|
30606 | * @member {boolean} javaMultipleFiles
|
30607 | * @memberof google.protobuf.FileOptions
|
30608 | * @instance
|
30609 | */
|
30610 | FileOptions.prototype.javaMultipleFiles = false;
|
30611 |
|
30612 | /**
|
30613 | * FileOptions javaGenerateEqualsAndHash.
|
30614 | * @member {boolean} javaGenerateEqualsAndHash
|
30615 | * @memberof google.protobuf.FileOptions
|
30616 | * @instance
|
30617 | */
|
30618 | FileOptions.prototype.javaGenerateEqualsAndHash = false;
|
30619 |
|
30620 | /**
|
30621 | * FileOptions javaStringCheckUtf8.
|
30622 | * @member {boolean} javaStringCheckUtf8
|
30623 | * @memberof google.protobuf.FileOptions
|
30624 | * @instance
|
30625 | */
|
30626 | FileOptions.prototype.javaStringCheckUtf8 = false;
|
30627 |
|
30628 | /**
|
30629 | * FileOptions optimizeFor.
|
30630 | * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor
|
30631 | * @memberof google.protobuf.FileOptions
|
30632 | * @instance
|
30633 | */
|
30634 | FileOptions.prototype.optimizeFor = 1;
|
30635 |
|
30636 | /**
|
30637 | * FileOptions goPackage.
|
30638 | * @member {string} goPackage
|
30639 | * @memberof google.protobuf.FileOptions
|
30640 | * @instance
|
30641 | */
|
30642 | FileOptions.prototype.goPackage = "";
|
30643 |
|
30644 | /**
|
30645 | * FileOptions ccGenericServices.
|
30646 | * @member {boolean} ccGenericServices
|
30647 | * @memberof google.protobuf.FileOptions
|
30648 | * @instance
|
30649 | */
|
30650 | FileOptions.prototype.ccGenericServices = false;
|
30651 |
|
30652 | /**
|
30653 | * FileOptions javaGenericServices.
|
30654 | * @member {boolean} javaGenericServices
|
30655 | * @memberof google.protobuf.FileOptions
|
30656 | * @instance
|
30657 | */
|
30658 | FileOptions.prototype.javaGenericServices = false;
|
30659 |
|
30660 | /**
|
30661 | * FileOptions pyGenericServices.
|
30662 | * @member {boolean} pyGenericServices
|
30663 | * @memberof google.protobuf.FileOptions
|
30664 | * @instance
|
30665 | */
|
30666 | FileOptions.prototype.pyGenericServices = false;
|
30667 |
|
30668 | /**
|
30669 | * FileOptions phpGenericServices.
|
30670 | * @member {boolean} phpGenericServices
|
30671 | * @memberof google.protobuf.FileOptions
|
30672 | * @instance
|
30673 | */
|
30674 | FileOptions.prototype.phpGenericServices = false;
|
30675 |
|
30676 | /**
|
30677 | * FileOptions deprecated.
|
30678 | * @member {boolean} deprecated
|
30679 | * @memberof google.protobuf.FileOptions
|
30680 | * @instance
|
30681 | */
|
30682 | FileOptions.prototype.deprecated = false;
|
30683 |
|
30684 | /**
|
30685 | * FileOptions ccEnableArenas.
|
30686 | * @member {boolean} ccEnableArenas
|
30687 | * @memberof google.protobuf.FileOptions
|
30688 | * @instance
|
30689 | */
|
30690 | FileOptions.prototype.ccEnableArenas = true;
|
30691 |
|
30692 | /**
|
30693 | * FileOptions objcClassPrefix.
|
30694 | * @member {string} objcClassPrefix
|
30695 | * @memberof google.protobuf.FileOptions
|
30696 | * @instance
|
30697 | */
|
30698 | FileOptions.prototype.objcClassPrefix = "";
|
30699 |
|
30700 | /**
|
30701 | * FileOptions csharpNamespace.
|
30702 | * @member {string} csharpNamespace
|
30703 | * @memberof google.protobuf.FileOptions
|
30704 | * @instance
|
30705 | */
|
30706 | FileOptions.prototype.csharpNamespace = "";
|
30707 |
|
30708 | /**
|
30709 | * FileOptions swiftPrefix.
|
30710 | * @member {string} swiftPrefix
|
30711 | * @memberof google.protobuf.FileOptions
|
30712 | * @instance
|
30713 | */
|
30714 | FileOptions.prototype.swiftPrefix = "";
|
30715 |
|
30716 | /**
|
30717 | * FileOptions phpClassPrefix.
|
30718 | * @member {string} phpClassPrefix
|
30719 | * @memberof google.protobuf.FileOptions
|
30720 | * @instance
|
30721 | */
|
30722 | FileOptions.prototype.phpClassPrefix = "";
|
30723 |
|
30724 | /**
|
30725 | * FileOptions phpNamespace.
|
30726 | * @member {string} phpNamespace
|
30727 | * @memberof google.protobuf.FileOptions
|
30728 | * @instance
|
30729 | */
|
30730 | FileOptions.prototype.phpNamespace = "";
|
30731 |
|
30732 | /**
|
30733 | * FileOptions phpMetadataNamespace.
|
30734 | * @member {string} phpMetadataNamespace
|
30735 | * @memberof google.protobuf.FileOptions
|
30736 | * @instance
|
30737 | */
|
30738 | FileOptions.prototype.phpMetadataNamespace = "";
|
30739 |
|
30740 | /**
|
30741 | * FileOptions rubyPackage.
|
30742 | * @member {string} rubyPackage
|
30743 | * @memberof google.protobuf.FileOptions
|
30744 | * @instance
|
30745 | */
|
30746 | FileOptions.prototype.rubyPackage = "";
|
30747 |
|
30748 | /**
|
30749 | * FileOptions features.
|
30750 | * @member {google.protobuf.IFeatureSet|null|undefined} features
|
30751 | * @memberof google.protobuf.FileOptions
|
30752 | * @instance
|
30753 | */
|
30754 | FileOptions.prototype.features = null;
|
30755 |
|
30756 | /**
|
30757 | * FileOptions uninterpretedOption.
|
30758 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
30759 | * @memberof google.protobuf.FileOptions
|
30760 | * @instance
|
30761 | */
|
30762 | FileOptions.prototype.uninterpretedOption = $util.emptyArray;
|
30763 |
|
30764 | /**
|
30765 | * Creates a new FileOptions instance using the specified properties.
|
30766 | * @function create
|
30767 | * @memberof google.protobuf.FileOptions
|
30768 | * @static
|
30769 | * @param {google.protobuf.IFileOptions=} [properties] Properties to set
|
30770 | * @returns {google.protobuf.FileOptions} FileOptions instance
|
30771 | */
|
30772 | FileOptions.create = function create(properties) {
|
30773 | return new FileOptions(properties);
|
30774 | };
|
30775 |
|
30776 | /**
|
30777 | * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.
|
30778 | * @function encode
|
30779 | * @memberof google.protobuf.FileOptions
|
30780 | * @static
|
30781 | * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode
|
30782 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
30783 | * @returns {$protobuf.Writer} Writer
|
30784 | */
|
30785 | FileOptions.encode = function encode(message, writer) {
|
30786 | if (!writer)
|
30787 | writer = $Writer.create();
|
30788 | if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage"))
|
30789 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage);
|
30790 | if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname"))
|
30791 | writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname);
|
30792 | if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor"))
|
30793 | writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor);
|
30794 | if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles"))
|
30795 | writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles);
|
30796 | if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage"))
|
30797 | writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage);
|
30798 | if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices"))
|
30799 | writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices);
|
30800 | if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices"))
|
30801 | writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices);
|
30802 | if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices"))
|
30803 | writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices);
|
30804 | if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash"))
|
30805 | writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash);
|
30806 | if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
|
30807 | writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated);
|
30808 | if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8"))
|
30809 | writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8);
|
30810 | if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas"))
|
30811 | writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas);
|
30812 | if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix"))
|
30813 | writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix);
|
30814 | if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace"))
|
30815 | writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace);
|
30816 | if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix"))
|
30817 | writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix);
|
30818 | if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix"))
|
30819 | writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix);
|
30820 | if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace"))
|
30821 | writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace);
|
30822 | if (message.phpGenericServices != null && Object.hasOwnProperty.call(message, "phpGenericServices"))
|
30823 | writer.uint32(/* id 42, wireType 0 =*/336).bool(message.phpGenericServices);
|
30824 | if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace"))
|
30825 | writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace);
|
30826 | if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage"))
|
30827 | writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage);
|
30828 | if (message.features != null && Object.hasOwnProperty.call(message, "features"))
|
30829 | $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim();
|
30830 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
30831 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
30832 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
30833 | return writer;
|
30834 | };
|
30835 |
|
30836 | /**
|
30837 | * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.
|
30838 | * @function encodeDelimited
|
30839 | * @memberof google.protobuf.FileOptions
|
30840 | * @static
|
30841 | * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode
|
30842 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
30843 | * @returns {$protobuf.Writer} Writer
|
30844 | */
|
30845 | FileOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
30846 | return this.encode(message, writer).ldelim();
|
30847 | };
|
30848 |
|
30849 | /**
|
30850 | * Decodes a FileOptions message from the specified reader or buffer.
|
30851 | * @function decode
|
30852 | * @memberof google.protobuf.FileOptions
|
30853 | * @static
|
30854 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
30855 | * @param {number} [length] Message length if known beforehand
|
30856 | * @returns {google.protobuf.FileOptions} FileOptions
|
30857 | * @throws {Error} If the payload is not a reader or valid buffer
|
30858 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
30859 | */
|
30860 | FileOptions.decode = function decode(reader, length) {
|
30861 | if (!(reader instanceof $Reader))
|
30862 | reader = $Reader.create(reader);
|
30863 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions();
|
30864 | while (reader.pos < end) {
|
30865 | var tag = reader.uint32();
|
30866 | switch (tag >>> 3) {
|
30867 | case 1: {
|
30868 | message.javaPackage = reader.string();
|
30869 | break;
|
30870 | }
|
30871 | case 8: {
|
30872 | message.javaOuterClassname = reader.string();
|
30873 | break;
|
30874 | }
|
30875 | case 10: {
|
30876 | message.javaMultipleFiles = reader.bool();
|
30877 | break;
|
30878 | }
|
30879 | case 20: {
|
30880 | message.javaGenerateEqualsAndHash = reader.bool();
|
30881 | break;
|
30882 | }
|
30883 | case 27: {
|
30884 | message.javaStringCheckUtf8 = reader.bool();
|
30885 | break;
|
30886 | }
|
30887 | case 9: {
|
30888 | message.optimizeFor = reader.int32();
|
30889 | break;
|
30890 | }
|
30891 | case 11: {
|
30892 | message.goPackage = reader.string();
|
30893 | break;
|
30894 | }
|
30895 | case 16: {
|
30896 | message.ccGenericServices = reader.bool();
|
30897 | break;
|
30898 | }
|
30899 | case 17: {
|
30900 | message.javaGenericServices = reader.bool();
|
30901 | break;
|
30902 | }
|
30903 | case 18: {
|
30904 | message.pyGenericServices = reader.bool();
|
30905 | break;
|
30906 | }
|
30907 | case 42: {
|
30908 | message.phpGenericServices = reader.bool();
|
30909 | break;
|
30910 | }
|
30911 | case 23: {
|
30912 | message.deprecated = reader.bool();
|
30913 | break;
|
30914 | }
|
30915 | case 31: {
|
30916 | message.ccEnableArenas = reader.bool();
|
30917 | break;
|
30918 | }
|
30919 | case 36: {
|
30920 | message.objcClassPrefix = reader.string();
|
30921 | break;
|
30922 | }
|
30923 | case 37: {
|
30924 | message.csharpNamespace = reader.string();
|
30925 | break;
|
30926 | }
|
30927 | case 39: {
|
30928 | message.swiftPrefix = reader.string();
|
30929 | break;
|
30930 | }
|
30931 | case 40: {
|
30932 | message.phpClassPrefix = reader.string();
|
30933 | break;
|
30934 | }
|
30935 | case 41: {
|
30936 | message.phpNamespace = reader.string();
|
30937 | break;
|
30938 | }
|
30939 | case 44: {
|
30940 | message.phpMetadataNamespace = reader.string();
|
30941 | break;
|
30942 | }
|
30943 | case 45: {
|
30944 | message.rubyPackage = reader.string();
|
30945 | break;
|
30946 | }
|
30947 | case 50: {
|
30948 | message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
|
30949 | break;
|
30950 | }
|
30951 | case 999: {
|
30952 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
30953 | message.uninterpretedOption = [];
|
30954 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
30955 | break;
|
30956 | }
|
30957 | default:
|
30958 | reader.skipType(tag & 7);
|
30959 | break;
|
30960 | }
|
30961 | }
|
30962 | return message;
|
30963 | };
|
30964 |
|
30965 | /**
|
30966 | * Decodes a FileOptions message from the specified reader or buffer, length delimited.
|
30967 | * @function decodeDelimited
|
30968 | * @memberof google.protobuf.FileOptions
|
30969 | * @static
|
30970 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
30971 | * @returns {google.protobuf.FileOptions} FileOptions
|
30972 | * @throws {Error} If the payload is not a reader or valid buffer
|
30973 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
30974 | */
|
30975 | FileOptions.decodeDelimited = function decodeDelimited(reader) {
|
30976 | if (!(reader instanceof $Reader))
|
30977 | reader = new $Reader(reader);
|
30978 | return this.decode(reader, reader.uint32());
|
30979 | };
|
30980 |
|
30981 | /**
|
30982 | * Verifies a FileOptions message.
|
30983 | * @function verify
|
30984 | * @memberof google.protobuf.FileOptions
|
30985 | * @static
|
30986 | * @param {Object.<string,*>} message Plain object to verify
|
30987 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
30988 | */
|
30989 | FileOptions.verify = function verify(message) {
|
30990 | if (typeof message !== "object" || message === null)
|
30991 | return "object expected";
|
30992 | if (message.javaPackage != null && message.hasOwnProperty("javaPackage"))
|
30993 | if (!$util.isString(message.javaPackage))
|
30994 | return "javaPackage: string expected";
|
30995 | if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname"))
|
30996 | if (!$util.isString(message.javaOuterClassname))
|
30997 | return "javaOuterClassname: string expected";
|
30998 | if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles"))
|
30999 | if (typeof message.javaMultipleFiles !== "boolean")
|
31000 | return "javaMultipleFiles: boolean expected";
|
31001 | if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash"))
|
31002 | if (typeof message.javaGenerateEqualsAndHash !== "boolean")
|
31003 | return "javaGenerateEqualsAndHash: boolean expected";
|
31004 | if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8"))
|
31005 | if (typeof message.javaStringCheckUtf8 !== "boolean")
|
31006 | return "javaStringCheckUtf8: boolean expected";
|
31007 | if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor"))
|
31008 | switch (message.optimizeFor) {
|
31009 | default:
|
31010 | return "optimizeFor: enum value expected";
|
31011 | case 1:
|
31012 | case 2:
|
31013 | case 3:
|
31014 | break;
|
31015 | }
|
31016 | if (message.goPackage != null && message.hasOwnProperty("goPackage"))
|
31017 | if (!$util.isString(message.goPackage))
|
31018 | return "goPackage: string expected";
|
31019 | if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices"))
|
31020 | if (typeof message.ccGenericServices !== "boolean")
|
31021 | return "ccGenericServices: boolean expected";
|
31022 | if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices"))
|
31023 | if (typeof message.javaGenericServices !== "boolean")
|
31024 | return "javaGenericServices: boolean expected";
|
31025 | if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices"))
|
31026 | if (typeof message.pyGenericServices !== "boolean")
|
31027 | return "pyGenericServices: boolean expected";
|
31028 | if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices"))
|
31029 | if (typeof message.phpGenericServices !== "boolean")
|
31030 | return "phpGenericServices: boolean expected";
|
31031 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
31032 | if (typeof message.deprecated !== "boolean")
|
31033 | return "deprecated: boolean expected";
|
31034 | if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas"))
|
31035 | if (typeof message.ccEnableArenas !== "boolean")
|
31036 | return "ccEnableArenas: boolean expected";
|
31037 | if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix"))
|
31038 | if (!$util.isString(message.objcClassPrefix))
|
31039 | return "objcClassPrefix: string expected";
|
31040 | if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace"))
|
31041 | if (!$util.isString(message.csharpNamespace))
|
31042 | return "csharpNamespace: string expected";
|
31043 | if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix"))
|
31044 | if (!$util.isString(message.swiftPrefix))
|
31045 | return "swiftPrefix: string expected";
|
31046 | if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix"))
|
31047 | if (!$util.isString(message.phpClassPrefix))
|
31048 | return "phpClassPrefix: string expected";
|
31049 | if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace"))
|
31050 | if (!$util.isString(message.phpNamespace))
|
31051 | return "phpNamespace: string expected";
|
31052 | if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace"))
|
31053 | if (!$util.isString(message.phpMetadataNamespace))
|
31054 | return "phpMetadataNamespace: string expected";
|
31055 | if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage"))
|
31056 | if (!$util.isString(message.rubyPackage))
|
31057 | return "rubyPackage: string expected";
|
31058 | if (message.features != null && message.hasOwnProperty("features")) {
|
31059 | var error = $root.google.protobuf.FeatureSet.verify(message.features);
|
31060 | if (error)
|
31061 | return "features." + error;
|
31062 | }
|
31063 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
31064 | if (!Array.isArray(message.uninterpretedOption))
|
31065 | return "uninterpretedOption: array expected";
|
31066 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
31067 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
31068 | if (error)
|
31069 | return "uninterpretedOption." + error;
|
31070 | }
|
31071 | }
|
31072 | return null;
|
31073 | };
|
31074 |
|
31075 | /**
|
31076 | * Creates a FileOptions message from a plain object. Also converts values to their respective internal types.
|
31077 | * @function fromObject
|
31078 | * @memberof google.protobuf.FileOptions
|
31079 | * @static
|
31080 | * @param {Object.<string,*>} object Plain object
|
31081 | * @returns {google.protobuf.FileOptions} FileOptions
|
31082 | */
|
31083 | FileOptions.fromObject = function fromObject(object) {
|
31084 | if (object instanceof $root.google.protobuf.FileOptions)
|
31085 | return object;
|
31086 | var message = new $root.google.protobuf.FileOptions();
|
31087 | if (object.javaPackage != null)
|
31088 | message.javaPackage = String(object.javaPackage);
|
31089 | if (object.javaOuterClassname != null)
|
31090 | message.javaOuterClassname = String(object.javaOuterClassname);
|
31091 | if (object.javaMultipleFiles != null)
|
31092 | message.javaMultipleFiles = Boolean(object.javaMultipleFiles);
|
31093 | if (object.javaGenerateEqualsAndHash != null)
|
31094 | message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash);
|
31095 | if (object.javaStringCheckUtf8 != null)
|
31096 | message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8);
|
31097 | switch (object.optimizeFor) {
|
31098 | default:
|
31099 | if (typeof object.optimizeFor === "number") {
|
31100 | message.optimizeFor = object.optimizeFor;
|
31101 | break;
|
31102 | }
|
31103 | break;
|
31104 | case "SPEED":
|
31105 | case 1:
|
31106 | message.optimizeFor = 1;
|
31107 | break;
|
31108 | case "CODE_SIZE":
|
31109 | case 2:
|
31110 | message.optimizeFor = 2;
|
31111 | break;
|
31112 | case "LITE_RUNTIME":
|
31113 | case 3:
|
31114 | message.optimizeFor = 3;
|
31115 | break;
|
31116 | }
|
31117 | if (object.goPackage != null)
|
31118 | message.goPackage = String(object.goPackage);
|
31119 | if (object.ccGenericServices != null)
|
31120 | message.ccGenericServices = Boolean(object.ccGenericServices);
|
31121 | if (object.javaGenericServices != null)
|
31122 | message.javaGenericServices = Boolean(object.javaGenericServices);
|
31123 | if (object.pyGenericServices != null)
|
31124 | message.pyGenericServices = Boolean(object.pyGenericServices);
|
31125 | if (object.phpGenericServices != null)
|
31126 | message.phpGenericServices = Boolean(object.phpGenericServices);
|
31127 | if (object.deprecated != null)
|
31128 | message.deprecated = Boolean(object.deprecated);
|
31129 | if (object.ccEnableArenas != null)
|
31130 | message.ccEnableArenas = Boolean(object.ccEnableArenas);
|
31131 | if (object.objcClassPrefix != null)
|
31132 | message.objcClassPrefix = String(object.objcClassPrefix);
|
31133 | if (object.csharpNamespace != null)
|
31134 | message.csharpNamespace = String(object.csharpNamespace);
|
31135 | if (object.swiftPrefix != null)
|
31136 | message.swiftPrefix = String(object.swiftPrefix);
|
31137 | if (object.phpClassPrefix != null)
|
31138 | message.phpClassPrefix = String(object.phpClassPrefix);
|
31139 | if (object.phpNamespace != null)
|
31140 | message.phpNamespace = String(object.phpNamespace);
|
31141 | if (object.phpMetadataNamespace != null)
|
31142 | message.phpMetadataNamespace = String(object.phpMetadataNamespace);
|
31143 | if (object.rubyPackage != null)
|
31144 | message.rubyPackage = String(object.rubyPackage);
|
31145 | if (object.features != null) {
|
31146 | if (typeof object.features !== "object")
|
31147 | throw TypeError(".google.protobuf.FileOptions.features: object expected");
|
31148 | message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
|
31149 | }
|
31150 | if (object.uninterpretedOption) {
|
31151 | if (!Array.isArray(object.uninterpretedOption))
|
31152 | throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected");
|
31153 | message.uninterpretedOption = [];
|
31154 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
31155 | if (typeof object.uninterpretedOption[i] !== "object")
|
31156 | throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected");
|
31157 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
31158 | }
|
31159 | }
|
31160 | return message;
|
31161 | };
|
31162 |
|
31163 | /**
|
31164 | * Creates a plain object from a FileOptions message. Also converts values to other types if specified.
|
31165 | * @function toObject
|
31166 | * @memberof google.protobuf.FileOptions
|
31167 | * @static
|
31168 | * @param {google.protobuf.FileOptions} message FileOptions
|
31169 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
31170 | * @returns {Object.<string,*>} Plain object
|
31171 | */
|
31172 | FileOptions.toObject = function toObject(message, options) {
|
31173 | if (!options)
|
31174 | options = {};
|
31175 | var object = {};
|
31176 | if (options.arrays || options.defaults)
|
31177 | object.uninterpretedOption = [];
|
31178 | if (options.defaults) {
|
31179 | object.javaPackage = "";
|
31180 | object.javaOuterClassname = "";
|
31181 | object.optimizeFor = options.enums === String ? "SPEED" : 1;
|
31182 | object.javaMultipleFiles = false;
|
31183 | object.goPackage = "";
|
31184 | object.ccGenericServices = false;
|
31185 | object.javaGenericServices = false;
|
31186 | object.pyGenericServices = false;
|
31187 | object.javaGenerateEqualsAndHash = false;
|
31188 | object.deprecated = false;
|
31189 | object.javaStringCheckUtf8 = false;
|
31190 | object.ccEnableArenas = true;
|
31191 | object.objcClassPrefix = "";
|
31192 | object.csharpNamespace = "";
|
31193 | object.swiftPrefix = "";
|
31194 | object.phpClassPrefix = "";
|
31195 | object.phpNamespace = "";
|
31196 | object.phpGenericServices = false;
|
31197 | object.phpMetadataNamespace = "";
|
31198 | object.rubyPackage = "";
|
31199 | object.features = null;
|
31200 | }
|
31201 | if (message.javaPackage != null && message.hasOwnProperty("javaPackage"))
|
31202 | object.javaPackage = message.javaPackage;
|
31203 | if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname"))
|
31204 | object.javaOuterClassname = message.javaOuterClassname;
|
31205 | if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor"))
|
31206 | object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor;
|
31207 | if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles"))
|
31208 | object.javaMultipleFiles = message.javaMultipleFiles;
|
31209 | if (message.goPackage != null && message.hasOwnProperty("goPackage"))
|
31210 | object.goPackage = message.goPackage;
|
31211 | if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices"))
|
31212 | object.ccGenericServices = message.ccGenericServices;
|
31213 | if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices"))
|
31214 | object.javaGenericServices = message.javaGenericServices;
|
31215 | if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices"))
|
31216 | object.pyGenericServices = message.pyGenericServices;
|
31217 | if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash"))
|
31218 | object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash;
|
31219 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
31220 | object.deprecated = message.deprecated;
|
31221 | if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8"))
|
31222 | object.javaStringCheckUtf8 = message.javaStringCheckUtf8;
|
31223 | if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas"))
|
31224 | object.ccEnableArenas = message.ccEnableArenas;
|
31225 | if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix"))
|
31226 | object.objcClassPrefix = message.objcClassPrefix;
|
31227 | if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace"))
|
31228 | object.csharpNamespace = message.csharpNamespace;
|
31229 | if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix"))
|
31230 | object.swiftPrefix = message.swiftPrefix;
|
31231 | if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix"))
|
31232 | object.phpClassPrefix = message.phpClassPrefix;
|
31233 | if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace"))
|
31234 | object.phpNamespace = message.phpNamespace;
|
31235 | if (message.phpGenericServices != null && message.hasOwnProperty("phpGenericServices"))
|
31236 | object.phpGenericServices = message.phpGenericServices;
|
31237 | if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace"))
|
31238 | object.phpMetadataNamespace = message.phpMetadataNamespace;
|
31239 | if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage"))
|
31240 | object.rubyPackage = message.rubyPackage;
|
31241 | if (message.features != null && message.hasOwnProperty("features"))
|
31242 | object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
|
31243 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
31244 | object.uninterpretedOption = [];
|
31245 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
31246 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
31247 | }
|
31248 | return object;
|
31249 | };
|
31250 |
|
31251 | /**
|
31252 | * Converts this FileOptions to JSON.
|
31253 | * @function toJSON
|
31254 | * @memberof google.protobuf.FileOptions
|
31255 | * @instance
|
31256 | * @returns {Object.<string,*>} JSON object
|
31257 | */
|
31258 | FileOptions.prototype.toJSON = function toJSON() {
|
31259 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
31260 | };
|
31261 |
|
31262 | /**
|
31263 | * Gets the default type url for FileOptions
|
31264 | * @function getTypeUrl
|
31265 | * @memberof google.protobuf.FileOptions
|
31266 | * @static
|
31267 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
31268 | * @returns {string} The default type url
|
31269 | */
|
31270 | FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
31271 | if (typeUrlPrefix === undefined) {
|
31272 | typeUrlPrefix = "type.googleapis.com";
|
31273 | }
|
31274 | return typeUrlPrefix + "/google.protobuf.FileOptions";
|
31275 | };
|
31276 |
|
31277 | /**
|
31278 | * OptimizeMode enum.
|
31279 | * @name google.protobuf.FileOptions.OptimizeMode
|
31280 | * @enum {number}
|
31281 | * @property {number} SPEED=1 SPEED value
|
31282 | * @property {number} CODE_SIZE=2 CODE_SIZE value
|
31283 | * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value
|
31284 | */
|
31285 | FileOptions.OptimizeMode = (function() {
|
31286 | var valuesById = {}, values = Object.create(valuesById);
|
31287 | values[valuesById[1] = "SPEED"] = 1;
|
31288 | values[valuesById[2] = "CODE_SIZE"] = 2;
|
31289 | values[valuesById[3] = "LITE_RUNTIME"] = 3;
|
31290 | return values;
|
31291 | })();
|
31292 |
|
31293 | return FileOptions;
|
31294 | })();
|
31295 |
|
31296 | protobuf.MessageOptions = (function() {
|
31297 |
|
31298 | /**
|
31299 | * Properties of a MessageOptions.
|
31300 | * @memberof google.protobuf
|
31301 | * @interface IMessageOptions
|
31302 | * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat
|
31303 | * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor
|
31304 | * @property {boolean|null} [deprecated] MessageOptions deprecated
|
31305 | * @property {boolean|null} [mapEntry] MessageOptions mapEntry
|
31306 | * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts
|
31307 | * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features
|
31308 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] MessageOptions uninterpretedOption
|
31309 | */
|
31310 |
|
31311 | /**
|
31312 | * Constructs a new MessageOptions.
|
31313 | * @memberof google.protobuf
|
31314 | * @classdesc Represents a MessageOptions.
|
31315 | * @implements IMessageOptions
|
31316 | * @constructor
|
31317 | * @param {google.protobuf.IMessageOptions=} [properties] Properties to set
|
31318 | */
|
31319 | function MessageOptions(properties) {
|
31320 | this.uninterpretedOption = [];
|
31321 | if (properties)
|
31322 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
31323 | if (properties[keys[i]] != null)
|
31324 | this[keys[i]] = properties[keys[i]];
|
31325 | }
|
31326 |
|
31327 | /**
|
31328 | * MessageOptions messageSetWireFormat.
|
31329 | * @member {boolean} messageSetWireFormat
|
31330 | * @memberof google.protobuf.MessageOptions
|
31331 | * @instance
|
31332 | */
|
31333 | MessageOptions.prototype.messageSetWireFormat = false;
|
31334 |
|
31335 | /**
|
31336 | * MessageOptions noStandardDescriptorAccessor.
|
31337 | * @member {boolean} noStandardDescriptorAccessor
|
31338 | * @memberof google.protobuf.MessageOptions
|
31339 | * @instance
|
31340 | */
|
31341 | MessageOptions.prototype.noStandardDescriptorAccessor = false;
|
31342 |
|
31343 | /**
|
31344 | * MessageOptions deprecated.
|
31345 | * @member {boolean} deprecated
|
31346 | * @memberof google.protobuf.MessageOptions
|
31347 | * @instance
|
31348 | */
|
31349 | MessageOptions.prototype.deprecated = false;
|
31350 |
|
31351 | /**
|
31352 | * MessageOptions mapEntry.
|
31353 | * @member {boolean} mapEntry
|
31354 | * @memberof google.protobuf.MessageOptions
|
31355 | * @instance
|
31356 | */
|
31357 | MessageOptions.prototype.mapEntry = false;
|
31358 |
|
31359 | /**
|
31360 | * MessageOptions deprecatedLegacyJsonFieldConflicts.
|
31361 | * @member {boolean} deprecatedLegacyJsonFieldConflicts
|
31362 | * @memberof google.protobuf.MessageOptions
|
31363 | * @instance
|
31364 | */
|
31365 | MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false;
|
31366 |
|
31367 | /**
|
31368 | * MessageOptions features.
|
31369 | * @member {google.protobuf.IFeatureSet|null|undefined} features
|
31370 | * @memberof google.protobuf.MessageOptions
|
31371 | * @instance
|
31372 | */
|
31373 | MessageOptions.prototype.features = null;
|
31374 |
|
31375 | /**
|
31376 | * MessageOptions uninterpretedOption.
|
31377 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
31378 | * @memberof google.protobuf.MessageOptions
|
31379 | * @instance
|
31380 | */
|
31381 | MessageOptions.prototype.uninterpretedOption = $util.emptyArray;
|
31382 |
|
31383 | /**
|
31384 | * Creates a new MessageOptions instance using the specified properties.
|
31385 | * @function create
|
31386 | * @memberof google.protobuf.MessageOptions
|
31387 | * @static
|
31388 | * @param {google.protobuf.IMessageOptions=} [properties] Properties to set
|
31389 | * @returns {google.protobuf.MessageOptions} MessageOptions instance
|
31390 | */
|
31391 | MessageOptions.create = function create(properties) {
|
31392 | return new MessageOptions(properties);
|
31393 | };
|
31394 |
|
31395 | /**
|
31396 | * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.
|
31397 | * @function encode
|
31398 | * @memberof google.protobuf.MessageOptions
|
31399 | * @static
|
31400 | * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode
|
31401 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
31402 | * @returns {$protobuf.Writer} Writer
|
31403 | */
|
31404 | MessageOptions.encode = function encode(message, writer) {
|
31405 | if (!writer)
|
31406 | writer = $Writer.create();
|
31407 | if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat"))
|
31408 | writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat);
|
31409 | if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor"))
|
31410 | writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor);
|
31411 | if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
|
31412 | writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated);
|
31413 | if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry"))
|
31414 | writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry);
|
31415 | if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts"))
|
31416 | writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts);
|
31417 | if (message.features != null && Object.hasOwnProperty.call(message, "features"))
|
31418 | $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
|
31419 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
31420 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
31421 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
31422 | return writer;
|
31423 | };
|
31424 |
|
31425 | /**
|
31426 | * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.
|
31427 | * @function encodeDelimited
|
31428 | * @memberof google.protobuf.MessageOptions
|
31429 | * @static
|
31430 | * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode
|
31431 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
31432 | * @returns {$protobuf.Writer} Writer
|
31433 | */
|
31434 | MessageOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
31435 | return this.encode(message, writer).ldelim();
|
31436 | };
|
31437 |
|
31438 | /**
|
31439 | * Decodes a MessageOptions message from the specified reader or buffer.
|
31440 | * @function decode
|
31441 | * @memberof google.protobuf.MessageOptions
|
31442 | * @static
|
31443 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
31444 | * @param {number} [length] Message length if known beforehand
|
31445 | * @returns {google.protobuf.MessageOptions} MessageOptions
|
31446 | * @throws {Error} If the payload is not a reader or valid buffer
|
31447 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
31448 | */
|
31449 | MessageOptions.decode = function decode(reader, length) {
|
31450 | if (!(reader instanceof $Reader))
|
31451 | reader = $Reader.create(reader);
|
31452 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions();
|
31453 | while (reader.pos < end) {
|
31454 | var tag = reader.uint32();
|
31455 | switch (tag >>> 3) {
|
31456 | case 1: {
|
31457 | message.messageSetWireFormat = reader.bool();
|
31458 | break;
|
31459 | }
|
31460 | case 2: {
|
31461 | message.noStandardDescriptorAccessor = reader.bool();
|
31462 | break;
|
31463 | }
|
31464 | case 3: {
|
31465 | message.deprecated = reader.bool();
|
31466 | break;
|
31467 | }
|
31468 | case 7: {
|
31469 | message.mapEntry = reader.bool();
|
31470 | break;
|
31471 | }
|
31472 | case 11: {
|
31473 | message.deprecatedLegacyJsonFieldConflicts = reader.bool();
|
31474 | break;
|
31475 | }
|
31476 | case 12: {
|
31477 | message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
|
31478 | break;
|
31479 | }
|
31480 | case 999: {
|
31481 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
31482 | message.uninterpretedOption = [];
|
31483 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
31484 | break;
|
31485 | }
|
31486 | default:
|
31487 | reader.skipType(tag & 7);
|
31488 | break;
|
31489 | }
|
31490 | }
|
31491 | return message;
|
31492 | };
|
31493 |
|
31494 | /**
|
31495 | * Decodes a MessageOptions message from the specified reader or buffer, length delimited.
|
31496 | * @function decodeDelimited
|
31497 | * @memberof google.protobuf.MessageOptions
|
31498 | * @static
|
31499 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
31500 | * @returns {google.protobuf.MessageOptions} MessageOptions
|
31501 | * @throws {Error} If the payload is not a reader or valid buffer
|
31502 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
31503 | */
|
31504 | MessageOptions.decodeDelimited = function decodeDelimited(reader) {
|
31505 | if (!(reader instanceof $Reader))
|
31506 | reader = new $Reader(reader);
|
31507 | return this.decode(reader, reader.uint32());
|
31508 | };
|
31509 |
|
31510 | /**
|
31511 | * Verifies a MessageOptions message.
|
31512 | * @function verify
|
31513 | * @memberof google.protobuf.MessageOptions
|
31514 | * @static
|
31515 | * @param {Object.<string,*>} message Plain object to verify
|
31516 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
31517 | */
|
31518 | MessageOptions.verify = function verify(message) {
|
31519 | if (typeof message !== "object" || message === null)
|
31520 | return "object expected";
|
31521 | if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat"))
|
31522 | if (typeof message.messageSetWireFormat !== "boolean")
|
31523 | return "messageSetWireFormat: boolean expected";
|
31524 | if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor"))
|
31525 | if (typeof message.noStandardDescriptorAccessor !== "boolean")
|
31526 | return "noStandardDescriptorAccessor: boolean expected";
|
31527 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
31528 | if (typeof message.deprecated !== "boolean")
|
31529 | return "deprecated: boolean expected";
|
31530 | if (message.mapEntry != null && message.hasOwnProperty("mapEntry"))
|
31531 | if (typeof message.mapEntry !== "boolean")
|
31532 | return "mapEntry: boolean expected";
|
31533 | if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts"))
|
31534 | if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean")
|
31535 | return "deprecatedLegacyJsonFieldConflicts: boolean expected";
|
31536 | if (message.features != null && message.hasOwnProperty("features")) {
|
31537 | var error = $root.google.protobuf.FeatureSet.verify(message.features);
|
31538 | if (error)
|
31539 | return "features." + error;
|
31540 | }
|
31541 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
31542 | if (!Array.isArray(message.uninterpretedOption))
|
31543 | return "uninterpretedOption: array expected";
|
31544 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
31545 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
31546 | if (error)
|
31547 | return "uninterpretedOption." + error;
|
31548 | }
|
31549 | }
|
31550 | return null;
|
31551 | };
|
31552 |
|
31553 | /**
|
31554 | * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types.
|
31555 | * @function fromObject
|
31556 | * @memberof google.protobuf.MessageOptions
|
31557 | * @static
|
31558 | * @param {Object.<string,*>} object Plain object
|
31559 | * @returns {google.protobuf.MessageOptions} MessageOptions
|
31560 | */
|
31561 | MessageOptions.fromObject = function fromObject(object) {
|
31562 | if (object instanceof $root.google.protobuf.MessageOptions)
|
31563 | return object;
|
31564 | var message = new $root.google.protobuf.MessageOptions();
|
31565 | if (object.messageSetWireFormat != null)
|
31566 | message.messageSetWireFormat = Boolean(object.messageSetWireFormat);
|
31567 | if (object.noStandardDescriptorAccessor != null)
|
31568 | message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor);
|
31569 | if (object.deprecated != null)
|
31570 | message.deprecated = Boolean(object.deprecated);
|
31571 | if (object.mapEntry != null)
|
31572 | message.mapEntry = Boolean(object.mapEntry);
|
31573 | if (object.deprecatedLegacyJsonFieldConflicts != null)
|
31574 | message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts);
|
31575 | if (object.features != null) {
|
31576 | if (typeof object.features !== "object")
|
31577 | throw TypeError(".google.protobuf.MessageOptions.features: object expected");
|
31578 | message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
|
31579 | }
|
31580 | if (object.uninterpretedOption) {
|
31581 | if (!Array.isArray(object.uninterpretedOption))
|
31582 | throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected");
|
31583 | message.uninterpretedOption = [];
|
31584 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
31585 | if (typeof object.uninterpretedOption[i] !== "object")
|
31586 | throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected");
|
31587 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
31588 | }
|
31589 | }
|
31590 | return message;
|
31591 | };
|
31592 |
|
31593 | /**
|
31594 | * Creates a plain object from a MessageOptions message. Also converts values to other types if specified.
|
31595 | * @function toObject
|
31596 | * @memberof google.protobuf.MessageOptions
|
31597 | * @static
|
31598 | * @param {google.protobuf.MessageOptions} message MessageOptions
|
31599 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
31600 | * @returns {Object.<string,*>} Plain object
|
31601 | */
|
31602 | MessageOptions.toObject = function toObject(message, options) {
|
31603 | if (!options)
|
31604 | options = {};
|
31605 | var object = {};
|
31606 | if (options.arrays || options.defaults)
|
31607 | object.uninterpretedOption = [];
|
31608 | if (options.defaults) {
|
31609 | object.messageSetWireFormat = false;
|
31610 | object.noStandardDescriptorAccessor = false;
|
31611 | object.deprecated = false;
|
31612 | object.mapEntry = false;
|
31613 | object.deprecatedLegacyJsonFieldConflicts = false;
|
31614 | object.features = null;
|
31615 | }
|
31616 | if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat"))
|
31617 | object.messageSetWireFormat = message.messageSetWireFormat;
|
31618 | if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor"))
|
31619 | object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor;
|
31620 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
31621 | object.deprecated = message.deprecated;
|
31622 | if (message.mapEntry != null && message.hasOwnProperty("mapEntry"))
|
31623 | object.mapEntry = message.mapEntry;
|
31624 | if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts"))
|
31625 | object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts;
|
31626 | if (message.features != null && message.hasOwnProperty("features"))
|
31627 | object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
|
31628 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
31629 | object.uninterpretedOption = [];
|
31630 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
31631 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
31632 | }
|
31633 | return object;
|
31634 | };
|
31635 |
|
31636 | /**
|
31637 | * Converts this MessageOptions to JSON.
|
31638 | * @function toJSON
|
31639 | * @memberof google.protobuf.MessageOptions
|
31640 | * @instance
|
31641 | * @returns {Object.<string,*>} JSON object
|
31642 | */
|
31643 | MessageOptions.prototype.toJSON = function toJSON() {
|
31644 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
31645 | };
|
31646 |
|
31647 | /**
|
31648 | * Gets the default type url for MessageOptions
|
31649 | * @function getTypeUrl
|
31650 | * @memberof google.protobuf.MessageOptions
|
31651 | * @static
|
31652 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
31653 | * @returns {string} The default type url
|
31654 | */
|
31655 | MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
31656 | if (typeUrlPrefix === undefined) {
|
31657 | typeUrlPrefix = "type.googleapis.com";
|
31658 | }
|
31659 | return typeUrlPrefix + "/google.protobuf.MessageOptions";
|
31660 | };
|
31661 |
|
31662 | return MessageOptions;
|
31663 | })();
|
31664 |
|
31665 | protobuf.FieldOptions = (function() {
|
31666 |
|
31667 | /**
|
31668 | * Properties of a FieldOptions.
|
31669 | * @memberof google.protobuf
|
31670 | * @interface IFieldOptions
|
31671 | * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype
|
31672 | * @property {boolean|null} [packed] FieldOptions packed
|
31673 | * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype
|
31674 | * @property {boolean|null} [lazy] FieldOptions lazy
|
31675 | * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy
|
31676 | * @property {boolean|null} [deprecated] FieldOptions deprecated
|
31677 | * @property {boolean|null} [weak] FieldOptions weak
|
31678 | * @property {boolean|null} [debugRedact] FieldOptions debugRedact
|
31679 | * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention
|
31680 | * @property {Array.<google.protobuf.FieldOptions.OptionTargetType>|null} [targets] FieldOptions targets
|
31681 | * @property {Array.<google.protobuf.FieldOptions.IEditionDefault>|null} [editionDefaults] FieldOptions editionDefaults
|
31682 | * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features
|
31683 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] FieldOptions uninterpretedOption
|
31684 | * @property {Array.<google.api.FieldBehavior>|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior
|
31685 | */
|
31686 |
|
31687 | /**
|
31688 | * Constructs a new FieldOptions.
|
31689 | * @memberof google.protobuf
|
31690 | * @classdesc Represents a FieldOptions.
|
31691 | * @implements IFieldOptions
|
31692 | * @constructor
|
31693 | * @param {google.protobuf.IFieldOptions=} [properties] Properties to set
|
31694 | */
|
31695 | function FieldOptions(properties) {
|
31696 | this.targets = [];
|
31697 | this.editionDefaults = [];
|
31698 | this.uninterpretedOption = [];
|
31699 | this[".google.api.fieldBehavior"] = [];
|
31700 | if (properties)
|
31701 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
31702 | if (properties[keys[i]] != null)
|
31703 | this[keys[i]] = properties[keys[i]];
|
31704 | }
|
31705 |
|
31706 | /**
|
31707 | * FieldOptions ctype.
|
31708 | * @member {google.protobuf.FieldOptions.CType} ctype
|
31709 | * @memberof google.protobuf.FieldOptions
|
31710 | * @instance
|
31711 | */
|
31712 | FieldOptions.prototype.ctype = 0;
|
31713 |
|
31714 | /**
|
31715 | * FieldOptions packed.
|
31716 | * @member {boolean} packed
|
31717 | * @memberof google.protobuf.FieldOptions
|
31718 | * @instance
|
31719 | */
|
31720 | FieldOptions.prototype.packed = false;
|
31721 |
|
31722 | /**
|
31723 | * FieldOptions jstype.
|
31724 | * @member {google.protobuf.FieldOptions.JSType} jstype
|
31725 | * @memberof google.protobuf.FieldOptions
|
31726 | * @instance
|
31727 | */
|
31728 | FieldOptions.prototype.jstype = 0;
|
31729 |
|
31730 | /**
|
31731 | * FieldOptions lazy.
|
31732 | * @member {boolean} lazy
|
31733 | * @memberof google.protobuf.FieldOptions
|
31734 | * @instance
|
31735 | */
|
31736 | FieldOptions.prototype.lazy = false;
|
31737 |
|
31738 | /**
|
31739 | * FieldOptions unverifiedLazy.
|
31740 | * @member {boolean} unverifiedLazy
|
31741 | * @memberof google.protobuf.FieldOptions
|
31742 | * @instance
|
31743 | */
|
31744 | FieldOptions.prototype.unverifiedLazy = false;
|
31745 |
|
31746 | /**
|
31747 | * FieldOptions deprecated.
|
31748 | * @member {boolean} deprecated
|
31749 | * @memberof google.protobuf.FieldOptions
|
31750 | * @instance
|
31751 | */
|
31752 | FieldOptions.prototype.deprecated = false;
|
31753 |
|
31754 | /**
|
31755 | * FieldOptions weak.
|
31756 | * @member {boolean} weak
|
31757 | * @memberof google.protobuf.FieldOptions
|
31758 | * @instance
|
31759 | */
|
31760 | FieldOptions.prototype.weak = false;
|
31761 |
|
31762 | /**
|
31763 | * FieldOptions debugRedact.
|
31764 | * @member {boolean} debugRedact
|
31765 | * @memberof google.protobuf.FieldOptions
|
31766 | * @instance
|
31767 | */
|
31768 | FieldOptions.prototype.debugRedact = false;
|
31769 |
|
31770 | /**
|
31771 | * FieldOptions retention.
|
31772 | * @member {google.protobuf.FieldOptions.OptionRetention} retention
|
31773 | * @memberof google.protobuf.FieldOptions
|
31774 | * @instance
|
31775 | */
|
31776 | FieldOptions.prototype.retention = 0;
|
31777 |
|
31778 | /**
|
31779 | * FieldOptions targets.
|
31780 | * @member {Array.<google.protobuf.FieldOptions.OptionTargetType>} targets
|
31781 | * @memberof google.protobuf.FieldOptions
|
31782 | * @instance
|
31783 | */
|
31784 | FieldOptions.prototype.targets = $util.emptyArray;
|
31785 |
|
31786 | /**
|
31787 | * FieldOptions editionDefaults.
|
31788 | * @member {Array.<google.protobuf.FieldOptions.IEditionDefault>} editionDefaults
|
31789 | * @memberof google.protobuf.FieldOptions
|
31790 | * @instance
|
31791 | */
|
31792 | FieldOptions.prototype.editionDefaults = $util.emptyArray;
|
31793 |
|
31794 | /**
|
31795 | * FieldOptions features.
|
31796 | * @member {google.protobuf.IFeatureSet|null|undefined} features
|
31797 | * @memberof google.protobuf.FieldOptions
|
31798 | * @instance
|
31799 | */
|
31800 | FieldOptions.prototype.features = null;
|
31801 |
|
31802 | /**
|
31803 | * FieldOptions uninterpretedOption.
|
31804 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
31805 | * @memberof google.protobuf.FieldOptions
|
31806 | * @instance
|
31807 | */
|
31808 | FieldOptions.prototype.uninterpretedOption = $util.emptyArray;
|
31809 |
|
31810 | /**
|
31811 | * FieldOptions .google.api.fieldBehavior.
|
31812 | * @member {Array.<google.api.FieldBehavior>} .google.api.fieldBehavior
|
31813 | * @memberof google.protobuf.FieldOptions
|
31814 | * @instance
|
31815 | */
|
31816 | FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray;
|
31817 |
|
31818 | /**
|
31819 | * Creates a new FieldOptions instance using the specified properties.
|
31820 | * @function create
|
31821 | * @memberof google.protobuf.FieldOptions
|
31822 | * @static
|
31823 | * @param {google.protobuf.IFieldOptions=} [properties] Properties to set
|
31824 | * @returns {google.protobuf.FieldOptions} FieldOptions instance
|
31825 | */
|
31826 | FieldOptions.create = function create(properties) {
|
31827 | return new FieldOptions(properties);
|
31828 | };
|
31829 |
|
31830 | /**
|
31831 | * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.
|
31832 | * @function encode
|
31833 | * @memberof google.protobuf.FieldOptions
|
31834 | * @static
|
31835 | * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode
|
31836 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
31837 | * @returns {$protobuf.Writer} Writer
|
31838 | */
|
31839 | FieldOptions.encode = function encode(message, writer) {
|
31840 | if (!writer)
|
31841 | writer = $Writer.create();
|
31842 | if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype"))
|
31843 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype);
|
31844 | if (message.packed != null && Object.hasOwnProperty.call(message, "packed"))
|
31845 | writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed);
|
31846 | if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
|
31847 | writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated);
|
31848 | if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy"))
|
31849 | writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy);
|
31850 | if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype"))
|
31851 | writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype);
|
31852 | if (message.weak != null && Object.hasOwnProperty.call(message, "weak"))
|
31853 | writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak);
|
31854 | if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy"))
|
31855 | writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy);
|
31856 | if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact"))
|
31857 | writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact);
|
31858 | if (message.retention != null && Object.hasOwnProperty.call(message, "retention"))
|
31859 | writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention);
|
31860 | if (message.targets != null && message.targets.length)
|
31861 | for (var i = 0; i < message.targets.length; ++i)
|
31862 | writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]);
|
31863 | if (message.editionDefaults != null && message.editionDefaults.length)
|
31864 | for (var i = 0; i < message.editionDefaults.length; ++i)
|
31865 | $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim();
|
31866 | if (message.features != null && Object.hasOwnProperty.call(message, "features"))
|
31867 | $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
|
31868 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
31869 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
31870 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
31871 | if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) {
|
31872 | writer.uint32(/* id 1052, wireType 2 =*/8418).fork();
|
31873 | for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i)
|
31874 | writer.int32(message[".google.api.fieldBehavior"][i]);
|
31875 | writer.ldelim();
|
31876 | }
|
31877 | return writer;
|
31878 | };
|
31879 |
|
31880 | /**
|
31881 | * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.
|
31882 | * @function encodeDelimited
|
31883 | * @memberof google.protobuf.FieldOptions
|
31884 | * @static
|
31885 | * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode
|
31886 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
31887 | * @returns {$protobuf.Writer} Writer
|
31888 | */
|
31889 | FieldOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
31890 | return this.encode(message, writer).ldelim();
|
31891 | };
|
31892 |
|
31893 | /**
|
31894 | * Decodes a FieldOptions message from the specified reader or buffer.
|
31895 | * @function decode
|
31896 | * @memberof google.protobuf.FieldOptions
|
31897 | * @static
|
31898 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
31899 | * @param {number} [length] Message length if known beforehand
|
31900 | * @returns {google.protobuf.FieldOptions} FieldOptions
|
31901 | * @throws {Error} If the payload is not a reader or valid buffer
|
31902 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
31903 | */
|
31904 | FieldOptions.decode = function decode(reader, length) {
|
31905 | if (!(reader instanceof $Reader))
|
31906 | reader = $Reader.create(reader);
|
31907 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions();
|
31908 | while (reader.pos < end) {
|
31909 | var tag = reader.uint32();
|
31910 | switch (tag >>> 3) {
|
31911 | case 1: {
|
31912 | message.ctype = reader.int32();
|
31913 | break;
|
31914 | }
|
31915 | case 2: {
|
31916 | message.packed = reader.bool();
|
31917 | break;
|
31918 | }
|
31919 | case 6: {
|
31920 | message.jstype = reader.int32();
|
31921 | break;
|
31922 | }
|
31923 | case 5: {
|
31924 | message.lazy = reader.bool();
|
31925 | break;
|
31926 | }
|
31927 | case 15: {
|
31928 | message.unverifiedLazy = reader.bool();
|
31929 | break;
|
31930 | }
|
31931 | case 3: {
|
31932 | message.deprecated = reader.bool();
|
31933 | break;
|
31934 | }
|
31935 | case 10: {
|
31936 | message.weak = reader.bool();
|
31937 | break;
|
31938 | }
|
31939 | case 16: {
|
31940 | message.debugRedact = reader.bool();
|
31941 | break;
|
31942 | }
|
31943 | case 17: {
|
31944 | message.retention = reader.int32();
|
31945 | break;
|
31946 | }
|
31947 | case 19: {
|
31948 | if (!(message.targets && message.targets.length))
|
31949 | message.targets = [];
|
31950 | if ((tag & 7) === 2) {
|
31951 | var end2 = reader.uint32() + reader.pos;
|
31952 | while (reader.pos < end2)
|
31953 | message.targets.push(reader.int32());
|
31954 | } else
|
31955 | message.targets.push(reader.int32());
|
31956 | break;
|
31957 | }
|
31958 | case 20: {
|
31959 | if (!(message.editionDefaults && message.editionDefaults.length))
|
31960 | message.editionDefaults = [];
|
31961 | message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32()));
|
31962 | break;
|
31963 | }
|
31964 | case 21: {
|
31965 | message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
|
31966 | break;
|
31967 | }
|
31968 | case 999: {
|
31969 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
31970 | message.uninterpretedOption = [];
|
31971 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
31972 | break;
|
31973 | }
|
31974 | case 1052: {
|
31975 | if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length))
|
31976 | message[".google.api.fieldBehavior"] = [];
|
31977 | if ((tag & 7) === 2) {
|
31978 | var end2 = reader.uint32() + reader.pos;
|
31979 | while (reader.pos < end2)
|
31980 | message[".google.api.fieldBehavior"].push(reader.int32());
|
31981 | } else
|
31982 | message[".google.api.fieldBehavior"].push(reader.int32());
|
31983 | break;
|
31984 | }
|
31985 | default:
|
31986 | reader.skipType(tag & 7);
|
31987 | break;
|
31988 | }
|
31989 | }
|
31990 | return message;
|
31991 | };
|
31992 |
|
31993 | /**
|
31994 | * Decodes a FieldOptions message from the specified reader or buffer, length delimited.
|
31995 | * @function decodeDelimited
|
31996 | * @memberof google.protobuf.FieldOptions
|
31997 | * @static
|
31998 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
31999 | * @returns {google.protobuf.FieldOptions} FieldOptions
|
32000 | * @throws {Error} If the payload is not a reader or valid buffer
|
32001 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
32002 | */
|
32003 | FieldOptions.decodeDelimited = function decodeDelimited(reader) {
|
32004 | if (!(reader instanceof $Reader))
|
32005 | reader = new $Reader(reader);
|
32006 | return this.decode(reader, reader.uint32());
|
32007 | };
|
32008 |
|
32009 | /**
|
32010 | * Verifies a FieldOptions message.
|
32011 | * @function verify
|
32012 | * @memberof google.protobuf.FieldOptions
|
32013 | * @static
|
32014 | * @param {Object.<string,*>} message Plain object to verify
|
32015 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
32016 | */
|
32017 | FieldOptions.verify = function verify(message) {
|
32018 | if (typeof message !== "object" || message === null)
|
32019 | return "object expected";
|
32020 | if (message.ctype != null && message.hasOwnProperty("ctype"))
|
32021 | switch (message.ctype) {
|
32022 | default:
|
32023 | return "ctype: enum value expected";
|
32024 | case 0:
|
32025 | case 1:
|
32026 | case 2:
|
32027 | break;
|
32028 | }
|
32029 | if (message.packed != null && message.hasOwnProperty("packed"))
|
32030 | if (typeof message.packed !== "boolean")
|
32031 | return "packed: boolean expected";
|
32032 | if (message.jstype != null && message.hasOwnProperty("jstype"))
|
32033 | switch (message.jstype) {
|
32034 | default:
|
32035 | return "jstype: enum value expected";
|
32036 | case 0:
|
32037 | case 1:
|
32038 | case 2:
|
32039 | break;
|
32040 | }
|
32041 | if (message.lazy != null && message.hasOwnProperty("lazy"))
|
32042 | if (typeof message.lazy !== "boolean")
|
32043 | return "lazy: boolean expected";
|
32044 | if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy"))
|
32045 | if (typeof message.unverifiedLazy !== "boolean")
|
32046 | return "unverifiedLazy: boolean expected";
|
32047 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
32048 | if (typeof message.deprecated !== "boolean")
|
32049 | return "deprecated: boolean expected";
|
32050 | if (message.weak != null && message.hasOwnProperty("weak"))
|
32051 | if (typeof message.weak !== "boolean")
|
32052 | return "weak: boolean expected";
|
32053 | if (message.debugRedact != null && message.hasOwnProperty("debugRedact"))
|
32054 | if (typeof message.debugRedact !== "boolean")
|
32055 | return "debugRedact: boolean expected";
|
32056 | if (message.retention != null && message.hasOwnProperty("retention"))
|
32057 | switch (message.retention) {
|
32058 | default:
|
32059 | return "retention: enum value expected";
|
32060 | case 0:
|
32061 | case 1:
|
32062 | case 2:
|
32063 | break;
|
32064 | }
|
32065 | if (message.targets != null && message.hasOwnProperty("targets")) {
|
32066 | if (!Array.isArray(message.targets))
|
32067 | return "targets: array expected";
|
32068 | for (var i = 0; i < message.targets.length; ++i)
|
32069 | switch (message.targets[i]) {
|
32070 | default:
|
32071 | return "targets: enum value[] expected";
|
32072 | case 0:
|
32073 | case 1:
|
32074 | case 2:
|
32075 | case 3:
|
32076 | case 4:
|
32077 | case 5:
|
32078 | case 6:
|
32079 | case 7:
|
32080 | case 8:
|
32081 | case 9:
|
32082 | break;
|
32083 | }
|
32084 | }
|
32085 | if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) {
|
32086 | if (!Array.isArray(message.editionDefaults))
|
32087 | return "editionDefaults: array expected";
|
32088 | for (var i = 0; i < message.editionDefaults.length; ++i) {
|
32089 | var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]);
|
32090 | if (error)
|
32091 | return "editionDefaults." + error;
|
32092 | }
|
32093 | }
|
32094 | if (message.features != null && message.hasOwnProperty("features")) {
|
32095 | var error = $root.google.protobuf.FeatureSet.verify(message.features);
|
32096 | if (error)
|
32097 | return "features." + error;
|
32098 | }
|
32099 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
32100 | if (!Array.isArray(message.uninterpretedOption))
|
32101 | return "uninterpretedOption: array expected";
|
32102 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
32103 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
32104 | if (error)
|
32105 | return "uninterpretedOption." + error;
|
32106 | }
|
32107 | }
|
32108 | if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) {
|
32109 | if (!Array.isArray(message[".google.api.fieldBehavior"]))
|
32110 | return ".google.api.fieldBehavior: array expected";
|
32111 | for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i)
|
32112 | switch (message[".google.api.fieldBehavior"][i]) {
|
32113 | default:
|
32114 | return ".google.api.fieldBehavior: enum value[] expected";
|
32115 | case 0:
|
32116 | case 1:
|
32117 | case 2:
|
32118 | case 3:
|
32119 | case 4:
|
32120 | case 5:
|
32121 | case 6:
|
32122 | case 7:
|
32123 | break;
|
32124 | }
|
32125 | }
|
32126 | return null;
|
32127 | };
|
32128 |
|
32129 | /**
|
32130 | * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types.
|
32131 | * @function fromObject
|
32132 | * @memberof google.protobuf.FieldOptions
|
32133 | * @static
|
32134 | * @param {Object.<string,*>} object Plain object
|
32135 | * @returns {google.protobuf.FieldOptions} FieldOptions
|
32136 | */
|
32137 | FieldOptions.fromObject = function fromObject(object) {
|
32138 | if (object instanceof $root.google.protobuf.FieldOptions)
|
32139 | return object;
|
32140 | var message = new $root.google.protobuf.FieldOptions();
|
32141 | switch (object.ctype) {
|
32142 | default:
|
32143 | if (typeof object.ctype === "number") {
|
32144 | message.ctype = object.ctype;
|
32145 | break;
|
32146 | }
|
32147 | break;
|
32148 | case "STRING":
|
32149 | case 0:
|
32150 | message.ctype = 0;
|
32151 | break;
|
32152 | case "CORD":
|
32153 | case 1:
|
32154 | message.ctype = 1;
|
32155 | break;
|
32156 | case "STRING_PIECE":
|
32157 | case 2:
|
32158 | message.ctype = 2;
|
32159 | break;
|
32160 | }
|
32161 | if (object.packed != null)
|
32162 | message.packed = Boolean(object.packed);
|
32163 | switch (object.jstype) {
|
32164 | default:
|
32165 | if (typeof object.jstype === "number") {
|
32166 | message.jstype = object.jstype;
|
32167 | break;
|
32168 | }
|
32169 | break;
|
32170 | case "JS_NORMAL":
|
32171 | case 0:
|
32172 | message.jstype = 0;
|
32173 | break;
|
32174 | case "JS_STRING":
|
32175 | case 1:
|
32176 | message.jstype = 1;
|
32177 | break;
|
32178 | case "JS_NUMBER":
|
32179 | case 2:
|
32180 | message.jstype = 2;
|
32181 | break;
|
32182 | }
|
32183 | if (object.lazy != null)
|
32184 | message.lazy = Boolean(object.lazy);
|
32185 | if (object.unverifiedLazy != null)
|
32186 | message.unverifiedLazy = Boolean(object.unverifiedLazy);
|
32187 | if (object.deprecated != null)
|
32188 | message.deprecated = Boolean(object.deprecated);
|
32189 | if (object.weak != null)
|
32190 | message.weak = Boolean(object.weak);
|
32191 | if (object.debugRedact != null)
|
32192 | message.debugRedact = Boolean(object.debugRedact);
|
32193 | switch (object.retention) {
|
32194 | default:
|
32195 | if (typeof object.retention === "number") {
|
32196 | message.retention = object.retention;
|
32197 | break;
|
32198 | }
|
32199 | break;
|
32200 | case "RETENTION_UNKNOWN":
|
32201 | case 0:
|
32202 | message.retention = 0;
|
32203 | break;
|
32204 | case "RETENTION_RUNTIME":
|
32205 | case 1:
|
32206 | message.retention = 1;
|
32207 | break;
|
32208 | case "RETENTION_SOURCE":
|
32209 | case 2:
|
32210 | message.retention = 2;
|
32211 | break;
|
32212 | }
|
32213 | if (object.targets) {
|
32214 | if (!Array.isArray(object.targets))
|
32215 | throw TypeError(".google.protobuf.FieldOptions.targets: array expected");
|
32216 | message.targets = [];
|
32217 | for (var i = 0; i < object.targets.length; ++i)
|
32218 | switch (object.targets[i]) {
|
32219 | default:
|
32220 | if (typeof object.targets[i] === "number") {
|
32221 | message.targets[i] = object.targets[i];
|
32222 | break;
|
32223 | }
|
32224 | case "TARGET_TYPE_UNKNOWN":
|
32225 | case 0:
|
32226 | message.targets[i] = 0;
|
32227 | break;
|
32228 | case "TARGET_TYPE_FILE":
|
32229 | case 1:
|
32230 | message.targets[i] = 1;
|
32231 | break;
|
32232 | case "TARGET_TYPE_EXTENSION_RANGE":
|
32233 | case 2:
|
32234 | message.targets[i] = 2;
|
32235 | break;
|
32236 | case "TARGET_TYPE_MESSAGE":
|
32237 | case 3:
|
32238 | message.targets[i] = 3;
|
32239 | break;
|
32240 | case "TARGET_TYPE_FIELD":
|
32241 | case 4:
|
32242 | message.targets[i] = 4;
|
32243 | break;
|
32244 | case "TARGET_TYPE_ONEOF":
|
32245 | case 5:
|
32246 | message.targets[i] = 5;
|
32247 | break;
|
32248 | case "TARGET_TYPE_ENUM":
|
32249 | case 6:
|
32250 | message.targets[i] = 6;
|
32251 | break;
|
32252 | case "TARGET_TYPE_ENUM_ENTRY":
|
32253 | case 7:
|
32254 | message.targets[i] = 7;
|
32255 | break;
|
32256 | case "TARGET_TYPE_SERVICE":
|
32257 | case 8:
|
32258 | message.targets[i] = 8;
|
32259 | break;
|
32260 | case "TARGET_TYPE_METHOD":
|
32261 | case 9:
|
32262 | message.targets[i] = 9;
|
32263 | break;
|
32264 | }
|
32265 | }
|
32266 | if (object.editionDefaults) {
|
32267 | if (!Array.isArray(object.editionDefaults))
|
32268 | throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected");
|
32269 | message.editionDefaults = [];
|
32270 | for (var i = 0; i < object.editionDefaults.length; ++i) {
|
32271 | if (typeof object.editionDefaults[i] !== "object")
|
32272 | throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected");
|
32273 | message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]);
|
32274 | }
|
32275 | }
|
32276 | if (object.features != null) {
|
32277 | if (typeof object.features !== "object")
|
32278 | throw TypeError(".google.protobuf.FieldOptions.features: object expected");
|
32279 | message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
|
32280 | }
|
32281 | if (object.uninterpretedOption) {
|
32282 | if (!Array.isArray(object.uninterpretedOption))
|
32283 | throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected");
|
32284 | message.uninterpretedOption = [];
|
32285 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
32286 | if (typeof object.uninterpretedOption[i] !== "object")
|
32287 | throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected");
|
32288 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
32289 | }
|
32290 | }
|
32291 | if (object[".google.api.fieldBehavior"]) {
|
32292 | if (!Array.isArray(object[".google.api.fieldBehavior"]))
|
32293 | throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected");
|
32294 | message[".google.api.fieldBehavior"] = [];
|
32295 | for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i)
|
32296 | switch (object[".google.api.fieldBehavior"][i]) {
|
32297 | default:
|
32298 | if (typeof object[".google.api.fieldBehavior"][i] === "number") {
|
32299 | message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i];
|
32300 | break;
|
32301 | }
|
32302 | case "FIELD_BEHAVIOR_UNSPECIFIED":
|
32303 | case 0:
|
32304 | message[".google.api.fieldBehavior"][i] = 0;
|
32305 | break;
|
32306 | case "OPTIONAL":
|
32307 | case 1:
|
32308 | message[".google.api.fieldBehavior"][i] = 1;
|
32309 | break;
|
32310 | case "REQUIRED":
|
32311 | case 2:
|
32312 | message[".google.api.fieldBehavior"][i] = 2;
|
32313 | break;
|
32314 | case "OUTPUT_ONLY":
|
32315 | case 3:
|
32316 | message[".google.api.fieldBehavior"][i] = 3;
|
32317 | break;
|
32318 | case "INPUT_ONLY":
|
32319 | case 4:
|
32320 | message[".google.api.fieldBehavior"][i] = 4;
|
32321 | break;
|
32322 | case "IMMUTABLE":
|
32323 | case 5:
|
32324 | message[".google.api.fieldBehavior"][i] = 5;
|
32325 | break;
|
32326 | case "UNORDERED_LIST":
|
32327 | case 6:
|
32328 | message[".google.api.fieldBehavior"][i] = 6;
|
32329 | break;
|
32330 | case "NON_EMPTY_DEFAULT":
|
32331 | case 7:
|
32332 | message[".google.api.fieldBehavior"][i] = 7;
|
32333 | break;
|
32334 | }
|
32335 | }
|
32336 | return message;
|
32337 | };
|
32338 |
|
32339 | /**
|
32340 | * Creates a plain object from a FieldOptions message. Also converts values to other types if specified.
|
32341 | * @function toObject
|
32342 | * @memberof google.protobuf.FieldOptions
|
32343 | * @static
|
32344 | * @param {google.protobuf.FieldOptions} message FieldOptions
|
32345 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
32346 | * @returns {Object.<string,*>} Plain object
|
32347 | */
|
32348 | FieldOptions.toObject = function toObject(message, options) {
|
32349 | if (!options)
|
32350 | options = {};
|
32351 | var object = {};
|
32352 | if (options.arrays || options.defaults) {
|
32353 | object.targets = [];
|
32354 | object.editionDefaults = [];
|
32355 | object.uninterpretedOption = [];
|
32356 | object[".google.api.fieldBehavior"] = [];
|
32357 | }
|
32358 | if (options.defaults) {
|
32359 | object.ctype = options.enums === String ? "STRING" : 0;
|
32360 | object.packed = false;
|
32361 | object.deprecated = false;
|
32362 | object.lazy = false;
|
32363 | object.jstype = options.enums === String ? "JS_NORMAL" : 0;
|
32364 | object.weak = false;
|
32365 | object.unverifiedLazy = false;
|
32366 | object.debugRedact = false;
|
32367 | object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0;
|
32368 | object.features = null;
|
32369 | }
|
32370 | if (message.ctype != null && message.hasOwnProperty("ctype"))
|
32371 | object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype;
|
32372 | if (message.packed != null && message.hasOwnProperty("packed"))
|
32373 | object.packed = message.packed;
|
32374 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
32375 | object.deprecated = message.deprecated;
|
32376 | if (message.lazy != null && message.hasOwnProperty("lazy"))
|
32377 | object.lazy = message.lazy;
|
32378 | if (message.jstype != null && message.hasOwnProperty("jstype"))
|
32379 | object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype;
|
32380 | if (message.weak != null && message.hasOwnProperty("weak"))
|
32381 | object.weak = message.weak;
|
32382 | if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy"))
|
32383 | object.unverifiedLazy = message.unverifiedLazy;
|
32384 | if (message.debugRedact != null && message.hasOwnProperty("debugRedact"))
|
32385 | object.debugRedact = message.debugRedact;
|
32386 | if (message.retention != null && message.hasOwnProperty("retention"))
|
32387 | object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention;
|
32388 | if (message.targets && message.targets.length) {
|
32389 | object.targets = [];
|
32390 | for (var j = 0; j < message.targets.length; ++j)
|
32391 | object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j];
|
32392 | }
|
32393 | if (message.editionDefaults && message.editionDefaults.length) {
|
32394 | object.editionDefaults = [];
|
32395 | for (var j = 0; j < message.editionDefaults.length; ++j)
|
32396 | object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options);
|
32397 | }
|
32398 | if (message.features != null && message.hasOwnProperty("features"))
|
32399 | object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
|
32400 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
32401 | object.uninterpretedOption = [];
|
32402 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
32403 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
32404 | }
|
32405 | if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) {
|
32406 | object[".google.api.fieldBehavior"] = [];
|
32407 | for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j)
|
32408 | object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j];
|
32409 | }
|
32410 | return object;
|
32411 | };
|
32412 |
|
32413 | /**
|
32414 | * Converts this FieldOptions to JSON.
|
32415 | * @function toJSON
|
32416 | * @memberof google.protobuf.FieldOptions
|
32417 | * @instance
|
32418 | * @returns {Object.<string,*>} JSON object
|
32419 | */
|
32420 | FieldOptions.prototype.toJSON = function toJSON() {
|
32421 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
32422 | };
|
32423 |
|
32424 | /**
|
32425 | * Gets the default type url for FieldOptions
|
32426 | * @function getTypeUrl
|
32427 | * @memberof google.protobuf.FieldOptions
|
32428 | * @static
|
32429 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
32430 | * @returns {string} The default type url
|
32431 | */
|
32432 | FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
32433 | if (typeUrlPrefix === undefined) {
|
32434 | typeUrlPrefix = "type.googleapis.com";
|
32435 | }
|
32436 | return typeUrlPrefix + "/google.protobuf.FieldOptions";
|
32437 | };
|
32438 |
|
32439 | /**
|
32440 | * CType enum.
|
32441 | * @name google.protobuf.FieldOptions.CType
|
32442 | * @enum {number}
|
32443 | * @property {number} STRING=0 STRING value
|
32444 | * @property {number} CORD=1 CORD value
|
32445 | * @property {number} STRING_PIECE=2 STRING_PIECE value
|
32446 | */
|
32447 | FieldOptions.CType = (function() {
|
32448 | var valuesById = {}, values = Object.create(valuesById);
|
32449 | values[valuesById[0] = "STRING"] = 0;
|
32450 | values[valuesById[1] = "CORD"] = 1;
|
32451 | values[valuesById[2] = "STRING_PIECE"] = 2;
|
32452 | return values;
|
32453 | })();
|
32454 |
|
32455 | /**
|
32456 | * JSType enum.
|
32457 | * @name google.protobuf.FieldOptions.JSType
|
32458 | * @enum {number}
|
32459 | * @property {number} JS_NORMAL=0 JS_NORMAL value
|
32460 | * @property {number} JS_STRING=1 JS_STRING value
|
32461 | * @property {number} JS_NUMBER=2 JS_NUMBER value
|
32462 | */
|
32463 | FieldOptions.JSType = (function() {
|
32464 | var valuesById = {}, values = Object.create(valuesById);
|
32465 | values[valuesById[0] = "JS_NORMAL"] = 0;
|
32466 | values[valuesById[1] = "JS_STRING"] = 1;
|
32467 | values[valuesById[2] = "JS_NUMBER"] = 2;
|
32468 | return values;
|
32469 | })();
|
32470 |
|
32471 | /**
|
32472 | * OptionRetention enum.
|
32473 | * @name google.protobuf.FieldOptions.OptionRetention
|
32474 | * @enum {number}
|
32475 | * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value
|
32476 | * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value
|
32477 | * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value
|
32478 | */
|
32479 | FieldOptions.OptionRetention = (function() {
|
32480 | var valuesById = {}, values = Object.create(valuesById);
|
32481 | values[valuesById[0] = "RETENTION_UNKNOWN"] = 0;
|
32482 | values[valuesById[1] = "RETENTION_RUNTIME"] = 1;
|
32483 | values[valuesById[2] = "RETENTION_SOURCE"] = 2;
|
32484 | return values;
|
32485 | })();
|
32486 |
|
32487 | /**
|
32488 | * OptionTargetType enum.
|
32489 | * @name google.protobuf.FieldOptions.OptionTargetType
|
32490 | * @enum {number}
|
32491 | * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value
|
32492 | * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value
|
32493 | * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value
|
32494 | * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value
|
32495 | * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value
|
32496 | * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value
|
32497 | * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value
|
32498 | * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value
|
32499 | * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value
|
32500 | * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value
|
32501 | */
|
32502 | FieldOptions.OptionTargetType = (function() {
|
32503 | var valuesById = {}, values = Object.create(valuesById);
|
32504 | values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0;
|
32505 | values[valuesById[1] = "TARGET_TYPE_FILE"] = 1;
|
32506 | values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2;
|
32507 | values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3;
|
32508 | values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4;
|
32509 | values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5;
|
32510 | values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6;
|
32511 | values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7;
|
32512 | values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8;
|
32513 | values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9;
|
32514 | return values;
|
32515 | })();
|
32516 |
|
32517 | FieldOptions.EditionDefault = (function() {
|
32518 |
|
32519 | /**
|
32520 | * Properties of an EditionDefault.
|
32521 | * @memberof google.protobuf.FieldOptions
|
32522 | * @interface IEditionDefault
|
32523 | * @property {string|null} [edition] EditionDefault edition
|
32524 | * @property {string|null} [value] EditionDefault value
|
32525 | */
|
32526 |
|
32527 | /**
|
32528 | * Constructs a new EditionDefault.
|
32529 | * @memberof google.protobuf.FieldOptions
|
32530 | * @classdesc Represents an EditionDefault.
|
32531 | * @implements IEditionDefault
|
32532 | * @constructor
|
32533 | * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set
|
32534 | */
|
32535 | function EditionDefault(properties) {
|
32536 | if (properties)
|
32537 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
32538 | if (properties[keys[i]] != null)
|
32539 | this[keys[i]] = properties[keys[i]];
|
32540 | }
|
32541 |
|
32542 | /**
|
32543 | * EditionDefault edition.
|
32544 | * @member {string} edition
|
32545 | * @memberof google.protobuf.FieldOptions.EditionDefault
|
32546 | * @instance
|
32547 | */
|
32548 | EditionDefault.prototype.edition = "";
|
32549 |
|
32550 | /**
|
32551 | * EditionDefault value.
|
32552 | * @member {string} value
|
32553 | * @memberof google.protobuf.FieldOptions.EditionDefault
|
32554 | * @instance
|
32555 | */
|
32556 | EditionDefault.prototype.value = "";
|
32557 |
|
32558 | /**
|
32559 | * Creates a new EditionDefault instance using the specified properties.
|
32560 | * @function create
|
32561 | * @memberof google.protobuf.FieldOptions.EditionDefault
|
32562 | * @static
|
32563 | * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set
|
32564 | * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance
|
32565 | */
|
32566 | EditionDefault.create = function create(properties) {
|
32567 | return new EditionDefault(properties);
|
32568 | };
|
32569 |
|
32570 | /**
|
32571 | * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages.
|
32572 | * @function encode
|
32573 | * @memberof google.protobuf.FieldOptions.EditionDefault
|
32574 | * @static
|
32575 | * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode
|
32576 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
32577 | * @returns {$protobuf.Writer} Writer
|
32578 | */
|
32579 | EditionDefault.encode = function encode(message, writer) {
|
32580 | if (!writer)
|
32581 | writer = $Writer.create();
|
32582 | if (message.edition != null && Object.hasOwnProperty.call(message, "edition"))
|
32583 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.edition);
|
32584 | if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
32585 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
|
32586 | return writer;
|
32587 | };
|
32588 |
|
32589 | /**
|
32590 | * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages.
|
32591 | * @function encodeDelimited
|
32592 | * @memberof google.protobuf.FieldOptions.EditionDefault
|
32593 | * @static
|
32594 | * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode
|
32595 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
32596 | * @returns {$protobuf.Writer} Writer
|
32597 | */
|
32598 | EditionDefault.encodeDelimited = function encodeDelimited(message, writer) {
|
32599 | return this.encode(message, writer).ldelim();
|
32600 | };
|
32601 |
|
32602 | /**
|
32603 | * Decodes an EditionDefault message from the specified reader or buffer.
|
32604 | * @function decode
|
32605 | * @memberof google.protobuf.FieldOptions.EditionDefault
|
32606 | * @static
|
32607 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
32608 | * @param {number} [length] Message length if known beforehand
|
32609 | * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault
|
32610 | * @throws {Error} If the payload is not a reader or valid buffer
|
32611 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
32612 | */
|
32613 | EditionDefault.decode = function decode(reader, length) {
|
32614 | if (!(reader instanceof $Reader))
|
32615 | reader = $Reader.create(reader);
|
32616 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault();
|
32617 | while (reader.pos < end) {
|
32618 | var tag = reader.uint32();
|
32619 | switch (tag >>> 3) {
|
32620 | case 1: {
|
32621 | message.edition = reader.string();
|
32622 | break;
|
32623 | }
|
32624 | case 2: {
|
32625 | message.value = reader.string();
|
32626 | break;
|
32627 | }
|
32628 | default:
|
32629 | reader.skipType(tag & 7);
|
32630 | break;
|
32631 | }
|
32632 | }
|
32633 | return message;
|
32634 | };
|
32635 |
|
32636 | /**
|
32637 | * Decodes an EditionDefault message from the specified reader or buffer, length delimited.
|
32638 | * @function decodeDelimited
|
32639 | * @memberof google.protobuf.FieldOptions.EditionDefault
|
32640 | * @static
|
32641 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
32642 | * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault
|
32643 | * @throws {Error} If the payload is not a reader or valid buffer
|
32644 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
32645 | */
|
32646 | EditionDefault.decodeDelimited = function decodeDelimited(reader) {
|
32647 | if (!(reader instanceof $Reader))
|
32648 | reader = new $Reader(reader);
|
32649 | return this.decode(reader, reader.uint32());
|
32650 | };
|
32651 |
|
32652 | /**
|
32653 | * Verifies an EditionDefault message.
|
32654 | * @function verify
|
32655 | * @memberof google.protobuf.FieldOptions.EditionDefault
|
32656 | * @static
|
32657 | * @param {Object.<string,*>} message Plain object to verify
|
32658 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
32659 | */
|
32660 | EditionDefault.verify = function verify(message) {
|
32661 | if (typeof message !== "object" || message === null)
|
32662 | return "object expected";
|
32663 | if (message.edition != null && message.hasOwnProperty("edition"))
|
32664 | if (!$util.isString(message.edition))
|
32665 | return "edition: string expected";
|
32666 | if (message.value != null && message.hasOwnProperty("value"))
|
32667 | if (!$util.isString(message.value))
|
32668 | return "value: string expected";
|
32669 | return null;
|
32670 | };
|
32671 |
|
32672 | /**
|
32673 | * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types.
|
32674 | * @function fromObject
|
32675 | * @memberof google.protobuf.FieldOptions.EditionDefault
|
32676 | * @static
|
32677 | * @param {Object.<string,*>} object Plain object
|
32678 | * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault
|
32679 | */
|
32680 | EditionDefault.fromObject = function fromObject(object) {
|
32681 | if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault)
|
32682 | return object;
|
32683 | var message = new $root.google.protobuf.FieldOptions.EditionDefault();
|
32684 | if (object.edition != null)
|
32685 | message.edition = String(object.edition);
|
32686 | if (object.value != null)
|
32687 | message.value = String(object.value);
|
32688 | return message;
|
32689 | };
|
32690 |
|
32691 | /**
|
32692 | * Creates a plain object from an EditionDefault message. Also converts values to other types if specified.
|
32693 | * @function toObject
|
32694 | * @memberof google.protobuf.FieldOptions.EditionDefault
|
32695 | * @static
|
32696 | * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault
|
32697 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
32698 | * @returns {Object.<string,*>} Plain object
|
32699 | */
|
32700 | EditionDefault.toObject = function toObject(message, options) {
|
32701 | if (!options)
|
32702 | options = {};
|
32703 | var object = {};
|
32704 | if (options.defaults) {
|
32705 | object.edition = "";
|
32706 | object.value = "";
|
32707 | }
|
32708 | if (message.edition != null && message.hasOwnProperty("edition"))
|
32709 | object.edition = message.edition;
|
32710 | if (message.value != null && message.hasOwnProperty("value"))
|
32711 | object.value = message.value;
|
32712 | return object;
|
32713 | };
|
32714 |
|
32715 | /**
|
32716 | * Converts this EditionDefault to JSON.
|
32717 | * @function toJSON
|
32718 | * @memberof google.protobuf.FieldOptions.EditionDefault
|
32719 | * @instance
|
32720 | * @returns {Object.<string,*>} JSON object
|
32721 | */
|
32722 | EditionDefault.prototype.toJSON = function toJSON() {
|
32723 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
32724 | };
|
32725 |
|
32726 | /**
|
32727 | * Gets the default type url for EditionDefault
|
32728 | * @function getTypeUrl
|
32729 | * @memberof google.protobuf.FieldOptions.EditionDefault
|
32730 | * @static
|
32731 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
32732 | * @returns {string} The default type url
|
32733 | */
|
32734 | EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
32735 | if (typeUrlPrefix === undefined) {
|
32736 | typeUrlPrefix = "type.googleapis.com";
|
32737 | }
|
32738 | return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault";
|
32739 | };
|
32740 |
|
32741 | return EditionDefault;
|
32742 | })();
|
32743 |
|
32744 | return FieldOptions;
|
32745 | })();
|
32746 |
|
32747 | protobuf.OneofOptions = (function() {
|
32748 |
|
32749 | /**
|
32750 | * Properties of an OneofOptions.
|
32751 | * @memberof google.protobuf
|
32752 | * @interface IOneofOptions
|
32753 | * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features
|
32754 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] OneofOptions uninterpretedOption
|
32755 | */
|
32756 |
|
32757 | /**
|
32758 | * Constructs a new OneofOptions.
|
32759 | * @memberof google.protobuf
|
32760 | * @classdesc Represents an OneofOptions.
|
32761 | * @implements IOneofOptions
|
32762 | * @constructor
|
32763 | * @param {google.protobuf.IOneofOptions=} [properties] Properties to set
|
32764 | */
|
32765 | function OneofOptions(properties) {
|
32766 | this.uninterpretedOption = [];
|
32767 | if (properties)
|
32768 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
32769 | if (properties[keys[i]] != null)
|
32770 | this[keys[i]] = properties[keys[i]];
|
32771 | }
|
32772 |
|
32773 | /**
|
32774 | * OneofOptions features.
|
32775 | * @member {google.protobuf.IFeatureSet|null|undefined} features
|
32776 | * @memberof google.protobuf.OneofOptions
|
32777 | * @instance
|
32778 | */
|
32779 | OneofOptions.prototype.features = null;
|
32780 |
|
32781 | /**
|
32782 | * OneofOptions uninterpretedOption.
|
32783 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
32784 | * @memberof google.protobuf.OneofOptions
|
32785 | * @instance
|
32786 | */
|
32787 | OneofOptions.prototype.uninterpretedOption = $util.emptyArray;
|
32788 |
|
32789 | /**
|
32790 | * Creates a new OneofOptions instance using the specified properties.
|
32791 | * @function create
|
32792 | * @memberof google.protobuf.OneofOptions
|
32793 | * @static
|
32794 | * @param {google.protobuf.IOneofOptions=} [properties] Properties to set
|
32795 | * @returns {google.protobuf.OneofOptions} OneofOptions instance
|
32796 | */
|
32797 | OneofOptions.create = function create(properties) {
|
32798 | return new OneofOptions(properties);
|
32799 | };
|
32800 |
|
32801 | /**
|
32802 | * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages.
|
32803 | * @function encode
|
32804 | * @memberof google.protobuf.OneofOptions
|
32805 | * @static
|
32806 | * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode
|
32807 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
32808 | * @returns {$protobuf.Writer} Writer
|
32809 | */
|
32810 | OneofOptions.encode = function encode(message, writer) {
|
32811 | if (!writer)
|
32812 | writer = $Writer.create();
|
32813 | if (message.features != null && Object.hasOwnProperty.call(message, "features"))
|
32814 | $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
32815 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
32816 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
32817 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
32818 | return writer;
|
32819 | };
|
32820 |
|
32821 | /**
|
32822 | * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages.
|
32823 | * @function encodeDelimited
|
32824 | * @memberof google.protobuf.OneofOptions
|
32825 | * @static
|
32826 | * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode
|
32827 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
32828 | * @returns {$protobuf.Writer} Writer
|
32829 | */
|
32830 | OneofOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
32831 | return this.encode(message, writer).ldelim();
|
32832 | };
|
32833 |
|
32834 | /**
|
32835 | * Decodes an OneofOptions message from the specified reader or buffer.
|
32836 | * @function decode
|
32837 | * @memberof google.protobuf.OneofOptions
|
32838 | * @static
|
32839 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
32840 | * @param {number} [length] Message length if known beforehand
|
32841 | * @returns {google.protobuf.OneofOptions} OneofOptions
|
32842 | * @throws {Error} If the payload is not a reader or valid buffer
|
32843 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
32844 | */
|
32845 | OneofOptions.decode = function decode(reader, length) {
|
32846 | if (!(reader instanceof $Reader))
|
32847 | reader = $Reader.create(reader);
|
32848 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions();
|
32849 | while (reader.pos < end) {
|
32850 | var tag = reader.uint32();
|
32851 | switch (tag >>> 3) {
|
32852 | case 1: {
|
32853 | message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
|
32854 | break;
|
32855 | }
|
32856 | case 999: {
|
32857 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
32858 | message.uninterpretedOption = [];
|
32859 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
32860 | break;
|
32861 | }
|
32862 | default:
|
32863 | reader.skipType(tag & 7);
|
32864 | break;
|
32865 | }
|
32866 | }
|
32867 | return message;
|
32868 | };
|
32869 |
|
32870 | /**
|
32871 | * Decodes an OneofOptions message from the specified reader or buffer, length delimited.
|
32872 | * @function decodeDelimited
|
32873 | * @memberof google.protobuf.OneofOptions
|
32874 | * @static
|
32875 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
32876 | * @returns {google.protobuf.OneofOptions} OneofOptions
|
32877 | * @throws {Error} If the payload is not a reader or valid buffer
|
32878 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
32879 | */
|
32880 | OneofOptions.decodeDelimited = function decodeDelimited(reader) {
|
32881 | if (!(reader instanceof $Reader))
|
32882 | reader = new $Reader(reader);
|
32883 | return this.decode(reader, reader.uint32());
|
32884 | };
|
32885 |
|
32886 | /**
|
32887 | * Verifies an OneofOptions message.
|
32888 | * @function verify
|
32889 | * @memberof google.protobuf.OneofOptions
|
32890 | * @static
|
32891 | * @param {Object.<string,*>} message Plain object to verify
|
32892 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
32893 | */
|
32894 | OneofOptions.verify = function verify(message) {
|
32895 | if (typeof message !== "object" || message === null)
|
32896 | return "object expected";
|
32897 | if (message.features != null && message.hasOwnProperty("features")) {
|
32898 | var error = $root.google.protobuf.FeatureSet.verify(message.features);
|
32899 | if (error)
|
32900 | return "features." + error;
|
32901 | }
|
32902 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
32903 | if (!Array.isArray(message.uninterpretedOption))
|
32904 | return "uninterpretedOption: array expected";
|
32905 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
32906 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
32907 | if (error)
|
32908 | return "uninterpretedOption." + error;
|
32909 | }
|
32910 | }
|
32911 | return null;
|
32912 | };
|
32913 |
|
32914 | /**
|
32915 | * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types.
|
32916 | * @function fromObject
|
32917 | * @memberof google.protobuf.OneofOptions
|
32918 | * @static
|
32919 | * @param {Object.<string,*>} object Plain object
|
32920 | * @returns {google.protobuf.OneofOptions} OneofOptions
|
32921 | */
|
32922 | OneofOptions.fromObject = function fromObject(object) {
|
32923 | if (object instanceof $root.google.protobuf.OneofOptions)
|
32924 | return object;
|
32925 | var message = new $root.google.protobuf.OneofOptions();
|
32926 | if (object.features != null) {
|
32927 | if (typeof object.features !== "object")
|
32928 | throw TypeError(".google.protobuf.OneofOptions.features: object expected");
|
32929 | message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
|
32930 | }
|
32931 | if (object.uninterpretedOption) {
|
32932 | if (!Array.isArray(object.uninterpretedOption))
|
32933 | throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected");
|
32934 | message.uninterpretedOption = [];
|
32935 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
32936 | if (typeof object.uninterpretedOption[i] !== "object")
|
32937 | throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected");
|
32938 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
32939 | }
|
32940 | }
|
32941 | return message;
|
32942 | };
|
32943 |
|
32944 | /**
|
32945 | * Creates a plain object from an OneofOptions message. Also converts values to other types if specified.
|
32946 | * @function toObject
|
32947 | * @memberof google.protobuf.OneofOptions
|
32948 | * @static
|
32949 | * @param {google.protobuf.OneofOptions} message OneofOptions
|
32950 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
32951 | * @returns {Object.<string,*>} Plain object
|
32952 | */
|
32953 | OneofOptions.toObject = function toObject(message, options) {
|
32954 | if (!options)
|
32955 | options = {};
|
32956 | var object = {};
|
32957 | if (options.arrays || options.defaults)
|
32958 | object.uninterpretedOption = [];
|
32959 | if (options.defaults)
|
32960 | object.features = null;
|
32961 | if (message.features != null && message.hasOwnProperty("features"))
|
32962 | object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
|
32963 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
32964 | object.uninterpretedOption = [];
|
32965 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
32966 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
32967 | }
|
32968 | return object;
|
32969 | };
|
32970 |
|
32971 | /**
|
32972 | * Converts this OneofOptions to JSON.
|
32973 | * @function toJSON
|
32974 | * @memberof google.protobuf.OneofOptions
|
32975 | * @instance
|
32976 | * @returns {Object.<string,*>} JSON object
|
32977 | */
|
32978 | OneofOptions.prototype.toJSON = function toJSON() {
|
32979 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
32980 | };
|
32981 |
|
32982 | /**
|
32983 | * Gets the default type url for OneofOptions
|
32984 | * @function getTypeUrl
|
32985 | * @memberof google.protobuf.OneofOptions
|
32986 | * @static
|
32987 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
32988 | * @returns {string} The default type url
|
32989 | */
|
32990 | OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
32991 | if (typeUrlPrefix === undefined) {
|
32992 | typeUrlPrefix = "type.googleapis.com";
|
32993 | }
|
32994 | return typeUrlPrefix + "/google.protobuf.OneofOptions";
|
32995 | };
|
32996 |
|
32997 | return OneofOptions;
|
32998 | })();
|
32999 |
|
33000 | protobuf.EnumOptions = (function() {
|
33001 |
|
33002 | /**
|
33003 | * Properties of an EnumOptions.
|
33004 | * @memberof google.protobuf
|
33005 | * @interface IEnumOptions
|
33006 | * @property {boolean|null} [allowAlias] EnumOptions allowAlias
|
33007 | * @property {boolean|null} [deprecated] EnumOptions deprecated
|
33008 | * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts
|
33009 | * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features
|
33010 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] EnumOptions uninterpretedOption
|
33011 | */
|
33012 |
|
33013 | /**
|
33014 | * Constructs a new EnumOptions.
|
33015 | * @memberof google.protobuf
|
33016 | * @classdesc Represents an EnumOptions.
|
33017 | * @implements IEnumOptions
|
33018 | * @constructor
|
33019 | * @param {google.protobuf.IEnumOptions=} [properties] Properties to set
|
33020 | */
|
33021 | function EnumOptions(properties) {
|
33022 | this.uninterpretedOption = [];
|
33023 | if (properties)
|
33024 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
33025 | if (properties[keys[i]] != null)
|
33026 | this[keys[i]] = properties[keys[i]];
|
33027 | }
|
33028 |
|
33029 | /**
|
33030 | * EnumOptions allowAlias.
|
33031 | * @member {boolean} allowAlias
|
33032 | * @memberof google.protobuf.EnumOptions
|
33033 | * @instance
|
33034 | */
|
33035 | EnumOptions.prototype.allowAlias = false;
|
33036 |
|
33037 | /**
|
33038 | * EnumOptions deprecated.
|
33039 | * @member {boolean} deprecated
|
33040 | * @memberof google.protobuf.EnumOptions
|
33041 | * @instance
|
33042 | */
|
33043 | EnumOptions.prototype.deprecated = false;
|
33044 |
|
33045 | /**
|
33046 | * EnumOptions deprecatedLegacyJsonFieldConflicts.
|
33047 | * @member {boolean} deprecatedLegacyJsonFieldConflicts
|
33048 | * @memberof google.protobuf.EnumOptions
|
33049 | * @instance
|
33050 | */
|
33051 | EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false;
|
33052 |
|
33053 | /**
|
33054 | * EnumOptions features.
|
33055 | * @member {google.protobuf.IFeatureSet|null|undefined} features
|
33056 | * @memberof google.protobuf.EnumOptions
|
33057 | * @instance
|
33058 | */
|
33059 | EnumOptions.prototype.features = null;
|
33060 |
|
33061 | /**
|
33062 | * EnumOptions uninterpretedOption.
|
33063 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
33064 | * @memberof google.protobuf.EnumOptions
|
33065 | * @instance
|
33066 | */
|
33067 | EnumOptions.prototype.uninterpretedOption = $util.emptyArray;
|
33068 |
|
33069 | /**
|
33070 | * Creates a new EnumOptions instance using the specified properties.
|
33071 | * @function create
|
33072 | * @memberof google.protobuf.EnumOptions
|
33073 | * @static
|
33074 | * @param {google.protobuf.IEnumOptions=} [properties] Properties to set
|
33075 | * @returns {google.protobuf.EnumOptions} EnumOptions instance
|
33076 | */
|
33077 | EnumOptions.create = function create(properties) {
|
33078 | return new EnumOptions(properties);
|
33079 | };
|
33080 |
|
33081 | /**
|
33082 | * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.
|
33083 | * @function encode
|
33084 | * @memberof google.protobuf.EnumOptions
|
33085 | * @static
|
33086 | * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode
|
33087 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
33088 | * @returns {$protobuf.Writer} Writer
|
33089 | */
|
33090 | EnumOptions.encode = function encode(message, writer) {
|
33091 | if (!writer)
|
33092 | writer = $Writer.create();
|
33093 | if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias"))
|
33094 | writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias);
|
33095 | if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
|
33096 | writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated);
|
33097 | if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts"))
|
33098 | writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts);
|
33099 | if (message.features != null && Object.hasOwnProperty.call(message, "features"))
|
33100 | $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
33101 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
33102 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
33103 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
33104 | return writer;
|
33105 | };
|
33106 |
|
33107 | /**
|
33108 | * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.
|
33109 | * @function encodeDelimited
|
33110 | * @memberof google.protobuf.EnumOptions
|
33111 | * @static
|
33112 | * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode
|
33113 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
33114 | * @returns {$protobuf.Writer} Writer
|
33115 | */
|
33116 | EnumOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
33117 | return this.encode(message, writer).ldelim();
|
33118 | };
|
33119 |
|
33120 | /**
|
33121 | * Decodes an EnumOptions message from the specified reader or buffer.
|
33122 | * @function decode
|
33123 | * @memberof google.protobuf.EnumOptions
|
33124 | * @static
|
33125 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
33126 | * @param {number} [length] Message length if known beforehand
|
33127 | * @returns {google.protobuf.EnumOptions} EnumOptions
|
33128 | * @throws {Error} If the payload is not a reader or valid buffer
|
33129 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
33130 | */
|
33131 | EnumOptions.decode = function decode(reader, length) {
|
33132 | if (!(reader instanceof $Reader))
|
33133 | reader = $Reader.create(reader);
|
33134 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions();
|
33135 | while (reader.pos < end) {
|
33136 | var tag = reader.uint32();
|
33137 | switch (tag >>> 3) {
|
33138 | case 2: {
|
33139 | message.allowAlias = reader.bool();
|
33140 | break;
|
33141 | }
|
33142 | case 3: {
|
33143 | message.deprecated = reader.bool();
|
33144 | break;
|
33145 | }
|
33146 | case 6: {
|
33147 | message.deprecatedLegacyJsonFieldConflicts = reader.bool();
|
33148 | break;
|
33149 | }
|
33150 | case 7: {
|
33151 | message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
|
33152 | break;
|
33153 | }
|
33154 | case 999: {
|
33155 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
33156 | message.uninterpretedOption = [];
|
33157 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
33158 | break;
|
33159 | }
|
33160 | default:
|
33161 | reader.skipType(tag & 7);
|
33162 | break;
|
33163 | }
|
33164 | }
|
33165 | return message;
|
33166 | };
|
33167 |
|
33168 | /**
|
33169 | * Decodes an EnumOptions message from the specified reader or buffer, length delimited.
|
33170 | * @function decodeDelimited
|
33171 | * @memberof google.protobuf.EnumOptions
|
33172 | * @static
|
33173 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
33174 | * @returns {google.protobuf.EnumOptions} EnumOptions
|
33175 | * @throws {Error} If the payload is not a reader or valid buffer
|
33176 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
33177 | */
|
33178 | EnumOptions.decodeDelimited = function decodeDelimited(reader) {
|
33179 | if (!(reader instanceof $Reader))
|
33180 | reader = new $Reader(reader);
|
33181 | return this.decode(reader, reader.uint32());
|
33182 | };
|
33183 |
|
33184 | /**
|
33185 | * Verifies an EnumOptions message.
|
33186 | * @function verify
|
33187 | * @memberof google.protobuf.EnumOptions
|
33188 | * @static
|
33189 | * @param {Object.<string,*>} message Plain object to verify
|
33190 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
33191 | */
|
33192 | EnumOptions.verify = function verify(message) {
|
33193 | if (typeof message !== "object" || message === null)
|
33194 | return "object expected";
|
33195 | if (message.allowAlias != null && message.hasOwnProperty("allowAlias"))
|
33196 | if (typeof message.allowAlias !== "boolean")
|
33197 | return "allowAlias: boolean expected";
|
33198 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
33199 | if (typeof message.deprecated !== "boolean")
|
33200 | return "deprecated: boolean expected";
|
33201 | if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts"))
|
33202 | if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean")
|
33203 | return "deprecatedLegacyJsonFieldConflicts: boolean expected";
|
33204 | if (message.features != null && message.hasOwnProperty("features")) {
|
33205 | var error = $root.google.protobuf.FeatureSet.verify(message.features);
|
33206 | if (error)
|
33207 | return "features." + error;
|
33208 | }
|
33209 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
33210 | if (!Array.isArray(message.uninterpretedOption))
|
33211 | return "uninterpretedOption: array expected";
|
33212 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
33213 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
33214 | if (error)
|
33215 | return "uninterpretedOption." + error;
|
33216 | }
|
33217 | }
|
33218 | return null;
|
33219 | };
|
33220 |
|
33221 | /**
|
33222 | * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types.
|
33223 | * @function fromObject
|
33224 | * @memberof google.protobuf.EnumOptions
|
33225 | * @static
|
33226 | * @param {Object.<string,*>} object Plain object
|
33227 | * @returns {google.protobuf.EnumOptions} EnumOptions
|
33228 | */
|
33229 | EnumOptions.fromObject = function fromObject(object) {
|
33230 | if (object instanceof $root.google.protobuf.EnumOptions)
|
33231 | return object;
|
33232 | var message = new $root.google.protobuf.EnumOptions();
|
33233 | if (object.allowAlias != null)
|
33234 | message.allowAlias = Boolean(object.allowAlias);
|
33235 | if (object.deprecated != null)
|
33236 | message.deprecated = Boolean(object.deprecated);
|
33237 | if (object.deprecatedLegacyJsonFieldConflicts != null)
|
33238 | message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts);
|
33239 | if (object.features != null) {
|
33240 | if (typeof object.features !== "object")
|
33241 | throw TypeError(".google.protobuf.EnumOptions.features: object expected");
|
33242 | message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
|
33243 | }
|
33244 | if (object.uninterpretedOption) {
|
33245 | if (!Array.isArray(object.uninterpretedOption))
|
33246 | throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected");
|
33247 | message.uninterpretedOption = [];
|
33248 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
33249 | if (typeof object.uninterpretedOption[i] !== "object")
|
33250 | throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected");
|
33251 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
33252 | }
|
33253 | }
|
33254 | return message;
|
33255 | };
|
33256 |
|
33257 | /**
|
33258 | * Creates a plain object from an EnumOptions message. Also converts values to other types if specified.
|
33259 | * @function toObject
|
33260 | * @memberof google.protobuf.EnumOptions
|
33261 | * @static
|
33262 | * @param {google.protobuf.EnumOptions} message EnumOptions
|
33263 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
33264 | * @returns {Object.<string,*>} Plain object
|
33265 | */
|
33266 | EnumOptions.toObject = function toObject(message, options) {
|
33267 | if (!options)
|
33268 | options = {};
|
33269 | var object = {};
|
33270 | if (options.arrays || options.defaults)
|
33271 | object.uninterpretedOption = [];
|
33272 | if (options.defaults) {
|
33273 | object.allowAlias = false;
|
33274 | object.deprecated = false;
|
33275 | object.deprecatedLegacyJsonFieldConflicts = false;
|
33276 | object.features = null;
|
33277 | }
|
33278 | if (message.allowAlias != null && message.hasOwnProperty("allowAlias"))
|
33279 | object.allowAlias = message.allowAlias;
|
33280 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
33281 | object.deprecated = message.deprecated;
|
33282 | if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts"))
|
33283 | object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts;
|
33284 | if (message.features != null && message.hasOwnProperty("features"))
|
33285 | object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
|
33286 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
33287 | object.uninterpretedOption = [];
|
33288 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
33289 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
33290 | }
|
33291 | return object;
|
33292 | };
|
33293 |
|
33294 | /**
|
33295 | * Converts this EnumOptions to JSON.
|
33296 | * @function toJSON
|
33297 | * @memberof google.protobuf.EnumOptions
|
33298 | * @instance
|
33299 | * @returns {Object.<string,*>} JSON object
|
33300 | */
|
33301 | EnumOptions.prototype.toJSON = function toJSON() {
|
33302 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
33303 | };
|
33304 |
|
33305 | /**
|
33306 | * Gets the default type url for EnumOptions
|
33307 | * @function getTypeUrl
|
33308 | * @memberof google.protobuf.EnumOptions
|
33309 | * @static
|
33310 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
33311 | * @returns {string} The default type url
|
33312 | */
|
33313 | EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
33314 | if (typeUrlPrefix === undefined) {
|
33315 | typeUrlPrefix = "type.googleapis.com";
|
33316 | }
|
33317 | return typeUrlPrefix + "/google.protobuf.EnumOptions";
|
33318 | };
|
33319 |
|
33320 | return EnumOptions;
|
33321 | })();
|
33322 |
|
33323 | protobuf.EnumValueOptions = (function() {
|
33324 |
|
33325 | /**
|
33326 | * Properties of an EnumValueOptions.
|
33327 | * @memberof google.protobuf
|
33328 | * @interface IEnumValueOptions
|
33329 | * @property {boolean|null} [deprecated] EnumValueOptions deprecated
|
33330 | * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features
|
33331 | * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact
|
33332 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] EnumValueOptions uninterpretedOption
|
33333 | */
|
33334 |
|
33335 | /**
|
33336 | * Constructs a new EnumValueOptions.
|
33337 | * @memberof google.protobuf
|
33338 | * @classdesc Represents an EnumValueOptions.
|
33339 | * @implements IEnumValueOptions
|
33340 | * @constructor
|
33341 | * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set
|
33342 | */
|
33343 | function EnumValueOptions(properties) {
|
33344 | this.uninterpretedOption = [];
|
33345 | if (properties)
|
33346 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
33347 | if (properties[keys[i]] != null)
|
33348 | this[keys[i]] = properties[keys[i]];
|
33349 | }
|
33350 |
|
33351 | /**
|
33352 | * EnumValueOptions deprecated.
|
33353 | * @member {boolean} deprecated
|
33354 | * @memberof google.protobuf.EnumValueOptions
|
33355 | * @instance
|
33356 | */
|
33357 | EnumValueOptions.prototype.deprecated = false;
|
33358 |
|
33359 | /**
|
33360 | * EnumValueOptions features.
|
33361 | * @member {google.protobuf.IFeatureSet|null|undefined} features
|
33362 | * @memberof google.protobuf.EnumValueOptions
|
33363 | * @instance
|
33364 | */
|
33365 | EnumValueOptions.prototype.features = null;
|
33366 |
|
33367 | /**
|
33368 | * EnumValueOptions debugRedact.
|
33369 | * @member {boolean} debugRedact
|
33370 | * @memberof google.protobuf.EnumValueOptions
|
33371 | * @instance
|
33372 | */
|
33373 | EnumValueOptions.prototype.debugRedact = false;
|
33374 |
|
33375 | /**
|
33376 | * EnumValueOptions uninterpretedOption.
|
33377 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
33378 | * @memberof google.protobuf.EnumValueOptions
|
33379 | * @instance
|
33380 | */
|
33381 | EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray;
|
33382 |
|
33383 | /**
|
33384 | * Creates a new EnumValueOptions instance using the specified properties.
|
33385 | * @function create
|
33386 | * @memberof google.protobuf.EnumValueOptions
|
33387 | * @static
|
33388 | * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set
|
33389 | * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance
|
33390 | */
|
33391 | EnumValueOptions.create = function create(properties) {
|
33392 | return new EnumValueOptions(properties);
|
33393 | };
|
33394 |
|
33395 | /**
|
33396 | * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.
|
33397 | * @function encode
|
33398 | * @memberof google.protobuf.EnumValueOptions
|
33399 | * @static
|
33400 | * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode
|
33401 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
33402 | * @returns {$protobuf.Writer} Writer
|
33403 | */
|
33404 | EnumValueOptions.encode = function encode(message, writer) {
|
33405 | if (!writer)
|
33406 | writer = $Writer.create();
|
33407 | if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
|
33408 | writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated);
|
33409 | if (message.features != null && Object.hasOwnProperty.call(message, "features"))
|
33410 | $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
33411 | if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact"))
|
33412 | writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact);
|
33413 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
33414 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
33415 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
33416 | return writer;
|
33417 | };
|
33418 |
|
33419 | /**
|
33420 | * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.
|
33421 | * @function encodeDelimited
|
33422 | * @memberof google.protobuf.EnumValueOptions
|
33423 | * @static
|
33424 | * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode
|
33425 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
33426 | * @returns {$protobuf.Writer} Writer
|
33427 | */
|
33428 | EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
33429 | return this.encode(message, writer).ldelim();
|
33430 | };
|
33431 |
|
33432 | /**
|
33433 | * Decodes an EnumValueOptions message from the specified reader or buffer.
|
33434 | * @function decode
|
33435 | * @memberof google.protobuf.EnumValueOptions
|
33436 | * @static
|
33437 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
33438 | * @param {number} [length] Message length if known beforehand
|
33439 | * @returns {google.protobuf.EnumValueOptions} EnumValueOptions
|
33440 | * @throws {Error} If the payload is not a reader or valid buffer
|
33441 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
33442 | */
|
33443 | EnumValueOptions.decode = function decode(reader, length) {
|
33444 | if (!(reader instanceof $Reader))
|
33445 | reader = $Reader.create(reader);
|
33446 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions();
|
33447 | while (reader.pos < end) {
|
33448 | var tag = reader.uint32();
|
33449 | switch (tag >>> 3) {
|
33450 | case 1: {
|
33451 | message.deprecated = reader.bool();
|
33452 | break;
|
33453 | }
|
33454 | case 2: {
|
33455 | message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
|
33456 | break;
|
33457 | }
|
33458 | case 3: {
|
33459 | message.debugRedact = reader.bool();
|
33460 | break;
|
33461 | }
|
33462 | case 999: {
|
33463 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
33464 | message.uninterpretedOption = [];
|
33465 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
33466 | break;
|
33467 | }
|
33468 | default:
|
33469 | reader.skipType(tag & 7);
|
33470 | break;
|
33471 | }
|
33472 | }
|
33473 | return message;
|
33474 | };
|
33475 |
|
33476 | /**
|
33477 | * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited.
|
33478 | * @function decodeDelimited
|
33479 | * @memberof google.protobuf.EnumValueOptions
|
33480 | * @static
|
33481 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
33482 | * @returns {google.protobuf.EnumValueOptions} EnumValueOptions
|
33483 | * @throws {Error} If the payload is not a reader or valid buffer
|
33484 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
33485 | */
|
33486 | EnumValueOptions.decodeDelimited = function decodeDelimited(reader) {
|
33487 | if (!(reader instanceof $Reader))
|
33488 | reader = new $Reader(reader);
|
33489 | return this.decode(reader, reader.uint32());
|
33490 | };
|
33491 |
|
33492 | /**
|
33493 | * Verifies an EnumValueOptions message.
|
33494 | * @function verify
|
33495 | * @memberof google.protobuf.EnumValueOptions
|
33496 | * @static
|
33497 | * @param {Object.<string,*>} message Plain object to verify
|
33498 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
33499 | */
|
33500 | EnumValueOptions.verify = function verify(message) {
|
33501 | if (typeof message !== "object" || message === null)
|
33502 | return "object expected";
|
33503 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
33504 | if (typeof message.deprecated !== "boolean")
|
33505 | return "deprecated: boolean expected";
|
33506 | if (message.features != null && message.hasOwnProperty("features")) {
|
33507 | var error = $root.google.protobuf.FeatureSet.verify(message.features);
|
33508 | if (error)
|
33509 | return "features." + error;
|
33510 | }
|
33511 | if (message.debugRedact != null && message.hasOwnProperty("debugRedact"))
|
33512 | if (typeof message.debugRedact !== "boolean")
|
33513 | return "debugRedact: boolean expected";
|
33514 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
33515 | if (!Array.isArray(message.uninterpretedOption))
|
33516 | return "uninterpretedOption: array expected";
|
33517 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
33518 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
33519 | if (error)
|
33520 | return "uninterpretedOption." + error;
|
33521 | }
|
33522 | }
|
33523 | return null;
|
33524 | };
|
33525 |
|
33526 | /**
|
33527 | * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types.
|
33528 | * @function fromObject
|
33529 | * @memberof google.protobuf.EnumValueOptions
|
33530 | * @static
|
33531 | * @param {Object.<string,*>} object Plain object
|
33532 | * @returns {google.protobuf.EnumValueOptions} EnumValueOptions
|
33533 | */
|
33534 | EnumValueOptions.fromObject = function fromObject(object) {
|
33535 | if (object instanceof $root.google.protobuf.EnumValueOptions)
|
33536 | return object;
|
33537 | var message = new $root.google.protobuf.EnumValueOptions();
|
33538 | if (object.deprecated != null)
|
33539 | message.deprecated = Boolean(object.deprecated);
|
33540 | if (object.features != null) {
|
33541 | if (typeof object.features !== "object")
|
33542 | throw TypeError(".google.protobuf.EnumValueOptions.features: object expected");
|
33543 | message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
|
33544 | }
|
33545 | if (object.debugRedact != null)
|
33546 | message.debugRedact = Boolean(object.debugRedact);
|
33547 | if (object.uninterpretedOption) {
|
33548 | if (!Array.isArray(object.uninterpretedOption))
|
33549 | throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected");
|
33550 | message.uninterpretedOption = [];
|
33551 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
33552 | if (typeof object.uninterpretedOption[i] !== "object")
|
33553 | throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected");
|
33554 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
33555 | }
|
33556 | }
|
33557 | return message;
|
33558 | };
|
33559 |
|
33560 | /**
|
33561 | * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified.
|
33562 | * @function toObject
|
33563 | * @memberof google.protobuf.EnumValueOptions
|
33564 | * @static
|
33565 | * @param {google.protobuf.EnumValueOptions} message EnumValueOptions
|
33566 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
33567 | * @returns {Object.<string,*>} Plain object
|
33568 | */
|
33569 | EnumValueOptions.toObject = function toObject(message, options) {
|
33570 | if (!options)
|
33571 | options = {};
|
33572 | var object = {};
|
33573 | if (options.arrays || options.defaults)
|
33574 | object.uninterpretedOption = [];
|
33575 | if (options.defaults) {
|
33576 | object.deprecated = false;
|
33577 | object.features = null;
|
33578 | object.debugRedact = false;
|
33579 | }
|
33580 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
33581 | object.deprecated = message.deprecated;
|
33582 | if (message.features != null && message.hasOwnProperty("features"))
|
33583 | object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
|
33584 | if (message.debugRedact != null && message.hasOwnProperty("debugRedact"))
|
33585 | object.debugRedact = message.debugRedact;
|
33586 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
33587 | object.uninterpretedOption = [];
|
33588 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
33589 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
33590 | }
|
33591 | return object;
|
33592 | };
|
33593 |
|
33594 | /**
|
33595 | * Converts this EnumValueOptions to JSON.
|
33596 | * @function toJSON
|
33597 | * @memberof google.protobuf.EnumValueOptions
|
33598 | * @instance
|
33599 | * @returns {Object.<string,*>} JSON object
|
33600 | */
|
33601 | EnumValueOptions.prototype.toJSON = function toJSON() {
|
33602 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
33603 | };
|
33604 |
|
33605 | /**
|
33606 | * Gets the default type url for EnumValueOptions
|
33607 | * @function getTypeUrl
|
33608 | * @memberof google.protobuf.EnumValueOptions
|
33609 | * @static
|
33610 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
33611 | * @returns {string} The default type url
|
33612 | */
|
33613 | EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
33614 | if (typeUrlPrefix === undefined) {
|
33615 | typeUrlPrefix = "type.googleapis.com";
|
33616 | }
|
33617 | return typeUrlPrefix + "/google.protobuf.EnumValueOptions";
|
33618 | };
|
33619 |
|
33620 | return EnumValueOptions;
|
33621 | })();
|
33622 |
|
33623 | protobuf.ServiceOptions = (function() {
|
33624 |
|
33625 | /**
|
33626 | * Properties of a ServiceOptions.
|
33627 | * @memberof google.protobuf
|
33628 | * @interface IServiceOptions
|
33629 | * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features
|
33630 | * @property {boolean|null} [deprecated] ServiceOptions deprecated
|
33631 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] ServiceOptions uninterpretedOption
|
33632 | * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost
|
33633 | * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes
|
33634 | */
|
33635 |
|
33636 | /**
|
33637 | * Constructs a new ServiceOptions.
|
33638 | * @memberof google.protobuf
|
33639 | * @classdesc Represents a ServiceOptions.
|
33640 | * @implements IServiceOptions
|
33641 | * @constructor
|
33642 | * @param {google.protobuf.IServiceOptions=} [properties] Properties to set
|
33643 | */
|
33644 | function ServiceOptions(properties) {
|
33645 | this.uninterpretedOption = [];
|
33646 | if (properties)
|
33647 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
33648 | if (properties[keys[i]] != null)
|
33649 | this[keys[i]] = properties[keys[i]];
|
33650 | }
|
33651 |
|
33652 | /**
|
33653 | * ServiceOptions features.
|
33654 | * @member {google.protobuf.IFeatureSet|null|undefined} features
|
33655 | * @memberof google.protobuf.ServiceOptions
|
33656 | * @instance
|
33657 | */
|
33658 | ServiceOptions.prototype.features = null;
|
33659 |
|
33660 | /**
|
33661 | * ServiceOptions deprecated.
|
33662 | * @member {boolean} deprecated
|
33663 | * @memberof google.protobuf.ServiceOptions
|
33664 | * @instance
|
33665 | */
|
33666 | ServiceOptions.prototype.deprecated = false;
|
33667 |
|
33668 | /**
|
33669 | * ServiceOptions uninterpretedOption.
|
33670 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
33671 | * @memberof google.protobuf.ServiceOptions
|
33672 | * @instance
|
33673 | */
|
33674 | ServiceOptions.prototype.uninterpretedOption = $util.emptyArray;
|
33675 |
|
33676 | /**
|
33677 | * ServiceOptions .google.api.defaultHost.
|
33678 | * @member {string} .google.api.defaultHost
|
33679 | * @memberof google.protobuf.ServiceOptions
|
33680 | * @instance
|
33681 | */
|
33682 | ServiceOptions.prototype[".google.api.defaultHost"] = "";
|
33683 |
|
33684 | /**
|
33685 | * ServiceOptions .google.api.oauthScopes.
|
33686 | * @member {string} .google.api.oauthScopes
|
33687 | * @memberof google.protobuf.ServiceOptions
|
33688 | * @instance
|
33689 | */
|
33690 | ServiceOptions.prototype[".google.api.oauthScopes"] = "";
|
33691 |
|
33692 | /**
|
33693 | * Creates a new ServiceOptions instance using the specified properties.
|
33694 | * @function create
|
33695 | * @memberof google.protobuf.ServiceOptions
|
33696 | * @static
|
33697 | * @param {google.protobuf.IServiceOptions=} [properties] Properties to set
|
33698 | * @returns {google.protobuf.ServiceOptions} ServiceOptions instance
|
33699 | */
|
33700 | ServiceOptions.create = function create(properties) {
|
33701 | return new ServiceOptions(properties);
|
33702 | };
|
33703 |
|
33704 | /**
|
33705 | * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.
|
33706 | * @function encode
|
33707 | * @memberof google.protobuf.ServiceOptions
|
33708 | * @static
|
33709 | * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode
|
33710 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
33711 | * @returns {$protobuf.Writer} Writer
|
33712 | */
|
33713 | ServiceOptions.encode = function encode(message, writer) {
|
33714 | if (!writer)
|
33715 | writer = $Writer.create();
|
33716 | if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
|
33717 | writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated);
|
33718 | if (message.features != null && Object.hasOwnProperty.call(message, "features"))
|
33719 | $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim();
|
33720 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
33721 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
33722 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
33723 | if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost"))
|
33724 | writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]);
|
33725 | if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes"))
|
33726 | writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]);
|
33727 | return writer;
|
33728 | };
|
33729 |
|
33730 | /**
|
33731 | * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.
|
33732 | * @function encodeDelimited
|
33733 | * @memberof google.protobuf.ServiceOptions
|
33734 | * @static
|
33735 | * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode
|
33736 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
33737 | * @returns {$protobuf.Writer} Writer
|
33738 | */
|
33739 | ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
33740 | return this.encode(message, writer).ldelim();
|
33741 | };
|
33742 |
|
33743 | /**
|
33744 | * Decodes a ServiceOptions message from the specified reader or buffer.
|
33745 | * @function decode
|
33746 | * @memberof google.protobuf.ServiceOptions
|
33747 | * @static
|
33748 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
33749 | * @param {number} [length] Message length if known beforehand
|
33750 | * @returns {google.protobuf.ServiceOptions} ServiceOptions
|
33751 | * @throws {Error} If the payload is not a reader or valid buffer
|
33752 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
33753 | */
|
33754 | ServiceOptions.decode = function decode(reader, length) {
|
33755 | if (!(reader instanceof $Reader))
|
33756 | reader = $Reader.create(reader);
|
33757 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions();
|
33758 | while (reader.pos < end) {
|
33759 | var tag = reader.uint32();
|
33760 | switch (tag >>> 3) {
|
33761 | case 34: {
|
33762 | message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
|
33763 | break;
|
33764 | }
|
33765 | case 33: {
|
33766 | message.deprecated = reader.bool();
|
33767 | break;
|
33768 | }
|
33769 | case 999: {
|
33770 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
33771 | message.uninterpretedOption = [];
|
33772 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
33773 | break;
|
33774 | }
|
33775 | case 1049: {
|
33776 | message[".google.api.defaultHost"] = reader.string();
|
33777 | break;
|
33778 | }
|
33779 | case 1050: {
|
33780 | message[".google.api.oauthScopes"] = reader.string();
|
33781 | break;
|
33782 | }
|
33783 | default:
|
33784 | reader.skipType(tag & 7);
|
33785 | break;
|
33786 | }
|
33787 | }
|
33788 | return message;
|
33789 | };
|
33790 |
|
33791 | /**
|
33792 | * Decodes a ServiceOptions message from the specified reader or buffer, length delimited.
|
33793 | * @function decodeDelimited
|
33794 | * @memberof google.protobuf.ServiceOptions
|
33795 | * @static
|
33796 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
33797 | * @returns {google.protobuf.ServiceOptions} ServiceOptions
|
33798 | * @throws {Error} If the payload is not a reader or valid buffer
|
33799 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
33800 | */
|
33801 | ServiceOptions.decodeDelimited = function decodeDelimited(reader) {
|
33802 | if (!(reader instanceof $Reader))
|
33803 | reader = new $Reader(reader);
|
33804 | return this.decode(reader, reader.uint32());
|
33805 | };
|
33806 |
|
33807 | /**
|
33808 | * Verifies a ServiceOptions message.
|
33809 | * @function verify
|
33810 | * @memberof google.protobuf.ServiceOptions
|
33811 | * @static
|
33812 | * @param {Object.<string,*>} message Plain object to verify
|
33813 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
33814 | */
|
33815 | ServiceOptions.verify = function verify(message) {
|
33816 | if (typeof message !== "object" || message === null)
|
33817 | return "object expected";
|
33818 | if (message.features != null && message.hasOwnProperty("features")) {
|
33819 | var error = $root.google.protobuf.FeatureSet.verify(message.features);
|
33820 | if (error)
|
33821 | return "features." + error;
|
33822 | }
|
33823 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
33824 | if (typeof message.deprecated !== "boolean")
|
33825 | return "deprecated: boolean expected";
|
33826 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
33827 | if (!Array.isArray(message.uninterpretedOption))
|
33828 | return "uninterpretedOption: array expected";
|
33829 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
33830 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
33831 | if (error)
|
33832 | return "uninterpretedOption." + error;
|
33833 | }
|
33834 | }
|
33835 | if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost"))
|
33836 | if (!$util.isString(message[".google.api.defaultHost"]))
|
33837 | return ".google.api.defaultHost: string expected";
|
33838 | if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes"))
|
33839 | if (!$util.isString(message[".google.api.oauthScopes"]))
|
33840 | return ".google.api.oauthScopes: string expected";
|
33841 | return null;
|
33842 | };
|
33843 |
|
33844 | /**
|
33845 | * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types.
|
33846 | * @function fromObject
|
33847 | * @memberof google.protobuf.ServiceOptions
|
33848 | * @static
|
33849 | * @param {Object.<string,*>} object Plain object
|
33850 | * @returns {google.protobuf.ServiceOptions} ServiceOptions
|
33851 | */
|
33852 | ServiceOptions.fromObject = function fromObject(object) {
|
33853 | if (object instanceof $root.google.protobuf.ServiceOptions)
|
33854 | return object;
|
33855 | var message = new $root.google.protobuf.ServiceOptions();
|
33856 | if (object.features != null) {
|
33857 | if (typeof object.features !== "object")
|
33858 | throw TypeError(".google.protobuf.ServiceOptions.features: object expected");
|
33859 | message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
|
33860 | }
|
33861 | if (object.deprecated != null)
|
33862 | message.deprecated = Boolean(object.deprecated);
|
33863 | if (object.uninterpretedOption) {
|
33864 | if (!Array.isArray(object.uninterpretedOption))
|
33865 | throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected");
|
33866 | message.uninterpretedOption = [];
|
33867 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
33868 | if (typeof object.uninterpretedOption[i] !== "object")
|
33869 | throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected");
|
33870 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
33871 | }
|
33872 | }
|
33873 | if (object[".google.api.defaultHost"] != null)
|
33874 | message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]);
|
33875 | if (object[".google.api.oauthScopes"] != null)
|
33876 | message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]);
|
33877 | return message;
|
33878 | };
|
33879 |
|
33880 | /**
|
33881 | * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified.
|
33882 | * @function toObject
|
33883 | * @memberof google.protobuf.ServiceOptions
|
33884 | * @static
|
33885 | * @param {google.protobuf.ServiceOptions} message ServiceOptions
|
33886 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
33887 | * @returns {Object.<string,*>} Plain object
|
33888 | */
|
33889 | ServiceOptions.toObject = function toObject(message, options) {
|
33890 | if (!options)
|
33891 | options = {};
|
33892 | var object = {};
|
33893 | if (options.arrays || options.defaults)
|
33894 | object.uninterpretedOption = [];
|
33895 | if (options.defaults) {
|
33896 | object.deprecated = false;
|
33897 | object.features = null;
|
33898 | object[".google.api.defaultHost"] = "";
|
33899 | object[".google.api.oauthScopes"] = "";
|
33900 | }
|
33901 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
33902 | object.deprecated = message.deprecated;
|
33903 | if (message.features != null && message.hasOwnProperty("features"))
|
33904 | object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
|
33905 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
33906 | object.uninterpretedOption = [];
|
33907 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
33908 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
33909 | }
|
33910 | if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost"))
|
33911 | object[".google.api.defaultHost"] = message[".google.api.defaultHost"];
|
33912 | if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes"))
|
33913 | object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"];
|
33914 | return object;
|
33915 | };
|
33916 |
|
33917 | /**
|
33918 | * Converts this ServiceOptions to JSON.
|
33919 | * @function toJSON
|
33920 | * @memberof google.protobuf.ServiceOptions
|
33921 | * @instance
|
33922 | * @returns {Object.<string,*>} JSON object
|
33923 | */
|
33924 | ServiceOptions.prototype.toJSON = function toJSON() {
|
33925 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
33926 | };
|
33927 |
|
33928 | /**
|
33929 | * Gets the default type url for ServiceOptions
|
33930 | * @function getTypeUrl
|
33931 | * @memberof google.protobuf.ServiceOptions
|
33932 | * @static
|
33933 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
33934 | * @returns {string} The default type url
|
33935 | */
|
33936 | ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
33937 | if (typeUrlPrefix === undefined) {
|
33938 | typeUrlPrefix = "type.googleapis.com";
|
33939 | }
|
33940 | return typeUrlPrefix + "/google.protobuf.ServiceOptions";
|
33941 | };
|
33942 |
|
33943 | return ServiceOptions;
|
33944 | })();
|
33945 |
|
33946 | protobuf.MethodOptions = (function() {
|
33947 |
|
33948 | /**
|
33949 | * Properties of a MethodOptions.
|
33950 | * @memberof google.protobuf
|
33951 | * @interface IMethodOptions
|
33952 | * @property {boolean|null} [deprecated] MethodOptions deprecated
|
33953 | * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel
|
33954 | * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features
|
33955 | * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] MethodOptions uninterpretedOption
|
33956 | * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http
|
33957 | * @property {Array.<string>|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature
|
33958 | * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo
|
33959 | * @property {google.api.IRoutingRule|null} [".google.api.routing"] MethodOptions .google.api.routing
|
33960 | */
|
33961 |
|
33962 | /**
|
33963 | * Constructs a new MethodOptions.
|
33964 | * @memberof google.protobuf
|
33965 | * @classdesc Represents a MethodOptions.
|
33966 | * @implements IMethodOptions
|
33967 | * @constructor
|
33968 | * @param {google.protobuf.IMethodOptions=} [properties] Properties to set
|
33969 | */
|
33970 | function MethodOptions(properties) {
|
33971 | this.uninterpretedOption = [];
|
33972 | this[".google.api.methodSignature"] = [];
|
33973 | if (properties)
|
33974 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
33975 | if (properties[keys[i]] != null)
|
33976 | this[keys[i]] = properties[keys[i]];
|
33977 | }
|
33978 |
|
33979 | /**
|
33980 | * MethodOptions deprecated.
|
33981 | * @member {boolean} deprecated
|
33982 | * @memberof google.protobuf.MethodOptions
|
33983 | * @instance
|
33984 | */
|
33985 | MethodOptions.prototype.deprecated = false;
|
33986 |
|
33987 | /**
|
33988 | * MethodOptions idempotencyLevel.
|
33989 | * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel
|
33990 | * @memberof google.protobuf.MethodOptions
|
33991 | * @instance
|
33992 | */
|
33993 | MethodOptions.prototype.idempotencyLevel = 0;
|
33994 |
|
33995 | /**
|
33996 | * MethodOptions features.
|
33997 | * @member {google.protobuf.IFeatureSet|null|undefined} features
|
33998 | * @memberof google.protobuf.MethodOptions
|
33999 | * @instance
|
34000 | */
|
34001 | MethodOptions.prototype.features = null;
|
34002 |
|
34003 | /**
|
34004 | * MethodOptions uninterpretedOption.
|
34005 | * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
|
34006 | * @memberof google.protobuf.MethodOptions
|
34007 | * @instance
|
34008 | */
|
34009 | MethodOptions.prototype.uninterpretedOption = $util.emptyArray;
|
34010 |
|
34011 | /**
|
34012 | * MethodOptions .google.api.http.
|
34013 | * @member {google.api.IHttpRule|null|undefined} .google.api.http
|
34014 | * @memberof google.protobuf.MethodOptions
|
34015 | * @instance
|
34016 | */
|
34017 | MethodOptions.prototype[".google.api.http"] = null;
|
34018 |
|
34019 | /**
|
34020 | * MethodOptions .google.api.methodSignature.
|
34021 | * @member {Array.<string>} .google.api.methodSignature
|
34022 | * @memberof google.protobuf.MethodOptions
|
34023 | * @instance
|
34024 | */
|
34025 | MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray;
|
34026 |
|
34027 | /**
|
34028 | * MethodOptions .google.longrunning.operationInfo.
|
34029 | * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo
|
34030 | * @memberof google.protobuf.MethodOptions
|
34031 | * @instance
|
34032 | */
|
34033 | MethodOptions.prototype[".google.longrunning.operationInfo"] = null;
|
34034 |
|
34035 | /**
|
34036 | * MethodOptions .google.api.routing.
|
34037 | * @member {google.api.IRoutingRule|null|undefined} .google.api.routing
|
34038 | * @memberof google.protobuf.MethodOptions
|
34039 | * @instance
|
34040 | */
|
34041 | MethodOptions.prototype[".google.api.routing"] = null;
|
34042 |
|
34043 | /**
|
34044 | * Creates a new MethodOptions instance using the specified properties.
|
34045 | * @function create
|
34046 | * @memberof google.protobuf.MethodOptions
|
34047 | * @static
|
34048 | * @param {google.protobuf.IMethodOptions=} [properties] Properties to set
|
34049 | * @returns {google.protobuf.MethodOptions} MethodOptions instance
|
34050 | */
|
34051 | MethodOptions.create = function create(properties) {
|
34052 | return new MethodOptions(properties);
|
34053 | };
|
34054 |
|
34055 | /**
|
34056 | * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.
|
34057 | * @function encode
|
34058 | * @memberof google.protobuf.MethodOptions
|
34059 | * @static
|
34060 | * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode
|
34061 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
34062 | * @returns {$protobuf.Writer} Writer
|
34063 | */
|
34064 | MethodOptions.encode = function encode(message, writer) {
|
34065 | if (!writer)
|
34066 | writer = $Writer.create();
|
34067 | if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
|
34068 | writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated);
|
34069 | if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel"))
|
34070 | writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel);
|
34071 | if (message.features != null && Object.hasOwnProperty.call(message, "features"))
|
34072 | $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim();
|
34073 | if (message.uninterpretedOption != null && message.uninterpretedOption.length)
|
34074 | for (var i = 0; i < message.uninterpretedOption.length; ++i)
|
34075 | $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
34076 | if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo"))
|
34077 | $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim();
|
34078 | if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length)
|
34079 | for (var i = 0; i < message[".google.api.methodSignature"].length; ++i)
|
34080 | writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]);
|
34081 | if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http"))
|
34082 | $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim();
|
34083 | if (message[".google.api.routing"] != null && Object.hasOwnProperty.call(message, ".google.api.routing"))
|
34084 | $root.google.api.RoutingRule.encode(message[".google.api.routing"], writer.uint32(/* id 72295729, wireType 2 =*/578365834).fork()).ldelim();
|
34085 | return writer;
|
34086 | };
|
34087 |
|
34088 | /**
|
34089 | * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.
|
34090 | * @function encodeDelimited
|
34091 | * @memberof google.protobuf.MethodOptions
|
34092 | * @static
|
34093 | * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode
|
34094 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
34095 | * @returns {$protobuf.Writer} Writer
|
34096 | */
|
34097 | MethodOptions.encodeDelimited = function encodeDelimited(message, writer) {
|
34098 | return this.encode(message, writer).ldelim();
|
34099 | };
|
34100 |
|
34101 | /**
|
34102 | * Decodes a MethodOptions message from the specified reader or buffer.
|
34103 | * @function decode
|
34104 | * @memberof google.protobuf.MethodOptions
|
34105 | * @static
|
34106 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
34107 | * @param {number} [length] Message length if known beforehand
|
34108 | * @returns {google.protobuf.MethodOptions} MethodOptions
|
34109 | * @throws {Error} If the payload is not a reader or valid buffer
|
34110 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
34111 | */
|
34112 | MethodOptions.decode = function decode(reader, length) {
|
34113 | if (!(reader instanceof $Reader))
|
34114 | reader = $Reader.create(reader);
|
34115 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions();
|
34116 | while (reader.pos < end) {
|
34117 | var tag = reader.uint32();
|
34118 | switch (tag >>> 3) {
|
34119 | case 33: {
|
34120 | message.deprecated = reader.bool();
|
34121 | break;
|
34122 | }
|
34123 | case 34: {
|
34124 | message.idempotencyLevel = reader.int32();
|
34125 | break;
|
34126 | }
|
34127 | case 35: {
|
34128 | message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
|
34129 | break;
|
34130 | }
|
34131 | case 999: {
|
34132 | if (!(message.uninterpretedOption && message.uninterpretedOption.length))
|
34133 | message.uninterpretedOption = [];
|
34134 | message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
|
34135 | break;
|
34136 | }
|
34137 | case 72295728: {
|
34138 | message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32());
|
34139 | break;
|
34140 | }
|
34141 | case 1051: {
|
34142 | if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length))
|
34143 | message[".google.api.methodSignature"] = [];
|
34144 | message[".google.api.methodSignature"].push(reader.string());
|
34145 | break;
|
34146 | }
|
34147 | case 1049: {
|
34148 | message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32());
|
34149 | break;
|
34150 | }
|
34151 | case 72295729: {
|
34152 | message[".google.api.routing"] = $root.google.api.RoutingRule.decode(reader, reader.uint32());
|
34153 | break;
|
34154 | }
|
34155 | default:
|
34156 | reader.skipType(tag & 7);
|
34157 | break;
|
34158 | }
|
34159 | }
|
34160 | return message;
|
34161 | };
|
34162 |
|
34163 | /**
|
34164 | * Decodes a MethodOptions message from the specified reader or buffer, length delimited.
|
34165 | * @function decodeDelimited
|
34166 | * @memberof google.protobuf.MethodOptions
|
34167 | * @static
|
34168 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
34169 | * @returns {google.protobuf.MethodOptions} MethodOptions
|
34170 | * @throws {Error} If the payload is not a reader or valid buffer
|
34171 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
34172 | */
|
34173 | MethodOptions.decodeDelimited = function decodeDelimited(reader) {
|
34174 | if (!(reader instanceof $Reader))
|
34175 | reader = new $Reader(reader);
|
34176 | return this.decode(reader, reader.uint32());
|
34177 | };
|
34178 |
|
34179 | /**
|
34180 | * Verifies a MethodOptions message.
|
34181 | * @function verify
|
34182 | * @memberof google.protobuf.MethodOptions
|
34183 | * @static
|
34184 | * @param {Object.<string,*>} message Plain object to verify
|
34185 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
34186 | */
|
34187 | MethodOptions.verify = function verify(message) {
|
34188 | if (typeof message !== "object" || message === null)
|
34189 | return "object expected";
|
34190 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
34191 | if (typeof message.deprecated !== "boolean")
|
34192 | return "deprecated: boolean expected";
|
34193 | if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel"))
|
34194 | switch (message.idempotencyLevel) {
|
34195 | default:
|
34196 | return "idempotencyLevel: enum value expected";
|
34197 | case 0:
|
34198 | case 1:
|
34199 | case 2:
|
34200 | break;
|
34201 | }
|
34202 | if (message.features != null && message.hasOwnProperty("features")) {
|
34203 | var error = $root.google.protobuf.FeatureSet.verify(message.features);
|
34204 | if (error)
|
34205 | return "features." + error;
|
34206 | }
|
34207 | if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
|
34208 | if (!Array.isArray(message.uninterpretedOption))
|
34209 | return "uninterpretedOption: array expected";
|
34210 | for (var i = 0; i < message.uninterpretedOption.length; ++i) {
|
34211 | var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
|
34212 | if (error)
|
34213 | return "uninterpretedOption." + error;
|
34214 | }
|
34215 | }
|
34216 | if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) {
|
34217 | var error = $root.google.api.HttpRule.verify(message[".google.api.http"]);
|
34218 | if (error)
|
34219 | return ".google.api.http." + error;
|
34220 | }
|
34221 | if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) {
|
34222 | if (!Array.isArray(message[".google.api.methodSignature"]))
|
34223 | return ".google.api.methodSignature: array expected";
|
34224 | for (var i = 0; i < message[".google.api.methodSignature"].length; ++i)
|
34225 | if (!$util.isString(message[".google.api.methodSignature"][i]))
|
34226 | return ".google.api.methodSignature: string[] expected";
|
34227 | }
|
34228 | if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) {
|
34229 | var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]);
|
34230 | if (error)
|
34231 | return ".google.longrunning.operationInfo." + error;
|
34232 | }
|
34233 | if (message[".google.api.routing"] != null && message.hasOwnProperty(".google.api.routing")) {
|
34234 | var error = $root.google.api.RoutingRule.verify(message[".google.api.routing"]);
|
34235 | if (error)
|
34236 | return ".google.api.routing." + error;
|
34237 | }
|
34238 | return null;
|
34239 | };
|
34240 |
|
34241 | /**
|
34242 | * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types.
|
34243 | * @function fromObject
|
34244 | * @memberof google.protobuf.MethodOptions
|
34245 | * @static
|
34246 | * @param {Object.<string,*>} object Plain object
|
34247 | * @returns {google.protobuf.MethodOptions} MethodOptions
|
34248 | */
|
34249 | MethodOptions.fromObject = function fromObject(object) {
|
34250 | if (object instanceof $root.google.protobuf.MethodOptions)
|
34251 | return object;
|
34252 | var message = new $root.google.protobuf.MethodOptions();
|
34253 | if (object.deprecated != null)
|
34254 | message.deprecated = Boolean(object.deprecated);
|
34255 | switch (object.idempotencyLevel) {
|
34256 | default:
|
34257 | if (typeof object.idempotencyLevel === "number") {
|
34258 | message.idempotencyLevel = object.idempotencyLevel;
|
34259 | break;
|
34260 | }
|
34261 | break;
|
34262 | case "IDEMPOTENCY_UNKNOWN":
|
34263 | case 0:
|
34264 | message.idempotencyLevel = 0;
|
34265 | break;
|
34266 | case "NO_SIDE_EFFECTS":
|
34267 | case 1:
|
34268 | message.idempotencyLevel = 1;
|
34269 | break;
|
34270 | case "IDEMPOTENT":
|
34271 | case 2:
|
34272 | message.idempotencyLevel = 2;
|
34273 | break;
|
34274 | }
|
34275 | if (object.features != null) {
|
34276 | if (typeof object.features !== "object")
|
34277 | throw TypeError(".google.protobuf.MethodOptions.features: object expected");
|
34278 | message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
|
34279 | }
|
34280 | if (object.uninterpretedOption) {
|
34281 | if (!Array.isArray(object.uninterpretedOption))
|
34282 | throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected");
|
34283 | message.uninterpretedOption = [];
|
34284 | for (var i = 0; i < object.uninterpretedOption.length; ++i) {
|
34285 | if (typeof object.uninterpretedOption[i] !== "object")
|
34286 | throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected");
|
34287 | message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
|
34288 | }
|
34289 | }
|
34290 | if (object[".google.api.http"] != null) {
|
34291 | if (typeof object[".google.api.http"] !== "object")
|
34292 | throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected");
|
34293 | message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]);
|
34294 | }
|
34295 | if (object[".google.api.methodSignature"]) {
|
34296 | if (!Array.isArray(object[".google.api.methodSignature"]))
|
34297 | throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected");
|
34298 | message[".google.api.methodSignature"] = [];
|
34299 | for (var i = 0; i < object[".google.api.methodSignature"].length; ++i)
|
34300 | message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]);
|
34301 | }
|
34302 | if (object[".google.longrunning.operationInfo"] != null) {
|
34303 | if (typeof object[".google.longrunning.operationInfo"] !== "object")
|
34304 | throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected");
|
34305 | message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]);
|
34306 | }
|
34307 | if (object[".google.api.routing"] != null) {
|
34308 | if (typeof object[".google.api.routing"] !== "object")
|
34309 | throw TypeError(".google.protobuf.MethodOptions..google.api.routing: object expected");
|
34310 | message[".google.api.routing"] = $root.google.api.RoutingRule.fromObject(object[".google.api.routing"]);
|
34311 | }
|
34312 | return message;
|
34313 | };
|
34314 |
|
34315 | /**
|
34316 | * Creates a plain object from a MethodOptions message. Also converts values to other types if specified.
|
34317 | * @function toObject
|
34318 | * @memberof google.protobuf.MethodOptions
|
34319 | * @static
|
34320 | * @param {google.protobuf.MethodOptions} message MethodOptions
|
34321 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
34322 | * @returns {Object.<string,*>} Plain object
|
34323 | */
|
34324 | MethodOptions.toObject = function toObject(message, options) {
|
34325 | if (!options)
|
34326 | options = {};
|
34327 | var object = {};
|
34328 | if (options.arrays || options.defaults) {
|
34329 | object.uninterpretedOption = [];
|
34330 | object[".google.api.methodSignature"] = [];
|
34331 | }
|
34332 | if (options.defaults) {
|
34333 | object.deprecated = false;
|
34334 | object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0;
|
34335 | object.features = null;
|
34336 | object[".google.longrunning.operationInfo"] = null;
|
34337 | object[".google.api.http"] = null;
|
34338 | object[".google.api.routing"] = null;
|
34339 | }
|
34340 | if (message.deprecated != null && message.hasOwnProperty("deprecated"))
|
34341 | object.deprecated = message.deprecated;
|
34342 | if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel"))
|
34343 | object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel;
|
34344 | if (message.features != null && message.hasOwnProperty("features"))
|
34345 | object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
|
34346 | if (message.uninterpretedOption && message.uninterpretedOption.length) {
|
34347 | object.uninterpretedOption = [];
|
34348 | for (var j = 0; j < message.uninterpretedOption.length; ++j)
|
34349 | object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
|
34350 | }
|
34351 | if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo"))
|
34352 | object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options);
|
34353 | if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) {
|
34354 | object[".google.api.methodSignature"] = [];
|
34355 | for (var j = 0; j < message[".google.api.methodSignature"].length; ++j)
|
34356 | object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j];
|
34357 | }
|
34358 | if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http"))
|
34359 | object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options);
|
34360 | if (message[".google.api.routing"] != null && message.hasOwnProperty(".google.api.routing"))
|
34361 | object[".google.api.routing"] = $root.google.api.RoutingRule.toObject(message[".google.api.routing"], options);
|
34362 | return object;
|
34363 | };
|
34364 |
|
34365 | /**
|
34366 | * Converts this MethodOptions to JSON.
|
34367 | * @function toJSON
|
34368 | * @memberof google.protobuf.MethodOptions
|
34369 | * @instance
|
34370 | * @returns {Object.<string,*>} JSON object
|
34371 | */
|
34372 | MethodOptions.prototype.toJSON = function toJSON() {
|
34373 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
34374 | };
|
34375 |
|
34376 | /**
|
34377 | * Gets the default type url for MethodOptions
|
34378 | * @function getTypeUrl
|
34379 | * @memberof google.protobuf.MethodOptions
|
34380 | * @static
|
34381 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
34382 | * @returns {string} The default type url
|
34383 | */
|
34384 | MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
34385 | if (typeUrlPrefix === undefined) {
|
34386 | typeUrlPrefix = "type.googleapis.com";
|
34387 | }
|
34388 | return typeUrlPrefix + "/google.protobuf.MethodOptions";
|
34389 | };
|
34390 |
|
34391 | /**
|
34392 | * IdempotencyLevel enum.
|
34393 | * @name google.protobuf.MethodOptions.IdempotencyLevel
|
34394 | * @enum {number}
|
34395 | * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value
|
34396 | * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value
|
34397 | * @property {number} IDEMPOTENT=2 IDEMPOTENT value
|
34398 | */
|
34399 | MethodOptions.IdempotencyLevel = (function() {
|
34400 | var valuesById = {}, values = Object.create(valuesById);
|
34401 | values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0;
|
34402 | values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1;
|
34403 | values[valuesById[2] = "IDEMPOTENT"] = 2;
|
34404 | return values;
|
34405 | })();
|
34406 |
|
34407 | return MethodOptions;
|
34408 | })();
|
34409 |
|
34410 | protobuf.UninterpretedOption = (function() {
|
34411 |
|
34412 | /**
|
34413 | * Properties of an UninterpretedOption.
|
34414 | * @memberof google.protobuf
|
34415 | * @interface IUninterpretedOption
|
34416 | * @property {Array.<google.protobuf.UninterpretedOption.INamePart>|null} [name] UninterpretedOption name
|
34417 | * @property {string|null} [identifierValue] UninterpretedOption identifierValue
|
34418 | * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue
|
34419 | * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue
|
34420 | * @property {number|null} [doubleValue] UninterpretedOption doubleValue
|
34421 | * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue
|
34422 | * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue
|
34423 | */
|
34424 |
|
34425 | /**
|
34426 | * Constructs a new UninterpretedOption.
|
34427 | * @memberof google.protobuf
|
34428 | * @classdesc Represents an UninterpretedOption.
|
34429 | * @implements IUninterpretedOption
|
34430 | * @constructor
|
34431 | * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set
|
34432 | */
|
34433 | function UninterpretedOption(properties) {
|
34434 | this.name = [];
|
34435 | if (properties)
|
34436 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
34437 | if (properties[keys[i]] != null)
|
34438 | this[keys[i]] = properties[keys[i]];
|
34439 | }
|
34440 |
|
34441 | /**
|
34442 | * UninterpretedOption name.
|
34443 | * @member {Array.<google.protobuf.UninterpretedOption.INamePart>} name
|
34444 | * @memberof google.protobuf.UninterpretedOption
|
34445 | * @instance
|
34446 | */
|
34447 | UninterpretedOption.prototype.name = $util.emptyArray;
|
34448 |
|
34449 | /**
|
34450 | * UninterpretedOption identifierValue.
|
34451 | * @member {string} identifierValue
|
34452 | * @memberof google.protobuf.UninterpretedOption
|
34453 | * @instance
|
34454 | */
|
34455 | UninterpretedOption.prototype.identifierValue = "";
|
34456 |
|
34457 | /**
|
34458 | * UninterpretedOption positiveIntValue.
|
34459 | * @member {number|Long} positiveIntValue
|
34460 | * @memberof google.protobuf.UninterpretedOption
|
34461 | * @instance
|
34462 | */
|
34463 | UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
34464 |
|
34465 | /**
|
34466 | * UninterpretedOption negativeIntValue.
|
34467 | * @member {number|Long} negativeIntValue
|
34468 | * @memberof google.protobuf.UninterpretedOption
|
34469 | * @instance
|
34470 | */
|
34471 | UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
34472 |
|
34473 | /**
|
34474 | * UninterpretedOption doubleValue.
|
34475 | * @member {number} doubleValue
|
34476 | * @memberof google.protobuf.UninterpretedOption
|
34477 | * @instance
|
34478 | */
|
34479 | UninterpretedOption.prototype.doubleValue = 0;
|
34480 |
|
34481 | /**
|
34482 | * UninterpretedOption stringValue.
|
34483 | * @member {Uint8Array} stringValue
|
34484 | * @memberof google.protobuf.UninterpretedOption
|
34485 | * @instance
|
34486 | */
|
34487 | UninterpretedOption.prototype.stringValue = $util.newBuffer([]);
|
34488 |
|
34489 | /**
|
34490 | * UninterpretedOption aggregateValue.
|
34491 | * @member {string} aggregateValue
|
34492 | * @memberof google.protobuf.UninterpretedOption
|
34493 | * @instance
|
34494 | */
|
34495 | UninterpretedOption.prototype.aggregateValue = "";
|
34496 |
|
34497 | /**
|
34498 | * Creates a new UninterpretedOption instance using the specified properties.
|
34499 | * @function create
|
34500 | * @memberof google.protobuf.UninterpretedOption
|
34501 | * @static
|
34502 | * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set
|
34503 | * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance
|
34504 | */
|
34505 | UninterpretedOption.create = function create(properties) {
|
34506 | return new UninterpretedOption(properties);
|
34507 | };
|
34508 |
|
34509 | /**
|
34510 | * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages.
|
34511 | * @function encode
|
34512 | * @memberof google.protobuf.UninterpretedOption
|
34513 | * @static
|
34514 | * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode
|
34515 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
34516 | * @returns {$protobuf.Writer} Writer
|
34517 | */
|
34518 | UninterpretedOption.encode = function encode(message, writer) {
|
34519 | if (!writer)
|
34520 | writer = $Writer.create();
|
34521 | if (message.name != null && message.name.length)
|
34522 | for (var i = 0; i < message.name.length; ++i)
|
34523 | $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
34524 | if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue"))
|
34525 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue);
|
34526 | if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue"))
|
34527 | writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue);
|
34528 | if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue"))
|
34529 | writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue);
|
34530 | if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue"))
|
34531 | writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue);
|
34532 | if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue"))
|
34533 | writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue);
|
34534 | if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue"))
|
34535 | writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue);
|
34536 | return writer;
|
34537 | };
|
34538 |
|
34539 | /**
|
34540 | * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages.
|
34541 | * @function encodeDelimited
|
34542 | * @memberof google.protobuf.UninterpretedOption
|
34543 | * @static
|
34544 | * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode
|
34545 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
34546 | * @returns {$protobuf.Writer} Writer
|
34547 | */
|
34548 | UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) {
|
34549 | return this.encode(message, writer).ldelim();
|
34550 | };
|
34551 |
|
34552 | /**
|
34553 | * Decodes an UninterpretedOption message from the specified reader or buffer.
|
34554 | * @function decode
|
34555 | * @memberof google.protobuf.UninterpretedOption
|
34556 | * @static
|
34557 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
34558 | * @param {number} [length] Message length if known beforehand
|
34559 | * @returns {google.protobuf.UninterpretedOption} UninterpretedOption
|
34560 | * @throws {Error} If the payload is not a reader or valid buffer
|
34561 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
34562 | */
|
34563 | UninterpretedOption.decode = function decode(reader, length) {
|
34564 | if (!(reader instanceof $Reader))
|
34565 | reader = $Reader.create(reader);
|
34566 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption();
|
34567 | while (reader.pos < end) {
|
34568 | var tag = reader.uint32();
|
34569 | switch (tag >>> 3) {
|
34570 | case 2: {
|
34571 | if (!(message.name && message.name.length))
|
34572 | message.name = [];
|
34573 | message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32()));
|
34574 | break;
|
34575 | }
|
34576 | case 3: {
|
34577 | message.identifierValue = reader.string();
|
34578 | break;
|
34579 | }
|
34580 | case 4: {
|
34581 | message.positiveIntValue = reader.uint64();
|
34582 | break;
|
34583 | }
|
34584 | case 5: {
|
34585 | message.negativeIntValue = reader.int64();
|
34586 | break;
|
34587 | }
|
34588 | case 6: {
|
34589 | message.doubleValue = reader.double();
|
34590 | break;
|
34591 | }
|
34592 | case 7: {
|
34593 | message.stringValue = reader.bytes();
|
34594 | break;
|
34595 | }
|
34596 | case 8: {
|
34597 | message.aggregateValue = reader.string();
|
34598 | break;
|
34599 | }
|
34600 | default:
|
34601 | reader.skipType(tag & 7);
|
34602 | break;
|
34603 | }
|
34604 | }
|
34605 | return message;
|
34606 | };
|
34607 |
|
34608 | /**
|
34609 | * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited.
|
34610 | * @function decodeDelimited
|
34611 | * @memberof google.protobuf.UninterpretedOption
|
34612 | * @static
|
34613 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
34614 | * @returns {google.protobuf.UninterpretedOption} UninterpretedOption
|
34615 | * @throws {Error} If the payload is not a reader or valid buffer
|
34616 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
34617 | */
|
34618 | UninterpretedOption.decodeDelimited = function decodeDelimited(reader) {
|
34619 | if (!(reader instanceof $Reader))
|
34620 | reader = new $Reader(reader);
|
34621 | return this.decode(reader, reader.uint32());
|
34622 | };
|
34623 |
|
34624 | /**
|
34625 | * Verifies an UninterpretedOption message.
|
34626 | * @function verify
|
34627 | * @memberof google.protobuf.UninterpretedOption
|
34628 | * @static
|
34629 | * @param {Object.<string,*>} message Plain object to verify
|
34630 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
34631 | */
|
34632 | UninterpretedOption.verify = function verify(message) {
|
34633 | if (typeof message !== "object" || message === null)
|
34634 | return "object expected";
|
34635 | if (message.name != null && message.hasOwnProperty("name")) {
|
34636 | if (!Array.isArray(message.name))
|
34637 | return "name: array expected";
|
34638 | for (var i = 0; i < message.name.length; ++i) {
|
34639 | var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]);
|
34640 | if (error)
|
34641 | return "name." + error;
|
34642 | }
|
34643 | }
|
34644 | if (message.identifierValue != null && message.hasOwnProperty("identifierValue"))
|
34645 | if (!$util.isString(message.identifierValue))
|
34646 | return "identifierValue: string expected";
|
34647 | if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue"))
|
34648 | if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high)))
|
34649 | return "positiveIntValue: integer|Long expected";
|
34650 | if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue"))
|
34651 | if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high)))
|
34652 | return "negativeIntValue: integer|Long expected";
|
34653 | if (message.doubleValue != null && message.hasOwnProperty("doubleValue"))
|
34654 | if (typeof message.doubleValue !== "number")
|
34655 | return "doubleValue: number expected";
|
34656 | if (message.stringValue != null && message.hasOwnProperty("stringValue"))
|
34657 | if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue)))
|
34658 | return "stringValue: buffer expected";
|
34659 | if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue"))
|
34660 | if (!$util.isString(message.aggregateValue))
|
34661 | return "aggregateValue: string expected";
|
34662 | return null;
|
34663 | };
|
34664 |
|
34665 | /**
|
34666 | * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types.
|
34667 | * @function fromObject
|
34668 | * @memberof google.protobuf.UninterpretedOption
|
34669 | * @static
|
34670 | * @param {Object.<string,*>} object Plain object
|
34671 | * @returns {google.protobuf.UninterpretedOption} UninterpretedOption
|
34672 | */
|
34673 | UninterpretedOption.fromObject = function fromObject(object) {
|
34674 | if (object instanceof $root.google.protobuf.UninterpretedOption)
|
34675 | return object;
|
34676 | var message = new $root.google.protobuf.UninterpretedOption();
|
34677 | if (object.name) {
|
34678 | if (!Array.isArray(object.name))
|
34679 | throw TypeError(".google.protobuf.UninterpretedOption.name: array expected");
|
34680 | message.name = [];
|
34681 | for (var i = 0; i < object.name.length; ++i) {
|
34682 | if (typeof object.name[i] !== "object")
|
34683 | throw TypeError(".google.protobuf.UninterpretedOption.name: object expected");
|
34684 | message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]);
|
34685 | }
|
34686 | }
|
34687 | if (object.identifierValue != null)
|
34688 | message.identifierValue = String(object.identifierValue);
|
34689 | if (object.positiveIntValue != null)
|
34690 | if ($util.Long)
|
34691 | (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true;
|
34692 | else if (typeof object.positiveIntValue === "string")
|
34693 | message.positiveIntValue = parseInt(object.positiveIntValue, 10);
|
34694 | else if (typeof object.positiveIntValue === "number")
|
34695 | message.positiveIntValue = object.positiveIntValue;
|
34696 | else if (typeof object.positiveIntValue === "object")
|
34697 | message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true);
|
34698 | if (object.negativeIntValue != null)
|
34699 | if ($util.Long)
|
34700 | (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false;
|
34701 | else if (typeof object.negativeIntValue === "string")
|
34702 | message.negativeIntValue = parseInt(object.negativeIntValue, 10);
|
34703 | else if (typeof object.negativeIntValue === "number")
|
34704 | message.negativeIntValue = object.negativeIntValue;
|
34705 | else if (typeof object.negativeIntValue === "object")
|
34706 | message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber();
|
34707 | if (object.doubleValue != null)
|
34708 | message.doubleValue = Number(object.doubleValue);
|
34709 | if (object.stringValue != null)
|
34710 | if (typeof object.stringValue === "string")
|
34711 | $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0);
|
34712 | else if (object.stringValue.length >= 0)
|
34713 | message.stringValue = object.stringValue;
|
34714 | if (object.aggregateValue != null)
|
34715 | message.aggregateValue = String(object.aggregateValue);
|
34716 | return message;
|
34717 | };
|
34718 |
|
34719 | /**
|
34720 | * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified.
|
34721 | * @function toObject
|
34722 | * @memberof google.protobuf.UninterpretedOption
|
34723 | * @static
|
34724 | * @param {google.protobuf.UninterpretedOption} message UninterpretedOption
|
34725 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
34726 | * @returns {Object.<string,*>} Plain object
|
34727 | */
|
34728 | UninterpretedOption.toObject = function toObject(message, options) {
|
34729 | if (!options)
|
34730 | options = {};
|
34731 | var object = {};
|
34732 | if (options.arrays || options.defaults)
|
34733 | object.name = [];
|
34734 | if (options.defaults) {
|
34735 | object.identifierValue = "";
|
34736 | if ($util.Long) {
|
34737 | var long = new $util.Long(0, 0, true);
|
34738 | object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
34739 | } else
|
34740 | object.positiveIntValue = options.longs === String ? "0" : 0;
|
34741 | if ($util.Long) {
|
34742 | var long = new $util.Long(0, 0, false);
|
34743 | object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
34744 | } else
|
34745 | object.negativeIntValue = options.longs === String ? "0" : 0;
|
34746 | object.doubleValue = 0;
|
34747 | if (options.bytes === String)
|
34748 | object.stringValue = "";
|
34749 | else {
|
34750 | object.stringValue = [];
|
34751 | if (options.bytes !== Array)
|
34752 | object.stringValue = $util.newBuffer(object.stringValue);
|
34753 | }
|
34754 | object.aggregateValue = "";
|
34755 | }
|
34756 | if (message.name && message.name.length) {
|
34757 | object.name = [];
|
34758 | for (var j = 0; j < message.name.length; ++j)
|
34759 | object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options);
|
34760 | }
|
34761 | if (message.identifierValue != null && message.hasOwnProperty("identifierValue"))
|
34762 | object.identifierValue = message.identifierValue;
|
34763 | if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue"))
|
34764 | if (typeof message.positiveIntValue === "number")
|
34765 | object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue;
|
34766 | else
|
34767 | object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue;
|
34768 | if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue"))
|
34769 | if (typeof message.negativeIntValue === "number")
|
34770 | object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue;
|
34771 | else
|
34772 | object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue;
|
34773 | if (message.doubleValue != null && message.hasOwnProperty("doubleValue"))
|
34774 | object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue;
|
34775 | if (message.stringValue != null && message.hasOwnProperty("stringValue"))
|
34776 | object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue;
|
34777 | if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue"))
|
34778 | object.aggregateValue = message.aggregateValue;
|
34779 | return object;
|
34780 | };
|
34781 |
|
34782 | /**
|
34783 | * Converts this UninterpretedOption to JSON.
|
34784 | * @function toJSON
|
34785 | * @memberof google.protobuf.UninterpretedOption
|
34786 | * @instance
|
34787 | * @returns {Object.<string,*>} JSON object
|
34788 | */
|
34789 | UninterpretedOption.prototype.toJSON = function toJSON() {
|
34790 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
34791 | };
|
34792 |
|
34793 | /**
|
34794 | * Gets the default type url for UninterpretedOption
|
34795 | * @function getTypeUrl
|
34796 | * @memberof google.protobuf.UninterpretedOption
|
34797 | * @static
|
34798 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
34799 | * @returns {string} The default type url
|
34800 | */
|
34801 | UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
34802 | if (typeUrlPrefix === undefined) {
|
34803 | typeUrlPrefix = "type.googleapis.com";
|
34804 | }
|
34805 | return typeUrlPrefix + "/google.protobuf.UninterpretedOption";
|
34806 | };
|
34807 |
|
34808 | UninterpretedOption.NamePart = (function() {
|
34809 |
|
34810 | /**
|
34811 | * Properties of a NamePart.
|
34812 | * @memberof google.protobuf.UninterpretedOption
|
34813 | * @interface INamePart
|
34814 | * @property {string} namePart NamePart namePart
|
34815 | * @property {boolean} isExtension NamePart isExtension
|
34816 | */
|
34817 |
|
34818 | /**
|
34819 | * Constructs a new NamePart.
|
34820 | * @memberof google.protobuf.UninterpretedOption
|
34821 | * @classdesc Represents a NamePart.
|
34822 | * @implements INamePart
|
34823 | * @constructor
|
34824 | * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set
|
34825 | */
|
34826 | function NamePart(properties) {
|
34827 | if (properties)
|
34828 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
34829 | if (properties[keys[i]] != null)
|
34830 | this[keys[i]] = properties[keys[i]];
|
34831 | }
|
34832 |
|
34833 | /**
|
34834 | * NamePart namePart.
|
34835 | * @member {string} namePart
|
34836 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
34837 | * @instance
|
34838 | */
|
34839 | NamePart.prototype.namePart = "";
|
34840 |
|
34841 | /**
|
34842 | * NamePart isExtension.
|
34843 | * @member {boolean} isExtension
|
34844 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
34845 | * @instance
|
34846 | */
|
34847 | NamePart.prototype.isExtension = false;
|
34848 |
|
34849 | /**
|
34850 | * Creates a new NamePart instance using the specified properties.
|
34851 | * @function create
|
34852 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
34853 | * @static
|
34854 | * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set
|
34855 | * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance
|
34856 | */
|
34857 | NamePart.create = function create(properties) {
|
34858 | return new NamePart(properties);
|
34859 | };
|
34860 |
|
34861 | /**
|
34862 | * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages.
|
34863 | * @function encode
|
34864 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
34865 | * @static
|
34866 | * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode
|
34867 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
34868 | * @returns {$protobuf.Writer} Writer
|
34869 | */
|
34870 | NamePart.encode = function encode(message, writer) {
|
34871 | if (!writer)
|
34872 | writer = $Writer.create();
|
34873 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart);
|
34874 | writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension);
|
34875 | return writer;
|
34876 | };
|
34877 |
|
34878 | /**
|
34879 | * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages.
|
34880 | * @function encodeDelimited
|
34881 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
34882 | * @static
|
34883 | * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode
|
34884 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
34885 | * @returns {$protobuf.Writer} Writer
|
34886 | */
|
34887 | NamePart.encodeDelimited = function encodeDelimited(message, writer) {
|
34888 | return this.encode(message, writer).ldelim();
|
34889 | };
|
34890 |
|
34891 | /**
|
34892 | * Decodes a NamePart message from the specified reader or buffer.
|
34893 | * @function decode
|
34894 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
34895 | * @static
|
34896 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
34897 | * @param {number} [length] Message length if known beforehand
|
34898 | * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart
|
34899 | * @throws {Error} If the payload is not a reader or valid buffer
|
34900 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
34901 | */
|
34902 | NamePart.decode = function decode(reader, length) {
|
34903 | if (!(reader instanceof $Reader))
|
34904 | reader = $Reader.create(reader);
|
34905 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart();
|
34906 | while (reader.pos < end) {
|
34907 | var tag = reader.uint32();
|
34908 | switch (tag >>> 3) {
|
34909 | case 1: {
|
34910 | message.namePart = reader.string();
|
34911 | break;
|
34912 | }
|
34913 | case 2: {
|
34914 | message.isExtension = reader.bool();
|
34915 | break;
|
34916 | }
|
34917 | default:
|
34918 | reader.skipType(tag & 7);
|
34919 | break;
|
34920 | }
|
34921 | }
|
34922 | if (!message.hasOwnProperty("namePart"))
|
34923 | throw $util.ProtocolError("missing required 'namePart'", { instance: message });
|
34924 | if (!message.hasOwnProperty("isExtension"))
|
34925 | throw $util.ProtocolError("missing required 'isExtension'", { instance: message });
|
34926 | return message;
|
34927 | };
|
34928 |
|
34929 | /**
|
34930 | * Decodes a NamePart message from the specified reader or buffer, length delimited.
|
34931 | * @function decodeDelimited
|
34932 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
34933 | * @static
|
34934 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
34935 | * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart
|
34936 | * @throws {Error} If the payload is not a reader or valid buffer
|
34937 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
34938 | */
|
34939 | NamePart.decodeDelimited = function decodeDelimited(reader) {
|
34940 | if (!(reader instanceof $Reader))
|
34941 | reader = new $Reader(reader);
|
34942 | return this.decode(reader, reader.uint32());
|
34943 | };
|
34944 |
|
34945 | /**
|
34946 | * Verifies a NamePart message.
|
34947 | * @function verify
|
34948 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
34949 | * @static
|
34950 | * @param {Object.<string,*>} message Plain object to verify
|
34951 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
34952 | */
|
34953 | NamePart.verify = function verify(message) {
|
34954 | if (typeof message !== "object" || message === null)
|
34955 | return "object expected";
|
34956 | if (!$util.isString(message.namePart))
|
34957 | return "namePart: string expected";
|
34958 | if (typeof message.isExtension !== "boolean")
|
34959 | return "isExtension: boolean expected";
|
34960 | return null;
|
34961 | };
|
34962 |
|
34963 | /**
|
34964 | * Creates a NamePart message from a plain object. Also converts values to their respective internal types.
|
34965 | * @function fromObject
|
34966 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
34967 | * @static
|
34968 | * @param {Object.<string,*>} object Plain object
|
34969 | * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart
|
34970 | */
|
34971 | NamePart.fromObject = function fromObject(object) {
|
34972 | if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart)
|
34973 | return object;
|
34974 | var message = new $root.google.protobuf.UninterpretedOption.NamePart();
|
34975 | if (object.namePart != null)
|
34976 | message.namePart = String(object.namePart);
|
34977 | if (object.isExtension != null)
|
34978 | message.isExtension = Boolean(object.isExtension);
|
34979 | return message;
|
34980 | };
|
34981 |
|
34982 | /**
|
34983 | * Creates a plain object from a NamePart message. Also converts values to other types if specified.
|
34984 | * @function toObject
|
34985 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
34986 | * @static
|
34987 | * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart
|
34988 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
34989 | * @returns {Object.<string,*>} Plain object
|
34990 | */
|
34991 | NamePart.toObject = function toObject(message, options) {
|
34992 | if (!options)
|
34993 | options = {};
|
34994 | var object = {};
|
34995 | if (options.defaults) {
|
34996 | object.namePart = "";
|
34997 | object.isExtension = false;
|
34998 | }
|
34999 | if (message.namePart != null && message.hasOwnProperty("namePart"))
|
35000 | object.namePart = message.namePart;
|
35001 | if (message.isExtension != null && message.hasOwnProperty("isExtension"))
|
35002 | object.isExtension = message.isExtension;
|
35003 | return object;
|
35004 | };
|
35005 |
|
35006 | /**
|
35007 | * Converts this NamePart to JSON.
|
35008 | * @function toJSON
|
35009 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
35010 | * @instance
|
35011 | * @returns {Object.<string,*>} JSON object
|
35012 | */
|
35013 | NamePart.prototype.toJSON = function toJSON() {
|
35014 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
35015 | };
|
35016 |
|
35017 | /**
|
35018 | * Gets the default type url for NamePart
|
35019 | * @function getTypeUrl
|
35020 | * @memberof google.protobuf.UninterpretedOption.NamePart
|
35021 | * @static
|
35022 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
35023 | * @returns {string} The default type url
|
35024 | */
|
35025 | NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
35026 | if (typeUrlPrefix === undefined) {
|
35027 | typeUrlPrefix = "type.googleapis.com";
|
35028 | }
|
35029 | return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart";
|
35030 | };
|
35031 |
|
35032 | return NamePart;
|
35033 | })();
|
35034 |
|
35035 | return UninterpretedOption;
|
35036 | })();
|
35037 |
|
35038 | protobuf.FeatureSet = (function() {
|
35039 |
|
35040 | /**
|
35041 | * Properties of a FeatureSet.
|
35042 | * @memberof google.protobuf
|
35043 | * @interface IFeatureSet
|
35044 | * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence
|
35045 | * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType
|
35046 | * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding
|
35047 | * @property {google.protobuf.FeatureSet.StringFieldValidation|null} [stringFieldValidation] FeatureSet stringFieldValidation
|
35048 | * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding
|
35049 | * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat
|
35050 | * @property {google.protobuf.IFeatureSet|null} [rawFeatures] FeatureSet rawFeatures
|
35051 | */
|
35052 |
|
35053 | /**
|
35054 | * Constructs a new FeatureSet.
|
35055 | * @memberof google.protobuf
|
35056 | * @classdesc Represents a FeatureSet.
|
35057 | * @implements IFeatureSet
|
35058 | * @constructor
|
35059 | * @param {google.protobuf.IFeatureSet=} [properties] Properties to set
|
35060 | */
|
35061 | function FeatureSet(properties) {
|
35062 | if (properties)
|
35063 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
35064 | if (properties[keys[i]] != null)
|
35065 | this[keys[i]] = properties[keys[i]];
|
35066 | }
|
35067 |
|
35068 | /**
|
35069 | * FeatureSet fieldPresence.
|
35070 | * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence
|
35071 | * @memberof google.protobuf.FeatureSet
|
35072 | * @instance
|
35073 | */
|
35074 | FeatureSet.prototype.fieldPresence = 0;
|
35075 |
|
35076 | /**
|
35077 | * FeatureSet enumType.
|
35078 | * @member {google.protobuf.FeatureSet.EnumType} enumType
|
35079 | * @memberof google.protobuf.FeatureSet
|
35080 | * @instance
|
35081 | */
|
35082 | FeatureSet.prototype.enumType = 0;
|
35083 |
|
35084 | /**
|
35085 | * FeatureSet repeatedFieldEncoding.
|
35086 | * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding
|
35087 | * @memberof google.protobuf.FeatureSet
|
35088 | * @instance
|
35089 | */
|
35090 | FeatureSet.prototype.repeatedFieldEncoding = 0;
|
35091 |
|
35092 | /**
|
35093 | * FeatureSet stringFieldValidation.
|
35094 | * @member {google.protobuf.FeatureSet.StringFieldValidation} stringFieldValidation
|
35095 | * @memberof google.protobuf.FeatureSet
|
35096 | * @instance
|
35097 | */
|
35098 | FeatureSet.prototype.stringFieldValidation = 0;
|
35099 |
|
35100 | /**
|
35101 | * FeatureSet messageEncoding.
|
35102 | * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding
|
35103 | * @memberof google.protobuf.FeatureSet
|
35104 | * @instance
|
35105 | */
|
35106 | FeatureSet.prototype.messageEncoding = 0;
|
35107 |
|
35108 | /**
|
35109 | * FeatureSet jsonFormat.
|
35110 | * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat
|
35111 | * @memberof google.protobuf.FeatureSet
|
35112 | * @instance
|
35113 | */
|
35114 | FeatureSet.prototype.jsonFormat = 0;
|
35115 |
|
35116 | /**
|
35117 | * FeatureSet rawFeatures.
|
35118 | * @member {google.protobuf.IFeatureSet|null|undefined} rawFeatures
|
35119 | * @memberof google.protobuf.FeatureSet
|
35120 | * @instance
|
35121 | */
|
35122 | FeatureSet.prototype.rawFeatures = null;
|
35123 |
|
35124 | /**
|
35125 | * Creates a new FeatureSet instance using the specified properties.
|
35126 | * @function create
|
35127 | * @memberof google.protobuf.FeatureSet
|
35128 | * @static
|
35129 | * @param {google.protobuf.IFeatureSet=} [properties] Properties to set
|
35130 | * @returns {google.protobuf.FeatureSet} FeatureSet instance
|
35131 | */
|
35132 | FeatureSet.create = function create(properties) {
|
35133 | return new FeatureSet(properties);
|
35134 | };
|
35135 |
|
35136 | /**
|
35137 | * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages.
|
35138 | * @function encode
|
35139 | * @memberof google.protobuf.FeatureSet
|
35140 | * @static
|
35141 | * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode
|
35142 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
35143 | * @returns {$protobuf.Writer} Writer
|
35144 | */
|
35145 | FeatureSet.encode = function encode(message, writer) {
|
35146 | if (!writer)
|
35147 | writer = $Writer.create();
|
35148 | if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence"))
|
35149 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence);
|
35150 | if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType"))
|
35151 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType);
|
35152 | if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding"))
|
35153 | writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding);
|
35154 | if (message.stringFieldValidation != null && Object.hasOwnProperty.call(message, "stringFieldValidation"))
|
35155 | writer.uint32(/* id 4, wireType 0 =*/32).int32(message.stringFieldValidation);
|
35156 | if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding"))
|
35157 | writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding);
|
35158 | if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat"))
|
35159 | writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat);
|
35160 | if (message.rawFeatures != null && Object.hasOwnProperty.call(message, "rawFeatures"))
|
35161 | $root.google.protobuf.FeatureSet.encode(message.rawFeatures, writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
|
35162 | return writer;
|
35163 | };
|
35164 |
|
35165 | /**
|
35166 | * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages.
|
35167 | * @function encodeDelimited
|
35168 | * @memberof google.protobuf.FeatureSet
|
35169 | * @static
|
35170 | * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode
|
35171 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
35172 | * @returns {$protobuf.Writer} Writer
|
35173 | */
|
35174 | FeatureSet.encodeDelimited = function encodeDelimited(message, writer) {
|
35175 | return this.encode(message, writer).ldelim();
|
35176 | };
|
35177 |
|
35178 | /**
|
35179 | * Decodes a FeatureSet message from the specified reader or buffer.
|
35180 | * @function decode
|
35181 | * @memberof google.protobuf.FeatureSet
|
35182 | * @static
|
35183 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
35184 | * @param {number} [length] Message length if known beforehand
|
35185 | * @returns {google.protobuf.FeatureSet} FeatureSet
|
35186 | * @throws {Error} If the payload is not a reader or valid buffer
|
35187 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
35188 | */
|
35189 | FeatureSet.decode = function decode(reader, length) {
|
35190 | if (!(reader instanceof $Reader))
|
35191 | reader = $Reader.create(reader);
|
35192 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet();
|
35193 | while (reader.pos < end) {
|
35194 | var tag = reader.uint32();
|
35195 | switch (tag >>> 3) {
|
35196 | case 1: {
|
35197 | message.fieldPresence = reader.int32();
|
35198 | break;
|
35199 | }
|
35200 | case 2: {
|
35201 | message.enumType = reader.int32();
|
35202 | break;
|
35203 | }
|
35204 | case 3: {
|
35205 | message.repeatedFieldEncoding = reader.int32();
|
35206 | break;
|
35207 | }
|
35208 | case 4: {
|
35209 | message.stringFieldValidation = reader.int32();
|
35210 | break;
|
35211 | }
|
35212 | case 5: {
|
35213 | message.messageEncoding = reader.int32();
|
35214 | break;
|
35215 | }
|
35216 | case 6: {
|
35217 | message.jsonFormat = reader.int32();
|
35218 | break;
|
35219 | }
|
35220 | case 999: {
|
35221 | message.rawFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
|
35222 | break;
|
35223 | }
|
35224 | default:
|
35225 | reader.skipType(tag & 7);
|
35226 | break;
|
35227 | }
|
35228 | }
|
35229 | return message;
|
35230 | };
|
35231 |
|
35232 | /**
|
35233 | * Decodes a FeatureSet message from the specified reader or buffer, length delimited.
|
35234 | * @function decodeDelimited
|
35235 | * @memberof google.protobuf.FeatureSet
|
35236 | * @static
|
35237 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
35238 | * @returns {google.protobuf.FeatureSet} FeatureSet
|
35239 | * @throws {Error} If the payload is not a reader or valid buffer
|
35240 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
35241 | */
|
35242 | FeatureSet.decodeDelimited = function decodeDelimited(reader) {
|
35243 | if (!(reader instanceof $Reader))
|
35244 | reader = new $Reader(reader);
|
35245 | return this.decode(reader, reader.uint32());
|
35246 | };
|
35247 |
|
35248 | /**
|
35249 | * Verifies a FeatureSet message.
|
35250 | * @function verify
|
35251 | * @memberof google.protobuf.FeatureSet
|
35252 | * @static
|
35253 | * @param {Object.<string,*>} message Plain object to verify
|
35254 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
35255 | */
|
35256 | FeatureSet.verify = function verify(message) {
|
35257 | if (typeof message !== "object" || message === null)
|
35258 | return "object expected";
|
35259 | if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence"))
|
35260 | switch (message.fieldPresence) {
|
35261 | default:
|
35262 | return "fieldPresence: enum value expected";
|
35263 | case 0:
|
35264 | case 1:
|
35265 | case 2:
|
35266 | case 3:
|
35267 | break;
|
35268 | }
|
35269 | if (message.enumType != null && message.hasOwnProperty("enumType"))
|
35270 | switch (message.enumType) {
|
35271 | default:
|
35272 | return "enumType: enum value expected";
|
35273 | case 0:
|
35274 | case 1:
|
35275 | case 2:
|
35276 | break;
|
35277 | }
|
35278 | if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding"))
|
35279 | switch (message.repeatedFieldEncoding) {
|
35280 | default:
|
35281 | return "repeatedFieldEncoding: enum value expected";
|
35282 | case 0:
|
35283 | case 1:
|
35284 | case 2:
|
35285 | break;
|
35286 | }
|
35287 | if (message.stringFieldValidation != null && message.hasOwnProperty("stringFieldValidation"))
|
35288 | switch (message.stringFieldValidation) {
|
35289 | default:
|
35290 | return "stringFieldValidation: enum value expected";
|
35291 | case 0:
|
35292 | case 1:
|
35293 | case 2:
|
35294 | case 3:
|
35295 | break;
|
35296 | }
|
35297 | if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding"))
|
35298 | switch (message.messageEncoding) {
|
35299 | default:
|
35300 | return "messageEncoding: enum value expected";
|
35301 | case 0:
|
35302 | case 1:
|
35303 | case 2:
|
35304 | break;
|
35305 | }
|
35306 | if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat"))
|
35307 | switch (message.jsonFormat) {
|
35308 | default:
|
35309 | return "jsonFormat: enum value expected";
|
35310 | case 0:
|
35311 | case 1:
|
35312 | case 2:
|
35313 | break;
|
35314 | }
|
35315 | if (message.rawFeatures != null && message.hasOwnProperty("rawFeatures")) {
|
35316 | var error = $root.google.protobuf.FeatureSet.verify(message.rawFeatures);
|
35317 | if (error)
|
35318 | return "rawFeatures." + error;
|
35319 | }
|
35320 | return null;
|
35321 | };
|
35322 |
|
35323 | /**
|
35324 | * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types.
|
35325 | * @function fromObject
|
35326 | * @memberof google.protobuf.FeatureSet
|
35327 | * @static
|
35328 | * @param {Object.<string,*>} object Plain object
|
35329 | * @returns {google.protobuf.FeatureSet} FeatureSet
|
35330 | */
|
35331 | FeatureSet.fromObject = function fromObject(object) {
|
35332 | if (object instanceof $root.google.protobuf.FeatureSet)
|
35333 | return object;
|
35334 | var message = new $root.google.protobuf.FeatureSet();
|
35335 | switch (object.fieldPresence) {
|
35336 | default:
|
35337 | if (typeof object.fieldPresence === "number") {
|
35338 | message.fieldPresence = object.fieldPresence;
|
35339 | break;
|
35340 | }
|
35341 | break;
|
35342 | case "FIELD_PRESENCE_UNKNOWN":
|
35343 | case 0:
|
35344 | message.fieldPresence = 0;
|
35345 | break;
|
35346 | case "EXPLICIT":
|
35347 | case 1:
|
35348 | message.fieldPresence = 1;
|
35349 | break;
|
35350 | case "IMPLICIT":
|
35351 | case 2:
|
35352 | message.fieldPresence = 2;
|
35353 | break;
|
35354 | case "LEGACY_REQUIRED":
|
35355 | case 3:
|
35356 | message.fieldPresence = 3;
|
35357 | break;
|
35358 | }
|
35359 | switch (object.enumType) {
|
35360 | default:
|
35361 | if (typeof object.enumType === "number") {
|
35362 | message.enumType = object.enumType;
|
35363 | break;
|
35364 | }
|
35365 | break;
|
35366 | case "ENUM_TYPE_UNKNOWN":
|
35367 | case 0:
|
35368 | message.enumType = 0;
|
35369 | break;
|
35370 | case "OPEN":
|
35371 | case 1:
|
35372 | message.enumType = 1;
|
35373 | break;
|
35374 | case "CLOSED":
|
35375 | case 2:
|
35376 | message.enumType = 2;
|
35377 | break;
|
35378 | }
|
35379 | switch (object.repeatedFieldEncoding) {
|
35380 | default:
|
35381 | if (typeof object.repeatedFieldEncoding === "number") {
|
35382 | message.repeatedFieldEncoding = object.repeatedFieldEncoding;
|
35383 | break;
|
35384 | }
|
35385 | break;
|
35386 | case "REPEATED_FIELD_ENCODING_UNKNOWN":
|
35387 | case 0:
|
35388 | message.repeatedFieldEncoding = 0;
|
35389 | break;
|
35390 | case "PACKED":
|
35391 | case 1:
|
35392 | message.repeatedFieldEncoding = 1;
|
35393 | break;
|
35394 | case "EXPANDED":
|
35395 | case 2:
|
35396 | message.repeatedFieldEncoding = 2;
|
35397 | break;
|
35398 | }
|
35399 | switch (object.stringFieldValidation) {
|
35400 | default:
|
35401 | if (typeof object.stringFieldValidation === "number") {
|
35402 | message.stringFieldValidation = object.stringFieldValidation;
|
35403 | break;
|
35404 | }
|
35405 | break;
|
35406 | case "STRING_FIELD_VALIDATION_UNKNOWN":
|
35407 | case 0:
|
35408 | message.stringFieldValidation = 0;
|
35409 | break;
|
35410 | case "MANDATORY":
|
35411 | case 1:
|
35412 | message.stringFieldValidation = 1;
|
35413 | break;
|
35414 | case "HINT":
|
35415 | case 2:
|
35416 | message.stringFieldValidation = 2;
|
35417 | break;
|
35418 | case "NONE":
|
35419 | case 3:
|
35420 | message.stringFieldValidation = 3;
|
35421 | break;
|
35422 | }
|
35423 | switch (object.messageEncoding) {
|
35424 | default:
|
35425 | if (typeof object.messageEncoding === "number") {
|
35426 | message.messageEncoding = object.messageEncoding;
|
35427 | break;
|
35428 | }
|
35429 | break;
|
35430 | case "MESSAGE_ENCODING_UNKNOWN":
|
35431 | case 0:
|
35432 | message.messageEncoding = 0;
|
35433 | break;
|
35434 | case "LENGTH_PREFIXED":
|
35435 | case 1:
|
35436 | message.messageEncoding = 1;
|
35437 | break;
|
35438 | case "DELIMITED":
|
35439 | case 2:
|
35440 | message.messageEncoding = 2;
|
35441 | break;
|
35442 | }
|
35443 | switch (object.jsonFormat) {
|
35444 | default:
|
35445 | if (typeof object.jsonFormat === "number") {
|
35446 | message.jsonFormat = object.jsonFormat;
|
35447 | break;
|
35448 | }
|
35449 | break;
|
35450 | case "JSON_FORMAT_UNKNOWN":
|
35451 | case 0:
|
35452 | message.jsonFormat = 0;
|
35453 | break;
|
35454 | case "ALLOW":
|
35455 | case 1:
|
35456 | message.jsonFormat = 1;
|
35457 | break;
|
35458 | case "LEGACY_BEST_EFFORT":
|
35459 | case 2:
|
35460 | message.jsonFormat = 2;
|
35461 | break;
|
35462 | }
|
35463 | if (object.rawFeatures != null) {
|
35464 | if (typeof object.rawFeatures !== "object")
|
35465 | throw TypeError(".google.protobuf.FeatureSet.rawFeatures: object expected");
|
35466 | message.rawFeatures = $root.google.protobuf.FeatureSet.fromObject(object.rawFeatures);
|
35467 | }
|
35468 | return message;
|
35469 | };
|
35470 |
|
35471 | /**
|
35472 | * Creates a plain object from a FeatureSet message. Also converts values to other types if specified.
|
35473 | * @function toObject
|
35474 | * @memberof google.protobuf.FeatureSet
|
35475 | * @static
|
35476 | * @param {google.protobuf.FeatureSet} message FeatureSet
|
35477 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
35478 | * @returns {Object.<string,*>} Plain object
|
35479 | */
|
35480 | FeatureSet.toObject = function toObject(message, options) {
|
35481 | if (!options)
|
35482 | options = {};
|
35483 | var object = {};
|
35484 | if (options.defaults) {
|
35485 | object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0;
|
35486 | object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0;
|
35487 | object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0;
|
35488 | object.stringFieldValidation = options.enums === String ? "STRING_FIELD_VALIDATION_UNKNOWN" : 0;
|
35489 | object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0;
|
35490 | object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0;
|
35491 | object.rawFeatures = null;
|
35492 | }
|
35493 | if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence"))
|
35494 | object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence;
|
35495 | if (message.enumType != null && message.hasOwnProperty("enumType"))
|
35496 | object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType;
|
35497 | if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding"))
|
35498 | object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding;
|
35499 | if (message.stringFieldValidation != null && message.hasOwnProperty("stringFieldValidation"))
|
35500 | object.stringFieldValidation = options.enums === String ? $root.google.protobuf.FeatureSet.StringFieldValidation[message.stringFieldValidation] === undefined ? message.stringFieldValidation : $root.google.protobuf.FeatureSet.StringFieldValidation[message.stringFieldValidation] : message.stringFieldValidation;
|
35501 | if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding"))
|
35502 | object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding;
|
35503 | if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat"))
|
35504 | object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat;
|
35505 | if (message.rawFeatures != null && message.hasOwnProperty("rawFeatures"))
|
35506 | object.rawFeatures = $root.google.protobuf.FeatureSet.toObject(message.rawFeatures, options);
|
35507 | return object;
|
35508 | };
|
35509 |
|
35510 | /**
|
35511 | * Converts this FeatureSet to JSON.
|
35512 | * @function toJSON
|
35513 | * @memberof google.protobuf.FeatureSet
|
35514 | * @instance
|
35515 | * @returns {Object.<string,*>} JSON object
|
35516 | */
|
35517 | FeatureSet.prototype.toJSON = function toJSON() {
|
35518 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
35519 | };
|
35520 |
|
35521 | /**
|
35522 | * Gets the default type url for FeatureSet
|
35523 | * @function getTypeUrl
|
35524 | * @memberof google.protobuf.FeatureSet
|
35525 | * @static
|
35526 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
35527 | * @returns {string} The default type url
|
35528 | */
|
35529 | FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
35530 | if (typeUrlPrefix === undefined) {
|
35531 | typeUrlPrefix = "type.googleapis.com";
|
35532 | }
|
35533 | return typeUrlPrefix + "/google.protobuf.FeatureSet";
|
35534 | };
|
35535 |
|
35536 | /**
|
35537 | * FieldPresence enum.
|
35538 | * @name google.protobuf.FeatureSet.FieldPresence
|
35539 | * @enum {number}
|
35540 | * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value
|
35541 | * @property {number} EXPLICIT=1 EXPLICIT value
|
35542 | * @property {number} IMPLICIT=2 IMPLICIT value
|
35543 | * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value
|
35544 | */
|
35545 | FeatureSet.FieldPresence = (function() {
|
35546 | var valuesById = {}, values = Object.create(valuesById);
|
35547 | values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0;
|
35548 | values[valuesById[1] = "EXPLICIT"] = 1;
|
35549 | values[valuesById[2] = "IMPLICIT"] = 2;
|
35550 | values[valuesById[3] = "LEGACY_REQUIRED"] = 3;
|
35551 | return values;
|
35552 | })();
|
35553 |
|
35554 | /**
|
35555 | * EnumType enum.
|
35556 | * @name google.protobuf.FeatureSet.EnumType
|
35557 | * @enum {number}
|
35558 | * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value
|
35559 | * @property {number} OPEN=1 OPEN value
|
35560 | * @property {number} CLOSED=2 CLOSED value
|
35561 | */
|
35562 | FeatureSet.EnumType = (function() {
|
35563 | var valuesById = {}, values = Object.create(valuesById);
|
35564 | values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0;
|
35565 | values[valuesById[1] = "OPEN"] = 1;
|
35566 | values[valuesById[2] = "CLOSED"] = 2;
|
35567 | return values;
|
35568 | })();
|
35569 |
|
35570 | /**
|
35571 | * RepeatedFieldEncoding enum.
|
35572 | * @name google.protobuf.FeatureSet.RepeatedFieldEncoding
|
35573 | * @enum {number}
|
35574 | * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value
|
35575 | * @property {number} PACKED=1 PACKED value
|
35576 | * @property {number} EXPANDED=2 EXPANDED value
|
35577 | */
|
35578 | FeatureSet.RepeatedFieldEncoding = (function() {
|
35579 | var valuesById = {}, values = Object.create(valuesById);
|
35580 | values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0;
|
35581 | values[valuesById[1] = "PACKED"] = 1;
|
35582 | values[valuesById[2] = "EXPANDED"] = 2;
|
35583 | return values;
|
35584 | })();
|
35585 |
|
35586 | /**
|
35587 | * StringFieldValidation enum.
|
35588 | * @name google.protobuf.FeatureSet.StringFieldValidation
|
35589 | * @enum {number}
|
35590 | * @property {number} STRING_FIELD_VALIDATION_UNKNOWN=0 STRING_FIELD_VALIDATION_UNKNOWN value
|
35591 | * @property {number} MANDATORY=1 MANDATORY value
|
35592 | * @property {number} HINT=2 HINT value
|
35593 | * @property {number} NONE=3 NONE value
|
35594 | */
|
35595 | FeatureSet.StringFieldValidation = (function() {
|
35596 | var valuesById = {}, values = Object.create(valuesById);
|
35597 | values[valuesById[0] = "STRING_FIELD_VALIDATION_UNKNOWN"] = 0;
|
35598 | values[valuesById[1] = "MANDATORY"] = 1;
|
35599 | values[valuesById[2] = "HINT"] = 2;
|
35600 | values[valuesById[3] = "NONE"] = 3;
|
35601 | return values;
|
35602 | })();
|
35603 |
|
35604 | /**
|
35605 | * MessageEncoding enum.
|
35606 | * @name google.protobuf.FeatureSet.MessageEncoding
|
35607 | * @enum {number}
|
35608 | * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value
|
35609 | * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value
|
35610 | * @property {number} DELIMITED=2 DELIMITED value
|
35611 | */
|
35612 | FeatureSet.MessageEncoding = (function() {
|
35613 | var valuesById = {}, values = Object.create(valuesById);
|
35614 | values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0;
|
35615 | values[valuesById[1] = "LENGTH_PREFIXED"] = 1;
|
35616 | values[valuesById[2] = "DELIMITED"] = 2;
|
35617 | return values;
|
35618 | })();
|
35619 |
|
35620 | /**
|
35621 | * JsonFormat enum.
|
35622 | * @name google.protobuf.FeatureSet.JsonFormat
|
35623 | * @enum {number}
|
35624 | * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value
|
35625 | * @property {number} ALLOW=1 ALLOW value
|
35626 | * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value
|
35627 | */
|
35628 | FeatureSet.JsonFormat = (function() {
|
35629 | var valuesById = {}, values = Object.create(valuesById);
|
35630 | values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0;
|
35631 | values[valuesById[1] = "ALLOW"] = 1;
|
35632 | values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2;
|
35633 | return values;
|
35634 | })();
|
35635 |
|
35636 | return FeatureSet;
|
35637 | })();
|
35638 |
|
35639 | protobuf.SourceCodeInfo = (function() {
|
35640 |
|
35641 | /**
|
35642 | * Properties of a SourceCodeInfo.
|
35643 | * @memberof google.protobuf
|
35644 | * @interface ISourceCodeInfo
|
35645 | * @property {Array.<google.protobuf.SourceCodeInfo.ILocation>|null} [location] SourceCodeInfo location
|
35646 | */
|
35647 |
|
35648 | /**
|
35649 | * Constructs a new SourceCodeInfo.
|
35650 | * @memberof google.protobuf
|
35651 | * @classdesc Represents a SourceCodeInfo.
|
35652 | * @implements ISourceCodeInfo
|
35653 | * @constructor
|
35654 | * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set
|
35655 | */
|
35656 | function SourceCodeInfo(properties) {
|
35657 | this.location = [];
|
35658 | if (properties)
|
35659 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
35660 | if (properties[keys[i]] != null)
|
35661 | this[keys[i]] = properties[keys[i]];
|
35662 | }
|
35663 |
|
35664 | /**
|
35665 | * SourceCodeInfo location.
|
35666 | * @member {Array.<google.protobuf.SourceCodeInfo.ILocation>} location
|
35667 | * @memberof google.protobuf.SourceCodeInfo
|
35668 | * @instance
|
35669 | */
|
35670 | SourceCodeInfo.prototype.location = $util.emptyArray;
|
35671 |
|
35672 | /**
|
35673 | * Creates a new SourceCodeInfo instance using the specified properties.
|
35674 | * @function create
|
35675 | * @memberof google.protobuf.SourceCodeInfo
|
35676 | * @static
|
35677 | * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set
|
35678 | * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance
|
35679 | */
|
35680 | SourceCodeInfo.create = function create(properties) {
|
35681 | return new SourceCodeInfo(properties);
|
35682 | };
|
35683 |
|
35684 | /**
|
35685 | * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages.
|
35686 | * @function encode
|
35687 | * @memberof google.protobuf.SourceCodeInfo
|
35688 | * @static
|
35689 | * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode
|
35690 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
35691 | * @returns {$protobuf.Writer} Writer
|
35692 | */
|
35693 | SourceCodeInfo.encode = function encode(message, writer) {
|
35694 | if (!writer)
|
35695 | writer = $Writer.create();
|
35696 | if (message.location != null && message.location.length)
|
35697 | for (var i = 0; i < message.location.length; ++i)
|
35698 | $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
35699 | return writer;
|
35700 | };
|
35701 |
|
35702 | /**
|
35703 | * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages.
|
35704 | * @function encodeDelimited
|
35705 | * @memberof google.protobuf.SourceCodeInfo
|
35706 | * @static
|
35707 | * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode
|
35708 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
35709 | * @returns {$protobuf.Writer} Writer
|
35710 | */
|
35711 | SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) {
|
35712 | return this.encode(message, writer).ldelim();
|
35713 | };
|
35714 |
|
35715 | /**
|
35716 | * Decodes a SourceCodeInfo message from the specified reader or buffer.
|
35717 | * @function decode
|
35718 | * @memberof google.protobuf.SourceCodeInfo
|
35719 | * @static
|
35720 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
35721 | * @param {number} [length] Message length if known beforehand
|
35722 | * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo
|
35723 | * @throws {Error} If the payload is not a reader or valid buffer
|
35724 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
35725 | */
|
35726 | SourceCodeInfo.decode = function decode(reader, length) {
|
35727 | if (!(reader instanceof $Reader))
|
35728 | reader = $Reader.create(reader);
|
35729 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo();
|
35730 | while (reader.pos < end) {
|
35731 | var tag = reader.uint32();
|
35732 | switch (tag >>> 3) {
|
35733 | case 1: {
|
35734 | if (!(message.location && message.location.length))
|
35735 | message.location = [];
|
35736 | message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32()));
|
35737 | break;
|
35738 | }
|
35739 | default:
|
35740 | reader.skipType(tag & 7);
|
35741 | break;
|
35742 | }
|
35743 | }
|
35744 | return message;
|
35745 | };
|
35746 |
|
35747 | /**
|
35748 | * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited.
|
35749 | * @function decodeDelimited
|
35750 | * @memberof google.protobuf.SourceCodeInfo
|
35751 | * @static
|
35752 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
35753 | * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo
|
35754 | * @throws {Error} If the payload is not a reader or valid buffer
|
35755 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
35756 | */
|
35757 | SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) {
|
35758 | if (!(reader instanceof $Reader))
|
35759 | reader = new $Reader(reader);
|
35760 | return this.decode(reader, reader.uint32());
|
35761 | };
|
35762 |
|
35763 | /**
|
35764 | * Verifies a SourceCodeInfo message.
|
35765 | * @function verify
|
35766 | * @memberof google.protobuf.SourceCodeInfo
|
35767 | * @static
|
35768 | * @param {Object.<string,*>} message Plain object to verify
|
35769 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
35770 | */
|
35771 | SourceCodeInfo.verify = function verify(message) {
|
35772 | if (typeof message !== "object" || message === null)
|
35773 | return "object expected";
|
35774 | if (message.location != null && message.hasOwnProperty("location")) {
|
35775 | if (!Array.isArray(message.location))
|
35776 | return "location: array expected";
|
35777 | for (var i = 0; i < message.location.length; ++i) {
|
35778 | var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]);
|
35779 | if (error)
|
35780 | return "location." + error;
|
35781 | }
|
35782 | }
|
35783 | return null;
|
35784 | };
|
35785 |
|
35786 | /**
|
35787 | * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types.
|
35788 | * @function fromObject
|
35789 | * @memberof google.protobuf.SourceCodeInfo
|
35790 | * @static
|
35791 | * @param {Object.<string,*>} object Plain object
|
35792 | * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo
|
35793 | */
|
35794 | SourceCodeInfo.fromObject = function fromObject(object) {
|
35795 | if (object instanceof $root.google.protobuf.SourceCodeInfo)
|
35796 | return object;
|
35797 | var message = new $root.google.protobuf.SourceCodeInfo();
|
35798 | if (object.location) {
|
35799 | if (!Array.isArray(object.location))
|
35800 | throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected");
|
35801 | message.location = [];
|
35802 | for (var i = 0; i < object.location.length; ++i) {
|
35803 | if (typeof object.location[i] !== "object")
|
35804 | throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected");
|
35805 | message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]);
|
35806 | }
|
35807 | }
|
35808 | return message;
|
35809 | };
|
35810 |
|
35811 | /**
|
35812 | * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified.
|
35813 | * @function toObject
|
35814 | * @memberof google.protobuf.SourceCodeInfo
|
35815 | * @static
|
35816 | * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo
|
35817 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
35818 | * @returns {Object.<string,*>} Plain object
|
35819 | */
|
35820 | SourceCodeInfo.toObject = function toObject(message, options) {
|
35821 | if (!options)
|
35822 | options = {};
|
35823 | var object = {};
|
35824 | if (options.arrays || options.defaults)
|
35825 | object.location = [];
|
35826 | if (message.location && message.location.length) {
|
35827 | object.location = [];
|
35828 | for (var j = 0; j < message.location.length; ++j)
|
35829 | object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options);
|
35830 | }
|
35831 | return object;
|
35832 | };
|
35833 |
|
35834 | /**
|
35835 | * Converts this SourceCodeInfo to JSON.
|
35836 | * @function toJSON
|
35837 | * @memberof google.protobuf.SourceCodeInfo
|
35838 | * @instance
|
35839 | * @returns {Object.<string,*>} JSON object
|
35840 | */
|
35841 | SourceCodeInfo.prototype.toJSON = function toJSON() {
|
35842 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
35843 | };
|
35844 |
|
35845 | /**
|
35846 | * Gets the default type url for SourceCodeInfo
|
35847 | * @function getTypeUrl
|
35848 | * @memberof google.protobuf.SourceCodeInfo
|
35849 | * @static
|
35850 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
35851 | * @returns {string} The default type url
|
35852 | */
|
35853 | SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
35854 | if (typeUrlPrefix === undefined) {
|
35855 | typeUrlPrefix = "type.googleapis.com";
|
35856 | }
|
35857 | return typeUrlPrefix + "/google.protobuf.SourceCodeInfo";
|
35858 | };
|
35859 |
|
35860 | SourceCodeInfo.Location = (function() {
|
35861 |
|
35862 | /**
|
35863 | * Properties of a Location.
|
35864 | * @memberof google.protobuf.SourceCodeInfo
|
35865 | * @interface ILocation
|
35866 | * @property {Array.<number>|null} [path] Location path
|
35867 | * @property {Array.<number>|null} [span] Location span
|
35868 | * @property {string|null} [leadingComments] Location leadingComments
|
35869 | * @property {string|null} [trailingComments] Location trailingComments
|
35870 | * @property {Array.<string>|null} [leadingDetachedComments] Location leadingDetachedComments
|
35871 | */
|
35872 |
|
35873 | /**
|
35874 | * Constructs a new Location.
|
35875 | * @memberof google.protobuf.SourceCodeInfo
|
35876 | * @classdesc Represents a Location.
|
35877 | * @implements ILocation
|
35878 | * @constructor
|
35879 | * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set
|
35880 | */
|
35881 | function Location(properties) {
|
35882 | this.path = [];
|
35883 | this.span = [];
|
35884 | this.leadingDetachedComments = [];
|
35885 | if (properties)
|
35886 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
35887 | if (properties[keys[i]] != null)
|
35888 | this[keys[i]] = properties[keys[i]];
|
35889 | }
|
35890 |
|
35891 | /**
|
35892 | * Location path.
|
35893 | * @member {Array.<number>} path
|
35894 | * @memberof google.protobuf.SourceCodeInfo.Location
|
35895 | * @instance
|
35896 | */
|
35897 | Location.prototype.path = $util.emptyArray;
|
35898 |
|
35899 | /**
|
35900 | * Location span.
|
35901 | * @member {Array.<number>} span
|
35902 | * @memberof google.protobuf.SourceCodeInfo.Location
|
35903 | * @instance
|
35904 | */
|
35905 | Location.prototype.span = $util.emptyArray;
|
35906 |
|
35907 | /**
|
35908 | * Location leadingComments.
|
35909 | * @member {string} leadingComments
|
35910 | * @memberof google.protobuf.SourceCodeInfo.Location
|
35911 | * @instance
|
35912 | */
|
35913 | Location.prototype.leadingComments = "";
|
35914 |
|
35915 | /**
|
35916 | * Location trailingComments.
|
35917 | * @member {string} trailingComments
|
35918 | * @memberof google.protobuf.SourceCodeInfo.Location
|
35919 | * @instance
|
35920 | */
|
35921 | Location.prototype.trailingComments = "";
|
35922 |
|
35923 | /**
|
35924 | * Location leadingDetachedComments.
|
35925 | * @member {Array.<string>} leadingDetachedComments
|
35926 | * @memberof google.protobuf.SourceCodeInfo.Location
|
35927 | * @instance
|
35928 | */
|
35929 | Location.prototype.leadingDetachedComments = $util.emptyArray;
|
35930 |
|
35931 | /**
|
35932 | * Creates a new Location instance using the specified properties.
|
35933 | * @function create
|
35934 | * @memberof google.protobuf.SourceCodeInfo.Location
|
35935 | * @static
|
35936 | * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set
|
35937 | * @returns {google.protobuf.SourceCodeInfo.Location} Location instance
|
35938 | */
|
35939 | Location.create = function create(properties) {
|
35940 | return new Location(properties);
|
35941 | };
|
35942 |
|
35943 | /**
|
35944 | * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.
|
35945 | * @function encode
|
35946 | * @memberof google.protobuf.SourceCodeInfo.Location
|
35947 | * @static
|
35948 | * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode
|
35949 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
35950 | * @returns {$protobuf.Writer} Writer
|
35951 | */
|
35952 | Location.encode = function encode(message, writer) {
|
35953 | if (!writer)
|
35954 | writer = $Writer.create();
|
35955 | if (message.path != null && message.path.length) {
|
35956 | writer.uint32(/* id 1, wireType 2 =*/10).fork();
|
35957 | for (var i = 0; i < message.path.length; ++i)
|
35958 | writer.int32(message.path[i]);
|
35959 | writer.ldelim();
|
35960 | }
|
35961 | if (message.span != null && message.span.length) {
|
35962 | writer.uint32(/* id 2, wireType 2 =*/18).fork();
|
35963 | for (var i = 0; i < message.span.length; ++i)
|
35964 | writer.int32(message.span[i]);
|
35965 | writer.ldelim();
|
35966 | }
|
35967 | if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments"))
|
35968 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments);
|
35969 | if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments"))
|
35970 | writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments);
|
35971 | if (message.leadingDetachedComments != null && message.leadingDetachedComments.length)
|
35972 | for (var i = 0; i < message.leadingDetachedComments.length; ++i)
|
35973 | writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]);
|
35974 | return writer;
|
35975 | };
|
35976 |
|
35977 | /**
|
35978 | * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.
|
35979 | * @function encodeDelimited
|
35980 | * @memberof google.protobuf.SourceCodeInfo.Location
|
35981 | * @static
|
35982 | * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode
|
35983 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
35984 | * @returns {$protobuf.Writer} Writer
|
35985 | */
|
35986 | Location.encodeDelimited = function encodeDelimited(message, writer) {
|
35987 | return this.encode(message, writer).ldelim();
|
35988 | };
|
35989 |
|
35990 | /**
|
35991 | * Decodes a Location message from the specified reader or buffer.
|
35992 | * @function decode
|
35993 | * @memberof google.protobuf.SourceCodeInfo.Location
|
35994 | * @static
|
35995 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
35996 | * @param {number} [length] Message length if known beforehand
|
35997 | * @returns {google.protobuf.SourceCodeInfo.Location} Location
|
35998 | * @throws {Error} If the payload is not a reader or valid buffer
|
35999 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
36000 | */
|
36001 | Location.decode = function decode(reader, length) {
|
36002 | if (!(reader instanceof $Reader))
|
36003 | reader = $Reader.create(reader);
|
36004 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location();
|
36005 | while (reader.pos < end) {
|
36006 | var tag = reader.uint32();
|
36007 | switch (tag >>> 3) {
|
36008 | case 1: {
|
36009 | if (!(message.path && message.path.length))
|
36010 | message.path = [];
|
36011 | if ((tag & 7) === 2) {
|
36012 | var end2 = reader.uint32() + reader.pos;
|
36013 | while (reader.pos < end2)
|
36014 | message.path.push(reader.int32());
|
36015 | } else
|
36016 | message.path.push(reader.int32());
|
36017 | break;
|
36018 | }
|
36019 | case 2: {
|
36020 | if (!(message.span && message.span.length))
|
36021 | message.span = [];
|
36022 | if ((tag & 7) === 2) {
|
36023 | var end2 = reader.uint32() + reader.pos;
|
36024 | while (reader.pos < end2)
|
36025 | message.span.push(reader.int32());
|
36026 | } else
|
36027 | message.span.push(reader.int32());
|
36028 | break;
|
36029 | }
|
36030 | case 3: {
|
36031 | message.leadingComments = reader.string();
|
36032 | break;
|
36033 | }
|
36034 | case 4: {
|
36035 | message.trailingComments = reader.string();
|
36036 | break;
|
36037 | }
|
36038 | case 6: {
|
36039 | if (!(message.leadingDetachedComments && message.leadingDetachedComments.length))
|
36040 | message.leadingDetachedComments = [];
|
36041 | message.leadingDetachedComments.push(reader.string());
|
36042 | break;
|
36043 | }
|
36044 | default:
|
36045 | reader.skipType(tag & 7);
|
36046 | break;
|
36047 | }
|
36048 | }
|
36049 | return message;
|
36050 | };
|
36051 |
|
36052 | /**
|
36053 | * Decodes a Location message from the specified reader or buffer, length delimited.
|
36054 | * @function decodeDelimited
|
36055 | * @memberof google.protobuf.SourceCodeInfo.Location
|
36056 | * @static
|
36057 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
36058 | * @returns {google.protobuf.SourceCodeInfo.Location} Location
|
36059 | * @throws {Error} If the payload is not a reader or valid buffer
|
36060 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
36061 | */
|
36062 | Location.decodeDelimited = function decodeDelimited(reader) {
|
36063 | if (!(reader instanceof $Reader))
|
36064 | reader = new $Reader(reader);
|
36065 | return this.decode(reader, reader.uint32());
|
36066 | };
|
36067 |
|
36068 | /**
|
36069 | * Verifies a Location message.
|
36070 | * @function verify
|
36071 | * @memberof google.protobuf.SourceCodeInfo.Location
|
36072 | * @static
|
36073 | * @param {Object.<string,*>} message Plain object to verify
|
36074 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
36075 | */
|
36076 | Location.verify = function verify(message) {
|
36077 | if (typeof message !== "object" || message === null)
|
36078 | return "object expected";
|
36079 | if (message.path != null && message.hasOwnProperty("path")) {
|
36080 | if (!Array.isArray(message.path))
|
36081 | return "path: array expected";
|
36082 | for (var i = 0; i < message.path.length; ++i)
|
36083 | if (!$util.isInteger(message.path[i]))
|
36084 | return "path: integer[] expected";
|
36085 | }
|
36086 | if (message.span != null && message.hasOwnProperty("span")) {
|
36087 | if (!Array.isArray(message.span))
|
36088 | return "span: array expected";
|
36089 | for (var i = 0; i < message.span.length; ++i)
|
36090 | if (!$util.isInteger(message.span[i]))
|
36091 | return "span: integer[] expected";
|
36092 | }
|
36093 | if (message.leadingComments != null && message.hasOwnProperty("leadingComments"))
|
36094 | if (!$util.isString(message.leadingComments))
|
36095 | return "leadingComments: string expected";
|
36096 | if (message.trailingComments != null && message.hasOwnProperty("trailingComments"))
|
36097 | if (!$util.isString(message.trailingComments))
|
36098 | return "trailingComments: string expected";
|
36099 | if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) {
|
36100 | if (!Array.isArray(message.leadingDetachedComments))
|
36101 | return "leadingDetachedComments: array expected";
|
36102 | for (var i = 0; i < message.leadingDetachedComments.length; ++i)
|
36103 | if (!$util.isString(message.leadingDetachedComments[i]))
|
36104 | return "leadingDetachedComments: string[] expected";
|
36105 | }
|
36106 | return null;
|
36107 | };
|
36108 |
|
36109 | /**
|
36110 | * Creates a Location message from a plain object. Also converts values to their respective internal types.
|
36111 | * @function fromObject
|
36112 | * @memberof google.protobuf.SourceCodeInfo.Location
|
36113 | * @static
|
36114 | * @param {Object.<string,*>} object Plain object
|
36115 | * @returns {google.protobuf.SourceCodeInfo.Location} Location
|
36116 | */
|
36117 | Location.fromObject = function fromObject(object) {
|
36118 | if (object instanceof $root.google.protobuf.SourceCodeInfo.Location)
|
36119 | return object;
|
36120 | var message = new $root.google.protobuf.SourceCodeInfo.Location();
|
36121 | if (object.path) {
|
36122 | if (!Array.isArray(object.path))
|
36123 | throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected");
|
36124 | message.path = [];
|
36125 | for (var i = 0; i < object.path.length; ++i)
|
36126 | message.path[i] = object.path[i] | 0;
|
36127 | }
|
36128 | if (object.span) {
|
36129 | if (!Array.isArray(object.span))
|
36130 | throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected");
|
36131 | message.span = [];
|
36132 | for (var i = 0; i < object.span.length; ++i)
|
36133 | message.span[i] = object.span[i] | 0;
|
36134 | }
|
36135 | if (object.leadingComments != null)
|
36136 | message.leadingComments = String(object.leadingComments);
|
36137 | if (object.trailingComments != null)
|
36138 | message.trailingComments = String(object.trailingComments);
|
36139 | if (object.leadingDetachedComments) {
|
36140 | if (!Array.isArray(object.leadingDetachedComments))
|
36141 | throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected");
|
36142 | message.leadingDetachedComments = [];
|
36143 | for (var i = 0; i < object.leadingDetachedComments.length; ++i)
|
36144 | message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]);
|
36145 | }
|
36146 | return message;
|
36147 | };
|
36148 |
|
36149 | /**
|
36150 | * Creates a plain object from a Location message. Also converts values to other types if specified.
|
36151 | * @function toObject
|
36152 | * @memberof google.protobuf.SourceCodeInfo.Location
|
36153 | * @static
|
36154 | * @param {google.protobuf.SourceCodeInfo.Location} message Location
|
36155 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
36156 | * @returns {Object.<string,*>} Plain object
|
36157 | */
|
36158 | Location.toObject = function toObject(message, options) {
|
36159 | if (!options)
|
36160 | options = {};
|
36161 | var object = {};
|
36162 | if (options.arrays || options.defaults) {
|
36163 | object.path = [];
|
36164 | object.span = [];
|
36165 | object.leadingDetachedComments = [];
|
36166 | }
|
36167 | if (options.defaults) {
|
36168 | object.leadingComments = "";
|
36169 | object.trailingComments = "";
|
36170 | }
|
36171 | if (message.path && message.path.length) {
|
36172 | object.path = [];
|
36173 | for (var j = 0; j < message.path.length; ++j)
|
36174 | object.path[j] = message.path[j];
|
36175 | }
|
36176 | if (message.span && message.span.length) {
|
36177 | object.span = [];
|
36178 | for (var j = 0; j < message.span.length; ++j)
|
36179 | object.span[j] = message.span[j];
|
36180 | }
|
36181 | if (message.leadingComments != null && message.hasOwnProperty("leadingComments"))
|
36182 | object.leadingComments = message.leadingComments;
|
36183 | if (message.trailingComments != null && message.hasOwnProperty("trailingComments"))
|
36184 | object.trailingComments = message.trailingComments;
|
36185 | if (message.leadingDetachedComments && message.leadingDetachedComments.length) {
|
36186 | object.leadingDetachedComments = [];
|
36187 | for (var j = 0; j < message.leadingDetachedComments.length; ++j)
|
36188 | object.leadingDetachedComments[j] = message.leadingDetachedComments[j];
|
36189 | }
|
36190 | return object;
|
36191 | };
|
36192 |
|
36193 | /**
|
36194 | * Converts this Location to JSON.
|
36195 | * @function toJSON
|
36196 | * @memberof google.protobuf.SourceCodeInfo.Location
|
36197 | * @instance
|
36198 | * @returns {Object.<string,*>} JSON object
|
36199 | */
|
36200 | Location.prototype.toJSON = function toJSON() {
|
36201 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
36202 | };
|
36203 |
|
36204 | /**
|
36205 | * Gets the default type url for Location
|
36206 | * @function getTypeUrl
|
36207 | * @memberof google.protobuf.SourceCodeInfo.Location
|
36208 | * @static
|
36209 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
36210 | * @returns {string} The default type url
|
36211 | */
|
36212 | Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
36213 | if (typeUrlPrefix === undefined) {
|
36214 | typeUrlPrefix = "type.googleapis.com";
|
36215 | }
|
36216 | return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location";
|
36217 | };
|
36218 |
|
36219 | return Location;
|
36220 | })();
|
36221 |
|
36222 | return SourceCodeInfo;
|
36223 | })();
|
36224 |
|
36225 | protobuf.GeneratedCodeInfo = (function() {
|
36226 |
|
36227 | /**
|
36228 | * Properties of a GeneratedCodeInfo.
|
36229 | * @memberof google.protobuf
|
36230 | * @interface IGeneratedCodeInfo
|
36231 | * @property {Array.<google.protobuf.GeneratedCodeInfo.IAnnotation>|null} [annotation] GeneratedCodeInfo annotation
|
36232 | */
|
36233 |
|
36234 | /**
|
36235 | * Constructs a new GeneratedCodeInfo.
|
36236 | * @memberof google.protobuf
|
36237 | * @classdesc Represents a GeneratedCodeInfo.
|
36238 | * @implements IGeneratedCodeInfo
|
36239 | * @constructor
|
36240 | * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set
|
36241 | */
|
36242 | function GeneratedCodeInfo(properties) {
|
36243 | this.annotation = [];
|
36244 | if (properties)
|
36245 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
36246 | if (properties[keys[i]] != null)
|
36247 | this[keys[i]] = properties[keys[i]];
|
36248 | }
|
36249 |
|
36250 | /**
|
36251 | * GeneratedCodeInfo annotation.
|
36252 | * @member {Array.<google.protobuf.GeneratedCodeInfo.IAnnotation>} annotation
|
36253 | * @memberof google.protobuf.GeneratedCodeInfo
|
36254 | * @instance
|
36255 | */
|
36256 | GeneratedCodeInfo.prototype.annotation = $util.emptyArray;
|
36257 |
|
36258 | /**
|
36259 | * Creates a new GeneratedCodeInfo instance using the specified properties.
|
36260 | * @function create
|
36261 | * @memberof google.protobuf.GeneratedCodeInfo
|
36262 | * @static
|
36263 | * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set
|
36264 | * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance
|
36265 | */
|
36266 | GeneratedCodeInfo.create = function create(properties) {
|
36267 | return new GeneratedCodeInfo(properties);
|
36268 | };
|
36269 |
|
36270 | /**
|
36271 | * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages.
|
36272 | * @function encode
|
36273 | * @memberof google.protobuf.GeneratedCodeInfo
|
36274 | * @static
|
36275 | * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode
|
36276 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
36277 | * @returns {$protobuf.Writer} Writer
|
36278 | */
|
36279 | GeneratedCodeInfo.encode = function encode(message, writer) {
|
36280 | if (!writer)
|
36281 | writer = $Writer.create();
|
36282 | if (message.annotation != null && message.annotation.length)
|
36283 | for (var i = 0; i < message.annotation.length; ++i)
|
36284 | $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
36285 | return writer;
|
36286 | };
|
36287 |
|
36288 | /**
|
36289 | * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages.
|
36290 | * @function encodeDelimited
|
36291 | * @memberof google.protobuf.GeneratedCodeInfo
|
36292 | * @static
|
36293 | * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode
|
36294 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
36295 | * @returns {$protobuf.Writer} Writer
|
36296 | */
|
36297 | GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) {
|
36298 | return this.encode(message, writer).ldelim();
|
36299 | };
|
36300 |
|
36301 | /**
|
36302 | * Decodes a GeneratedCodeInfo message from the specified reader or buffer.
|
36303 | * @function decode
|
36304 | * @memberof google.protobuf.GeneratedCodeInfo
|
36305 | * @static
|
36306 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
36307 | * @param {number} [length] Message length if known beforehand
|
36308 | * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo
|
36309 | * @throws {Error} If the payload is not a reader or valid buffer
|
36310 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
36311 | */
|
36312 | GeneratedCodeInfo.decode = function decode(reader, length) {
|
36313 | if (!(reader instanceof $Reader))
|
36314 | reader = $Reader.create(reader);
|
36315 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo();
|
36316 | while (reader.pos < end) {
|
36317 | var tag = reader.uint32();
|
36318 | switch (tag >>> 3) {
|
36319 | case 1: {
|
36320 | if (!(message.annotation && message.annotation.length))
|
36321 | message.annotation = [];
|
36322 | message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32()));
|
36323 | break;
|
36324 | }
|
36325 | default:
|
36326 | reader.skipType(tag & 7);
|
36327 | break;
|
36328 | }
|
36329 | }
|
36330 | return message;
|
36331 | };
|
36332 |
|
36333 | /**
|
36334 | * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited.
|
36335 | * @function decodeDelimited
|
36336 | * @memberof google.protobuf.GeneratedCodeInfo
|
36337 | * @static
|
36338 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
36339 | * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo
|
36340 | * @throws {Error} If the payload is not a reader or valid buffer
|
36341 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
36342 | */
|
36343 | GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) {
|
36344 | if (!(reader instanceof $Reader))
|
36345 | reader = new $Reader(reader);
|
36346 | return this.decode(reader, reader.uint32());
|
36347 | };
|
36348 |
|
36349 | /**
|
36350 | * Verifies a GeneratedCodeInfo message.
|
36351 | * @function verify
|
36352 | * @memberof google.protobuf.GeneratedCodeInfo
|
36353 | * @static
|
36354 | * @param {Object.<string,*>} message Plain object to verify
|
36355 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
36356 | */
|
36357 | GeneratedCodeInfo.verify = function verify(message) {
|
36358 | if (typeof message !== "object" || message === null)
|
36359 | return "object expected";
|
36360 | if (message.annotation != null && message.hasOwnProperty("annotation")) {
|
36361 | if (!Array.isArray(message.annotation))
|
36362 | return "annotation: array expected";
|
36363 | for (var i = 0; i < message.annotation.length; ++i) {
|
36364 | var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]);
|
36365 | if (error)
|
36366 | return "annotation." + error;
|
36367 | }
|
36368 | }
|
36369 | return null;
|
36370 | };
|
36371 |
|
36372 | /**
|
36373 | * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types.
|
36374 | * @function fromObject
|
36375 | * @memberof google.protobuf.GeneratedCodeInfo
|
36376 | * @static
|
36377 | * @param {Object.<string,*>} object Plain object
|
36378 | * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo
|
36379 | */
|
36380 | GeneratedCodeInfo.fromObject = function fromObject(object) {
|
36381 | if (object instanceof $root.google.protobuf.GeneratedCodeInfo)
|
36382 | return object;
|
36383 | var message = new $root.google.protobuf.GeneratedCodeInfo();
|
36384 | if (object.annotation) {
|
36385 | if (!Array.isArray(object.annotation))
|
36386 | throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected");
|
36387 | message.annotation = [];
|
36388 | for (var i = 0; i < object.annotation.length; ++i) {
|
36389 | if (typeof object.annotation[i] !== "object")
|
36390 | throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected");
|
36391 | message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]);
|
36392 | }
|
36393 | }
|
36394 | return message;
|
36395 | };
|
36396 |
|
36397 | /**
|
36398 | * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified.
|
36399 | * @function toObject
|
36400 | * @memberof google.protobuf.GeneratedCodeInfo
|
36401 | * @static
|
36402 | * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo
|
36403 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
36404 | * @returns {Object.<string,*>} Plain object
|
36405 | */
|
36406 | GeneratedCodeInfo.toObject = function toObject(message, options) {
|
36407 | if (!options)
|
36408 | options = {};
|
36409 | var object = {};
|
36410 | if (options.arrays || options.defaults)
|
36411 | object.annotation = [];
|
36412 | if (message.annotation && message.annotation.length) {
|
36413 | object.annotation = [];
|
36414 | for (var j = 0; j < message.annotation.length; ++j)
|
36415 | object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options);
|
36416 | }
|
36417 | return object;
|
36418 | };
|
36419 |
|
36420 | /**
|
36421 | * Converts this GeneratedCodeInfo to JSON.
|
36422 | * @function toJSON
|
36423 | * @memberof google.protobuf.GeneratedCodeInfo
|
36424 | * @instance
|
36425 | * @returns {Object.<string,*>} JSON object
|
36426 | */
|
36427 | GeneratedCodeInfo.prototype.toJSON = function toJSON() {
|
36428 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
36429 | };
|
36430 |
|
36431 | /**
|
36432 | * Gets the default type url for GeneratedCodeInfo
|
36433 | * @function getTypeUrl
|
36434 | * @memberof google.protobuf.GeneratedCodeInfo
|
36435 | * @static
|
36436 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
36437 | * @returns {string} The default type url
|
36438 | */
|
36439 | GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
36440 | if (typeUrlPrefix === undefined) {
|
36441 | typeUrlPrefix = "type.googleapis.com";
|
36442 | }
|
36443 | return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo";
|
36444 | };
|
36445 |
|
36446 | GeneratedCodeInfo.Annotation = (function() {
|
36447 |
|
36448 | /**
|
36449 | * Properties of an Annotation.
|
36450 | * @memberof google.protobuf.GeneratedCodeInfo
|
36451 | * @interface IAnnotation
|
36452 | * @property {Array.<number>|null} [path] Annotation path
|
36453 | * @property {string|null} [sourceFile] Annotation sourceFile
|
36454 | * @property {number|null} [begin] Annotation begin
|
36455 | * @property {number|null} [end] Annotation end
|
36456 | * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic
|
36457 | */
|
36458 |
|
36459 | /**
|
36460 | * Constructs a new Annotation.
|
36461 | * @memberof google.protobuf.GeneratedCodeInfo
|
36462 | * @classdesc Represents an Annotation.
|
36463 | * @implements IAnnotation
|
36464 | * @constructor
|
36465 | * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set
|
36466 | */
|
36467 | function Annotation(properties) {
|
36468 | this.path = [];
|
36469 | if (properties)
|
36470 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
36471 | if (properties[keys[i]] != null)
|
36472 | this[keys[i]] = properties[keys[i]];
|
36473 | }
|
36474 |
|
36475 | /**
|
36476 | * Annotation path.
|
36477 | * @member {Array.<number>} path
|
36478 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
36479 | * @instance
|
36480 | */
|
36481 | Annotation.prototype.path = $util.emptyArray;
|
36482 |
|
36483 | /**
|
36484 | * Annotation sourceFile.
|
36485 | * @member {string} sourceFile
|
36486 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
36487 | * @instance
|
36488 | */
|
36489 | Annotation.prototype.sourceFile = "";
|
36490 |
|
36491 | /**
|
36492 | * Annotation begin.
|
36493 | * @member {number} begin
|
36494 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
36495 | * @instance
|
36496 | */
|
36497 | Annotation.prototype.begin = 0;
|
36498 |
|
36499 | /**
|
36500 | * Annotation end.
|
36501 | * @member {number} end
|
36502 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
36503 | * @instance
|
36504 | */
|
36505 | Annotation.prototype.end = 0;
|
36506 |
|
36507 | /**
|
36508 | * Annotation semantic.
|
36509 | * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic
|
36510 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
36511 | * @instance
|
36512 | */
|
36513 | Annotation.prototype.semantic = 0;
|
36514 |
|
36515 | /**
|
36516 | * Creates a new Annotation instance using the specified properties.
|
36517 | * @function create
|
36518 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
36519 | * @static
|
36520 | * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set
|
36521 | * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance
|
36522 | */
|
36523 | Annotation.create = function create(properties) {
|
36524 | return new Annotation(properties);
|
36525 | };
|
36526 |
|
36527 | /**
|
36528 | * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages.
|
36529 | * @function encode
|
36530 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
36531 | * @static
|
36532 | * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode
|
36533 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
36534 | * @returns {$protobuf.Writer} Writer
|
36535 | */
|
36536 | Annotation.encode = function encode(message, writer) {
|
36537 | if (!writer)
|
36538 | writer = $Writer.create();
|
36539 | if (message.path != null && message.path.length) {
|
36540 | writer.uint32(/* id 1, wireType 2 =*/10).fork();
|
36541 | for (var i = 0; i < message.path.length; ++i)
|
36542 | writer.int32(message.path[i]);
|
36543 | writer.ldelim();
|
36544 | }
|
36545 | if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile"))
|
36546 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile);
|
36547 | if (message.begin != null && Object.hasOwnProperty.call(message, "begin"))
|
36548 | writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin);
|
36549 | if (message.end != null && Object.hasOwnProperty.call(message, "end"))
|
36550 | writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end);
|
36551 | if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic"))
|
36552 | writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic);
|
36553 | return writer;
|
36554 | };
|
36555 |
|
36556 | /**
|
36557 | * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages.
|
36558 | * @function encodeDelimited
|
36559 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
36560 | * @static
|
36561 | * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode
|
36562 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
36563 | * @returns {$protobuf.Writer} Writer
|
36564 | */
|
36565 | Annotation.encodeDelimited = function encodeDelimited(message, writer) {
|
36566 | return this.encode(message, writer).ldelim();
|
36567 | };
|
36568 |
|
36569 | /**
|
36570 | * Decodes an Annotation message from the specified reader or buffer.
|
36571 | * @function decode
|
36572 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
36573 | * @static
|
36574 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
36575 | * @param {number} [length] Message length if known beforehand
|
36576 | * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation
|
36577 | * @throws {Error} If the payload is not a reader or valid buffer
|
36578 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
36579 | */
|
36580 | Annotation.decode = function decode(reader, length) {
|
36581 | if (!(reader instanceof $Reader))
|
36582 | reader = $Reader.create(reader);
|
36583 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation();
|
36584 | while (reader.pos < end) {
|
36585 | var tag = reader.uint32();
|
36586 | switch (tag >>> 3) {
|
36587 | case 1: {
|
36588 | if (!(message.path && message.path.length))
|
36589 | message.path = [];
|
36590 | if ((tag & 7) === 2) {
|
36591 | var end2 = reader.uint32() + reader.pos;
|
36592 | while (reader.pos < end2)
|
36593 | message.path.push(reader.int32());
|
36594 | } else
|
36595 | message.path.push(reader.int32());
|
36596 | break;
|
36597 | }
|
36598 | case 2: {
|
36599 | message.sourceFile = reader.string();
|
36600 | break;
|
36601 | }
|
36602 | case 3: {
|
36603 | message.begin = reader.int32();
|
36604 | break;
|
36605 | }
|
36606 | case 4: {
|
36607 | message.end = reader.int32();
|
36608 | break;
|
36609 | }
|
36610 | case 5: {
|
36611 | message.semantic = reader.int32();
|
36612 | break;
|
36613 | }
|
36614 | default:
|
36615 | reader.skipType(tag & 7);
|
36616 | break;
|
36617 | }
|
36618 | }
|
36619 | return message;
|
36620 | };
|
36621 |
|
36622 | /**
|
36623 | * Decodes an Annotation message from the specified reader or buffer, length delimited.
|
36624 | * @function decodeDelimited
|
36625 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
36626 | * @static
|
36627 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
36628 | * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation
|
36629 | * @throws {Error} If the payload is not a reader or valid buffer
|
36630 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
36631 | */
|
36632 | Annotation.decodeDelimited = function decodeDelimited(reader) {
|
36633 | if (!(reader instanceof $Reader))
|
36634 | reader = new $Reader(reader);
|
36635 | return this.decode(reader, reader.uint32());
|
36636 | };
|
36637 |
|
36638 | /**
|
36639 | * Verifies an Annotation message.
|
36640 | * @function verify
|
36641 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
36642 | * @static
|
36643 | * @param {Object.<string,*>} message Plain object to verify
|
36644 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
36645 | */
|
36646 | Annotation.verify = function verify(message) {
|
36647 | if (typeof message !== "object" || message === null)
|
36648 | return "object expected";
|
36649 | if (message.path != null && message.hasOwnProperty("path")) {
|
36650 | if (!Array.isArray(message.path))
|
36651 | return "path: array expected";
|
36652 | for (var i = 0; i < message.path.length; ++i)
|
36653 | if (!$util.isInteger(message.path[i]))
|
36654 | return "path: integer[] expected";
|
36655 | }
|
36656 | if (message.sourceFile != null && message.hasOwnProperty("sourceFile"))
|
36657 | if (!$util.isString(message.sourceFile))
|
36658 | return "sourceFile: string expected";
|
36659 | if (message.begin != null && message.hasOwnProperty("begin"))
|
36660 | if (!$util.isInteger(message.begin))
|
36661 | return "begin: integer expected";
|
36662 | if (message.end != null && message.hasOwnProperty("end"))
|
36663 | if (!$util.isInteger(message.end))
|
36664 | return "end: integer expected";
|
36665 | if (message.semantic != null && message.hasOwnProperty("semantic"))
|
36666 | switch (message.semantic) {
|
36667 | default:
|
36668 | return "semantic: enum value expected";
|
36669 | case 0:
|
36670 | case 1:
|
36671 | case 2:
|
36672 | break;
|
36673 | }
|
36674 | return null;
|
36675 | };
|
36676 |
|
36677 | /**
|
36678 | * Creates an Annotation message from a plain object. Also converts values to their respective internal types.
|
36679 | * @function fromObject
|
36680 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
36681 | * @static
|
36682 | * @param {Object.<string,*>} object Plain object
|
36683 | * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation
|
36684 | */
|
36685 | Annotation.fromObject = function fromObject(object) {
|
36686 | if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation)
|
36687 | return object;
|
36688 | var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation();
|
36689 | if (object.path) {
|
36690 | if (!Array.isArray(object.path))
|
36691 | throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected");
|
36692 | message.path = [];
|
36693 | for (var i = 0; i < object.path.length; ++i)
|
36694 | message.path[i] = object.path[i] | 0;
|
36695 | }
|
36696 | if (object.sourceFile != null)
|
36697 | message.sourceFile = String(object.sourceFile);
|
36698 | if (object.begin != null)
|
36699 | message.begin = object.begin | 0;
|
36700 | if (object.end != null)
|
36701 | message.end = object.end | 0;
|
36702 | switch (object.semantic) {
|
36703 | default:
|
36704 | if (typeof object.semantic === "number") {
|
36705 | message.semantic = object.semantic;
|
36706 | break;
|
36707 | }
|
36708 | break;
|
36709 | case "NONE":
|
36710 | case 0:
|
36711 | message.semantic = 0;
|
36712 | break;
|
36713 | case "SET":
|
36714 | case 1:
|
36715 | message.semantic = 1;
|
36716 | break;
|
36717 | case "ALIAS":
|
36718 | case 2:
|
36719 | message.semantic = 2;
|
36720 | break;
|
36721 | }
|
36722 | return message;
|
36723 | };
|
36724 |
|
36725 | /**
|
36726 | * Creates a plain object from an Annotation message. Also converts values to other types if specified.
|
36727 | * @function toObject
|
36728 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
36729 | * @static
|
36730 | * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation
|
36731 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
36732 | * @returns {Object.<string,*>} Plain object
|
36733 | */
|
36734 | Annotation.toObject = function toObject(message, options) {
|
36735 | if (!options)
|
36736 | options = {};
|
36737 | var object = {};
|
36738 | if (options.arrays || options.defaults)
|
36739 | object.path = [];
|
36740 | if (options.defaults) {
|
36741 | object.sourceFile = "";
|
36742 | object.begin = 0;
|
36743 | object.end = 0;
|
36744 | object.semantic = options.enums === String ? "NONE" : 0;
|
36745 | }
|
36746 | if (message.path && message.path.length) {
|
36747 | object.path = [];
|
36748 | for (var j = 0; j < message.path.length; ++j)
|
36749 | object.path[j] = message.path[j];
|
36750 | }
|
36751 | if (message.sourceFile != null && message.hasOwnProperty("sourceFile"))
|
36752 | object.sourceFile = message.sourceFile;
|
36753 | if (message.begin != null && message.hasOwnProperty("begin"))
|
36754 | object.begin = message.begin;
|
36755 | if (message.end != null && message.hasOwnProperty("end"))
|
36756 | object.end = message.end;
|
36757 | if (message.semantic != null && message.hasOwnProperty("semantic"))
|
36758 | object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic;
|
36759 | return object;
|
36760 | };
|
36761 |
|
36762 | /**
|
36763 | * Converts this Annotation to JSON.
|
36764 | * @function toJSON
|
36765 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
36766 | * @instance
|
36767 | * @returns {Object.<string,*>} JSON object
|
36768 | */
|
36769 | Annotation.prototype.toJSON = function toJSON() {
|
36770 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
36771 | };
|
36772 |
|
36773 | /**
|
36774 | * Gets the default type url for Annotation
|
36775 | * @function getTypeUrl
|
36776 | * @memberof google.protobuf.GeneratedCodeInfo.Annotation
|
36777 | * @static
|
36778 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
36779 | * @returns {string} The default type url
|
36780 | */
|
36781 | Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
36782 | if (typeUrlPrefix === undefined) {
|
36783 | typeUrlPrefix = "type.googleapis.com";
|
36784 | }
|
36785 | return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation";
|
36786 | };
|
36787 |
|
36788 | /**
|
36789 | * Semantic enum.
|
36790 | * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic
|
36791 | * @enum {number}
|
36792 | * @property {number} NONE=0 NONE value
|
36793 | * @property {number} SET=1 SET value
|
36794 | * @property {number} ALIAS=2 ALIAS value
|
36795 | */
|
36796 | Annotation.Semantic = (function() {
|
36797 | var valuesById = {}, values = Object.create(valuesById);
|
36798 | values[valuesById[0] = "NONE"] = 0;
|
36799 | values[valuesById[1] = "SET"] = 1;
|
36800 | values[valuesById[2] = "ALIAS"] = 2;
|
36801 | return values;
|
36802 | })();
|
36803 |
|
36804 | return Annotation;
|
36805 | })();
|
36806 |
|
36807 | return GeneratedCodeInfo;
|
36808 | })();
|
36809 |
|
36810 | protobuf.Duration = (function() {
|
36811 |
|
36812 | /**
|
36813 | * Properties of a Duration.
|
36814 | * @memberof google.protobuf
|
36815 | * @interface IDuration
|
36816 | * @property {number|Long|null} [seconds] Duration seconds
|
36817 | * @property {number|null} [nanos] Duration nanos
|
36818 | */
|
36819 |
|
36820 | /**
|
36821 | * Constructs a new Duration.
|
36822 | * @memberof google.protobuf
|
36823 | * @classdesc Represents a Duration.
|
36824 | * @implements IDuration
|
36825 | * @constructor
|
36826 | * @param {google.protobuf.IDuration=} [properties] Properties to set
|
36827 | */
|
36828 | function Duration(properties) {
|
36829 | if (properties)
|
36830 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
36831 | if (properties[keys[i]] != null)
|
36832 | this[keys[i]] = properties[keys[i]];
|
36833 | }
|
36834 |
|
36835 | /**
|
36836 | * Duration seconds.
|
36837 | * @member {number|Long} seconds
|
36838 | * @memberof google.protobuf.Duration
|
36839 | * @instance
|
36840 | */
|
36841 | Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
36842 |
|
36843 | /**
|
36844 | * Duration nanos.
|
36845 | * @member {number} nanos
|
36846 | * @memberof google.protobuf.Duration
|
36847 | * @instance
|
36848 | */
|
36849 | Duration.prototype.nanos = 0;
|
36850 |
|
36851 | /**
|
36852 | * Creates a new Duration instance using the specified properties.
|
36853 | * @function create
|
36854 | * @memberof google.protobuf.Duration
|
36855 | * @static
|
36856 | * @param {google.protobuf.IDuration=} [properties] Properties to set
|
36857 | * @returns {google.protobuf.Duration} Duration instance
|
36858 | */
|
36859 | Duration.create = function create(properties) {
|
36860 | return new Duration(properties);
|
36861 | };
|
36862 |
|
36863 | /**
|
36864 | * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages.
|
36865 | * @function encode
|
36866 | * @memberof google.protobuf.Duration
|
36867 | * @static
|
36868 | * @param {google.protobuf.IDuration} message Duration message or plain object to encode
|
36869 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
36870 | * @returns {$protobuf.Writer} Writer
|
36871 | */
|
36872 | Duration.encode = function encode(message, writer) {
|
36873 | if (!writer)
|
36874 | writer = $Writer.create();
|
36875 | if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds"))
|
36876 | writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds);
|
36877 | if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos"))
|
36878 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos);
|
36879 | return writer;
|
36880 | };
|
36881 |
|
36882 | /**
|
36883 | * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages.
|
36884 | * @function encodeDelimited
|
36885 | * @memberof google.protobuf.Duration
|
36886 | * @static
|
36887 | * @param {google.protobuf.IDuration} message Duration message or plain object to encode
|
36888 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
36889 | * @returns {$protobuf.Writer} Writer
|
36890 | */
|
36891 | Duration.encodeDelimited = function encodeDelimited(message, writer) {
|
36892 | return this.encode(message, writer).ldelim();
|
36893 | };
|
36894 |
|
36895 | /**
|
36896 | * Decodes a Duration message from the specified reader or buffer.
|
36897 | * @function decode
|
36898 | * @memberof google.protobuf.Duration
|
36899 | * @static
|
36900 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
36901 | * @param {number} [length] Message length if known beforehand
|
36902 | * @returns {google.protobuf.Duration} Duration
|
36903 | * @throws {Error} If the payload is not a reader or valid buffer
|
36904 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
36905 | */
|
36906 | Duration.decode = function decode(reader, length) {
|
36907 | if (!(reader instanceof $Reader))
|
36908 | reader = $Reader.create(reader);
|
36909 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration();
|
36910 | while (reader.pos < end) {
|
36911 | var tag = reader.uint32();
|
36912 | switch (tag >>> 3) {
|
36913 | case 1: {
|
36914 | message.seconds = reader.int64();
|
36915 | break;
|
36916 | }
|
36917 | case 2: {
|
36918 | message.nanos = reader.int32();
|
36919 | break;
|
36920 | }
|
36921 | default:
|
36922 | reader.skipType(tag & 7);
|
36923 | break;
|
36924 | }
|
36925 | }
|
36926 | return message;
|
36927 | };
|
36928 |
|
36929 | /**
|
36930 | * Decodes a Duration message from the specified reader or buffer, length delimited.
|
36931 | * @function decodeDelimited
|
36932 | * @memberof google.protobuf.Duration
|
36933 | * @static
|
36934 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
36935 | * @returns {google.protobuf.Duration} Duration
|
36936 | * @throws {Error} If the payload is not a reader or valid buffer
|
36937 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
36938 | */
|
36939 | Duration.decodeDelimited = function decodeDelimited(reader) {
|
36940 | if (!(reader instanceof $Reader))
|
36941 | reader = new $Reader(reader);
|
36942 | return this.decode(reader, reader.uint32());
|
36943 | };
|
36944 |
|
36945 | /**
|
36946 | * Verifies a Duration message.
|
36947 | * @function verify
|
36948 | * @memberof google.protobuf.Duration
|
36949 | * @static
|
36950 | * @param {Object.<string,*>} message Plain object to verify
|
36951 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
36952 | */
|
36953 | Duration.verify = function verify(message) {
|
36954 | if (typeof message !== "object" || message === null)
|
36955 | return "object expected";
|
36956 | if (message.seconds != null && message.hasOwnProperty("seconds"))
|
36957 | if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high)))
|
36958 | return "seconds: integer|Long expected";
|
36959 | if (message.nanos != null && message.hasOwnProperty("nanos"))
|
36960 | if (!$util.isInteger(message.nanos))
|
36961 | return "nanos: integer expected";
|
36962 | return null;
|
36963 | };
|
36964 |
|
36965 | /**
|
36966 | * Creates a Duration message from a plain object. Also converts values to their respective internal types.
|
36967 | * @function fromObject
|
36968 | * @memberof google.protobuf.Duration
|
36969 | * @static
|
36970 | * @param {Object.<string,*>} object Plain object
|
36971 | * @returns {google.protobuf.Duration} Duration
|
36972 | */
|
36973 | Duration.fromObject = function fromObject(object) {
|
36974 | if (object instanceof $root.google.protobuf.Duration)
|
36975 | return object;
|
36976 | var message = new $root.google.protobuf.Duration();
|
36977 | if (object.seconds != null)
|
36978 | if ($util.Long)
|
36979 | (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false;
|
36980 | else if (typeof object.seconds === "string")
|
36981 | message.seconds = parseInt(object.seconds, 10);
|
36982 | else if (typeof object.seconds === "number")
|
36983 | message.seconds = object.seconds;
|
36984 | else if (typeof object.seconds === "object")
|
36985 | message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber();
|
36986 | if (object.nanos != null)
|
36987 | message.nanos = object.nanos | 0;
|
36988 | return message;
|
36989 | };
|
36990 |
|
36991 | /**
|
36992 | * Creates a plain object from a Duration message. Also converts values to other types if specified.
|
36993 | * @function toObject
|
36994 | * @memberof google.protobuf.Duration
|
36995 | * @static
|
36996 | * @param {google.protobuf.Duration} message Duration
|
36997 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
36998 | * @returns {Object.<string,*>} Plain object
|
36999 | */
|
37000 | Duration.toObject = function toObject(message, options) {
|
37001 | if (!options)
|
37002 | options = {};
|
37003 | var object = {};
|
37004 | if (options.defaults) {
|
37005 | if ($util.Long) {
|
37006 | var long = new $util.Long(0, 0, false);
|
37007 | object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
37008 | } else
|
37009 | object.seconds = options.longs === String ? "0" : 0;
|
37010 | object.nanos = 0;
|
37011 | }
|
37012 | if (message.seconds != null && message.hasOwnProperty("seconds"))
|
37013 | if (typeof message.seconds === "number")
|
37014 | object.seconds = options.longs === String ? String(message.seconds) : message.seconds;
|
37015 | else
|
37016 | object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds;
|
37017 | if (message.nanos != null && message.hasOwnProperty("nanos"))
|
37018 | object.nanos = message.nanos;
|
37019 | return object;
|
37020 | };
|
37021 |
|
37022 | /**
|
37023 | * Converts this Duration to JSON.
|
37024 | * @function toJSON
|
37025 | * @memberof google.protobuf.Duration
|
37026 | * @instance
|
37027 | * @returns {Object.<string,*>} JSON object
|
37028 | */
|
37029 | Duration.prototype.toJSON = function toJSON() {
|
37030 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
37031 | };
|
37032 |
|
37033 | /**
|
37034 | * Gets the default type url for Duration
|
37035 | * @function getTypeUrl
|
37036 | * @memberof google.protobuf.Duration
|
37037 | * @static
|
37038 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
37039 | * @returns {string} The default type url
|
37040 | */
|
37041 | Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
37042 | if (typeUrlPrefix === undefined) {
|
37043 | typeUrlPrefix = "type.googleapis.com";
|
37044 | }
|
37045 | return typeUrlPrefix + "/google.protobuf.Duration";
|
37046 | };
|
37047 |
|
37048 | return Duration;
|
37049 | })();
|
37050 |
|
37051 | protobuf.Any = (function() {
|
37052 |
|
37053 | /**
|
37054 | * Properties of an Any.
|
37055 | * @memberof google.protobuf
|
37056 | * @interface IAny
|
37057 | * @property {string|null} [type_url] Any type_url
|
37058 | * @property {Uint8Array|null} [value] Any value
|
37059 | */
|
37060 |
|
37061 | /**
|
37062 | * Constructs a new Any.
|
37063 | * @memberof google.protobuf
|
37064 | * @classdesc Represents an Any.
|
37065 | * @implements IAny
|
37066 | * @constructor
|
37067 | * @param {google.protobuf.IAny=} [properties] Properties to set
|
37068 | */
|
37069 | function Any(properties) {
|
37070 | if (properties)
|
37071 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
37072 | if (properties[keys[i]] != null)
|
37073 | this[keys[i]] = properties[keys[i]];
|
37074 | }
|
37075 |
|
37076 | /**
|
37077 | * Any type_url.
|
37078 | * @member {string} type_url
|
37079 | * @memberof google.protobuf.Any
|
37080 | * @instance
|
37081 | */
|
37082 | Any.prototype.type_url = "";
|
37083 |
|
37084 | /**
|
37085 | * Any value.
|
37086 | * @member {Uint8Array} value
|
37087 | * @memberof google.protobuf.Any
|
37088 | * @instance
|
37089 | */
|
37090 | Any.prototype.value = $util.newBuffer([]);
|
37091 |
|
37092 | /**
|
37093 | * Creates a new Any instance using the specified properties.
|
37094 | * @function create
|
37095 | * @memberof google.protobuf.Any
|
37096 | * @static
|
37097 | * @param {google.protobuf.IAny=} [properties] Properties to set
|
37098 | * @returns {google.protobuf.Any} Any instance
|
37099 | */
|
37100 | Any.create = function create(properties) {
|
37101 | return new Any(properties);
|
37102 | };
|
37103 |
|
37104 | /**
|
37105 | * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages.
|
37106 | * @function encode
|
37107 | * @memberof google.protobuf.Any
|
37108 | * @static
|
37109 | * @param {google.protobuf.IAny} message Any message or plain object to encode
|
37110 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
37111 | * @returns {$protobuf.Writer} Writer
|
37112 | */
|
37113 | Any.encode = function encode(message, writer) {
|
37114 | if (!writer)
|
37115 | writer = $Writer.create();
|
37116 | if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url"))
|
37117 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url);
|
37118 | if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
37119 | writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value);
|
37120 | return writer;
|
37121 | };
|
37122 |
|
37123 | /**
|
37124 | * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages.
|
37125 | * @function encodeDelimited
|
37126 | * @memberof google.protobuf.Any
|
37127 | * @static
|
37128 | * @param {google.protobuf.IAny} message Any message or plain object to encode
|
37129 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
37130 | * @returns {$protobuf.Writer} Writer
|
37131 | */
|
37132 | Any.encodeDelimited = function encodeDelimited(message, writer) {
|
37133 | return this.encode(message, writer).ldelim();
|
37134 | };
|
37135 |
|
37136 | /**
|
37137 | * Decodes an Any message from the specified reader or buffer.
|
37138 | * @function decode
|
37139 | * @memberof google.protobuf.Any
|
37140 | * @static
|
37141 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
37142 | * @param {number} [length] Message length if known beforehand
|
37143 | * @returns {google.protobuf.Any} Any
|
37144 | * @throws {Error} If the payload is not a reader or valid buffer
|
37145 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
37146 | */
|
37147 | Any.decode = function decode(reader, length) {
|
37148 | if (!(reader instanceof $Reader))
|
37149 | reader = $Reader.create(reader);
|
37150 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any();
|
37151 | while (reader.pos < end) {
|
37152 | var tag = reader.uint32();
|
37153 | switch (tag >>> 3) {
|
37154 | case 1: {
|
37155 | message.type_url = reader.string();
|
37156 | break;
|
37157 | }
|
37158 | case 2: {
|
37159 | message.value = reader.bytes();
|
37160 | break;
|
37161 | }
|
37162 | default:
|
37163 | reader.skipType(tag & 7);
|
37164 | break;
|
37165 | }
|
37166 | }
|
37167 | return message;
|
37168 | };
|
37169 |
|
37170 | /**
|
37171 | * Decodes an Any message from the specified reader or buffer, length delimited.
|
37172 | * @function decodeDelimited
|
37173 | * @memberof google.protobuf.Any
|
37174 | * @static
|
37175 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
37176 | * @returns {google.protobuf.Any} Any
|
37177 | * @throws {Error} If the payload is not a reader or valid buffer
|
37178 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
37179 | */
|
37180 | Any.decodeDelimited = function decodeDelimited(reader) {
|
37181 | if (!(reader instanceof $Reader))
|
37182 | reader = new $Reader(reader);
|
37183 | return this.decode(reader, reader.uint32());
|
37184 | };
|
37185 |
|
37186 | /**
|
37187 | * Verifies an Any message.
|
37188 | * @function verify
|
37189 | * @memberof google.protobuf.Any
|
37190 | * @static
|
37191 | * @param {Object.<string,*>} message Plain object to verify
|
37192 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
37193 | */
|
37194 | Any.verify = function verify(message) {
|
37195 | if (typeof message !== "object" || message === null)
|
37196 | return "object expected";
|
37197 | if (message.type_url != null && message.hasOwnProperty("type_url"))
|
37198 | if (!$util.isString(message.type_url))
|
37199 | return "type_url: string expected";
|
37200 | if (message.value != null && message.hasOwnProperty("value"))
|
37201 | if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
|
37202 | return "value: buffer expected";
|
37203 | return null;
|
37204 | };
|
37205 |
|
37206 | /**
|
37207 | * Creates an Any message from a plain object. Also converts values to their respective internal types.
|
37208 | * @function fromObject
|
37209 | * @memberof google.protobuf.Any
|
37210 | * @static
|
37211 | * @param {Object.<string,*>} object Plain object
|
37212 | * @returns {google.protobuf.Any} Any
|
37213 | */
|
37214 | Any.fromObject = function fromObject(object) {
|
37215 | if (object instanceof $root.google.protobuf.Any)
|
37216 | return object;
|
37217 | var message = new $root.google.protobuf.Any();
|
37218 | if (object.type_url != null)
|
37219 | message.type_url = String(object.type_url);
|
37220 | if (object.value != null)
|
37221 | if (typeof object.value === "string")
|
37222 | $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0);
|
37223 | else if (object.value.length >= 0)
|
37224 | message.value = object.value;
|
37225 | return message;
|
37226 | };
|
37227 |
|
37228 | /**
|
37229 | * Creates a plain object from an Any message. Also converts values to other types if specified.
|
37230 | * @function toObject
|
37231 | * @memberof google.protobuf.Any
|
37232 | * @static
|
37233 | * @param {google.protobuf.Any} message Any
|
37234 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
37235 | * @returns {Object.<string,*>} Plain object
|
37236 | */
|
37237 | Any.toObject = function toObject(message, options) {
|
37238 | if (!options)
|
37239 | options = {};
|
37240 | var object = {};
|
37241 | if (options.defaults) {
|
37242 | object.type_url = "";
|
37243 | if (options.bytes === String)
|
37244 | object.value = "";
|
37245 | else {
|
37246 | object.value = [];
|
37247 | if (options.bytes !== Array)
|
37248 | object.value = $util.newBuffer(object.value);
|
37249 | }
|
37250 | }
|
37251 | if (message.type_url != null && message.hasOwnProperty("type_url"))
|
37252 | object.type_url = message.type_url;
|
37253 | if (message.value != null && message.hasOwnProperty("value"))
|
37254 | object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value;
|
37255 | return object;
|
37256 | };
|
37257 |
|
37258 | /**
|
37259 | * Converts this Any to JSON.
|
37260 | * @function toJSON
|
37261 | * @memberof google.protobuf.Any
|
37262 | * @instance
|
37263 | * @returns {Object.<string,*>} JSON object
|
37264 | */
|
37265 | Any.prototype.toJSON = function toJSON() {
|
37266 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
37267 | };
|
37268 |
|
37269 | /**
|
37270 | * Gets the default type url for Any
|
37271 | * @function getTypeUrl
|
37272 | * @memberof google.protobuf.Any
|
37273 | * @static
|
37274 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
37275 | * @returns {string} The default type url
|
37276 | */
|
37277 | Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
37278 | if (typeUrlPrefix === undefined) {
|
37279 | typeUrlPrefix = "type.googleapis.com";
|
37280 | }
|
37281 | return typeUrlPrefix + "/google.protobuf.Any";
|
37282 | };
|
37283 |
|
37284 | return Any;
|
37285 | })();
|
37286 |
|
37287 | protobuf.Empty = (function() {
|
37288 |
|
37289 | /**
|
37290 | * Properties of an Empty.
|
37291 | * @memberof google.protobuf
|
37292 | * @interface IEmpty
|
37293 | */
|
37294 |
|
37295 | /**
|
37296 | * Constructs a new Empty.
|
37297 | * @memberof google.protobuf
|
37298 | * @classdesc Represents an Empty.
|
37299 | * @implements IEmpty
|
37300 | * @constructor
|
37301 | * @param {google.protobuf.IEmpty=} [properties] Properties to set
|
37302 | */
|
37303 | function Empty(properties) {
|
37304 | if (properties)
|
37305 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
37306 | if (properties[keys[i]] != null)
|
37307 | this[keys[i]] = properties[keys[i]];
|
37308 | }
|
37309 |
|
37310 | /**
|
37311 | * Creates a new Empty instance using the specified properties.
|
37312 | * @function create
|
37313 | * @memberof google.protobuf.Empty
|
37314 | * @static
|
37315 | * @param {google.protobuf.IEmpty=} [properties] Properties to set
|
37316 | * @returns {google.protobuf.Empty} Empty instance
|
37317 | */
|
37318 | Empty.create = function create(properties) {
|
37319 | return new Empty(properties);
|
37320 | };
|
37321 |
|
37322 | /**
|
37323 | * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages.
|
37324 | * @function encode
|
37325 | * @memberof google.protobuf.Empty
|
37326 | * @static
|
37327 | * @param {google.protobuf.IEmpty} message Empty message or plain object to encode
|
37328 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
37329 | * @returns {$protobuf.Writer} Writer
|
37330 | */
|
37331 | Empty.encode = function encode(message, writer) {
|
37332 | if (!writer)
|
37333 | writer = $Writer.create();
|
37334 | return writer;
|
37335 | };
|
37336 |
|
37337 | /**
|
37338 | * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages.
|
37339 | * @function encodeDelimited
|
37340 | * @memberof google.protobuf.Empty
|
37341 | * @static
|
37342 | * @param {google.protobuf.IEmpty} message Empty message or plain object to encode
|
37343 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
37344 | * @returns {$protobuf.Writer} Writer
|
37345 | */
|
37346 | Empty.encodeDelimited = function encodeDelimited(message, writer) {
|
37347 | return this.encode(message, writer).ldelim();
|
37348 | };
|
37349 |
|
37350 | /**
|
37351 | * Decodes an Empty message from the specified reader or buffer.
|
37352 | * @function decode
|
37353 | * @memberof google.protobuf.Empty
|
37354 | * @static
|
37355 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
37356 | * @param {number} [length] Message length if known beforehand
|
37357 | * @returns {google.protobuf.Empty} Empty
|
37358 | * @throws {Error} If the payload is not a reader or valid buffer
|
37359 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
37360 | */
|
37361 | Empty.decode = function decode(reader, length) {
|
37362 | if (!(reader instanceof $Reader))
|
37363 | reader = $Reader.create(reader);
|
37364 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty();
|
37365 | while (reader.pos < end) {
|
37366 | var tag = reader.uint32();
|
37367 | switch (tag >>> 3) {
|
37368 | default:
|
37369 | reader.skipType(tag & 7);
|
37370 | break;
|
37371 | }
|
37372 | }
|
37373 | return message;
|
37374 | };
|
37375 |
|
37376 | /**
|
37377 | * Decodes an Empty message from the specified reader or buffer, length delimited.
|
37378 | * @function decodeDelimited
|
37379 | * @memberof google.protobuf.Empty
|
37380 | * @static
|
37381 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
37382 | * @returns {google.protobuf.Empty} Empty
|
37383 | * @throws {Error} If the payload is not a reader or valid buffer
|
37384 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
37385 | */
|
37386 | Empty.decodeDelimited = function decodeDelimited(reader) {
|
37387 | if (!(reader instanceof $Reader))
|
37388 | reader = new $Reader(reader);
|
37389 | return this.decode(reader, reader.uint32());
|
37390 | };
|
37391 |
|
37392 | /**
|
37393 | * Verifies an Empty message.
|
37394 | * @function verify
|
37395 | * @memberof google.protobuf.Empty
|
37396 | * @static
|
37397 | * @param {Object.<string,*>} message Plain object to verify
|
37398 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
37399 | */
|
37400 | Empty.verify = function verify(message) {
|
37401 | if (typeof message !== "object" || message === null)
|
37402 | return "object expected";
|
37403 | return null;
|
37404 | };
|
37405 |
|
37406 | /**
|
37407 | * Creates an Empty message from a plain object. Also converts values to their respective internal types.
|
37408 | * @function fromObject
|
37409 | * @memberof google.protobuf.Empty
|
37410 | * @static
|
37411 | * @param {Object.<string,*>} object Plain object
|
37412 | * @returns {google.protobuf.Empty} Empty
|
37413 | */
|
37414 | Empty.fromObject = function fromObject(object) {
|
37415 | if (object instanceof $root.google.protobuf.Empty)
|
37416 | return object;
|
37417 | return new $root.google.protobuf.Empty();
|
37418 | };
|
37419 |
|
37420 | /**
|
37421 | * Creates a plain object from an Empty message. Also converts values to other types if specified.
|
37422 | * @function toObject
|
37423 | * @memberof google.protobuf.Empty
|
37424 | * @static
|
37425 | * @param {google.protobuf.Empty} message Empty
|
37426 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
37427 | * @returns {Object.<string,*>} Plain object
|
37428 | */
|
37429 | Empty.toObject = function toObject() {
|
37430 | return {};
|
37431 | };
|
37432 |
|
37433 | /**
|
37434 | * Converts this Empty to JSON.
|
37435 | * @function toJSON
|
37436 | * @memberof google.protobuf.Empty
|
37437 | * @instance
|
37438 | * @returns {Object.<string,*>} JSON object
|
37439 | */
|
37440 | Empty.prototype.toJSON = function toJSON() {
|
37441 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
37442 | };
|
37443 |
|
37444 | /**
|
37445 | * Gets the default type url for Empty
|
37446 | * @function getTypeUrl
|
37447 | * @memberof google.protobuf.Empty
|
37448 | * @static
|
37449 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
37450 | * @returns {string} The default type url
|
37451 | */
|
37452 | Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
37453 | if (typeUrlPrefix === undefined) {
|
37454 | typeUrlPrefix = "type.googleapis.com";
|
37455 | }
|
37456 | return typeUrlPrefix + "/google.protobuf.Empty";
|
37457 | };
|
37458 |
|
37459 | return Empty;
|
37460 | })();
|
37461 |
|
37462 | protobuf.Timestamp = (function() {
|
37463 |
|
37464 | /**
|
37465 | * Properties of a Timestamp.
|
37466 | * @memberof google.protobuf
|
37467 | * @interface ITimestamp
|
37468 | * @property {number|Long|null} [seconds] Timestamp seconds
|
37469 | * @property {number|null} [nanos] Timestamp nanos
|
37470 | */
|
37471 |
|
37472 | /**
|
37473 | * Constructs a new Timestamp.
|
37474 | * @memberof google.protobuf
|
37475 | * @classdesc Represents a Timestamp.
|
37476 | * @implements ITimestamp
|
37477 | * @constructor
|
37478 | * @param {google.protobuf.ITimestamp=} [properties] Properties to set
|
37479 | */
|
37480 | function Timestamp(properties) {
|
37481 | if (properties)
|
37482 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
37483 | if (properties[keys[i]] != null)
|
37484 | this[keys[i]] = properties[keys[i]];
|
37485 | }
|
37486 |
|
37487 | /**
|
37488 | * Timestamp seconds.
|
37489 | * @member {number|Long} seconds
|
37490 | * @memberof google.protobuf.Timestamp
|
37491 | * @instance
|
37492 | */
|
37493 | Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
37494 |
|
37495 | /**
|
37496 | * Timestamp nanos.
|
37497 | * @member {number} nanos
|
37498 | * @memberof google.protobuf.Timestamp
|
37499 | * @instance
|
37500 | */
|
37501 | Timestamp.prototype.nanos = 0;
|
37502 |
|
37503 | /**
|
37504 | * Creates a new Timestamp instance using the specified properties.
|
37505 | * @function create
|
37506 | * @memberof google.protobuf.Timestamp
|
37507 | * @static
|
37508 | * @param {google.protobuf.ITimestamp=} [properties] Properties to set
|
37509 | * @returns {google.protobuf.Timestamp} Timestamp instance
|
37510 | */
|
37511 | Timestamp.create = function create(properties) {
|
37512 | return new Timestamp(properties);
|
37513 | };
|
37514 |
|
37515 | /**
|
37516 | * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages.
|
37517 | * @function encode
|
37518 | * @memberof google.protobuf.Timestamp
|
37519 | * @static
|
37520 | * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode
|
37521 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
37522 | * @returns {$protobuf.Writer} Writer
|
37523 | */
|
37524 | Timestamp.encode = function encode(message, writer) {
|
37525 | if (!writer)
|
37526 | writer = $Writer.create();
|
37527 | if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds"))
|
37528 | writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds);
|
37529 | if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos"))
|
37530 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos);
|
37531 | return writer;
|
37532 | };
|
37533 |
|
37534 | /**
|
37535 | * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages.
|
37536 | * @function encodeDelimited
|
37537 | * @memberof google.protobuf.Timestamp
|
37538 | * @static
|
37539 | * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode
|
37540 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
37541 | * @returns {$protobuf.Writer} Writer
|
37542 | */
|
37543 | Timestamp.encodeDelimited = function encodeDelimited(message, writer) {
|
37544 | return this.encode(message, writer).ldelim();
|
37545 | };
|
37546 |
|
37547 | /**
|
37548 | * Decodes a Timestamp message from the specified reader or buffer.
|
37549 | * @function decode
|
37550 | * @memberof google.protobuf.Timestamp
|
37551 | * @static
|
37552 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
37553 | * @param {number} [length] Message length if known beforehand
|
37554 | * @returns {google.protobuf.Timestamp} Timestamp
|
37555 | * @throws {Error} If the payload is not a reader or valid buffer
|
37556 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
37557 | */
|
37558 | Timestamp.decode = function decode(reader, length) {
|
37559 | if (!(reader instanceof $Reader))
|
37560 | reader = $Reader.create(reader);
|
37561 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp();
|
37562 | while (reader.pos < end) {
|
37563 | var tag = reader.uint32();
|
37564 | switch (tag >>> 3) {
|
37565 | case 1: {
|
37566 | message.seconds = reader.int64();
|
37567 | break;
|
37568 | }
|
37569 | case 2: {
|
37570 | message.nanos = reader.int32();
|
37571 | break;
|
37572 | }
|
37573 | default:
|
37574 | reader.skipType(tag & 7);
|
37575 | break;
|
37576 | }
|
37577 | }
|
37578 | return message;
|
37579 | };
|
37580 |
|
37581 | /**
|
37582 | * Decodes a Timestamp message from the specified reader or buffer, length delimited.
|
37583 | * @function decodeDelimited
|
37584 | * @memberof google.protobuf.Timestamp
|
37585 | * @static
|
37586 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
37587 | * @returns {google.protobuf.Timestamp} Timestamp
|
37588 | * @throws {Error} If the payload is not a reader or valid buffer
|
37589 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
37590 | */
|
37591 | Timestamp.decodeDelimited = function decodeDelimited(reader) {
|
37592 | if (!(reader instanceof $Reader))
|
37593 | reader = new $Reader(reader);
|
37594 | return this.decode(reader, reader.uint32());
|
37595 | };
|
37596 |
|
37597 | /**
|
37598 | * Verifies a Timestamp message.
|
37599 | * @function verify
|
37600 | * @memberof google.protobuf.Timestamp
|
37601 | * @static
|
37602 | * @param {Object.<string,*>} message Plain object to verify
|
37603 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
37604 | */
|
37605 | Timestamp.verify = function verify(message) {
|
37606 | if (typeof message !== "object" || message === null)
|
37607 | return "object expected";
|
37608 | if (message.seconds != null && message.hasOwnProperty("seconds"))
|
37609 | if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high)))
|
37610 | return "seconds: integer|Long expected";
|
37611 | if (message.nanos != null && message.hasOwnProperty("nanos"))
|
37612 | if (!$util.isInteger(message.nanos))
|
37613 | return "nanos: integer expected";
|
37614 | return null;
|
37615 | };
|
37616 |
|
37617 | /**
|
37618 | * Creates a Timestamp message from a plain object. Also converts values to their respective internal types.
|
37619 | * @function fromObject
|
37620 | * @memberof google.protobuf.Timestamp
|
37621 | * @static
|
37622 | * @param {Object.<string,*>} object Plain object
|
37623 | * @returns {google.protobuf.Timestamp} Timestamp
|
37624 | */
|
37625 | Timestamp.fromObject = function fromObject(object) {
|
37626 | if (object instanceof $root.google.protobuf.Timestamp)
|
37627 | return object;
|
37628 | var message = new $root.google.protobuf.Timestamp();
|
37629 | if (object.seconds != null)
|
37630 | if ($util.Long)
|
37631 | (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false;
|
37632 | else if (typeof object.seconds === "string")
|
37633 | message.seconds = parseInt(object.seconds, 10);
|
37634 | else if (typeof object.seconds === "number")
|
37635 | message.seconds = object.seconds;
|
37636 | else if (typeof object.seconds === "object")
|
37637 | message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber();
|
37638 | if (object.nanos != null)
|
37639 | message.nanos = object.nanos | 0;
|
37640 | return message;
|
37641 | };
|
37642 |
|
37643 | /**
|
37644 | * Creates a plain object from a Timestamp message. Also converts values to other types if specified.
|
37645 | * @function toObject
|
37646 | * @memberof google.protobuf.Timestamp
|
37647 | * @static
|
37648 | * @param {google.protobuf.Timestamp} message Timestamp
|
37649 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
37650 | * @returns {Object.<string,*>} Plain object
|
37651 | */
|
37652 | Timestamp.toObject = function toObject(message, options) {
|
37653 | if (!options)
|
37654 | options = {};
|
37655 | var object = {};
|
37656 | if (options.defaults) {
|
37657 | if ($util.Long) {
|
37658 | var long = new $util.Long(0, 0, false);
|
37659 | object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
37660 | } else
|
37661 | object.seconds = options.longs === String ? "0" : 0;
|
37662 | object.nanos = 0;
|
37663 | }
|
37664 | if (message.seconds != null && message.hasOwnProperty("seconds"))
|
37665 | if (typeof message.seconds === "number")
|
37666 | object.seconds = options.longs === String ? String(message.seconds) : message.seconds;
|
37667 | else
|
37668 | object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds;
|
37669 | if (message.nanos != null && message.hasOwnProperty("nanos"))
|
37670 | object.nanos = message.nanos;
|
37671 | return object;
|
37672 | };
|
37673 |
|
37674 | /**
|
37675 | * Converts this Timestamp to JSON.
|
37676 | * @function toJSON
|
37677 | * @memberof google.protobuf.Timestamp
|
37678 | * @instance
|
37679 | * @returns {Object.<string,*>} JSON object
|
37680 | */
|
37681 | Timestamp.prototype.toJSON = function toJSON() {
|
37682 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
37683 | };
|
37684 |
|
37685 | /**
|
37686 | * Gets the default type url for Timestamp
|
37687 | * @function getTypeUrl
|
37688 | * @memberof google.protobuf.Timestamp
|
37689 | * @static
|
37690 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
37691 | * @returns {string} The default type url
|
37692 | */
|
37693 | Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
37694 | if (typeUrlPrefix === undefined) {
|
37695 | typeUrlPrefix = "type.googleapis.com";
|
37696 | }
|
37697 | return typeUrlPrefix + "/google.protobuf.Timestamp";
|
37698 | };
|
37699 |
|
37700 | return Timestamp;
|
37701 | })();
|
37702 |
|
37703 | protobuf.Struct = (function() {
|
37704 |
|
37705 | /**
|
37706 | * Properties of a Struct.
|
37707 | * @memberof google.protobuf
|
37708 | * @interface IStruct
|
37709 | * @property {Object.<string,google.protobuf.IValue>|null} [fields] Struct fields
|
37710 | */
|
37711 |
|
37712 | /**
|
37713 | * Constructs a new Struct.
|
37714 | * @memberof google.protobuf
|
37715 | * @classdesc Represents a Struct.
|
37716 | * @implements IStruct
|
37717 | * @constructor
|
37718 | * @param {google.protobuf.IStruct=} [properties] Properties to set
|
37719 | */
|
37720 | function Struct(properties) {
|
37721 | this.fields = {};
|
37722 | if (properties)
|
37723 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
37724 | if (properties[keys[i]] != null)
|
37725 | this[keys[i]] = properties[keys[i]];
|
37726 | }
|
37727 |
|
37728 | /**
|
37729 | * Struct fields.
|
37730 | * @member {Object.<string,google.protobuf.IValue>} fields
|
37731 | * @memberof google.protobuf.Struct
|
37732 | * @instance
|
37733 | */
|
37734 | Struct.prototype.fields = $util.emptyObject;
|
37735 |
|
37736 | /**
|
37737 | * Creates a new Struct instance using the specified properties.
|
37738 | * @function create
|
37739 | * @memberof google.protobuf.Struct
|
37740 | * @static
|
37741 | * @param {google.protobuf.IStruct=} [properties] Properties to set
|
37742 | * @returns {google.protobuf.Struct} Struct instance
|
37743 | */
|
37744 | Struct.create = function create(properties) {
|
37745 | return new Struct(properties);
|
37746 | };
|
37747 |
|
37748 | /**
|
37749 | * Encodes the specified Struct message. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages.
|
37750 | * @function encode
|
37751 | * @memberof google.protobuf.Struct
|
37752 | * @static
|
37753 | * @param {google.protobuf.IStruct} message Struct message or plain object to encode
|
37754 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
37755 | * @returns {$protobuf.Writer} Writer
|
37756 | */
|
37757 | Struct.encode = function encode(message, writer) {
|
37758 | if (!writer)
|
37759 | writer = $Writer.create();
|
37760 | if (message.fields != null && Object.hasOwnProperty.call(message, "fields"))
|
37761 | for (var keys = Object.keys(message.fields), i = 0; i < keys.length; ++i) {
|
37762 | writer.uint32(/* id 1, wireType 2 =*/10).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]);
|
37763 | $root.google.protobuf.Value.encode(message.fields[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim();
|
37764 | }
|
37765 | return writer;
|
37766 | };
|
37767 |
|
37768 | /**
|
37769 | * Encodes the specified Struct message, length delimited. Does not implicitly {@link google.protobuf.Struct.verify|verify} messages.
|
37770 | * @function encodeDelimited
|
37771 | * @memberof google.protobuf.Struct
|
37772 | * @static
|
37773 | * @param {google.protobuf.IStruct} message Struct message or plain object to encode
|
37774 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
37775 | * @returns {$protobuf.Writer} Writer
|
37776 | */
|
37777 | Struct.encodeDelimited = function encodeDelimited(message, writer) {
|
37778 | return this.encode(message, writer).ldelim();
|
37779 | };
|
37780 |
|
37781 | /**
|
37782 | * Decodes a Struct message from the specified reader or buffer.
|
37783 | * @function decode
|
37784 | * @memberof google.protobuf.Struct
|
37785 | * @static
|
37786 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
37787 | * @param {number} [length] Message length if known beforehand
|
37788 | * @returns {google.protobuf.Struct} Struct
|
37789 | * @throws {Error} If the payload is not a reader or valid buffer
|
37790 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
37791 | */
|
37792 | Struct.decode = function decode(reader, length) {
|
37793 | if (!(reader instanceof $Reader))
|
37794 | reader = $Reader.create(reader);
|
37795 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Struct(), key, value;
|
37796 | while (reader.pos < end) {
|
37797 | var tag = reader.uint32();
|
37798 | switch (tag >>> 3) {
|
37799 | case 1: {
|
37800 | if (message.fields === $util.emptyObject)
|
37801 | message.fields = {};
|
37802 | var end2 = reader.uint32() + reader.pos;
|
37803 | key = "";
|
37804 | value = null;
|
37805 | while (reader.pos < end2) {
|
37806 | var tag2 = reader.uint32();
|
37807 | switch (tag2 >>> 3) {
|
37808 | case 1:
|
37809 | key = reader.string();
|
37810 | break;
|
37811 | case 2:
|
37812 | value = $root.google.protobuf.Value.decode(reader, reader.uint32());
|
37813 | break;
|
37814 | default:
|
37815 | reader.skipType(tag2 & 7);
|
37816 | break;
|
37817 | }
|
37818 | }
|
37819 | message.fields[key] = value;
|
37820 | break;
|
37821 | }
|
37822 | default:
|
37823 | reader.skipType(tag & 7);
|
37824 | break;
|
37825 | }
|
37826 | }
|
37827 | return message;
|
37828 | };
|
37829 |
|
37830 | /**
|
37831 | * Decodes a Struct message from the specified reader or buffer, length delimited.
|
37832 | * @function decodeDelimited
|
37833 | * @memberof google.protobuf.Struct
|
37834 | * @static
|
37835 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
37836 | * @returns {google.protobuf.Struct} Struct
|
37837 | * @throws {Error} If the payload is not a reader or valid buffer
|
37838 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
37839 | */
|
37840 | Struct.decodeDelimited = function decodeDelimited(reader) {
|
37841 | if (!(reader instanceof $Reader))
|
37842 | reader = new $Reader(reader);
|
37843 | return this.decode(reader, reader.uint32());
|
37844 | };
|
37845 |
|
37846 | /**
|
37847 | * Verifies a Struct message.
|
37848 | * @function verify
|
37849 | * @memberof google.protobuf.Struct
|
37850 | * @static
|
37851 | * @param {Object.<string,*>} message Plain object to verify
|
37852 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
37853 | */
|
37854 | Struct.verify = function verify(message) {
|
37855 | if (typeof message !== "object" || message === null)
|
37856 | return "object expected";
|
37857 | if (message.fields != null && message.hasOwnProperty("fields")) {
|
37858 | if (!$util.isObject(message.fields))
|
37859 | return "fields: object expected";
|
37860 | var key = Object.keys(message.fields);
|
37861 | for (var i = 0; i < key.length; ++i) {
|
37862 | var error = $root.google.protobuf.Value.verify(message.fields[key[i]]);
|
37863 | if (error)
|
37864 | return "fields." + error;
|
37865 | }
|
37866 | }
|
37867 | return null;
|
37868 | };
|
37869 |
|
37870 | /**
|
37871 | * Creates a Struct message from a plain object. Also converts values to their respective internal types.
|
37872 | * @function fromObject
|
37873 | * @memberof google.protobuf.Struct
|
37874 | * @static
|
37875 | * @param {Object.<string,*>} object Plain object
|
37876 | * @returns {google.protobuf.Struct} Struct
|
37877 | */
|
37878 | Struct.fromObject = function fromObject(object) {
|
37879 | if (object instanceof $root.google.protobuf.Struct)
|
37880 | return object;
|
37881 | var message = new $root.google.protobuf.Struct();
|
37882 | if (object.fields) {
|
37883 | if (typeof object.fields !== "object")
|
37884 | throw TypeError(".google.protobuf.Struct.fields: object expected");
|
37885 | message.fields = {};
|
37886 | for (var keys = Object.keys(object.fields), i = 0; i < keys.length; ++i) {
|
37887 | if (typeof object.fields[keys[i]] !== "object")
|
37888 | throw TypeError(".google.protobuf.Struct.fields: object expected");
|
37889 | message.fields[keys[i]] = $root.google.protobuf.Value.fromObject(object.fields[keys[i]]);
|
37890 | }
|
37891 | }
|
37892 | return message;
|
37893 | };
|
37894 |
|
37895 | /**
|
37896 | * Creates a plain object from a Struct message. Also converts values to other types if specified.
|
37897 | * @function toObject
|
37898 | * @memberof google.protobuf.Struct
|
37899 | * @static
|
37900 | * @param {google.protobuf.Struct} message Struct
|
37901 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
37902 | * @returns {Object.<string,*>} Plain object
|
37903 | */
|
37904 | Struct.toObject = function toObject(message, options) {
|
37905 | if (!options)
|
37906 | options = {};
|
37907 | var object = {};
|
37908 | if (options.objects || options.defaults)
|
37909 | object.fields = {};
|
37910 | var keys2;
|
37911 | if (message.fields && (keys2 = Object.keys(message.fields)).length) {
|
37912 | object.fields = {};
|
37913 | for (var j = 0; j < keys2.length; ++j)
|
37914 | object.fields[keys2[j]] = $root.google.protobuf.Value.toObject(message.fields[keys2[j]], options);
|
37915 | }
|
37916 | return object;
|
37917 | };
|
37918 |
|
37919 | /**
|
37920 | * Converts this Struct to JSON.
|
37921 | * @function toJSON
|
37922 | * @memberof google.protobuf.Struct
|
37923 | * @instance
|
37924 | * @returns {Object.<string,*>} JSON object
|
37925 | */
|
37926 | Struct.prototype.toJSON = function toJSON() {
|
37927 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
37928 | };
|
37929 |
|
37930 | /**
|
37931 | * Gets the default type url for Struct
|
37932 | * @function getTypeUrl
|
37933 | * @memberof google.protobuf.Struct
|
37934 | * @static
|
37935 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
37936 | * @returns {string} The default type url
|
37937 | */
|
37938 | Struct.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
37939 | if (typeUrlPrefix === undefined) {
|
37940 | typeUrlPrefix = "type.googleapis.com";
|
37941 | }
|
37942 | return typeUrlPrefix + "/google.protobuf.Struct";
|
37943 | };
|
37944 |
|
37945 | return Struct;
|
37946 | })();
|
37947 |
|
37948 | protobuf.Value = (function() {
|
37949 |
|
37950 | /**
|
37951 | * Properties of a Value.
|
37952 | * @memberof google.protobuf
|
37953 | * @interface IValue
|
37954 | * @property {google.protobuf.NullValue|null} [nullValue] Value nullValue
|
37955 | * @property {number|null} [numberValue] Value numberValue
|
37956 | * @property {string|null} [stringValue] Value stringValue
|
37957 | * @property {boolean|null} [boolValue] Value boolValue
|
37958 | * @property {google.protobuf.IStruct|null} [structValue] Value structValue
|
37959 | * @property {google.protobuf.IListValue|null} [listValue] Value listValue
|
37960 | */
|
37961 |
|
37962 | /**
|
37963 | * Constructs a new Value.
|
37964 | * @memberof google.protobuf
|
37965 | * @classdesc Represents a Value.
|
37966 | * @implements IValue
|
37967 | * @constructor
|
37968 | * @param {google.protobuf.IValue=} [properties] Properties to set
|
37969 | */
|
37970 | function Value(properties) {
|
37971 | if (properties)
|
37972 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
37973 | if (properties[keys[i]] != null)
|
37974 | this[keys[i]] = properties[keys[i]];
|
37975 | }
|
37976 |
|
37977 | /**
|
37978 | * Value nullValue.
|
37979 | * @member {google.protobuf.NullValue|null|undefined} nullValue
|
37980 | * @memberof google.protobuf.Value
|
37981 | * @instance
|
37982 | */
|
37983 | Value.prototype.nullValue = null;
|
37984 |
|
37985 | /**
|
37986 | * Value numberValue.
|
37987 | * @member {number|null|undefined} numberValue
|
37988 | * @memberof google.protobuf.Value
|
37989 | * @instance
|
37990 | */
|
37991 | Value.prototype.numberValue = null;
|
37992 |
|
37993 | /**
|
37994 | * Value stringValue.
|
37995 | * @member {string|null|undefined} stringValue
|
37996 | * @memberof google.protobuf.Value
|
37997 | * @instance
|
37998 | */
|
37999 | Value.prototype.stringValue = null;
|
38000 |
|
38001 | /**
|
38002 | * Value boolValue.
|
38003 | * @member {boolean|null|undefined} boolValue
|
38004 | * @memberof google.protobuf.Value
|
38005 | * @instance
|
38006 | */
|
38007 | Value.prototype.boolValue = null;
|
38008 |
|
38009 | /**
|
38010 | * Value structValue.
|
38011 | * @member {google.protobuf.IStruct|null|undefined} structValue
|
38012 | * @memberof google.protobuf.Value
|
38013 | * @instance
|
38014 | */
|
38015 | Value.prototype.structValue = null;
|
38016 |
|
38017 | /**
|
38018 | * Value listValue.
|
38019 | * @member {google.protobuf.IListValue|null|undefined} listValue
|
38020 | * @memberof google.protobuf.Value
|
38021 | * @instance
|
38022 | */
|
38023 | Value.prototype.listValue = null;
|
38024 |
|
38025 | // OneOf field names bound to virtual getters and setters
|
38026 | var $oneOfFields;
|
38027 |
|
38028 | /**
|
38029 | * Value kind.
|
38030 | * @member {"nullValue"|"numberValue"|"stringValue"|"boolValue"|"structValue"|"listValue"|undefined} kind
|
38031 | * @memberof google.protobuf.Value
|
38032 | * @instance
|
38033 | */
|
38034 | Object.defineProperty(Value.prototype, "kind", {
|
38035 | get: $util.oneOfGetter($oneOfFields = ["nullValue", "numberValue", "stringValue", "boolValue", "structValue", "listValue"]),
|
38036 | set: $util.oneOfSetter($oneOfFields)
|
38037 | });
|
38038 |
|
38039 | /**
|
38040 | * Creates a new Value instance using the specified properties.
|
38041 | * @function create
|
38042 | * @memberof google.protobuf.Value
|
38043 | * @static
|
38044 | * @param {google.protobuf.IValue=} [properties] Properties to set
|
38045 | * @returns {google.protobuf.Value} Value instance
|
38046 | */
|
38047 | Value.create = function create(properties) {
|
38048 | return new Value(properties);
|
38049 | };
|
38050 |
|
38051 | /**
|
38052 | * Encodes the specified Value message. Does not implicitly {@link google.protobuf.Value.verify|verify} messages.
|
38053 | * @function encode
|
38054 | * @memberof google.protobuf.Value
|
38055 | * @static
|
38056 | * @param {google.protobuf.IValue} message Value message or plain object to encode
|
38057 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
38058 | * @returns {$protobuf.Writer} Writer
|
38059 | */
|
38060 | Value.encode = function encode(message, writer) {
|
38061 | if (!writer)
|
38062 | writer = $Writer.create();
|
38063 | if (message.nullValue != null && Object.hasOwnProperty.call(message, "nullValue"))
|
38064 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.nullValue);
|
38065 | if (message.numberValue != null && Object.hasOwnProperty.call(message, "numberValue"))
|
38066 | writer.uint32(/* id 2, wireType 1 =*/17).double(message.numberValue);
|
38067 | if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue"))
|
38068 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.stringValue);
|
38069 | if (message.boolValue != null && Object.hasOwnProperty.call(message, "boolValue"))
|
38070 | writer.uint32(/* id 4, wireType 0 =*/32).bool(message.boolValue);
|
38071 | if (message.structValue != null && Object.hasOwnProperty.call(message, "structValue"))
|
38072 | $root.google.protobuf.Struct.encode(message.structValue, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
38073 | if (message.listValue != null && Object.hasOwnProperty.call(message, "listValue"))
|
38074 | $root.google.protobuf.ListValue.encode(message.listValue, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
38075 | return writer;
|
38076 | };
|
38077 |
|
38078 | /**
|
38079 | * Encodes the specified Value message, length delimited. Does not implicitly {@link google.protobuf.Value.verify|verify} messages.
|
38080 | * @function encodeDelimited
|
38081 | * @memberof google.protobuf.Value
|
38082 | * @static
|
38083 | * @param {google.protobuf.IValue} message Value message or plain object to encode
|
38084 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
38085 | * @returns {$protobuf.Writer} Writer
|
38086 | */
|
38087 | Value.encodeDelimited = function encodeDelimited(message, writer) {
|
38088 | return this.encode(message, writer).ldelim();
|
38089 | };
|
38090 |
|
38091 | /**
|
38092 | * Decodes a Value message from the specified reader or buffer.
|
38093 | * @function decode
|
38094 | * @memberof google.protobuf.Value
|
38095 | * @static
|
38096 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
38097 | * @param {number} [length] Message length if known beforehand
|
38098 | * @returns {google.protobuf.Value} Value
|
38099 | * @throws {Error} If the payload is not a reader or valid buffer
|
38100 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
38101 | */
|
38102 | Value.decode = function decode(reader, length) {
|
38103 | if (!(reader instanceof $Reader))
|
38104 | reader = $Reader.create(reader);
|
38105 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Value();
|
38106 | while (reader.pos < end) {
|
38107 | var tag = reader.uint32();
|
38108 | switch (tag >>> 3) {
|
38109 | case 1: {
|
38110 | message.nullValue = reader.int32();
|
38111 | break;
|
38112 | }
|
38113 | case 2: {
|
38114 | message.numberValue = reader.double();
|
38115 | break;
|
38116 | }
|
38117 | case 3: {
|
38118 | message.stringValue = reader.string();
|
38119 | break;
|
38120 | }
|
38121 | case 4: {
|
38122 | message.boolValue = reader.bool();
|
38123 | break;
|
38124 | }
|
38125 | case 5: {
|
38126 | message.structValue = $root.google.protobuf.Struct.decode(reader, reader.uint32());
|
38127 | break;
|
38128 | }
|
38129 | case 6: {
|
38130 | message.listValue = $root.google.protobuf.ListValue.decode(reader, reader.uint32());
|
38131 | break;
|
38132 | }
|
38133 | default:
|
38134 | reader.skipType(tag & 7);
|
38135 | break;
|
38136 | }
|
38137 | }
|
38138 | return message;
|
38139 | };
|
38140 |
|
38141 | /**
|
38142 | * Decodes a Value message from the specified reader or buffer, length delimited.
|
38143 | * @function decodeDelimited
|
38144 | * @memberof google.protobuf.Value
|
38145 | * @static
|
38146 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
38147 | * @returns {google.protobuf.Value} Value
|
38148 | * @throws {Error} If the payload is not a reader or valid buffer
|
38149 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
38150 | */
|
38151 | Value.decodeDelimited = function decodeDelimited(reader) {
|
38152 | if (!(reader instanceof $Reader))
|
38153 | reader = new $Reader(reader);
|
38154 | return this.decode(reader, reader.uint32());
|
38155 | };
|
38156 |
|
38157 | /**
|
38158 | * Verifies a Value message.
|
38159 | * @function verify
|
38160 | * @memberof google.protobuf.Value
|
38161 | * @static
|
38162 | * @param {Object.<string,*>} message Plain object to verify
|
38163 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
38164 | */
|
38165 | Value.verify = function verify(message) {
|
38166 | if (typeof message !== "object" || message === null)
|
38167 | return "object expected";
|
38168 | var properties = {};
|
38169 | if (message.nullValue != null && message.hasOwnProperty("nullValue")) {
|
38170 | properties.kind = 1;
|
38171 | switch (message.nullValue) {
|
38172 | default:
|
38173 | return "nullValue: enum value expected";
|
38174 | case 0:
|
38175 | break;
|
38176 | }
|
38177 | }
|
38178 | if (message.numberValue != null && message.hasOwnProperty("numberValue")) {
|
38179 | if (properties.kind === 1)
|
38180 | return "kind: multiple values";
|
38181 | properties.kind = 1;
|
38182 | if (typeof message.numberValue !== "number")
|
38183 | return "numberValue: number expected";
|
38184 | }
|
38185 | if (message.stringValue != null && message.hasOwnProperty("stringValue")) {
|
38186 | if (properties.kind === 1)
|
38187 | return "kind: multiple values";
|
38188 | properties.kind = 1;
|
38189 | if (!$util.isString(message.stringValue))
|
38190 | return "stringValue: string expected";
|
38191 | }
|
38192 | if (message.boolValue != null && message.hasOwnProperty("boolValue")) {
|
38193 | if (properties.kind === 1)
|
38194 | return "kind: multiple values";
|
38195 | properties.kind = 1;
|
38196 | if (typeof message.boolValue !== "boolean")
|
38197 | return "boolValue: boolean expected";
|
38198 | }
|
38199 | if (message.structValue != null && message.hasOwnProperty("structValue")) {
|
38200 | if (properties.kind === 1)
|
38201 | return "kind: multiple values";
|
38202 | properties.kind = 1;
|
38203 | {
|
38204 | var error = $root.google.protobuf.Struct.verify(message.structValue);
|
38205 | if (error)
|
38206 | return "structValue." + error;
|
38207 | }
|
38208 | }
|
38209 | if (message.listValue != null && message.hasOwnProperty("listValue")) {
|
38210 | if (properties.kind === 1)
|
38211 | return "kind: multiple values";
|
38212 | properties.kind = 1;
|
38213 | {
|
38214 | var error = $root.google.protobuf.ListValue.verify(message.listValue);
|
38215 | if (error)
|
38216 | return "listValue." + error;
|
38217 | }
|
38218 | }
|
38219 | return null;
|
38220 | };
|
38221 |
|
38222 | /**
|
38223 | * Creates a Value message from a plain object. Also converts values to their respective internal types.
|
38224 | * @function fromObject
|
38225 | * @memberof google.protobuf.Value
|
38226 | * @static
|
38227 | * @param {Object.<string,*>} object Plain object
|
38228 | * @returns {google.protobuf.Value} Value
|
38229 | */
|
38230 | Value.fromObject = function fromObject(object) {
|
38231 | if (object instanceof $root.google.protobuf.Value)
|
38232 | return object;
|
38233 | var message = new $root.google.protobuf.Value();
|
38234 | switch (object.nullValue) {
|
38235 | default:
|
38236 | if (typeof object.nullValue === "number") {
|
38237 | message.nullValue = object.nullValue;
|
38238 | break;
|
38239 | }
|
38240 | break;
|
38241 | case "NULL_VALUE":
|
38242 | case 0:
|
38243 | message.nullValue = 0;
|
38244 | break;
|
38245 | }
|
38246 | if (object.numberValue != null)
|
38247 | message.numberValue = Number(object.numberValue);
|
38248 | if (object.stringValue != null)
|
38249 | message.stringValue = String(object.stringValue);
|
38250 | if (object.boolValue != null)
|
38251 | message.boolValue = Boolean(object.boolValue);
|
38252 | if (object.structValue != null) {
|
38253 | if (typeof object.structValue !== "object")
|
38254 | throw TypeError(".google.protobuf.Value.structValue: object expected");
|
38255 | message.structValue = $root.google.protobuf.Struct.fromObject(object.structValue);
|
38256 | }
|
38257 | if (object.listValue != null) {
|
38258 | if (typeof object.listValue !== "object")
|
38259 | throw TypeError(".google.protobuf.Value.listValue: object expected");
|
38260 | message.listValue = $root.google.protobuf.ListValue.fromObject(object.listValue);
|
38261 | }
|
38262 | return message;
|
38263 | };
|
38264 |
|
38265 | /**
|
38266 | * Creates a plain object from a Value message. Also converts values to other types if specified.
|
38267 | * @function toObject
|
38268 | * @memberof google.protobuf.Value
|
38269 | * @static
|
38270 | * @param {google.protobuf.Value} message Value
|
38271 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
38272 | * @returns {Object.<string,*>} Plain object
|
38273 | */
|
38274 | Value.toObject = function toObject(message, options) {
|
38275 | if (!options)
|
38276 | options = {};
|
38277 | var object = {};
|
38278 | if (message.nullValue != null && message.hasOwnProperty("nullValue")) {
|
38279 | object.nullValue = options.enums === String ? $root.google.protobuf.NullValue[message.nullValue] === undefined ? message.nullValue : $root.google.protobuf.NullValue[message.nullValue] : message.nullValue;
|
38280 | if (options.oneofs)
|
38281 | object.kind = "nullValue";
|
38282 | }
|
38283 | if (message.numberValue != null && message.hasOwnProperty("numberValue")) {
|
38284 | object.numberValue = options.json && !isFinite(message.numberValue) ? String(message.numberValue) : message.numberValue;
|
38285 | if (options.oneofs)
|
38286 | object.kind = "numberValue";
|
38287 | }
|
38288 | if (message.stringValue != null && message.hasOwnProperty("stringValue")) {
|
38289 | object.stringValue = message.stringValue;
|
38290 | if (options.oneofs)
|
38291 | object.kind = "stringValue";
|
38292 | }
|
38293 | if (message.boolValue != null && message.hasOwnProperty("boolValue")) {
|
38294 | object.boolValue = message.boolValue;
|
38295 | if (options.oneofs)
|
38296 | object.kind = "boolValue";
|
38297 | }
|
38298 | if (message.structValue != null && message.hasOwnProperty("structValue")) {
|
38299 | object.structValue = $root.google.protobuf.Struct.toObject(message.structValue, options);
|
38300 | if (options.oneofs)
|
38301 | object.kind = "structValue";
|
38302 | }
|
38303 | if (message.listValue != null && message.hasOwnProperty("listValue")) {
|
38304 | object.listValue = $root.google.protobuf.ListValue.toObject(message.listValue, options);
|
38305 | if (options.oneofs)
|
38306 | object.kind = "listValue";
|
38307 | }
|
38308 | return object;
|
38309 | };
|
38310 |
|
38311 | /**
|
38312 | * Converts this Value to JSON.
|
38313 | * @function toJSON
|
38314 | * @memberof google.protobuf.Value
|
38315 | * @instance
|
38316 | * @returns {Object.<string,*>} JSON object
|
38317 | */
|
38318 | Value.prototype.toJSON = function toJSON() {
|
38319 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
38320 | };
|
38321 |
|
38322 | /**
|
38323 | * Gets the default type url for Value
|
38324 | * @function getTypeUrl
|
38325 | * @memberof google.protobuf.Value
|
38326 | * @static
|
38327 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
38328 | * @returns {string} The default type url
|
38329 | */
|
38330 | Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
38331 | if (typeUrlPrefix === undefined) {
|
38332 | typeUrlPrefix = "type.googleapis.com";
|
38333 | }
|
38334 | return typeUrlPrefix + "/google.protobuf.Value";
|
38335 | };
|
38336 |
|
38337 | return Value;
|
38338 | })();
|
38339 |
|
38340 | /**
|
38341 | * NullValue enum.
|
38342 | * @name google.protobuf.NullValue
|
38343 | * @enum {number}
|
38344 | * @property {number} NULL_VALUE=0 NULL_VALUE value
|
38345 | */
|
38346 | protobuf.NullValue = (function() {
|
38347 | var valuesById = {}, values = Object.create(valuesById);
|
38348 | values[valuesById[0] = "NULL_VALUE"] = 0;
|
38349 | return values;
|
38350 | })();
|
38351 |
|
38352 | protobuf.ListValue = (function() {
|
38353 |
|
38354 | /**
|
38355 | * Properties of a ListValue.
|
38356 | * @memberof google.protobuf
|
38357 | * @interface IListValue
|
38358 | * @property {Array.<google.protobuf.IValue>|null} [values] ListValue values
|
38359 | */
|
38360 |
|
38361 | /**
|
38362 | * Constructs a new ListValue.
|
38363 | * @memberof google.protobuf
|
38364 | * @classdesc Represents a ListValue.
|
38365 | * @implements IListValue
|
38366 | * @constructor
|
38367 | * @param {google.protobuf.IListValue=} [properties] Properties to set
|
38368 | */
|
38369 | function ListValue(properties) {
|
38370 | this.values = [];
|
38371 | if (properties)
|
38372 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
38373 | if (properties[keys[i]] != null)
|
38374 | this[keys[i]] = properties[keys[i]];
|
38375 | }
|
38376 |
|
38377 | /**
|
38378 | * ListValue values.
|
38379 | * @member {Array.<google.protobuf.IValue>} values
|
38380 | * @memberof google.protobuf.ListValue
|
38381 | * @instance
|
38382 | */
|
38383 | ListValue.prototype.values = $util.emptyArray;
|
38384 |
|
38385 | /**
|
38386 | * Creates a new ListValue instance using the specified properties.
|
38387 | * @function create
|
38388 | * @memberof google.protobuf.ListValue
|
38389 | * @static
|
38390 | * @param {google.protobuf.IListValue=} [properties] Properties to set
|
38391 | * @returns {google.protobuf.ListValue} ListValue instance
|
38392 | */
|
38393 | ListValue.create = function create(properties) {
|
38394 | return new ListValue(properties);
|
38395 | };
|
38396 |
|
38397 | /**
|
38398 | * Encodes the specified ListValue message. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages.
|
38399 | * @function encode
|
38400 | * @memberof google.protobuf.ListValue
|
38401 | * @static
|
38402 | * @param {google.protobuf.IListValue} message ListValue message or plain object to encode
|
38403 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
38404 | * @returns {$protobuf.Writer} Writer
|
38405 | */
|
38406 | ListValue.encode = function encode(message, writer) {
|
38407 | if (!writer)
|
38408 | writer = $Writer.create();
|
38409 | if (message.values != null && message.values.length)
|
38410 | for (var i = 0; i < message.values.length; ++i)
|
38411 | $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
38412 | return writer;
|
38413 | };
|
38414 |
|
38415 | /**
|
38416 | * Encodes the specified ListValue message, length delimited. Does not implicitly {@link google.protobuf.ListValue.verify|verify} messages.
|
38417 | * @function encodeDelimited
|
38418 | * @memberof google.protobuf.ListValue
|
38419 | * @static
|
38420 | * @param {google.protobuf.IListValue} message ListValue message or plain object to encode
|
38421 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
38422 | * @returns {$protobuf.Writer} Writer
|
38423 | */
|
38424 | ListValue.encodeDelimited = function encodeDelimited(message, writer) {
|
38425 | return this.encode(message, writer).ldelim();
|
38426 | };
|
38427 |
|
38428 | /**
|
38429 | * Decodes a ListValue message from the specified reader or buffer.
|
38430 | * @function decode
|
38431 | * @memberof google.protobuf.ListValue
|
38432 | * @static
|
38433 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
38434 | * @param {number} [length] Message length if known beforehand
|
38435 | * @returns {google.protobuf.ListValue} ListValue
|
38436 | * @throws {Error} If the payload is not a reader or valid buffer
|
38437 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
38438 | */
|
38439 | ListValue.decode = function decode(reader, length) {
|
38440 | if (!(reader instanceof $Reader))
|
38441 | reader = $Reader.create(reader);
|
38442 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ListValue();
|
38443 | while (reader.pos < end) {
|
38444 | var tag = reader.uint32();
|
38445 | switch (tag >>> 3) {
|
38446 | case 1: {
|
38447 | if (!(message.values && message.values.length))
|
38448 | message.values = [];
|
38449 | message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32()));
|
38450 | break;
|
38451 | }
|
38452 | default:
|
38453 | reader.skipType(tag & 7);
|
38454 | break;
|
38455 | }
|
38456 | }
|
38457 | return message;
|
38458 | };
|
38459 |
|
38460 | /**
|
38461 | * Decodes a ListValue message from the specified reader or buffer, length delimited.
|
38462 | * @function decodeDelimited
|
38463 | * @memberof google.protobuf.ListValue
|
38464 | * @static
|
38465 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
38466 | * @returns {google.protobuf.ListValue} ListValue
|
38467 | * @throws {Error} If the payload is not a reader or valid buffer
|
38468 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
38469 | */
|
38470 | ListValue.decodeDelimited = function decodeDelimited(reader) {
|
38471 | if (!(reader instanceof $Reader))
|
38472 | reader = new $Reader(reader);
|
38473 | return this.decode(reader, reader.uint32());
|
38474 | };
|
38475 |
|
38476 | /**
|
38477 | * Verifies a ListValue message.
|
38478 | * @function verify
|
38479 | * @memberof google.protobuf.ListValue
|
38480 | * @static
|
38481 | * @param {Object.<string,*>} message Plain object to verify
|
38482 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
38483 | */
|
38484 | ListValue.verify = function verify(message) {
|
38485 | if (typeof message !== "object" || message === null)
|
38486 | return "object expected";
|
38487 | if (message.values != null && message.hasOwnProperty("values")) {
|
38488 | if (!Array.isArray(message.values))
|
38489 | return "values: array expected";
|
38490 | for (var i = 0; i < message.values.length; ++i) {
|
38491 | var error = $root.google.protobuf.Value.verify(message.values[i]);
|
38492 | if (error)
|
38493 | return "values." + error;
|
38494 | }
|
38495 | }
|
38496 | return null;
|
38497 | };
|
38498 |
|
38499 | /**
|
38500 | * Creates a ListValue message from a plain object. Also converts values to their respective internal types.
|
38501 | * @function fromObject
|
38502 | * @memberof google.protobuf.ListValue
|
38503 | * @static
|
38504 | * @param {Object.<string,*>} object Plain object
|
38505 | * @returns {google.protobuf.ListValue} ListValue
|
38506 | */
|
38507 | ListValue.fromObject = function fromObject(object) {
|
38508 | if (object instanceof $root.google.protobuf.ListValue)
|
38509 | return object;
|
38510 | var message = new $root.google.protobuf.ListValue();
|
38511 | if (object.values) {
|
38512 | if (!Array.isArray(object.values))
|
38513 | throw TypeError(".google.protobuf.ListValue.values: array expected");
|
38514 | message.values = [];
|
38515 | for (var i = 0; i < object.values.length; ++i) {
|
38516 | if (typeof object.values[i] !== "object")
|
38517 | throw TypeError(".google.protobuf.ListValue.values: object expected");
|
38518 | message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]);
|
38519 | }
|
38520 | }
|
38521 | return message;
|
38522 | };
|
38523 |
|
38524 | /**
|
38525 | * Creates a plain object from a ListValue message. Also converts values to other types if specified.
|
38526 | * @function toObject
|
38527 | * @memberof google.protobuf.ListValue
|
38528 | * @static
|
38529 | * @param {google.protobuf.ListValue} message ListValue
|
38530 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
38531 | * @returns {Object.<string,*>} Plain object
|
38532 | */
|
38533 | ListValue.toObject = function toObject(message, options) {
|
38534 | if (!options)
|
38535 | options = {};
|
38536 | var object = {};
|
38537 | if (options.arrays || options.defaults)
|
38538 | object.values = [];
|
38539 | if (message.values && message.values.length) {
|
38540 | object.values = [];
|
38541 | for (var j = 0; j < message.values.length; ++j)
|
38542 | object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options);
|
38543 | }
|
38544 | return object;
|
38545 | };
|
38546 |
|
38547 | /**
|
38548 | * Converts this ListValue to JSON.
|
38549 | * @function toJSON
|
38550 | * @memberof google.protobuf.ListValue
|
38551 | * @instance
|
38552 | * @returns {Object.<string,*>} JSON object
|
38553 | */
|
38554 | ListValue.prototype.toJSON = function toJSON() {
|
38555 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
38556 | };
|
38557 |
|
38558 | /**
|
38559 | * Gets the default type url for ListValue
|
38560 | * @function getTypeUrl
|
38561 | * @memberof google.protobuf.ListValue
|
38562 | * @static
|
38563 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
38564 | * @returns {string} The default type url
|
38565 | */
|
38566 | ListValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
38567 | if (typeUrlPrefix === undefined) {
|
38568 | typeUrlPrefix = "type.googleapis.com";
|
38569 | }
|
38570 | return typeUrlPrefix + "/google.protobuf.ListValue";
|
38571 | };
|
38572 |
|
38573 | return ListValue;
|
38574 | })();
|
38575 |
|
38576 | protobuf.DoubleValue = (function() {
|
38577 |
|
38578 | /**
|
38579 | * Properties of a DoubleValue.
|
38580 | * @memberof google.protobuf
|
38581 | * @interface IDoubleValue
|
38582 | * @property {number|null} [value] DoubleValue value
|
38583 | */
|
38584 |
|
38585 | /**
|
38586 | * Constructs a new DoubleValue.
|
38587 | * @memberof google.protobuf
|
38588 | * @classdesc Represents a DoubleValue.
|
38589 | * @implements IDoubleValue
|
38590 | * @constructor
|
38591 | * @param {google.protobuf.IDoubleValue=} [properties] Properties to set
|
38592 | */
|
38593 | function DoubleValue(properties) {
|
38594 | if (properties)
|
38595 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
38596 | if (properties[keys[i]] != null)
|
38597 | this[keys[i]] = properties[keys[i]];
|
38598 | }
|
38599 |
|
38600 | /**
|
38601 | * DoubleValue value.
|
38602 | * @member {number} value
|
38603 | * @memberof google.protobuf.DoubleValue
|
38604 | * @instance
|
38605 | */
|
38606 | DoubleValue.prototype.value = 0;
|
38607 |
|
38608 | /**
|
38609 | * Creates a new DoubleValue instance using the specified properties.
|
38610 | * @function create
|
38611 | * @memberof google.protobuf.DoubleValue
|
38612 | * @static
|
38613 | * @param {google.protobuf.IDoubleValue=} [properties] Properties to set
|
38614 | * @returns {google.protobuf.DoubleValue} DoubleValue instance
|
38615 | */
|
38616 | DoubleValue.create = function create(properties) {
|
38617 | return new DoubleValue(properties);
|
38618 | };
|
38619 |
|
38620 | /**
|
38621 | * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages.
|
38622 | * @function encode
|
38623 | * @memberof google.protobuf.DoubleValue
|
38624 | * @static
|
38625 | * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode
|
38626 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
38627 | * @returns {$protobuf.Writer} Writer
|
38628 | */
|
38629 | DoubleValue.encode = function encode(message, writer) {
|
38630 | if (!writer)
|
38631 | writer = $Writer.create();
|
38632 | if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
38633 | writer.uint32(/* id 1, wireType 1 =*/9).double(message.value);
|
38634 | return writer;
|
38635 | };
|
38636 |
|
38637 | /**
|
38638 | * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages.
|
38639 | * @function encodeDelimited
|
38640 | * @memberof google.protobuf.DoubleValue
|
38641 | * @static
|
38642 | * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode
|
38643 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
38644 | * @returns {$protobuf.Writer} Writer
|
38645 | */
|
38646 | DoubleValue.encodeDelimited = function encodeDelimited(message, writer) {
|
38647 | return this.encode(message, writer).ldelim();
|
38648 | };
|
38649 |
|
38650 | /**
|
38651 | * Decodes a DoubleValue message from the specified reader or buffer.
|
38652 | * @function decode
|
38653 | * @memberof google.protobuf.DoubleValue
|
38654 | * @static
|
38655 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
38656 | * @param {number} [length] Message length if known beforehand
|
38657 | * @returns {google.protobuf.DoubleValue} DoubleValue
|
38658 | * @throws {Error} If the payload is not a reader or valid buffer
|
38659 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
38660 | */
|
38661 | DoubleValue.decode = function decode(reader, length) {
|
38662 | if (!(reader instanceof $Reader))
|
38663 | reader = $Reader.create(reader);
|
38664 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DoubleValue();
|
38665 | while (reader.pos < end) {
|
38666 | var tag = reader.uint32();
|
38667 | switch (tag >>> 3) {
|
38668 | case 1: {
|
38669 | message.value = reader.double();
|
38670 | break;
|
38671 | }
|
38672 | default:
|
38673 | reader.skipType(tag & 7);
|
38674 | break;
|
38675 | }
|
38676 | }
|
38677 | return message;
|
38678 | };
|
38679 |
|
38680 | /**
|
38681 | * Decodes a DoubleValue message from the specified reader or buffer, length delimited.
|
38682 | * @function decodeDelimited
|
38683 | * @memberof google.protobuf.DoubleValue
|
38684 | * @static
|
38685 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
38686 | * @returns {google.protobuf.DoubleValue} DoubleValue
|
38687 | * @throws {Error} If the payload is not a reader or valid buffer
|
38688 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
38689 | */
|
38690 | DoubleValue.decodeDelimited = function decodeDelimited(reader) {
|
38691 | if (!(reader instanceof $Reader))
|
38692 | reader = new $Reader(reader);
|
38693 | return this.decode(reader, reader.uint32());
|
38694 | };
|
38695 |
|
38696 | /**
|
38697 | * Verifies a DoubleValue message.
|
38698 | * @function verify
|
38699 | * @memberof google.protobuf.DoubleValue
|
38700 | * @static
|
38701 | * @param {Object.<string,*>} message Plain object to verify
|
38702 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
38703 | */
|
38704 | DoubleValue.verify = function verify(message) {
|
38705 | if (typeof message !== "object" || message === null)
|
38706 | return "object expected";
|
38707 | if (message.value != null && message.hasOwnProperty("value"))
|
38708 | if (typeof message.value !== "number")
|
38709 | return "value: number expected";
|
38710 | return null;
|
38711 | };
|
38712 |
|
38713 | /**
|
38714 | * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types.
|
38715 | * @function fromObject
|
38716 | * @memberof google.protobuf.DoubleValue
|
38717 | * @static
|
38718 | * @param {Object.<string,*>} object Plain object
|
38719 | * @returns {google.protobuf.DoubleValue} DoubleValue
|
38720 | */
|
38721 | DoubleValue.fromObject = function fromObject(object) {
|
38722 | if (object instanceof $root.google.protobuf.DoubleValue)
|
38723 | return object;
|
38724 | var message = new $root.google.protobuf.DoubleValue();
|
38725 | if (object.value != null)
|
38726 | message.value = Number(object.value);
|
38727 | return message;
|
38728 | };
|
38729 |
|
38730 | /**
|
38731 | * Creates a plain object from a DoubleValue message. Also converts values to other types if specified.
|
38732 | * @function toObject
|
38733 | * @memberof google.protobuf.DoubleValue
|
38734 | * @static
|
38735 | * @param {google.protobuf.DoubleValue} message DoubleValue
|
38736 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
38737 | * @returns {Object.<string,*>} Plain object
|
38738 | */
|
38739 | DoubleValue.toObject = function toObject(message, options) {
|
38740 | if (!options)
|
38741 | options = {};
|
38742 | var object = {};
|
38743 | if (options.defaults)
|
38744 | object.value = 0;
|
38745 | if (message.value != null && message.hasOwnProperty("value"))
|
38746 | object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value;
|
38747 | return object;
|
38748 | };
|
38749 |
|
38750 | /**
|
38751 | * Converts this DoubleValue to JSON.
|
38752 | * @function toJSON
|
38753 | * @memberof google.protobuf.DoubleValue
|
38754 | * @instance
|
38755 | * @returns {Object.<string,*>} JSON object
|
38756 | */
|
38757 | DoubleValue.prototype.toJSON = function toJSON() {
|
38758 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
38759 | };
|
38760 |
|
38761 | /**
|
38762 | * Gets the default type url for DoubleValue
|
38763 | * @function getTypeUrl
|
38764 | * @memberof google.protobuf.DoubleValue
|
38765 | * @static
|
38766 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
38767 | * @returns {string} The default type url
|
38768 | */
|
38769 | DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
38770 | if (typeUrlPrefix === undefined) {
|
38771 | typeUrlPrefix = "type.googleapis.com";
|
38772 | }
|
38773 | return typeUrlPrefix + "/google.protobuf.DoubleValue";
|
38774 | };
|
38775 |
|
38776 | return DoubleValue;
|
38777 | })();
|
38778 |
|
38779 | protobuf.FloatValue = (function() {
|
38780 |
|
38781 | /**
|
38782 | * Properties of a FloatValue.
|
38783 | * @memberof google.protobuf
|
38784 | * @interface IFloatValue
|
38785 | * @property {number|null} [value] FloatValue value
|
38786 | */
|
38787 |
|
38788 | /**
|
38789 | * Constructs a new FloatValue.
|
38790 | * @memberof google.protobuf
|
38791 | * @classdesc Represents a FloatValue.
|
38792 | * @implements IFloatValue
|
38793 | * @constructor
|
38794 | * @param {google.protobuf.IFloatValue=} [properties] Properties to set
|
38795 | */
|
38796 | function FloatValue(properties) {
|
38797 | if (properties)
|
38798 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
38799 | if (properties[keys[i]] != null)
|
38800 | this[keys[i]] = properties[keys[i]];
|
38801 | }
|
38802 |
|
38803 | /**
|
38804 | * FloatValue value.
|
38805 | * @member {number} value
|
38806 | * @memberof google.protobuf.FloatValue
|
38807 | * @instance
|
38808 | */
|
38809 | FloatValue.prototype.value = 0;
|
38810 |
|
38811 | /**
|
38812 | * Creates a new FloatValue instance using the specified properties.
|
38813 | * @function create
|
38814 | * @memberof google.protobuf.FloatValue
|
38815 | * @static
|
38816 | * @param {google.protobuf.IFloatValue=} [properties] Properties to set
|
38817 | * @returns {google.protobuf.FloatValue} FloatValue instance
|
38818 | */
|
38819 | FloatValue.create = function create(properties) {
|
38820 | return new FloatValue(properties);
|
38821 | };
|
38822 |
|
38823 | /**
|
38824 | * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages.
|
38825 | * @function encode
|
38826 | * @memberof google.protobuf.FloatValue
|
38827 | * @static
|
38828 | * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode
|
38829 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
38830 | * @returns {$protobuf.Writer} Writer
|
38831 | */
|
38832 | FloatValue.encode = function encode(message, writer) {
|
38833 | if (!writer)
|
38834 | writer = $Writer.create();
|
38835 | if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
38836 | writer.uint32(/* id 1, wireType 5 =*/13).float(message.value);
|
38837 | return writer;
|
38838 | };
|
38839 |
|
38840 | /**
|
38841 | * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages.
|
38842 | * @function encodeDelimited
|
38843 | * @memberof google.protobuf.FloatValue
|
38844 | * @static
|
38845 | * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode
|
38846 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
38847 | * @returns {$protobuf.Writer} Writer
|
38848 | */
|
38849 | FloatValue.encodeDelimited = function encodeDelimited(message, writer) {
|
38850 | return this.encode(message, writer).ldelim();
|
38851 | };
|
38852 |
|
38853 | /**
|
38854 | * Decodes a FloatValue message from the specified reader or buffer.
|
38855 | * @function decode
|
38856 | * @memberof google.protobuf.FloatValue
|
38857 | * @static
|
38858 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
38859 | * @param {number} [length] Message length if known beforehand
|
38860 | * @returns {google.protobuf.FloatValue} FloatValue
|
38861 | * @throws {Error} If the payload is not a reader or valid buffer
|
38862 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
38863 | */
|
38864 | FloatValue.decode = function decode(reader, length) {
|
38865 | if (!(reader instanceof $Reader))
|
38866 | reader = $Reader.create(reader);
|
38867 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FloatValue();
|
38868 | while (reader.pos < end) {
|
38869 | var tag = reader.uint32();
|
38870 | switch (tag >>> 3) {
|
38871 | case 1: {
|
38872 | message.value = reader.float();
|
38873 | break;
|
38874 | }
|
38875 | default:
|
38876 | reader.skipType(tag & 7);
|
38877 | break;
|
38878 | }
|
38879 | }
|
38880 | return message;
|
38881 | };
|
38882 |
|
38883 | /**
|
38884 | * Decodes a FloatValue message from the specified reader or buffer, length delimited.
|
38885 | * @function decodeDelimited
|
38886 | * @memberof google.protobuf.FloatValue
|
38887 | * @static
|
38888 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
38889 | * @returns {google.protobuf.FloatValue} FloatValue
|
38890 | * @throws {Error} If the payload is not a reader or valid buffer
|
38891 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
38892 | */
|
38893 | FloatValue.decodeDelimited = function decodeDelimited(reader) {
|
38894 | if (!(reader instanceof $Reader))
|
38895 | reader = new $Reader(reader);
|
38896 | return this.decode(reader, reader.uint32());
|
38897 | };
|
38898 |
|
38899 | /**
|
38900 | * Verifies a FloatValue message.
|
38901 | * @function verify
|
38902 | * @memberof google.protobuf.FloatValue
|
38903 | * @static
|
38904 | * @param {Object.<string,*>} message Plain object to verify
|
38905 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
38906 | */
|
38907 | FloatValue.verify = function verify(message) {
|
38908 | if (typeof message !== "object" || message === null)
|
38909 | return "object expected";
|
38910 | if (message.value != null && message.hasOwnProperty("value"))
|
38911 | if (typeof message.value !== "number")
|
38912 | return "value: number expected";
|
38913 | return null;
|
38914 | };
|
38915 |
|
38916 | /**
|
38917 | * Creates a FloatValue message from a plain object. Also converts values to their respective internal types.
|
38918 | * @function fromObject
|
38919 | * @memberof google.protobuf.FloatValue
|
38920 | * @static
|
38921 | * @param {Object.<string,*>} object Plain object
|
38922 | * @returns {google.protobuf.FloatValue} FloatValue
|
38923 | */
|
38924 | FloatValue.fromObject = function fromObject(object) {
|
38925 | if (object instanceof $root.google.protobuf.FloatValue)
|
38926 | return object;
|
38927 | var message = new $root.google.protobuf.FloatValue();
|
38928 | if (object.value != null)
|
38929 | message.value = Number(object.value);
|
38930 | return message;
|
38931 | };
|
38932 |
|
38933 | /**
|
38934 | * Creates a plain object from a FloatValue message. Also converts values to other types if specified.
|
38935 | * @function toObject
|
38936 | * @memberof google.protobuf.FloatValue
|
38937 | * @static
|
38938 | * @param {google.protobuf.FloatValue} message FloatValue
|
38939 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
38940 | * @returns {Object.<string,*>} Plain object
|
38941 | */
|
38942 | FloatValue.toObject = function toObject(message, options) {
|
38943 | if (!options)
|
38944 | options = {};
|
38945 | var object = {};
|
38946 | if (options.defaults)
|
38947 | object.value = 0;
|
38948 | if (message.value != null && message.hasOwnProperty("value"))
|
38949 | object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value;
|
38950 | return object;
|
38951 | };
|
38952 |
|
38953 | /**
|
38954 | * Converts this FloatValue to JSON.
|
38955 | * @function toJSON
|
38956 | * @memberof google.protobuf.FloatValue
|
38957 | * @instance
|
38958 | * @returns {Object.<string,*>} JSON object
|
38959 | */
|
38960 | FloatValue.prototype.toJSON = function toJSON() {
|
38961 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
38962 | };
|
38963 |
|
38964 | /**
|
38965 | * Gets the default type url for FloatValue
|
38966 | * @function getTypeUrl
|
38967 | * @memberof google.protobuf.FloatValue
|
38968 | * @static
|
38969 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
38970 | * @returns {string} The default type url
|
38971 | */
|
38972 | FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
38973 | if (typeUrlPrefix === undefined) {
|
38974 | typeUrlPrefix = "type.googleapis.com";
|
38975 | }
|
38976 | return typeUrlPrefix + "/google.protobuf.FloatValue";
|
38977 | };
|
38978 |
|
38979 | return FloatValue;
|
38980 | })();
|
38981 |
|
38982 | protobuf.Int64Value = (function() {
|
38983 |
|
38984 | /**
|
38985 | * Properties of an Int64Value.
|
38986 | * @memberof google.protobuf
|
38987 | * @interface IInt64Value
|
38988 | * @property {number|Long|null} [value] Int64Value value
|
38989 | */
|
38990 |
|
38991 | /**
|
38992 | * Constructs a new Int64Value.
|
38993 | * @memberof google.protobuf
|
38994 | * @classdesc Represents an Int64Value.
|
38995 | * @implements IInt64Value
|
38996 | * @constructor
|
38997 | * @param {google.protobuf.IInt64Value=} [properties] Properties to set
|
38998 | */
|
38999 | function Int64Value(properties) {
|
39000 | if (properties)
|
39001 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
39002 | if (properties[keys[i]] != null)
|
39003 | this[keys[i]] = properties[keys[i]];
|
39004 | }
|
39005 |
|
39006 | /**
|
39007 | * Int64Value value.
|
39008 | * @member {number|Long} value
|
39009 | * @memberof google.protobuf.Int64Value
|
39010 | * @instance
|
39011 | */
|
39012 | Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
39013 |
|
39014 | /**
|
39015 | * Creates a new Int64Value instance using the specified properties.
|
39016 | * @function create
|
39017 | * @memberof google.protobuf.Int64Value
|
39018 | * @static
|
39019 | * @param {google.protobuf.IInt64Value=} [properties] Properties to set
|
39020 | * @returns {google.protobuf.Int64Value} Int64Value instance
|
39021 | */
|
39022 | Int64Value.create = function create(properties) {
|
39023 | return new Int64Value(properties);
|
39024 | };
|
39025 |
|
39026 | /**
|
39027 | * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages.
|
39028 | * @function encode
|
39029 | * @memberof google.protobuf.Int64Value
|
39030 | * @static
|
39031 | * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode
|
39032 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
39033 | * @returns {$protobuf.Writer} Writer
|
39034 | */
|
39035 | Int64Value.encode = function encode(message, writer) {
|
39036 | if (!writer)
|
39037 | writer = $Writer.create();
|
39038 | if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
39039 | writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value);
|
39040 | return writer;
|
39041 | };
|
39042 |
|
39043 | /**
|
39044 | * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages.
|
39045 | * @function encodeDelimited
|
39046 | * @memberof google.protobuf.Int64Value
|
39047 | * @static
|
39048 | * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode
|
39049 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
39050 | * @returns {$protobuf.Writer} Writer
|
39051 | */
|
39052 | Int64Value.encodeDelimited = function encodeDelimited(message, writer) {
|
39053 | return this.encode(message, writer).ldelim();
|
39054 | };
|
39055 |
|
39056 | /**
|
39057 | * Decodes an Int64Value message from the specified reader or buffer.
|
39058 | * @function decode
|
39059 | * @memberof google.protobuf.Int64Value
|
39060 | * @static
|
39061 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
39062 | * @param {number} [length] Message length if known beforehand
|
39063 | * @returns {google.protobuf.Int64Value} Int64Value
|
39064 | * @throws {Error} If the payload is not a reader or valid buffer
|
39065 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
39066 | */
|
39067 | Int64Value.decode = function decode(reader, length) {
|
39068 | if (!(reader instanceof $Reader))
|
39069 | reader = $Reader.create(reader);
|
39070 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int64Value();
|
39071 | while (reader.pos < end) {
|
39072 | var tag = reader.uint32();
|
39073 | switch (tag >>> 3) {
|
39074 | case 1: {
|
39075 | message.value = reader.int64();
|
39076 | break;
|
39077 | }
|
39078 | default:
|
39079 | reader.skipType(tag & 7);
|
39080 | break;
|
39081 | }
|
39082 | }
|
39083 | return message;
|
39084 | };
|
39085 |
|
39086 | /**
|
39087 | * Decodes an Int64Value message from the specified reader or buffer, length delimited.
|
39088 | * @function decodeDelimited
|
39089 | * @memberof google.protobuf.Int64Value
|
39090 | * @static
|
39091 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
39092 | * @returns {google.protobuf.Int64Value} Int64Value
|
39093 | * @throws {Error} If the payload is not a reader or valid buffer
|
39094 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
39095 | */
|
39096 | Int64Value.decodeDelimited = function decodeDelimited(reader) {
|
39097 | if (!(reader instanceof $Reader))
|
39098 | reader = new $Reader(reader);
|
39099 | return this.decode(reader, reader.uint32());
|
39100 | };
|
39101 |
|
39102 | /**
|
39103 | * Verifies an Int64Value message.
|
39104 | * @function verify
|
39105 | * @memberof google.protobuf.Int64Value
|
39106 | * @static
|
39107 | * @param {Object.<string,*>} message Plain object to verify
|
39108 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
39109 | */
|
39110 | Int64Value.verify = function verify(message) {
|
39111 | if (typeof message !== "object" || message === null)
|
39112 | return "object expected";
|
39113 | if (message.value != null && message.hasOwnProperty("value"))
|
39114 | if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high)))
|
39115 | return "value: integer|Long expected";
|
39116 | return null;
|
39117 | };
|
39118 |
|
39119 | /**
|
39120 | * Creates an Int64Value message from a plain object. Also converts values to their respective internal types.
|
39121 | * @function fromObject
|
39122 | * @memberof google.protobuf.Int64Value
|
39123 | * @static
|
39124 | * @param {Object.<string,*>} object Plain object
|
39125 | * @returns {google.protobuf.Int64Value} Int64Value
|
39126 | */
|
39127 | Int64Value.fromObject = function fromObject(object) {
|
39128 | if (object instanceof $root.google.protobuf.Int64Value)
|
39129 | return object;
|
39130 | var message = new $root.google.protobuf.Int64Value();
|
39131 | if (object.value != null)
|
39132 | if ($util.Long)
|
39133 | (message.value = $util.Long.fromValue(object.value)).unsigned = false;
|
39134 | else if (typeof object.value === "string")
|
39135 | message.value = parseInt(object.value, 10);
|
39136 | else if (typeof object.value === "number")
|
39137 | message.value = object.value;
|
39138 | else if (typeof object.value === "object")
|
39139 | message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber();
|
39140 | return message;
|
39141 | };
|
39142 |
|
39143 | /**
|
39144 | * Creates a plain object from an Int64Value message. Also converts values to other types if specified.
|
39145 | * @function toObject
|
39146 | * @memberof google.protobuf.Int64Value
|
39147 | * @static
|
39148 | * @param {google.protobuf.Int64Value} message Int64Value
|
39149 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
39150 | * @returns {Object.<string,*>} Plain object
|
39151 | */
|
39152 | Int64Value.toObject = function toObject(message, options) {
|
39153 | if (!options)
|
39154 | options = {};
|
39155 | var object = {};
|
39156 | if (options.defaults)
|
39157 | if ($util.Long) {
|
39158 | var long = new $util.Long(0, 0, false);
|
39159 | object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
39160 | } else
|
39161 | object.value = options.longs === String ? "0" : 0;
|
39162 | if (message.value != null && message.hasOwnProperty("value"))
|
39163 | if (typeof message.value === "number")
|
39164 | object.value = options.longs === String ? String(message.value) : message.value;
|
39165 | else
|
39166 | object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value;
|
39167 | return object;
|
39168 | };
|
39169 |
|
39170 | /**
|
39171 | * Converts this Int64Value to JSON.
|
39172 | * @function toJSON
|
39173 | * @memberof google.protobuf.Int64Value
|
39174 | * @instance
|
39175 | * @returns {Object.<string,*>} JSON object
|
39176 | */
|
39177 | Int64Value.prototype.toJSON = function toJSON() {
|
39178 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
39179 | };
|
39180 |
|
39181 | /**
|
39182 | * Gets the default type url for Int64Value
|
39183 | * @function getTypeUrl
|
39184 | * @memberof google.protobuf.Int64Value
|
39185 | * @static
|
39186 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
39187 | * @returns {string} The default type url
|
39188 | */
|
39189 | Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
39190 | if (typeUrlPrefix === undefined) {
|
39191 | typeUrlPrefix = "type.googleapis.com";
|
39192 | }
|
39193 | return typeUrlPrefix + "/google.protobuf.Int64Value";
|
39194 | };
|
39195 |
|
39196 | return Int64Value;
|
39197 | })();
|
39198 |
|
39199 | protobuf.UInt64Value = (function() {
|
39200 |
|
39201 | /**
|
39202 | * Properties of a UInt64Value.
|
39203 | * @memberof google.protobuf
|
39204 | * @interface IUInt64Value
|
39205 | * @property {number|Long|null} [value] UInt64Value value
|
39206 | */
|
39207 |
|
39208 | /**
|
39209 | * Constructs a new UInt64Value.
|
39210 | * @memberof google.protobuf
|
39211 | * @classdesc Represents a UInt64Value.
|
39212 | * @implements IUInt64Value
|
39213 | * @constructor
|
39214 | * @param {google.protobuf.IUInt64Value=} [properties] Properties to set
|
39215 | */
|
39216 | function UInt64Value(properties) {
|
39217 | if (properties)
|
39218 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
39219 | if (properties[keys[i]] != null)
|
39220 | this[keys[i]] = properties[keys[i]];
|
39221 | }
|
39222 |
|
39223 | /**
|
39224 | * UInt64Value value.
|
39225 | * @member {number|Long} value
|
39226 | * @memberof google.protobuf.UInt64Value
|
39227 | * @instance
|
39228 | */
|
39229 | UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
39230 |
|
39231 | /**
|
39232 | * Creates a new UInt64Value instance using the specified properties.
|
39233 | * @function create
|
39234 | * @memberof google.protobuf.UInt64Value
|
39235 | * @static
|
39236 | * @param {google.protobuf.IUInt64Value=} [properties] Properties to set
|
39237 | * @returns {google.protobuf.UInt64Value} UInt64Value instance
|
39238 | */
|
39239 | UInt64Value.create = function create(properties) {
|
39240 | return new UInt64Value(properties);
|
39241 | };
|
39242 |
|
39243 | /**
|
39244 | * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages.
|
39245 | * @function encode
|
39246 | * @memberof google.protobuf.UInt64Value
|
39247 | * @static
|
39248 | * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode
|
39249 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
39250 | * @returns {$protobuf.Writer} Writer
|
39251 | */
|
39252 | UInt64Value.encode = function encode(message, writer) {
|
39253 | if (!writer)
|
39254 | writer = $Writer.create();
|
39255 | if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
39256 | writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value);
|
39257 | return writer;
|
39258 | };
|
39259 |
|
39260 | /**
|
39261 | * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages.
|
39262 | * @function encodeDelimited
|
39263 | * @memberof google.protobuf.UInt64Value
|
39264 | * @static
|
39265 | * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode
|
39266 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
39267 | * @returns {$protobuf.Writer} Writer
|
39268 | */
|
39269 | UInt64Value.encodeDelimited = function encodeDelimited(message, writer) {
|
39270 | return this.encode(message, writer).ldelim();
|
39271 | };
|
39272 |
|
39273 | /**
|
39274 | * Decodes a UInt64Value message from the specified reader or buffer.
|
39275 | * @function decode
|
39276 | * @memberof google.protobuf.UInt64Value
|
39277 | * @static
|
39278 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
39279 | * @param {number} [length] Message length if known beforehand
|
39280 | * @returns {google.protobuf.UInt64Value} UInt64Value
|
39281 | * @throws {Error} If the payload is not a reader or valid buffer
|
39282 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
39283 | */
|
39284 | UInt64Value.decode = function decode(reader, length) {
|
39285 | if (!(reader instanceof $Reader))
|
39286 | reader = $Reader.create(reader);
|
39287 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt64Value();
|
39288 | while (reader.pos < end) {
|
39289 | var tag = reader.uint32();
|
39290 | switch (tag >>> 3) {
|
39291 | case 1: {
|
39292 | message.value = reader.uint64();
|
39293 | break;
|
39294 | }
|
39295 | default:
|
39296 | reader.skipType(tag & 7);
|
39297 | break;
|
39298 | }
|
39299 | }
|
39300 | return message;
|
39301 | };
|
39302 |
|
39303 | /**
|
39304 | * Decodes a UInt64Value message from the specified reader or buffer, length delimited.
|
39305 | * @function decodeDelimited
|
39306 | * @memberof google.protobuf.UInt64Value
|
39307 | * @static
|
39308 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
39309 | * @returns {google.protobuf.UInt64Value} UInt64Value
|
39310 | * @throws {Error} If the payload is not a reader or valid buffer
|
39311 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
39312 | */
|
39313 | UInt64Value.decodeDelimited = function decodeDelimited(reader) {
|
39314 | if (!(reader instanceof $Reader))
|
39315 | reader = new $Reader(reader);
|
39316 | return this.decode(reader, reader.uint32());
|
39317 | };
|
39318 |
|
39319 | /**
|
39320 | * Verifies a UInt64Value message.
|
39321 | * @function verify
|
39322 | * @memberof google.protobuf.UInt64Value
|
39323 | * @static
|
39324 | * @param {Object.<string,*>} message Plain object to verify
|
39325 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
39326 | */
|
39327 | UInt64Value.verify = function verify(message) {
|
39328 | if (typeof message !== "object" || message === null)
|
39329 | return "object expected";
|
39330 | if (message.value != null && message.hasOwnProperty("value"))
|
39331 | if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high)))
|
39332 | return "value: integer|Long expected";
|
39333 | return null;
|
39334 | };
|
39335 |
|
39336 | /**
|
39337 | * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types.
|
39338 | * @function fromObject
|
39339 | * @memberof google.protobuf.UInt64Value
|
39340 | * @static
|
39341 | * @param {Object.<string,*>} object Plain object
|
39342 | * @returns {google.protobuf.UInt64Value} UInt64Value
|
39343 | */
|
39344 | UInt64Value.fromObject = function fromObject(object) {
|
39345 | if (object instanceof $root.google.protobuf.UInt64Value)
|
39346 | return object;
|
39347 | var message = new $root.google.protobuf.UInt64Value();
|
39348 | if (object.value != null)
|
39349 | if ($util.Long)
|
39350 | (message.value = $util.Long.fromValue(object.value)).unsigned = true;
|
39351 | else if (typeof object.value === "string")
|
39352 | message.value = parseInt(object.value, 10);
|
39353 | else if (typeof object.value === "number")
|
39354 | message.value = object.value;
|
39355 | else if (typeof object.value === "object")
|
39356 | message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true);
|
39357 | return message;
|
39358 | };
|
39359 |
|
39360 | /**
|
39361 | * Creates a plain object from a UInt64Value message. Also converts values to other types if specified.
|
39362 | * @function toObject
|
39363 | * @memberof google.protobuf.UInt64Value
|
39364 | * @static
|
39365 | * @param {google.protobuf.UInt64Value} message UInt64Value
|
39366 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
39367 | * @returns {Object.<string,*>} Plain object
|
39368 | */
|
39369 | UInt64Value.toObject = function toObject(message, options) {
|
39370 | if (!options)
|
39371 | options = {};
|
39372 | var object = {};
|
39373 | if (options.defaults)
|
39374 | if ($util.Long) {
|
39375 | var long = new $util.Long(0, 0, true);
|
39376 | object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
39377 | } else
|
39378 | object.value = options.longs === String ? "0" : 0;
|
39379 | if (message.value != null && message.hasOwnProperty("value"))
|
39380 | if (typeof message.value === "number")
|
39381 | object.value = options.longs === String ? String(message.value) : message.value;
|
39382 | else
|
39383 | object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value;
|
39384 | return object;
|
39385 | };
|
39386 |
|
39387 | /**
|
39388 | * Converts this UInt64Value to JSON.
|
39389 | * @function toJSON
|
39390 | * @memberof google.protobuf.UInt64Value
|
39391 | * @instance
|
39392 | * @returns {Object.<string,*>} JSON object
|
39393 | */
|
39394 | UInt64Value.prototype.toJSON = function toJSON() {
|
39395 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
39396 | };
|
39397 |
|
39398 | /**
|
39399 | * Gets the default type url for UInt64Value
|
39400 | * @function getTypeUrl
|
39401 | * @memberof google.protobuf.UInt64Value
|
39402 | * @static
|
39403 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
39404 | * @returns {string} The default type url
|
39405 | */
|
39406 | UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
39407 | if (typeUrlPrefix === undefined) {
|
39408 | typeUrlPrefix = "type.googleapis.com";
|
39409 | }
|
39410 | return typeUrlPrefix + "/google.protobuf.UInt64Value";
|
39411 | };
|
39412 |
|
39413 | return UInt64Value;
|
39414 | })();
|
39415 |
|
39416 | protobuf.Int32Value = (function() {
|
39417 |
|
39418 | /**
|
39419 | * Properties of an Int32Value.
|
39420 | * @memberof google.protobuf
|
39421 | * @interface IInt32Value
|
39422 | * @property {number|null} [value] Int32Value value
|
39423 | */
|
39424 |
|
39425 | /**
|
39426 | * Constructs a new Int32Value.
|
39427 | * @memberof google.protobuf
|
39428 | * @classdesc Represents an Int32Value.
|
39429 | * @implements IInt32Value
|
39430 | * @constructor
|
39431 | * @param {google.protobuf.IInt32Value=} [properties] Properties to set
|
39432 | */
|
39433 | function Int32Value(properties) {
|
39434 | if (properties)
|
39435 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
39436 | if (properties[keys[i]] != null)
|
39437 | this[keys[i]] = properties[keys[i]];
|
39438 | }
|
39439 |
|
39440 | /**
|
39441 | * Int32Value value.
|
39442 | * @member {number} value
|
39443 | * @memberof google.protobuf.Int32Value
|
39444 | * @instance
|
39445 | */
|
39446 | Int32Value.prototype.value = 0;
|
39447 |
|
39448 | /**
|
39449 | * Creates a new Int32Value instance using the specified properties.
|
39450 | * @function create
|
39451 | * @memberof google.protobuf.Int32Value
|
39452 | * @static
|
39453 | * @param {google.protobuf.IInt32Value=} [properties] Properties to set
|
39454 | * @returns {google.protobuf.Int32Value} Int32Value instance
|
39455 | */
|
39456 | Int32Value.create = function create(properties) {
|
39457 | return new Int32Value(properties);
|
39458 | };
|
39459 |
|
39460 | /**
|
39461 | * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages.
|
39462 | * @function encode
|
39463 | * @memberof google.protobuf.Int32Value
|
39464 | * @static
|
39465 | * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode
|
39466 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
39467 | * @returns {$protobuf.Writer} Writer
|
39468 | */
|
39469 | Int32Value.encode = function encode(message, writer) {
|
39470 | if (!writer)
|
39471 | writer = $Writer.create();
|
39472 | if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
39473 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value);
|
39474 | return writer;
|
39475 | };
|
39476 |
|
39477 | /**
|
39478 | * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages.
|
39479 | * @function encodeDelimited
|
39480 | * @memberof google.protobuf.Int32Value
|
39481 | * @static
|
39482 | * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode
|
39483 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
39484 | * @returns {$protobuf.Writer} Writer
|
39485 | */
|
39486 | Int32Value.encodeDelimited = function encodeDelimited(message, writer) {
|
39487 | return this.encode(message, writer).ldelim();
|
39488 | };
|
39489 |
|
39490 | /**
|
39491 | * Decodes an Int32Value message from the specified reader or buffer.
|
39492 | * @function decode
|
39493 | * @memberof google.protobuf.Int32Value
|
39494 | * @static
|
39495 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
39496 | * @param {number} [length] Message length if known beforehand
|
39497 | * @returns {google.protobuf.Int32Value} Int32Value
|
39498 | * @throws {Error} If the payload is not a reader or valid buffer
|
39499 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
39500 | */
|
39501 | Int32Value.decode = function decode(reader, length) {
|
39502 | if (!(reader instanceof $Reader))
|
39503 | reader = $Reader.create(reader);
|
39504 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int32Value();
|
39505 | while (reader.pos < end) {
|
39506 | var tag = reader.uint32();
|
39507 | switch (tag >>> 3) {
|
39508 | case 1: {
|
39509 | message.value = reader.int32();
|
39510 | break;
|
39511 | }
|
39512 | default:
|
39513 | reader.skipType(tag & 7);
|
39514 | break;
|
39515 | }
|
39516 | }
|
39517 | return message;
|
39518 | };
|
39519 |
|
39520 | /**
|
39521 | * Decodes an Int32Value message from the specified reader or buffer, length delimited.
|
39522 | * @function decodeDelimited
|
39523 | * @memberof google.protobuf.Int32Value
|
39524 | * @static
|
39525 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
39526 | * @returns {google.protobuf.Int32Value} Int32Value
|
39527 | * @throws {Error} If the payload is not a reader or valid buffer
|
39528 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
39529 | */
|
39530 | Int32Value.decodeDelimited = function decodeDelimited(reader) {
|
39531 | if (!(reader instanceof $Reader))
|
39532 | reader = new $Reader(reader);
|
39533 | return this.decode(reader, reader.uint32());
|
39534 | };
|
39535 |
|
39536 | /**
|
39537 | * Verifies an Int32Value message.
|
39538 | * @function verify
|
39539 | * @memberof google.protobuf.Int32Value
|
39540 | * @static
|
39541 | * @param {Object.<string,*>} message Plain object to verify
|
39542 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
39543 | */
|
39544 | Int32Value.verify = function verify(message) {
|
39545 | if (typeof message !== "object" || message === null)
|
39546 | return "object expected";
|
39547 | if (message.value != null && message.hasOwnProperty("value"))
|
39548 | if (!$util.isInteger(message.value))
|
39549 | return "value: integer expected";
|
39550 | return null;
|
39551 | };
|
39552 |
|
39553 | /**
|
39554 | * Creates an Int32Value message from a plain object. Also converts values to their respective internal types.
|
39555 | * @function fromObject
|
39556 | * @memberof google.protobuf.Int32Value
|
39557 | * @static
|
39558 | * @param {Object.<string,*>} object Plain object
|
39559 | * @returns {google.protobuf.Int32Value} Int32Value
|
39560 | */
|
39561 | Int32Value.fromObject = function fromObject(object) {
|
39562 | if (object instanceof $root.google.protobuf.Int32Value)
|
39563 | return object;
|
39564 | var message = new $root.google.protobuf.Int32Value();
|
39565 | if (object.value != null)
|
39566 | message.value = object.value | 0;
|
39567 | return message;
|
39568 | };
|
39569 |
|
39570 | /**
|
39571 | * Creates a plain object from an Int32Value message. Also converts values to other types if specified.
|
39572 | * @function toObject
|
39573 | * @memberof google.protobuf.Int32Value
|
39574 | * @static
|
39575 | * @param {google.protobuf.Int32Value} message Int32Value
|
39576 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
39577 | * @returns {Object.<string,*>} Plain object
|
39578 | */
|
39579 | Int32Value.toObject = function toObject(message, options) {
|
39580 | if (!options)
|
39581 | options = {};
|
39582 | var object = {};
|
39583 | if (options.defaults)
|
39584 | object.value = 0;
|
39585 | if (message.value != null && message.hasOwnProperty("value"))
|
39586 | object.value = message.value;
|
39587 | return object;
|
39588 | };
|
39589 |
|
39590 | /**
|
39591 | * Converts this Int32Value to JSON.
|
39592 | * @function toJSON
|
39593 | * @memberof google.protobuf.Int32Value
|
39594 | * @instance
|
39595 | * @returns {Object.<string,*>} JSON object
|
39596 | */
|
39597 | Int32Value.prototype.toJSON = function toJSON() {
|
39598 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
39599 | };
|
39600 |
|
39601 | /**
|
39602 | * Gets the default type url for Int32Value
|
39603 | * @function getTypeUrl
|
39604 | * @memberof google.protobuf.Int32Value
|
39605 | * @static
|
39606 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
39607 | * @returns {string} The default type url
|
39608 | */
|
39609 | Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
39610 | if (typeUrlPrefix === undefined) {
|
39611 | typeUrlPrefix = "type.googleapis.com";
|
39612 | }
|
39613 | return typeUrlPrefix + "/google.protobuf.Int32Value";
|
39614 | };
|
39615 |
|
39616 | return Int32Value;
|
39617 | })();
|
39618 |
|
39619 | protobuf.UInt32Value = (function() {
|
39620 |
|
39621 | /**
|
39622 | * Properties of a UInt32Value.
|
39623 | * @memberof google.protobuf
|
39624 | * @interface IUInt32Value
|
39625 | * @property {number|null} [value] UInt32Value value
|
39626 | */
|
39627 |
|
39628 | /**
|
39629 | * Constructs a new UInt32Value.
|
39630 | * @memberof google.protobuf
|
39631 | * @classdesc Represents a UInt32Value.
|
39632 | * @implements IUInt32Value
|
39633 | * @constructor
|
39634 | * @param {google.protobuf.IUInt32Value=} [properties] Properties to set
|
39635 | */
|
39636 | function UInt32Value(properties) {
|
39637 | if (properties)
|
39638 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
39639 | if (properties[keys[i]] != null)
|
39640 | this[keys[i]] = properties[keys[i]];
|
39641 | }
|
39642 |
|
39643 | /**
|
39644 | * UInt32Value value.
|
39645 | * @member {number} value
|
39646 | * @memberof google.protobuf.UInt32Value
|
39647 | * @instance
|
39648 | */
|
39649 | UInt32Value.prototype.value = 0;
|
39650 |
|
39651 | /**
|
39652 | * Creates a new UInt32Value instance using the specified properties.
|
39653 | * @function create
|
39654 | * @memberof google.protobuf.UInt32Value
|
39655 | * @static
|
39656 | * @param {google.protobuf.IUInt32Value=} [properties] Properties to set
|
39657 | * @returns {google.protobuf.UInt32Value} UInt32Value instance
|
39658 | */
|
39659 | UInt32Value.create = function create(properties) {
|
39660 | return new UInt32Value(properties);
|
39661 | };
|
39662 |
|
39663 | /**
|
39664 | * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages.
|
39665 | * @function encode
|
39666 | * @memberof google.protobuf.UInt32Value
|
39667 | * @static
|
39668 | * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode
|
39669 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
39670 | * @returns {$protobuf.Writer} Writer
|
39671 | */
|
39672 | UInt32Value.encode = function encode(message, writer) {
|
39673 | if (!writer)
|
39674 | writer = $Writer.create();
|
39675 | if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
39676 | writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value);
|
39677 | return writer;
|
39678 | };
|
39679 |
|
39680 | /**
|
39681 | * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages.
|
39682 | * @function encodeDelimited
|
39683 | * @memberof google.protobuf.UInt32Value
|
39684 | * @static
|
39685 | * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode
|
39686 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
39687 | * @returns {$protobuf.Writer} Writer
|
39688 | */
|
39689 | UInt32Value.encodeDelimited = function encodeDelimited(message, writer) {
|
39690 | return this.encode(message, writer).ldelim();
|
39691 | };
|
39692 |
|
39693 | /**
|
39694 | * Decodes a UInt32Value message from the specified reader or buffer.
|
39695 | * @function decode
|
39696 | * @memberof google.protobuf.UInt32Value
|
39697 | * @static
|
39698 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
39699 | * @param {number} [length] Message length if known beforehand
|
39700 | * @returns {google.protobuf.UInt32Value} UInt32Value
|
39701 | * @throws {Error} If the payload is not a reader or valid buffer
|
39702 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
39703 | */
|
39704 | UInt32Value.decode = function decode(reader, length) {
|
39705 | if (!(reader instanceof $Reader))
|
39706 | reader = $Reader.create(reader);
|
39707 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt32Value();
|
39708 | while (reader.pos < end) {
|
39709 | var tag = reader.uint32();
|
39710 | switch (tag >>> 3) {
|
39711 | case 1: {
|
39712 | message.value = reader.uint32();
|
39713 | break;
|
39714 | }
|
39715 | default:
|
39716 | reader.skipType(tag & 7);
|
39717 | break;
|
39718 | }
|
39719 | }
|
39720 | return message;
|
39721 | };
|
39722 |
|
39723 | /**
|
39724 | * Decodes a UInt32Value message from the specified reader or buffer, length delimited.
|
39725 | * @function decodeDelimited
|
39726 | * @memberof google.protobuf.UInt32Value
|
39727 | * @static
|
39728 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
39729 | * @returns {google.protobuf.UInt32Value} UInt32Value
|
39730 | * @throws {Error} If the payload is not a reader or valid buffer
|
39731 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
39732 | */
|
39733 | UInt32Value.decodeDelimited = function decodeDelimited(reader) {
|
39734 | if (!(reader instanceof $Reader))
|
39735 | reader = new $Reader(reader);
|
39736 | return this.decode(reader, reader.uint32());
|
39737 | };
|
39738 |
|
39739 | /**
|
39740 | * Verifies a UInt32Value message.
|
39741 | * @function verify
|
39742 | * @memberof google.protobuf.UInt32Value
|
39743 | * @static
|
39744 | * @param {Object.<string,*>} message Plain object to verify
|
39745 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
39746 | */
|
39747 | UInt32Value.verify = function verify(message) {
|
39748 | if (typeof message !== "object" || message === null)
|
39749 | return "object expected";
|
39750 | if (message.value != null && message.hasOwnProperty("value"))
|
39751 | if (!$util.isInteger(message.value))
|
39752 | return "value: integer expected";
|
39753 | return null;
|
39754 | };
|
39755 |
|
39756 | /**
|
39757 | * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types.
|
39758 | * @function fromObject
|
39759 | * @memberof google.protobuf.UInt32Value
|
39760 | * @static
|
39761 | * @param {Object.<string,*>} object Plain object
|
39762 | * @returns {google.protobuf.UInt32Value} UInt32Value
|
39763 | */
|
39764 | UInt32Value.fromObject = function fromObject(object) {
|
39765 | if (object instanceof $root.google.protobuf.UInt32Value)
|
39766 | return object;
|
39767 | var message = new $root.google.protobuf.UInt32Value();
|
39768 | if (object.value != null)
|
39769 | message.value = object.value >>> 0;
|
39770 | return message;
|
39771 | };
|
39772 |
|
39773 | /**
|
39774 | * Creates a plain object from a UInt32Value message. Also converts values to other types if specified.
|
39775 | * @function toObject
|
39776 | * @memberof google.protobuf.UInt32Value
|
39777 | * @static
|
39778 | * @param {google.protobuf.UInt32Value} message UInt32Value
|
39779 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
39780 | * @returns {Object.<string,*>} Plain object
|
39781 | */
|
39782 | UInt32Value.toObject = function toObject(message, options) {
|
39783 | if (!options)
|
39784 | options = {};
|
39785 | var object = {};
|
39786 | if (options.defaults)
|
39787 | object.value = 0;
|
39788 | if (message.value != null && message.hasOwnProperty("value"))
|
39789 | object.value = message.value;
|
39790 | return object;
|
39791 | };
|
39792 |
|
39793 | /**
|
39794 | * Converts this UInt32Value to JSON.
|
39795 | * @function toJSON
|
39796 | * @memberof google.protobuf.UInt32Value
|
39797 | * @instance
|
39798 | * @returns {Object.<string,*>} JSON object
|
39799 | */
|
39800 | UInt32Value.prototype.toJSON = function toJSON() {
|
39801 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
39802 | };
|
39803 |
|
39804 | /**
|
39805 | * Gets the default type url for UInt32Value
|
39806 | * @function getTypeUrl
|
39807 | * @memberof google.protobuf.UInt32Value
|
39808 | * @static
|
39809 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
39810 | * @returns {string} The default type url
|
39811 | */
|
39812 | UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
39813 | if (typeUrlPrefix === undefined) {
|
39814 | typeUrlPrefix = "type.googleapis.com";
|
39815 | }
|
39816 | return typeUrlPrefix + "/google.protobuf.UInt32Value";
|
39817 | };
|
39818 |
|
39819 | return UInt32Value;
|
39820 | })();
|
39821 |
|
39822 | protobuf.BoolValue = (function() {
|
39823 |
|
39824 | /**
|
39825 | * Properties of a BoolValue.
|
39826 | * @memberof google.protobuf
|
39827 | * @interface IBoolValue
|
39828 | * @property {boolean|null} [value] BoolValue value
|
39829 | */
|
39830 |
|
39831 | /**
|
39832 | * Constructs a new BoolValue.
|
39833 | * @memberof google.protobuf
|
39834 | * @classdesc Represents a BoolValue.
|
39835 | * @implements IBoolValue
|
39836 | * @constructor
|
39837 | * @param {google.protobuf.IBoolValue=} [properties] Properties to set
|
39838 | */
|
39839 | function BoolValue(properties) {
|
39840 | if (properties)
|
39841 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
39842 | if (properties[keys[i]] != null)
|
39843 | this[keys[i]] = properties[keys[i]];
|
39844 | }
|
39845 |
|
39846 | /**
|
39847 | * BoolValue value.
|
39848 | * @member {boolean} value
|
39849 | * @memberof google.protobuf.BoolValue
|
39850 | * @instance
|
39851 | */
|
39852 | BoolValue.prototype.value = false;
|
39853 |
|
39854 | /**
|
39855 | * Creates a new BoolValue instance using the specified properties.
|
39856 | * @function create
|
39857 | * @memberof google.protobuf.BoolValue
|
39858 | * @static
|
39859 | * @param {google.protobuf.IBoolValue=} [properties] Properties to set
|
39860 | * @returns {google.protobuf.BoolValue} BoolValue instance
|
39861 | */
|
39862 | BoolValue.create = function create(properties) {
|
39863 | return new BoolValue(properties);
|
39864 | };
|
39865 |
|
39866 | /**
|
39867 | * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages.
|
39868 | * @function encode
|
39869 | * @memberof google.protobuf.BoolValue
|
39870 | * @static
|
39871 | * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode
|
39872 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
39873 | * @returns {$protobuf.Writer} Writer
|
39874 | */
|
39875 | BoolValue.encode = function encode(message, writer) {
|
39876 | if (!writer)
|
39877 | writer = $Writer.create();
|
39878 | if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
39879 | writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value);
|
39880 | return writer;
|
39881 | };
|
39882 |
|
39883 | /**
|
39884 | * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages.
|
39885 | * @function encodeDelimited
|
39886 | * @memberof google.protobuf.BoolValue
|
39887 | * @static
|
39888 | * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode
|
39889 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
39890 | * @returns {$protobuf.Writer} Writer
|
39891 | */
|
39892 | BoolValue.encodeDelimited = function encodeDelimited(message, writer) {
|
39893 | return this.encode(message, writer).ldelim();
|
39894 | };
|
39895 |
|
39896 | /**
|
39897 | * Decodes a BoolValue message from the specified reader or buffer.
|
39898 | * @function decode
|
39899 | * @memberof google.protobuf.BoolValue
|
39900 | * @static
|
39901 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
39902 | * @param {number} [length] Message length if known beforehand
|
39903 | * @returns {google.protobuf.BoolValue} BoolValue
|
39904 | * @throws {Error} If the payload is not a reader or valid buffer
|
39905 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
39906 | */
|
39907 | BoolValue.decode = function decode(reader, length) {
|
39908 | if (!(reader instanceof $Reader))
|
39909 | reader = $Reader.create(reader);
|
39910 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BoolValue();
|
39911 | while (reader.pos < end) {
|
39912 | var tag = reader.uint32();
|
39913 | switch (tag >>> 3) {
|
39914 | case 1: {
|
39915 | message.value = reader.bool();
|
39916 | break;
|
39917 | }
|
39918 | default:
|
39919 | reader.skipType(tag & 7);
|
39920 | break;
|
39921 | }
|
39922 | }
|
39923 | return message;
|
39924 | };
|
39925 |
|
39926 | /**
|
39927 | * Decodes a BoolValue message from the specified reader or buffer, length delimited.
|
39928 | * @function decodeDelimited
|
39929 | * @memberof google.protobuf.BoolValue
|
39930 | * @static
|
39931 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
39932 | * @returns {google.protobuf.BoolValue} BoolValue
|
39933 | * @throws {Error} If the payload is not a reader or valid buffer
|
39934 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
39935 | */
|
39936 | BoolValue.decodeDelimited = function decodeDelimited(reader) {
|
39937 | if (!(reader instanceof $Reader))
|
39938 | reader = new $Reader(reader);
|
39939 | return this.decode(reader, reader.uint32());
|
39940 | };
|
39941 |
|
39942 | /**
|
39943 | * Verifies a BoolValue message.
|
39944 | * @function verify
|
39945 | * @memberof google.protobuf.BoolValue
|
39946 | * @static
|
39947 | * @param {Object.<string,*>} message Plain object to verify
|
39948 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
39949 | */
|
39950 | BoolValue.verify = function verify(message) {
|
39951 | if (typeof message !== "object" || message === null)
|
39952 | return "object expected";
|
39953 | if (message.value != null && message.hasOwnProperty("value"))
|
39954 | if (typeof message.value !== "boolean")
|
39955 | return "value: boolean expected";
|
39956 | return null;
|
39957 | };
|
39958 |
|
39959 | /**
|
39960 | * Creates a BoolValue message from a plain object. Also converts values to their respective internal types.
|
39961 | * @function fromObject
|
39962 | * @memberof google.protobuf.BoolValue
|
39963 | * @static
|
39964 | * @param {Object.<string,*>} object Plain object
|
39965 | * @returns {google.protobuf.BoolValue} BoolValue
|
39966 | */
|
39967 | BoolValue.fromObject = function fromObject(object) {
|
39968 | if (object instanceof $root.google.protobuf.BoolValue)
|
39969 | return object;
|
39970 | var message = new $root.google.protobuf.BoolValue();
|
39971 | if (object.value != null)
|
39972 | message.value = Boolean(object.value);
|
39973 | return message;
|
39974 | };
|
39975 |
|
39976 | /**
|
39977 | * Creates a plain object from a BoolValue message. Also converts values to other types if specified.
|
39978 | * @function toObject
|
39979 | * @memberof google.protobuf.BoolValue
|
39980 | * @static
|
39981 | * @param {google.protobuf.BoolValue} message BoolValue
|
39982 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
39983 | * @returns {Object.<string,*>} Plain object
|
39984 | */
|
39985 | BoolValue.toObject = function toObject(message, options) {
|
39986 | if (!options)
|
39987 | options = {};
|
39988 | var object = {};
|
39989 | if (options.defaults)
|
39990 | object.value = false;
|
39991 | if (message.value != null && message.hasOwnProperty("value"))
|
39992 | object.value = message.value;
|
39993 | return object;
|
39994 | };
|
39995 |
|
39996 | /**
|
39997 | * Converts this BoolValue to JSON.
|
39998 | * @function toJSON
|
39999 | * @memberof google.protobuf.BoolValue
|
40000 | * @instance
|
40001 | * @returns {Object.<string,*>} JSON object
|
40002 | */
|
40003 | BoolValue.prototype.toJSON = function toJSON() {
|
40004 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
40005 | };
|
40006 |
|
40007 | /**
|
40008 | * Gets the default type url for BoolValue
|
40009 | * @function getTypeUrl
|
40010 | * @memberof google.protobuf.BoolValue
|
40011 | * @static
|
40012 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
40013 | * @returns {string} The default type url
|
40014 | */
|
40015 | BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
40016 | if (typeUrlPrefix === undefined) {
|
40017 | typeUrlPrefix = "type.googleapis.com";
|
40018 | }
|
40019 | return typeUrlPrefix + "/google.protobuf.BoolValue";
|
40020 | };
|
40021 |
|
40022 | return BoolValue;
|
40023 | })();
|
40024 |
|
40025 | protobuf.StringValue = (function() {
|
40026 |
|
40027 | /**
|
40028 | * Properties of a StringValue.
|
40029 | * @memberof google.protobuf
|
40030 | * @interface IStringValue
|
40031 | * @property {string|null} [value] StringValue value
|
40032 | */
|
40033 |
|
40034 | /**
|
40035 | * Constructs a new StringValue.
|
40036 | * @memberof google.protobuf
|
40037 | * @classdesc Represents a StringValue.
|
40038 | * @implements IStringValue
|
40039 | * @constructor
|
40040 | * @param {google.protobuf.IStringValue=} [properties] Properties to set
|
40041 | */
|
40042 | function StringValue(properties) {
|
40043 | if (properties)
|
40044 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
40045 | if (properties[keys[i]] != null)
|
40046 | this[keys[i]] = properties[keys[i]];
|
40047 | }
|
40048 |
|
40049 | /**
|
40050 | * StringValue value.
|
40051 | * @member {string} value
|
40052 | * @memberof google.protobuf.StringValue
|
40053 | * @instance
|
40054 | */
|
40055 | StringValue.prototype.value = "";
|
40056 |
|
40057 | /**
|
40058 | * Creates a new StringValue instance using the specified properties.
|
40059 | * @function create
|
40060 | * @memberof google.protobuf.StringValue
|
40061 | * @static
|
40062 | * @param {google.protobuf.IStringValue=} [properties] Properties to set
|
40063 | * @returns {google.protobuf.StringValue} StringValue instance
|
40064 | */
|
40065 | StringValue.create = function create(properties) {
|
40066 | return new StringValue(properties);
|
40067 | };
|
40068 |
|
40069 | /**
|
40070 | * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages.
|
40071 | * @function encode
|
40072 | * @memberof google.protobuf.StringValue
|
40073 | * @static
|
40074 | * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode
|
40075 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
40076 | * @returns {$protobuf.Writer} Writer
|
40077 | */
|
40078 | StringValue.encode = function encode(message, writer) {
|
40079 | if (!writer)
|
40080 | writer = $Writer.create();
|
40081 | if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
40082 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.value);
|
40083 | return writer;
|
40084 | };
|
40085 |
|
40086 | /**
|
40087 | * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages.
|
40088 | * @function encodeDelimited
|
40089 | * @memberof google.protobuf.StringValue
|
40090 | * @static
|
40091 | * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode
|
40092 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
40093 | * @returns {$protobuf.Writer} Writer
|
40094 | */
|
40095 | StringValue.encodeDelimited = function encodeDelimited(message, writer) {
|
40096 | return this.encode(message, writer).ldelim();
|
40097 | };
|
40098 |
|
40099 | /**
|
40100 | * Decodes a StringValue message from the specified reader or buffer.
|
40101 | * @function decode
|
40102 | * @memberof google.protobuf.StringValue
|
40103 | * @static
|
40104 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
40105 | * @param {number} [length] Message length if known beforehand
|
40106 | * @returns {google.protobuf.StringValue} StringValue
|
40107 | * @throws {Error} If the payload is not a reader or valid buffer
|
40108 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
40109 | */
|
40110 | StringValue.decode = function decode(reader, length) {
|
40111 | if (!(reader instanceof $Reader))
|
40112 | reader = $Reader.create(reader);
|
40113 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.StringValue();
|
40114 | while (reader.pos < end) {
|
40115 | var tag = reader.uint32();
|
40116 | switch (tag >>> 3) {
|
40117 | case 1: {
|
40118 | message.value = reader.string();
|
40119 | break;
|
40120 | }
|
40121 | default:
|
40122 | reader.skipType(tag & 7);
|
40123 | break;
|
40124 | }
|
40125 | }
|
40126 | return message;
|
40127 | };
|
40128 |
|
40129 | /**
|
40130 | * Decodes a StringValue message from the specified reader or buffer, length delimited.
|
40131 | * @function decodeDelimited
|
40132 | * @memberof google.protobuf.StringValue
|
40133 | * @static
|
40134 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
40135 | * @returns {google.protobuf.StringValue} StringValue
|
40136 | * @throws {Error} If the payload is not a reader or valid buffer
|
40137 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
40138 | */
|
40139 | StringValue.decodeDelimited = function decodeDelimited(reader) {
|
40140 | if (!(reader instanceof $Reader))
|
40141 | reader = new $Reader(reader);
|
40142 | return this.decode(reader, reader.uint32());
|
40143 | };
|
40144 |
|
40145 | /**
|
40146 | * Verifies a StringValue message.
|
40147 | * @function verify
|
40148 | * @memberof google.protobuf.StringValue
|
40149 | * @static
|
40150 | * @param {Object.<string,*>} message Plain object to verify
|
40151 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
40152 | */
|
40153 | StringValue.verify = function verify(message) {
|
40154 | if (typeof message !== "object" || message === null)
|
40155 | return "object expected";
|
40156 | if (message.value != null && message.hasOwnProperty("value"))
|
40157 | if (!$util.isString(message.value))
|
40158 | return "value: string expected";
|
40159 | return null;
|
40160 | };
|
40161 |
|
40162 | /**
|
40163 | * Creates a StringValue message from a plain object. Also converts values to their respective internal types.
|
40164 | * @function fromObject
|
40165 | * @memberof google.protobuf.StringValue
|
40166 | * @static
|
40167 | * @param {Object.<string,*>} object Plain object
|
40168 | * @returns {google.protobuf.StringValue} StringValue
|
40169 | */
|
40170 | StringValue.fromObject = function fromObject(object) {
|
40171 | if (object instanceof $root.google.protobuf.StringValue)
|
40172 | return object;
|
40173 | var message = new $root.google.protobuf.StringValue();
|
40174 | if (object.value != null)
|
40175 | message.value = String(object.value);
|
40176 | return message;
|
40177 | };
|
40178 |
|
40179 | /**
|
40180 | * Creates a plain object from a StringValue message. Also converts values to other types if specified.
|
40181 | * @function toObject
|
40182 | * @memberof google.protobuf.StringValue
|
40183 | * @static
|
40184 | * @param {google.protobuf.StringValue} message StringValue
|
40185 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
40186 | * @returns {Object.<string,*>} Plain object
|
40187 | */
|
40188 | StringValue.toObject = function toObject(message, options) {
|
40189 | if (!options)
|
40190 | options = {};
|
40191 | var object = {};
|
40192 | if (options.defaults)
|
40193 | object.value = "";
|
40194 | if (message.value != null && message.hasOwnProperty("value"))
|
40195 | object.value = message.value;
|
40196 | return object;
|
40197 | };
|
40198 |
|
40199 | /**
|
40200 | * Converts this StringValue to JSON.
|
40201 | * @function toJSON
|
40202 | * @memberof google.protobuf.StringValue
|
40203 | * @instance
|
40204 | * @returns {Object.<string,*>} JSON object
|
40205 | */
|
40206 | StringValue.prototype.toJSON = function toJSON() {
|
40207 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
40208 | };
|
40209 |
|
40210 | /**
|
40211 | * Gets the default type url for StringValue
|
40212 | * @function getTypeUrl
|
40213 | * @memberof google.protobuf.StringValue
|
40214 | * @static
|
40215 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
40216 | * @returns {string} The default type url
|
40217 | */
|
40218 | StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
40219 | if (typeUrlPrefix === undefined) {
|
40220 | typeUrlPrefix = "type.googleapis.com";
|
40221 | }
|
40222 | return typeUrlPrefix + "/google.protobuf.StringValue";
|
40223 | };
|
40224 |
|
40225 | return StringValue;
|
40226 | })();
|
40227 |
|
40228 | protobuf.BytesValue = (function() {
|
40229 |
|
40230 | /**
|
40231 | * Properties of a BytesValue.
|
40232 | * @memberof google.protobuf
|
40233 | * @interface IBytesValue
|
40234 | * @property {Uint8Array|null} [value] BytesValue value
|
40235 | */
|
40236 |
|
40237 | /**
|
40238 | * Constructs a new BytesValue.
|
40239 | * @memberof google.protobuf
|
40240 | * @classdesc Represents a BytesValue.
|
40241 | * @implements IBytesValue
|
40242 | * @constructor
|
40243 | * @param {google.protobuf.IBytesValue=} [properties] Properties to set
|
40244 | */
|
40245 | function BytesValue(properties) {
|
40246 | if (properties)
|
40247 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
40248 | if (properties[keys[i]] != null)
|
40249 | this[keys[i]] = properties[keys[i]];
|
40250 | }
|
40251 |
|
40252 | /**
|
40253 | * BytesValue value.
|
40254 | * @member {Uint8Array} value
|
40255 | * @memberof google.protobuf.BytesValue
|
40256 | * @instance
|
40257 | */
|
40258 | BytesValue.prototype.value = $util.newBuffer([]);
|
40259 |
|
40260 | /**
|
40261 | * Creates a new BytesValue instance using the specified properties.
|
40262 | * @function create
|
40263 | * @memberof google.protobuf.BytesValue
|
40264 | * @static
|
40265 | * @param {google.protobuf.IBytesValue=} [properties] Properties to set
|
40266 | * @returns {google.protobuf.BytesValue} BytesValue instance
|
40267 | */
|
40268 | BytesValue.create = function create(properties) {
|
40269 | return new BytesValue(properties);
|
40270 | };
|
40271 |
|
40272 | /**
|
40273 | * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages.
|
40274 | * @function encode
|
40275 | * @memberof google.protobuf.BytesValue
|
40276 | * @static
|
40277 | * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode
|
40278 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
40279 | * @returns {$protobuf.Writer} Writer
|
40280 | */
|
40281 | BytesValue.encode = function encode(message, writer) {
|
40282 | if (!writer)
|
40283 | writer = $Writer.create();
|
40284 | if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
40285 | writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value);
|
40286 | return writer;
|
40287 | };
|
40288 |
|
40289 | /**
|
40290 | * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages.
|
40291 | * @function encodeDelimited
|
40292 | * @memberof google.protobuf.BytesValue
|
40293 | * @static
|
40294 | * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode
|
40295 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
40296 | * @returns {$protobuf.Writer} Writer
|
40297 | */
|
40298 | BytesValue.encodeDelimited = function encodeDelimited(message, writer) {
|
40299 | return this.encode(message, writer).ldelim();
|
40300 | };
|
40301 |
|
40302 | /**
|
40303 | * Decodes a BytesValue message from the specified reader or buffer.
|
40304 | * @function decode
|
40305 | * @memberof google.protobuf.BytesValue
|
40306 | * @static
|
40307 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
40308 | * @param {number} [length] Message length if known beforehand
|
40309 | * @returns {google.protobuf.BytesValue} BytesValue
|
40310 | * @throws {Error} If the payload is not a reader or valid buffer
|
40311 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
40312 | */
|
40313 | BytesValue.decode = function decode(reader, length) {
|
40314 | if (!(reader instanceof $Reader))
|
40315 | reader = $Reader.create(reader);
|
40316 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BytesValue();
|
40317 | while (reader.pos < end) {
|
40318 | var tag = reader.uint32();
|
40319 | switch (tag >>> 3) {
|
40320 | case 1: {
|
40321 | message.value = reader.bytes();
|
40322 | break;
|
40323 | }
|
40324 | default:
|
40325 | reader.skipType(tag & 7);
|
40326 | break;
|
40327 | }
|
40328 | }
|
40329 | return message;
|
40330 | };
|
40331 |
|
40332 | /**
|
40333 | * Decodes a BytesValue message from the specified reader or buffer, length delimited.
|
40334 | * @function decodeDelimited
|
40335 | * @memberof google.protobuf.BytesValue
|
40336 | * @static
|
40337 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
40338 | * @returns {google.protobuf.BytesValue} BytesValue
|
40339 | * @throws {Error} If the payload is not a reader or valid buffer
|
40340 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
40341 | */
|
40342 | BytesValue.decodeDelimited = function decodeDelimited(reader) {
|
40343 | if (!(reader instanceof $Reader))
|
40344 | reader = new $Reader(reader);
|
40345 | return this.decode(reader, reader.uint32());
|
40346 | };
|
40347 |
|
40348 | /**
|
40349 | * Verifies a BytesValue message.
|
40350 | * @function verify
|
40351 | * @memberof google.protobuf.BytesValue
|
40352 | * @static
|
40353 | * @param {Object.<string,*>} message Plain object to verify
|
40354 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
40355 | */
|
40356 | BytesValue.verify = function verify(message) {
|
40357 | if (typeof message !== "object" || message === null)
|
40358 | return "object expected";
|
40359 | if (message.value != null && message.hasOwnProperty("value"))
|
40360 | if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
|
40361 | return "value: buffer expected";
|
40362 | return null;
|
40363 | };
|
40364 |
|
40365 | /**
|
40366 | * Creates a BytesValue message from a plain object. Also converts values to their respective internal types.
|
40367 | * @function fromObject
|
40368 | * @memberof google.protobuf.BytesValue
|
40369 | * @static
|
40370 | * @param {Object.<string,*>} object Plain object
|
40371 | * @returns {google.protobuf.BytesValue} BytesValue
|
40372 | */
|
40373 | BytesValue.fromObject = function fromObject(object) {
|
40374 | if (object instanceof $root.google.protobuf.BytesValue)
|
40375 | return object;
|
40376 | var message = new $root.google.protobuf.BytesValue();
|
40377 | if (object.value != null)
|
40378 | if (typeof object.value === "string")
|
40379 | $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0);
|
40380 | else if (object.value.length >= 0)
|
40381 | message.value = object.value;
|
40382 | return message;
|
40383 | };
|
40384 |
|
40385 | /**
|
40386 | * Creates a plain object from a BytesValue message. Also converts values to other types if specified.
|
40387 | * @function toObject
|
40388 | * @memberof google.protobuf.BytesValue
|
40389 | * @static
|
40390 | * @param {google.protobuf.BytesValue} message BytesValue
|
40391 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
40392 | * @returns {Object.<string,*>} Plain object
|
40393 | */
|
40394 | BytesValue.toObject = function toObject(message, options) {
|
40395 | if (!options)
|
40396 | options = {};
|
40397 | var object = {};
|
40398 | if (options.defaults)
|
40399 | if (options.bytes === String)
|
40400 | object.value = "";
|
40401 | else {
|
40402 | object.value = [];
|
40403 | if (options.bytes !== Array)
|
40404 | object.value = $util.newBuffer(object.value);
|
40405 | }
|
40406 | if (message.value != null && message.hasOwnProperty("value"))
|
40407 | object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value;
|
40408 | return object;
|
40409 | };
|
40410 |
|
40411 | /**
|
40412 | * Converts this BytesValue to JSON.
|
40413 | * @function toJSON
|
40414 | * @memberof google.protobuf.BytesValue
|
40415 | * @instance
|
40416 | * @returns {Object.<string,*>} JSON object
|
40417 | */
|
40418 | BytesValue.prototype.toJSON = function toJSON() {
|
40419 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
40420 | };
|
40421 |
|
40422 | /**
|
40423 | * Gets the default type url for BytesValue
|
40424 | * @function getTypeUrl
|
40425 | * @memberof google.protobuf.BytesValue
|
40426 | * @static
|
40427 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
40428 | * @returns {string} The default type url
|
40429 | */
|
40430 | BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
40431 | if (typeUrlPrefix === undefined) {
|
40432 | typeUrlPrefix = "type.googleapis.com";
|
40433 | }
|
40434 | return typeUrlPrefix + "/google.protobuf.BytesValue";
|
40435 | };
|
40436 |
|
40437 | return BytesValue;
|
40438 | })();
|
40439 |
|
40440 | return protobuf;
|
40441 | })();
|
40442 |
|
40443 | google.longrunning = (function() {
|
40444 |
|
40445 | /**
|
40446 | * Namespace longrunning.
|
40447 | * @memberof google
|
40448 | * @namespace
|
40449 | */
|
40450 | var longrunning = {};
|
40451 |
|
40452 | longrunning.Operations = (function() {
|
40453 |
|
40454 | /**
|
40455 | * Constructs a new Operations service.
|
40456 | * @memberof google.longrunning
|
40457 | * @classdesc Represents an Operations
|
40458 | * @extends $protobuf.rpc.Service
|
40459 | * @constructor
|
40460 | * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
|
40461 | * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
|
40462 | * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
|
40463 | */
|
40464 | function Operations(rpcImpl, requestDelimited, responseDelimited) {
|
40465 | $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
|
40466 | }
|
40467 |
|
40468 | (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations;
|
40469 |
|
40470 | /**
|
40471 | * Creates new Operations service using the specified rpc implementation.
|
40472 | * @function create
|
40473 | * @memberof google.longrunning.Operations
|
40474 | * @static
|
40475 | * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
|
40476 | * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
|
40477 | * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
|
40478 | * @returns {Operations} RPC service. Useful where requests and/or responses are streamed.
|
40479 | */
|
40480 | Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) {
|
40481 | return new this(rpcImpl, requestDelimited, responseDelimited);
|
40482 | };
|
40483 |
|
40484 | /**
|
40485 | * Callback as used by {@link google.longrunning.Operations|listOperations}.
|
40486 | * @memberof google.longrunning.Operations
|
40487 | * @typedef ListOperationsCallback
|
40488 | * @type {function}
|
40489 | * @param {Error|null} error Error, if any
|
40490 | * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse
|
40491 | */
|
40492 |
|
40493 | /**
|
40494 | * Calls ListOperations.
|
40495 | * @function listOperations
|
40496 | * @memberof google.longrunning.Operations
|
40497 | * @instance
|
40498 | * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object
|
40499 | * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse
|
40500 | * @returns {undefined}
|
40501 | * @variation 1
|
40502 | */
|
40503 | Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) {
|
40504 | return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback);
|
40505 | }, "name", { value: "ListOperations" });
|
40506 |
|
40507 | /**
|
40508 | * Calls ListOperations.
|
40509 | * @function listOperations
|
40510 | * @memberof google.longrunning.Operations
|
40511 | * @instance
|
40512 | * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object
|
40513 | * @returns {Promise<google.longrunning.ListOperationsResponse>} Promise
|
40514 | * @variation 2
|
40515 | */
|
40516 |
|
40517 | /**
|
40518 | * Callback as used by {@link google.longrunning.Operations|getOperation}.
|
40519 | * @memberof google.longrunning.Operations
|
40520 | * @typedef GetOperationCallback
|
40521 | * @type {function}
|
40522 | * @param {Error|null} error Error, if any
|
40523 | * @param {google.longrunning.Operation} [response] Operation
|
40524 | */
|
40525 |
|
40526 | /**
|
40527 | * Calls GetOperation.
|
40528 | * @function getOperation
|
40529 | * @memberof google.longrunning.Operations
|
40530 | * @instance
|
40531 | * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object
|
40532 | * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation
|
40533 | * @returns {undefined}
|
40534 | * @variation 1
|
40535 | */
|
40536 | Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) {
|
40537 | return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback);
|
40538 | }, "name", { value: "GetOperation" });
|
40539 |
|
40540 | /**
|
40541 | * Calls GetOperation.
|
40542 | * @function getOperation
|
40543 | * @memberof google.longrunning.Operations
|
40544 | * @instance
|
40545 | * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object
|
40546 | * @returns {Promise<google.longrunning.Operation>} Promise
|
40547 | * @variation 2
|
40548 | */
|
40549 |
|
40550 | /**
|
40551 | * Callback as used by {@link google.longrunning.Operations|deleteOperation}.
|
40552 | * @memberof google.longrunning.Operations
|
40553 | * @typedef DeleteOperationCallback
|
40554 | * @type {function}
|
40555 | * @param {Error|null} error Error, if any
|
40556 | * @param {google.protobuf.Empty} [response] Empty
|
40557 | */
|
40558 |
|
40559 | /**
|
40560 | * Calls DeleteOperation.
|
40561 | * @function deleteOperation
|
40562 | * @memberof google.longrunning.Operations
|
40563 | * @instance
|
40564 | * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object
|
40565 | * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty
|
40566 | * @returns {undefined}
|
40567 | * @variation 1
|
40568 | */
|
40569 | Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) {
|
40570 | return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback);
|
40571 | }, "name", { value: "DeleteOperation" });
|
40572 |
|
40573 | /**
|
40574 | * Calls DeleteOperation.
|
40575 | * @function deleteOperation
|
40576 | * @memberof google.longrunning.Operations
|
40577 | * @instance
|
40578 | * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object
|
40579 | * @returns {Promise<google.protobuf.Empty>} Promise
|
40580 | * @variation 2
|
40581 | */
|
40582 |
|
40583 | /**
|
40584 | * Callback as used by {@link google.longrunning.Operations|cancelOperation}.
|
40585 | * @memberof google.longrunning.Operations
|
40586 | * @typedef CancelOperationCallback
|
40587 | * @type {function}
|
40588 | * @param {Error|null} error Error, if any
|
40589 | * @param {google.protobuf.Empty} [response] Empty
|
40590 | */
|
40591 |
|
40592 | /**
|
40593 | * Calls CancelOperation.
|
40594 | * @function cancelOperation
|
40595 | * @memberof google.longrunning.Operations
|
40596 | * @instance
|
40597 | * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object
|
40598 | * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty
|
40599 | * @returns {undefined}
|
40600 | * @variation 1
|
40601 | */
|
40602 | Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) {
|
40603 | return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback);
|
40604 | }, "name", { value: "CancelOperation" });
|
40605 |
|
40606 | /**
|
40607 | * Calls CancelOperation.
|
40608 | * @function cancelOperation
|
40609 | * @memberof google.longrunning.Operations
|
40610 | * @instance
|
40611 | * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object
|
40612 | * @returns {Promise<google.protobuf.Empty>} Promise
|
40613 | * @variation 2
|
40614 | */
|
40615 |
|
40616 | /**
|
40617 | * Callback as used by {@link google.longrunning.Operations|waitOperation}.
|
40618 | * @memberof google.longrunning.Operations
|
40619 | * @typedef WaitOperationCallback
|
40620 | * @type {function}
|
40621 | * @param {Error|null} error Error, if any
|
40622 | * @param {google.longrunning.Operation} [response] Operation
|
40623 | */
|
40624 |
|
40625 | /**
|
40626 | * Calls WaitOperation.
|
40627 | * @function waitOperation
|
40628 | * @memberof google.longrunning.Operations
|
40629 | * @instance
|
40630 | * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object
|
40631 | * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation
|
40632 | * @returns {undefined}
|
40633 | * @variation 1
|
40634 | */
|
40635 | Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) {
|
40636 | return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback);
|
40637 | }, "name", { value: "WaitOperation" });
|
40638 |
|
40639 | /**
|
40640 | * Calls WaitOperation.
|
40641 | * @function waitOperation
|
40642 | * @memberof google.longrunning.Operations
|
40643 | * @instance
|
40644 | * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object
|
40645 | * @returns {Promise<google.longrunning.Operation>} Promise
|
40646 | * @variation 2
|
40647 | */
|
40648 |
|
40649 | return Operations;
|
40650 | })();
|
40651 |
|
40652 | longrunning.Operation = (function() {
|
40653 |
|
40654 | /**
|
40655 | * Properties of an Operation.
|
40656 | * @memberof google.longrunning
|
40657 | * @interface IOperation
|
40658 | * @property {string|null} [name] Operation name
|
40659 | * @property {google.protobuf.IAny|null} [metadata] Operation metadata
|
40660 | * @property {boolean|null} [done] Operation done
|
40661 | * @property {google.rpc.IStatus|null} [error] Operation error
|
40662 | * @property {google.protobuf.IAny|null} [response] Operation response
|
40663 | */
|
40664 |
|
40665 | /**
|
40666 | * Constructs a new Operation.
|
40667 | * @memberof google.longrunning
|
40668 | * @classdesc Represents an Operation.
|
40669 | * @implements IOperation
|
40670 | * @constructor
|
40671 | * @param {google.longrunning.IOperation=} [properties] Properties to set
|
40672 | */
|
40673 | function Operation(properties) {
|
40674 | if (properties)
|
40675 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
40676 | if (properties[keys[i]] != null)
|
40677 | this[keys[i]] = properties[keys[i]];
|
40678 | }
|
40679 |
|
40680 | /**
|
40681 | * Operation name.
|
40682 | * @member {string} name
|
40683 | * @memberof google.longrunning.Operation
|
40684 | * @instance
|
40685 | */
|
40686 | Operation.prototype.name = "";
|
40687 |
|
40688 | /**
|
40689 | * Operation metadata.
|
40690 | * @member {google.protobuf.IAny|null|undefined} metadata
|
40691 | * @memberof google.longrunning.Operation
|
40692 | * @instance
|
40693 | */
|
40694 | Operation.prototype.metadata = null;
|
40695 |
|
40696 | /**
|
40697 | * Operation done.
|
40698 | * @member {boolean} done
|
40699 | * @memberof google.longrunning.Operation
|
40700 | * @instance
|
40701 | */
|
40702 | Operation.prototype.done = false;
|
40703 |
|
40704 | /**
|
40705 | * Operation error.
|
40706 | * @member {google.rpc.IStatus|null|undefined} error
|
40707 | * @memberof google.longrunning.Operation
|
40708 | * @instance
|
40709 | */
|
40710 | Operation.prototype.error = null;
|
40711 |
|
40712 | /**
|
40713 | * Operation response.
|
40714 | * @member {google.protobuf.IAny|null|undefined} response
|
40715 | * @memberof google.longrunning.Operation
|
40716 | * @instance
|
40717 | */
|
40718 | Operation.prototype.response = null;
|
40719 |
|
40720 | // OneOf field names bound to virtual getters and setters
|
40721 | var $oneOfFields;
|
40722 |
|
40723 | /**
|
40724 | * Operation result.
|
40725 | * @member {"error"|"response"|undefined} result
|
40726 | * @memberof google.longrunning.Operation
|
40727 | * @instance
|
40728 | */
|
40729 | Object.defineProperty(Operation.prototype, "result", {
|
40730 | get: $util.oneOfGetter($oneOfFields = ["error", "response"]),
|
40731 | set: $util.oneOfSetter($oneOfFields)
|
40732 | });
|
40733 |
|
40734 | /**
|
40735 | * Creates a new Operation instance using the specified properties.
|
40736 | * @function create
|
40737 | * @memberof google.longrunning.Operation
|
40738 | * @static
|
40739 | * @param {google.longrunning.IOperation=} [properties] Properties to set
|
40740 | * @returns {google.longrunning.Operation} Operation instance
|
40741 | */
|
40742 | Operation.create = function create(properties) {
|
40743 | return new Operation(properties);
|
40744 | };
|
40745 |
|
40746 | /**
|
40747 | * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages.
|
40748 | * @function encode
|
40749 | * @memberof google.longrunning.Operation
|
40750 | * @static
|
40751 | * @param {google.longrunning.IOperation} message Operation message or plain object to encode
|
40752 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
40753 | * @returns {$protobuf.Writer} Writer
|
40754 | */
|
40755 | Operation.encode = function encode(message, writer) {
|
40756 | if (!writer)
|
40757 | writer = $Writer.create();
|
40758 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
40759 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
40760 | if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
|
40761 | $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
40762 | if (message.done != null && Object.hasOwnProperty.call(message, "done"))
|
40763 | writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done);
|
40764 | if (message.error != null && Object.hasOwnProperty.call(message, "error"))
|
40765 | $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
40766 | if (message.response != null && Object.hasOwnProperty.call(message, "response"))
|
40767 | $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
40768 | return writer;
|
40769 | };
|
40770 |
|
40771 | /**
|
40772 | * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages.
|
40773 | * @function encodeDelimited
|
40774 | * @memberof google.longrunning.Operation
|
40775 | * @static
|
40776 | * @param {google.longrunning.IOperation} message Operation message or plain object to encode
|
40777 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
40778 | * @returns {$protobuf.Writer} Writer
|
40779 | */
|
40780 | Operation.encodeDelimited = function encodeDelimited(message, writer) {
|
40781 | return this.encode(message, writer).ldelim();
|
40782 | };
|
40783 |
|
40784 | /**
|
40785 | * Decodes an Operation message from the specified reader or buffer.
|
40786 | * @function decode
|
40787 | * @memberof google.longrunning.Operation
|
40788 | * @static
|
40789 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
40790 | * @param {number} [length] Message length if known beforehand
|
40791 | * @returns {google.longrunning.Operation} Operation
|
40792 | * @throws {Error} If the payload is not a reader or valid buffer
|
40793 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
40794 | */
|
40795 | Operation.decode = function decode(reader, length) {
|
40796 | if (!(reader instanceof $Reader))
|
40797 | reader = $Reader.create(reader);
|
40798 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation();
|
40799 | while (reader.pos < end) {
|
40800 | var tag = reader.uint32();
|
40801 | switch (tag >>> 3) {
|
40802 | case 1: {
|
40803 | message.name = reader.string();
|
40804 | break;
|
40805 | }
|
40806 | case 2: {
|
40807 | message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32());
|
40808 | break;
|
40809 | }
|
40810 | case 3: {
|
40811 | message.done = reader.bool();
|
40812 | break;
|
40813 | }
|
40814 | case 4: {
|
40815 | message.error = $root.google.rpc.Status.decode(reader, reader.uint32());
|
40816 | break;
|
40817 | }
|
40818 | case 5: {
|
40819 | message.response = $root.google.protobuf.Any.decode(reader, reader.uint32());
|
40820 | break;
|
40821 | }
|
40822 | default:
|
40823 | reader.skipType(tag & 7);
|
40824 | break;
|
40825 | }
|
40826 | }
|
40827 | return message;
|
40828 | };
|
40829 |
|
40830 | /**
|
40831 | * Decodes an Operation message from the specified reader or buffer, length delimited.
|
40832 | * @function decodeDelimited
|
40833 | * @memberof google.longrunning.Operation
|
40834 | * @static
|
40835 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
40836 | * @returns {google.longrunning.Operation} Operation
|
40837 | * @throws {Error} If the payload is not a reader or valid buffer
|
40838 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
40839 | */
|
40840 | Operation.decodeDelimited = function decodeDelimited(reader) {
|
40841 | if (!(reader instanceof $Reader))
|
40842 | reader = new $Reader(reader);
|
40843 | return this.decode(reader, reader.uint32());
|
40844 | };
|
40845 |
|
40846 | /**
|
40847 | * Verifies an Operation message.
|
40848 | * @function verify
|
40849 | * @memberof google.longrunning.Operation
|
40850 | * @static
|
40851 | * @param {Object.<string,*>} message Plain object to verify
|
40852 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
40853 | */
|
40854 | Operation.verify = function verify(message) {
|
40855 | if (typeof message !== "object" || message === null)
|
40856 | return "object expected";
|
40857 | var properties = {};
|
40858 | if (message.name != null && message.hasOwnProperty("name"))
|
40859 | if (!$util.isString(message.name))
|
40860 | return "name: string expected";
|
40861 | if (message.metadata != null && message.hasOwnProperty("metadata")) {
|
40862 | var error = $root.google.protobuf.Any.verify(message.metadata);
|
40863 | if (error)
|
40864 | return "metadata." + error;
|
40865 | }
|
40866 | if (message.done != null && message.hasOwnProperty("done"))
|
40867 | if (typeof message.done !== "boolean")
|
40868 | return "done: boolean expected";
|
40869 | if (message.error != null && message.hasOwnProperty("error")) {
|
40870 | properties.result = 1;
|
40871 | {
|
40872 | var error = $root.google.rpc.Status.verify(message.error);
|
40873 | if (error)
|
40874 | return "error." + error;
|
40875 | }
|
40876 | }
|
40877 | if (message.response != null && message.hasOwnProperty("response")) {
|
40878 | if (properties.result === 1)
|
40879 | return "result: multiple values";
|
40880 | properties.result = 1;
|
40881 | {
|
40882 | var error = $root.google.protobuf.Any.verify(message.response);
|
40883 | if (error)
|
40884 | return "response." + error;
|
40885 | }
|
40886 | }
|
40887 | return null;
|
40888 | };
|
40889 |
|
40890 | /**
|
40891 | * Creates an Operation message from a plain object. Also converts values to their respective internal types.
|
40892 | * @function fromObject
|
40893 | * @memberof google.longrunning.Operation
|
40894 | * @static
|
40895 | * @param {Object.<string,*>} object Plain object
|
40896 | * @returns {google.longrunning.Operation} Operation
|
40897 | */
|
40898 | Operation.fromObject = function fromObject(object) {
|
40899 | if (object instanceof $root.google.longrunning.Operation)
|
40900 | return object;
|
40901 | var message = new $root.google.longrunning.Operation();
|
40902 | if (object.name != null)
|
40903 | message.name = String(object.name);
|
40904 | if (object.metadata != null) {
|
40905 | if (typeof object.metadata !== "object")
|
40906 | throw TypeError(".google.longrunning.Operation.metadata: object expected");
|
40907 | message.metadata = $root.google.protobuf.Any.fromObject(object.metadata);
|
40908 | }
|
40909 | if (object.done != null)
|
40910 | message.done = Boolean(object.done);
|
40911 | if (object.error != null) {
|
40912 | if (typeof object.error !== "object")
|
40913 | throw TypeError(".google.longrunning.Operation.error: object expected");
|
40914 | message.error = $root.google.rpc.Status.fromObject(object.error);
|
40915 | }
|
40916 | if (object.response != null) {
|
40917 | if (typeof object.response !== "object")
|
40918 | throw TypeError(".google.longrunning.Operation.response: object expected");
|
40919 | message.response = $root.google.protobuf.Any.fromObject(object.response);
|
40920 | }
|
40921 | return message;
|
40922 | };
|
40923 |
|
40924 | /**
|
40925 | * Creates a plain object from an Operation message. Also converts values to other types if specified.
|
40926 | * @function toObject
|
40927 | * @memberof google.longrunning.Operation
|
40928 | * @static
|
40929 | * @param {google.longrunning.Operation} message Operation
|
40930 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
40931 | * @returns {Object.<string,*>} Plain object
|
40932 | */
|
40933 | Operation.toObject = function toObject(message, options) {
|
40934 | if (!options)
|
40935 | options = {};
|
40936 | var object = {};
|
40937 | if (options.defaults) {
|
40938 | object.name = "";
|
40939 | object.metadata = null;
|
40940 | object.done = false;
|
40941 | }
|
40942 | if (message.name != null && message.hasOwnProperty("name"))
|
40943 | object.name = message.name;
|
40944 | if (message.metadata != null && message.hasOwnProperty("metadata"))
|
40945 | object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options);
|
40946 | if (message.done != null && message.hasOwnProperty("done"))
|
40947 | object.done = message.done;
|
40948 | if (message.error != null && message.hasOwnProperty("error")) {
|
40949 | object.error = $root.google.rpc.Status.toObject(message.error, options);
|
40950 | if (options.oneofs)
|
40951 | object.result = "error";
|
40952 | }
|
40953 | if (message.response != null && message.hasOwnProperty("response")) {
|
40954 | object.response = $root.google.protobuf.Any.toObject(message.response, options);
|
40955 | if (options.oneofs)
|
40956 | object.result = "response";
|
40957 | }
|
40958 | return object;
|
40959 | };
|
40960 |
|
40961 | /**
|
40962 | * Converts this Operation to JSON.
|
40963 | * @function toJSON
|
40964 | * @memberof google.longrunning.Operation
|
40965 | * @instance
|
40966 | * @returns {Object.<string,*>} JSON object
|
40967 | */
|
40968 | Operation.prototype.toJSON = function toJSON() {
|
40969 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
40970 | };
|
40971 |
|
40972 | /**
|
40973 | * Gets the default type url for Operation
|
40974 | * @function getTypeUrl
|
40975 | * @memberof google.longrunning.Operation
|
40976 | * @static
|
40977 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
40978 | * @returns {string} The default type url
|
40979 | */
|
40980 | Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
40981 | if (typeUrlPrefix === undefined) {
|
40982 | typeUrlPrefix = "type.googleapis.com";
|
40983 | }
|
40984 | return typeUrlPrefix + "/google.longrunning.Operation";
|
40985 | };
|
40986 |
|
40987 | return Operation;
|
40988 | })();
|
40989 |
|
40990 | longrunning.GetOperationRequest = (function() {
|
40991 |
|
40992 | /**
|
40993 | * Properties of a GetOperationRequest.
|
40994 | * @memberof google.longrunning
|
40995 | * @interface IGetOperationRequest
|
40996 | * @property {string|null} [name] GetOperationRequest name
|
40997 | */
|
40998 |
|
40999 | /**
|
41000 | * Constructs a new GetOperationRequest.
|
41001 | * @memberof google.longrunning
|
41002 | * @classdesc Represents a GetOperationRequest.
|
41003 | * @implements IGetOperationRequest
|
41004 | * @constructor
|
41005 | * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set
|
41006 | */
|
41007 | function GetOperationRequest(properties) {
|
41008 | if (properties)
|
41009 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
41010 | if (properties[keys[i]] != null)
|
41011 | this[keys[i]] = properties[keys[i]];
|
41012 | }
|
41013 |
|
41014 | /**
|
41015 | * GetOperationRequest name.
|
41016 | * @member {string} name
|
41017 | * @memberof google.longrunning.GetOperationRequest
|
41018 | * @instance
|
41019 | */
|
41020 | GetOperationRequest.prototype.name = "";
|
41021 |
|
41022 | /**
|
41023 | * Creates a new GetOperationRequest instance using the specified properties.
|
41024 | * @function create
|
41025 | * @memberof google.longrunning.GetOperationRequest
|
41026 | * @static
|
41027 | * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set
|
41028 | * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance
|
41029 | */
|
41030 | GetOperationRequest.create = function create(properties) {
|
41031 | return new GetOperationRequest(properties);
|
41032 | };
|
41033 |
|
41034 | /**
|
41035 | * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages.
|
41036 | * @function encode
|
41037 | * @memberof google.longrunning.GetOperationRequest
|
41038 | * @static
|
41039 | * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode
|
41040 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
41041 | * @returns {$protobuf.Writer} Writer
|
41042 | */
|
41043 | GetOperationRequest.encode = function encode(message, writer) {
|
41044 | if (!writer)
|
41045 | writer = $Writer.create();
|
41046 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
41047 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
41048 | return writer;
|
41049 | };
|
41050 |
|
41051 | /**
|
41052 | * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages.
|
41053 | * @function encodeDelimited
|
41054 | * @memberof google.longrunning.GetOperationRequest
|
41055 | * @static
|
41056 | * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode
|
41057 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
41058 | * @returns {$protobuf.Writer} Writer
|
41059 | */
|
41060 | GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
41061 | return this.encode(message, writer).ldelim();
|
41062 | };
|
41063 |
|
41064 | /**
|
41065 | * Decodes a GetOperationRequest message from the specified reader or buffer.
|
41066 | * @function decode
|
41067 | * @memberof google.longrunning.GetOperationRequest
|
41068 | * @static
|
41069 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
41070 | * @param {number} [length] Message length if known beforehand
|
41071 | * @returns {google.longrunning.GetOperationRequest} GetOperationRequest
|
41072 | * @throws {Error} If the payload is not a reader or valid buffer
|
41073 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
41074 | */
|
41075 | GetOperationRequest.decode = function decode(reader, length) {
|
41076 | if (!(reader instanceof $Reader))
|
41077 | reader = $Reader.create(reader);
|
41078 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest();
|
41079 | while (reader.pos < end) {
|
41080 | var tag = reader.uint32();
|
41081 | switch (tag >>> 3) {
|
41082 | case 1: {
|
41083 | message.name = reader.string();
|
41084 | break;
|
41085 | }
|
41086 | default:
|
41087 | reader.skipType(tag & 7);
|
41088 | break;
|
41089 | }
|
41090 | }
|
41091 | return message;
|
41092 | };
|
41093 |
|
41094 | /**
|
41095 | * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited.
|
41096 | * @function decodeDelimited
|
41097 | * @memberof google.longrunning.GetOperationRequest
|
41098 | * @static
|
41099 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
41100 | * @returns {google.longrunning.GetOperationRequest} GetOperationRequest
|
41101 | * @throws {Error} If the payload is not a reader or valid buffer
|
41102 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
41103 | */
|
41104 | GetOperationRequest.decodeDelimited = function decodeDelimited(reader) {
|
41105 | if (!(reader instanceof $Reader))
|
41106 | reader = new $Reader(reader);
|
41107 | return this.decode(reader, reader.uint32());
|
41108 | };
|
41109 |
|
41110 | /**
|
41111 | * Verifies a GetOperationRequest message.
|
41112 | * @function verify
|
41113 | * @memberof google.longrunning.GetOperationRequest
|
41114 | * @static
|
41115 | * @param {Object.<string,*>} message Plain object to verify
|
41116 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
41117 | */
|
41118 | GetOperationRequest.verify = function verify(message) {
|
41119 | if (typeof message !== "object" || message === null)
|
41120 | return "object expected";
|
41121 | if (message.name != null && message.hasOwnProperty("name"))
|
41122 | if (!$util.isString(message.name))
|
41123 | return "name: string expected";
|
41124 | return null;
|
41125 | };
|
41126 |
|
41127 | /**
|
41128 | * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types.
|
41129 | * @function fromObject
|
41130 | * @memberof google.longrunning.GetOperationRequest
|
41131 | * @static
|
41132 | * @param {Object.<string,*>} object Plain object
|
41133 | * @returns {google.longrunning.GetOperationRequest} GetOperationRequest
|
41134 | */
|
41135 | GetOperationRequest.fromObject = function fromObject(object) {
|
41136 | if (object instanceof $root.google.longrunning.GetOperationRequest)
|
41137 | return object;
|
41138 | var message = new $root.google.longrunning.GetOperationRequest();
|
41139 | if (object.name != null)
|
41140 | message.name = String(object.name);
|
41141 | return message;
|
41142 | };
|
41143 |
|
41144 | /**
|
41145 | * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified.
|
41146 | * @function toObject
|
41147 | * @memberof google.longrunning.GetOperationRequest
|
41148 | * @static
|
41149 | * @param {google.longrunning.GetOperationRequest} message GetOperationRequest
|
41150 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
41151 | * @returns {Object.<string,*>} Plain object
|
41152 | */
|
41153 | GetOperationRequest.toObject = function toObject(message, options) {
|
41154 | if (!options)
|
41155 | options = {};
|
41156 | var object = {};
|
41157 | if (options.defaults)
|
41158 | object.name = "";
|
41159 | if (message.name != null && message.hasOwnProperty("name"))
|
41160 | object.name = message.name;
|
41161 | return object;
|
41162 | };
|
41163 |
|
41164 | /**
|
41165 | * Converts this GetOperationRequest to JSON.
|
41166 | * @function toJSON
|
41167 | * @memberof google.longrunning.GetOperationRequest
|
41168 | * @instance
|
41169 | * @returns {Object.<string,*>} JSON object
|
41170 | */
|
41171 | GetOperationRequest.prototype.toJSON = function toJSON() {
|
41172 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
41173 | };
|
41174 |
|
41175 | /**
|
41176 | * Gets the default type url for GetOperationRequest
|
41177 | * @function getTypeUrl
|
41178 | * @memberof google.longrunning.GetOperationRequest
|
41179 | * @static
|
41180 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
41181 | * @returns {string} The default type url
|
41182 | */
|
41183 | GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
41184 | if (typeUrlPrefix === undefined) {
|
41185 | typeUrlPrefix = "type.googleapis.com";
|
41186 | }
|
41187 | return typeUrlPrefix + "/google.longrunning.GetOperationRequest";
|
41188 | };
|
41189 |
|
41190 | return GetOperationRequest;
|
41191 | })();
|
41192 |
|
41193 | longrunning.ListOperationsRequest = (function() {
|
41194 |
|
41195 | /**
|
41196 | * Properties of a ListOperationsRequest.
|
41197 | * @memberof google.longrunning
|
41198 | * @interface IListOperationsRequest
|
41199 | * @property {string|null} [name] ListOperationsRequest name
|
41200 | * @property {string|null} [filter] ListOperationsRequest filter
|
41201 | * @property {number|null} [pageSize] ListOperationsRequest pageSize
|
41202 | * @property {string|null} [pageToken] ListOperationsRequest pageToken
|
41203 | */
|
41204 |
|
41205 | /**
|
41206 | * Constructs a new ListOperationsRequest.
|
41207 | * @memberof google.longrunning
|
41208 | * @classdesc Represents a ListOperationsRequest.
|
41209 | * @implements IListOperationsRequest
|
41210 | * @constructor
|
41211 | * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set
|
41212 | */
|
41213 | function ListOperationsRequest(properties) {
|
41214 | if (properties)
|
41215 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
41216 | if (properties[keys[i]] != null)
|
41217 | this[keys[i]] = properties[keys[i]];
|
41218 | }
|
41219 |
|
41220 | /**
|
41221 | * ListOperationsRequest name.
|
41222 | * @member {string} name
|
41223 | * @memberof google.longrunning.ListOperationsRequest
|
41224 | * @instance
|
41225 | */
|
41226 | ListOperationsRequest.prototype.name = "";
|
41227 |
|
41228 | /**
|
41229 | * ListOperationsRequest filter.
|
41230 | * @member {string} filter
|
41231 | * @memberof google.longrunning.ListOperationsRequest
|
41232 | * @instance
|
41233 | */
|
41234 | ListOperationsRequest.prototype.filter = "";
|
41235 |
|
41236 | /**
|
41237 | * ListOperationsRequest pageSize.
|
41238 | * @member {number} pageSize
|
41239 | * @memberof google.longrunning.ListOperationsRequest
|
41240 | * @instance
|
41241 | */
|
41242 | ListOperationsRequest.prototype.pageSize = 0;
|
41243 |
|
41244 | /**
|
41245 | * ListOperationsRequest pageToken.
|
41246 | * @member {string} pageToken
|
41247 | * @memberof google.longrunning.ListOperationsRequest
|
41248 | * @instance
|
41249 | */
|
41250 | ListOperationsRequest.prototype.pageToken = "";
|
41251 |
|
41252 | /**
|
41253 | * Creates a new ListOperationsRequest instance using the specified properties.
|
41254 | * @function create
|
41255 | * @memberof google.longrunning.ListOperationsRequest
|
41256 | * @static
|
41257 | * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set
|
41258 | * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance
|
41259 | */
|
41260 | ListOperationsRequest.create = function create(properties) {
|
41261 | return new ListOperationsRequest(properties);
|
41262 | };
|
41263 |
|
41264 | /**
|
41265 | * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages.
|
41266 | * @function encode
|
41267 | * @memberof google.longrunning.ListOperationsRequest
|
41268 | * @static
|
41269 | * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode
|
41270 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
41271 | * @returns {$protobuf.Writer} Writer
|
41272 | */
|
41273 | ListOperationsRequest.encode = function encode(message, writer) {
|
41274 | if (!writer)
|
41275 | writer = $Writer.create();
|
41276 | if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
|
41277 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter);
|
41278 | if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
|
41279 | writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
|
41280 | if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
|
41281 | writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
|
41282 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
41283 | writer.uint32(/* id 4, wireType 2 =*/34).string(message.name);
|
41284 | return writer;
|
41285 | };
|
41286 |
|
41287 | /**
|
41288 | * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages.
|
41289 | * @function encodeDelimited
|
41290 | * @memberof google.longrunning.ListOperationsRequest
|
41291 | * @static
|
41292 | * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode
|
41293 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
41294 | * @returns {$protobuf.Writer} Writer
|
41295 | */
|
41296 | ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
41297 | return this.encode(message, writer).ldelim();
|
41298 | };
|
41299 |
|
41300 | /**
|
41301 | * Decodes a ListOperationsRequest message from the specified reader or buffer.
|
41302 | * @function decode
|
41303 | * @memberof google.longrunning.ListOperationsRequest
|
41304 | * @static
|
41305 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
41306 | * @param {number} [length] Message length if known beforehand
|
41307 | * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest
|
41308 | * @throws {Error} If the payload is not a reader or valid buffer
|
41309 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
41310 | */
|
41311 | ListOperationsRequest.decode = function decode(reader, length) {
|
41312 | if (!(reader instanceof $Reader))
|
41313 | reader = $Reader.create(reader);
|
41314 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest();
|
41315 | while (reader.pos < end) {
|
41316 | var tag = reader.uint32();
|
41317 | switch (tag >>> 3) {
|
41318 | case 4: {
|
41319 | message.name = reader.string();
|
41320 | break;
|
41321 | }
|
41322 | case 1: {
|
41323 | message.filter = reader.string();
|
41324 | break;
|
41325 | }
|
41326 | case 2: {
|
41327 | message.pageSize = reader.int32();
|
41328 | break;
|
41329 | }
|
41330 | case 3: {
|
41331 | message.pageToken = reader.string();
|
41332 | break;
|
41333 | }
|
41334 | default:
|
41335 | reader.skipType(tag & 7);
|
41336 | break;
|
41337 | }
|
41338 | }
|
41339 | return message;
|
41340 | };
|
41341 |
|
41342 | /**
|
41343 | * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited.
|
41344 | * @function decodeDelimited
|
41345 | * @memberof google.longrunning.ListOperationsRequest
|
41346 | * @static
|
41347 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
41348 | * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest
|
41349 | * @throws {Error} If the payload is not a reader or valid buffer
|
41350 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
41351 | */
|
41352 | ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) {
|
41353 | if (!(reader instanceof $Reader))
|
41354 | reader = new $Reader(reader);
|
41355 | return this.decode(reader, reader.uint32());
|
41356 | };
|
41357 |
|
41358 | /**
|
41359 | * Verifies a ListOperationsRequest message.
|
41360 | * @function verify
|
41361 | * @memberof google.longrunning.ListOperationsRequest
|
41362 | * @static
|
41363 | * @param {Object.<string,*>} message Plain object to verify
|
41364 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
41365 | */
|
41366 | ListOperationsRequest.verify = function verify(message) {
|
41367 | if (typeof message !== "object" || message === null)
|
41368 | return "object expected";
|
41369 | if (message.name != null && message.hasOwnProperty("name"))
|
41370 | if (!$util.isString(message.name))
|
41371 | return "name: string expected";
|
41372 | if (message.filter != null && message.hasOwnProperty("filter"))
|
41373 | if (!$util.isString(message.filter))
|
41374 | return "filter: string expected";
|
41375 | if (message.pageSize != null && message.hasOwnProperty("pageSize"))
|
41376 | if (!$util.isInteger(message.pageSize))
|
41377 | return "pageSize: integer expected";
|
41378 | if (message.pageToken != null && message.hasOwnProperty("pageToken"))
|
41379 | if (!$util.isString(message.pageToken))
|
41380 | return "pageToken: string expected";
|
41381 | return null;
|
41382 | };
|
41383 |
|
41384 | /**
|
41385 | * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types.
|
41386 | * @function fromObject
|
41387 | * @memberof google.longrunning.ListOperationsRequest
|
41388 | * @static
|
41389 | * @param {Object.<string,*>} object Plain object
|
41390 | * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest
|
41391 | */
|
41392 | ListOperationsRequest.fromObject = function fromObject(object) {
|
41393 | if (object instanceof $root.google.longrunning.ListOperationsRequest)
|
41394 | return object;
|
41395 | var message = new $root.google.longrunning.ListOperationsRequest();
|
41396 | if (object.name != null)
|
41397 | message.name = String(object.name);
|
41398 | if (object.filter != null)
|
41399 | message.filter = String(object.filter);
|
41400 | if (object.pageSize != null)
|
41401 | message.pageSize = object.pageSize | 0;
|
41402 | if (object.pageToken != null)
|
41403 | message.pageToken = String(object.pageToken);
|
41404 | return message;
|
41405 | };
|
41406 |
|
41407 | /**
|
41408 | * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified.
|
41409 | * @function toObject
|
41410 | * @memberof google.longrunning.ListOperationsRequest
|
41411 | * @static
|
41412 | * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest
|
41413 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
41414 | * @returns {Object.<string,*>} Plain object
|
41415 | */
|
41416 | ListOperationsRequest.toObject = function toObject(message, options) {
|
41417 | if (!options)
|
41418 | options = {};
|
41419 | var object = {};
|
41420 | if (options.defaults) {
|
41421 | object.filter = "";
|
41422 | object.pageSize = 0;
|
41423 | object.pageToken = "";
|
41424 | object.name = "";
|
41425 | }
|
41426 | if (message.filter != null && message.hasOwnProperty("filter"))
|
41427 | object.filter = message.filter;
|
41428 | if (message.pageSize != null && message.hasOwnProperty("pageSize"))
|
41429 | object.pageSize = message.pageSize;
|
41430 | if (message.pageToken != null && message.hasOwnProperty("pageToken"))
|
41431 | object.pageToken = message.pageToken;
|
41432 | if (message.name != null && message.hasOwnProperty("name"))
|
41433 | object.name = message.name;
|
41434 | return object;
|
41435 | };
|
41436 |
|
41437 | /**
|
41438 | * Converts this ListOperationsRequest to JSON.
|
41439 | * @function toJSON
|
41440 | * @memberof google.longrunning.ListOperationsRequest
|
41441 | * @instance
|
41442 | * @returns {Object.<string,*>} JSON object
|
41443 | */
|
41444 | ListOperationsRequest.prototype.toJSON = function toJSON() {
|
41445 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
41446 | };
|
41447 |
|
41448 | /**
|
41449 | * Gets the default type url for ListOperationsRequest
|
41450 | * @function getTypeUrl
|
41451 | * @memberof google.longrunning.ListOperationsRequest
|
41452 | * @static
|
41453 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
41454 | * @returns {string} The default type url
|
41455 | */
|
41456 | ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
41457 | if (typeUrlPrefix === undefined) {
|
41458 | typeUrlPrefix = "type.googleapis.com";
|
41459 | }
|
41460 | return typeUrlPrefix + "/google.longrunning.ListOperationsRequest";
|
41461 | };
|
41462 |
|
41463 | return ListOperationsRequest;
|
41464 | })();
|
41465 |
|
41466 | longrunning.ListOperationsResponse = (function() {
|
41467 |
|
41468 | /**
|
41469 | * Properties of a ListOperationsResponse.
|
41470 | * @memberof google.longrunning
|
41471 | * @interface IListOperationsResponse
|
41472 | * @property {Array.<google.longrunning.IOperation>|null} [operations] ListOperationsResponse operations
|
41473 | * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken
|
41474 | */
|
41475 |
|
41476 | /**
|
41477 | * Constructs a new ListOperationsResponse.
|
41478 | * @memberof google.longrunning
|
41479 | * @classdesc Represents a ListOperationsResponse.
|
41480 | * @implements IListOperationsResponse
|
41481 | * @constructor
|
41482 | * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set
|
41483 | */
|
41484 | function ListOperationsResponse(properties) {
|
41485 | this.operations = [];
|
41486 | if (properties)
|
41487 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
41488 | if (properties[keys[i]] != null)
|
41489 | this[keys[i]] = properties[keys[i]];
|
41490 | }
|
41491 |
|
41492 | /**
|
41493 | * ListOperationsResponse operations.
|
41494 | * @member {Array.<google.longrunning.IOperation>} operations
|
41495 | * @memberof google.longrunning.ListOperationsResponse
|
41496 | * @instance
|
41497 | */
|
41498 | ListOperationsResponse.prototype.operations = $util.emptyArray;
|
41499 |
|
41500 | /**
|
41501 | * ListOperationsResponse nextPageToken.
|
41502 | * @member {string} nextPageToken
|
41503 | * @memberof google.longrunning.ListOperationsResponse
|
41504 | * @instance
|
41505 | */
|
41506 | ListOperationsResponse.prototype.nextPageToken = "";
|
41507 |
|
41508 | /**
|
41509 | * Creates a new ListOperationsResponse instance using the specified properties.
|
41510 | * @function create
|
41511 | * @memberof google.longrunning.ListOperationsResponse
|
41512 | * @static
|
41513 | * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set
|
41514 | * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance
|
41515 | */
|
41516 | ListOperationsResponse.create = function create(properties) {
|
41517 | return new ListOperationsResponse(properties);
|
41518 | };
|
41519 |
|
41520 | /**
|
41521 | * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages.
|
41522 | * @function encode
|
41523 | * @memberof google.longrunning.ListOperationsResponse
|
41524 | * @static
|
41525 | * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode
|
41526 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
41527 | * @returns {$protobuf.Writer} Writer
|
41528 | */
|
41529 | ListOperationsResponse.encode = function encode(message, writer) {
|
41530 | if (!writer)
|
41531 | writer = $Writer.create();
|
41532 | if (message.operations != null && message.operations.length)
|
41533 | for (var i = 0; i < message.operations.length; ++i)
|
41534 | $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
41535 | if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
|
41536 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
|
41537 | return writer;
|
41538 | };
|
41539 |
|
41540 | /**
|
41541 | * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages.
|
41542 | * @function encodeDelimited
|
41543 | * @memberof google.longrunning.ListOperationsResponse
|
41544 | * @static
|
41545 | * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode
|
41546 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
41547 | * @returns {$protobuf.Writer} Writer
|
41548 | */
|
41549 | ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
41550 | return this.encode(message, writer).ldelim();
|
41551 | };
|
41552 |
|
41553 | /**
|
41554 | * Decodes a ListOperationsResponse message from the specified reader or buffer.
|
41555 | * @function decode
|
41556 | * @memberof google.longrunning.ListOperationsResponse
|
41557 | * @static
|
41558 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
41559 | * @param {number} [length] Message length if known beforehand
|
41560 | * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse
|
41561 | * @throws {Error} If the payload is not a reader or valid buffer
|
41562 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
41563 | */
|
41564 | ListOperationsResponse.decode = function decode(reader, length) {
|
41565 | if (!(reader instanceof $Reader))
|
41566 | reader = $Reader.create(reader);
|
41567 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse();
|
41568 | while (reader.pos < end) {
|
41569 | var tag = reader.uint32();
|
41570 | switch (tag >>> 3) {
|
41571 | case 1: {
|
41572 | if (!(message.operations && message.operations.length))
|
41573 | message.operations = [];
|
41574 | message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32()));
|
41575 | break;
|
41576 | }
|
41577 | case 2: {
|
41578 | message.nextPageToken = reader.string();
|
41579 | break;
|
41580 | }
|
41581 | default:
|
41582 | reader.skipType(tag & 7);
|
41583 | break;
|
41584 | }
|
41585 | }
|
41586 | return message;
|
41587 | };
|
41588 |
|
41589 | /**
|
41590 | * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited.
|
41591 | * @function decodeDelimited
|
41592 | * @memberof google.longrunning.ListOperationsResponse
|
41593 | * @static
|
41594 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
41595 | * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse
|
41596 | * @throws {Error} If the payload is not a reader or valid buffer
|
41597 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
41598 | */
|
41599 | ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) {
|
41600 | if (!(reader instanceof $Reader))
|
41601 | reader = new $Reader(reader);
|
41602 | return this.decode(reader, reader.uint32());
|
41603 | };
|
41604 |
|
41605 | /**
|
41606 | * Verifies a ListOperationsResponse message.
|
41607 | * @function verify
|
41608 | * @memberof google.longrunning.ListOperationsResponse
|
41609 | * @static
|
41610 | * @param {Object.<string,*>} message Plain object to verify
|
41611 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
41612 | */
|
41613 | ListOperationsResponse.verify = function verify(message) {
|
41614 | if (typeof message !== "object" || message === null)
|
41615 | return "object expected";
|
41616 | if (message.operations != null && message.hasOwnProperty("operations")) {
|
41617 | if (!Array.isArray(message.operations))
|
41618 | return "operations: array expected";
|
41619 | for (var i = 0; i < message.operations.length; ++i) {
|
41620 | var error = $root.google.longrunning.Operation.verify(message.operations[i]);
|
41621 | if (error)
|
41622 | return "operations." + error;
|
41623 | }
|
41624 | }
|
41625 | if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
|
41626 | if (!$util.isString(message.nextPageToken))
|
41627 | return "nextPageToken: string expected";
|
41628 | return null;
|
41629 | };
|
41630 |
|
41631 | /**
|
41632 | * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types.
|
41633 | * @function fromObject
|
41634 | * @memberof google.longrunning.ListOperationsResponse
|
41635 | * @static
|
41636 | * @param {Object.<string,*>} object Plain object
|
41637 | * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse
|
41638 | */
|
41639 | ListOperationsResponse.fromObject = function fromObject(object) {
|
41640 | if (object instanceof $root.google.longrunning.ListOperationsResponse)
|
41641 | return object;
|
41642 | var message = new $root.google.longrunning.ListOperationsResponse();
|
41643 | if (object.operations) {
|
41644 | if (!Array.isArray(object.operations))
|
41645 | throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected");
|
41646 | message.operations = [];
|
41647 | for (var i = 0; i < object.operations.length; ++i) {
|
41648 | if (typeof object.operations[i] !== "object")
|
41649 | throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected");
|
41650 | message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]);
|
41651 | }
|
41652 | }
|
41653 | if (object.nextPageToken != null)
|
41654 | message.nextPageToken = String(object.nextPageToken);
|
41655 | return message;
|
41656 | };
|
41657 |
|
41658 | /**
|
41659 | * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified.
|
41660 | * @function toObject
|
41661 | * @memberof google.longrunning.ListOperationsResponse
|
41662 | * @static
|
41663 | * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse
|
41664 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
41665 | * @returns {Object.<string,*>} Plain object
|
41666 | */
|
41667 | ListOperationsResponse.toObject = function toObject(message, options) {
|
41668 | if (!options)
|
41669 | options = {};
|
41670 | var object = {};
|
41671 | if (options.arrays || options.defaults)
|
41672 | object.operations = [];
|
41673 | if (options.defaults)
|
41674 | object.nextPageToken = "";
|
41675 | if (message.operations && message.operations.length) {
|
41676 | object.operations = [];
|
41677 | for (var j = 0; j < message.operations.length; ++j)
|
41678 | object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options);
|
41679 | }
|
41680 | if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
|
41681 | object.nextPageToken = message.nextPageToken;
|
41682 | return object;
|
41683 | };
|
41684 |
|
41685 | /**
|
41686 | * Converts this ListOperationsResponse to JSON.
|
41687 | * @function toJSON
|
41688 | * @memberof google.longrunning.ListOperationsResponse
|
41689 | * @instance
|
41690 | * @returns {Object.<string,*>} JSON object
|
41691 | */
|
41692 | ListOperationsResponse.prototype.toJSON = function toJSON() {
|
41693 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
41694 | };
|
41695 |
|
41696 | /**
|
41697 | * Gets the default type url for ListOperationsResponse
|
41698 | * @function getTypeUrl
|
41699 | * @memberof google.longrunning.ListOperationsResponse
|
41700 | * @static
|
41701 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
41702 | * @returns {string} The default type url
|
41703 | */
|
41704 | ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
41705 | if (typeUrlPrefix === undefined) {
|
41706 | typeUrlPrefix = "type.googleapis.com";
|
41707 | }
|
41708 | return typeUrlPrefix + "/google.longrunning.ListOperationsResponse";
|
41709 | };
|
41710 |
|
41711 | return ListOperationsResponse;
|
41712 | })();
|
41713 |
|
41714 | longrunning.CancelOperationRequest = (function() {
|
41715 |
|
41716 | /**
|
41717 | * Properties of a CancelOperationRequest.
|
41718 | * @memberof google.longrunning
|
41719 | * @interface ICancelOperationRequest
|
41720 | * @property {string|null} [name] CancelOperationRequest name
|
41721 | */
|
41722 |
|
41723 | /**
|
41724 | * Constructs a new CancelOperationRequest.
|
41725 | * @memberof google.longrunning
|
41726 | * @classdesc Represents a CancelOperationRequest.
|
41727 | * @implements ICancelOperationRequest
|
41728 | * @constructor
|
41729 | * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set
|
41730 | */
|
41731 | function CancelOperationRequest(properties) {
|
41732 | if (properties)
|
41733 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
41734 | if (properties[keys[i]] != null)
|
41735 | this[keys[i]] = properties[keys[i]];
|
41736 | }
|
41737 |
|
41738 | /**
|
41739 | * CancelOperationRequest name.
|
41740 | * @member {string} name
|
41741 | * @memberof google.longrunning.CancelOperationRequest
|
41742 | * @instance
|
41743 | */
|
41744 | CancelOperationRequest.prototype.name = "";
|
41745 |
|
41746 | /**
|
41747 | * Creates a new CancelOperationRequest instance using the specified properties.
|
41748 | * @function create
|
41749 | * @memberof google.longrunning.CancelOperationRequest
|
41750 | * @static
|
41751 | * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set
|
41752 | * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance
|
41753 | */
|
41754 | CancelOperationRequest.create = function create(properties) {
|
41755 | return new CancelOperationRequest(properties);
|
41756 | };
|
41757 |
|
41758 | /**
|
41759 | * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages.
|
41760 | * @function encode
|
41761 | * @memberof google.longrunning.CancelOperationRequest
|
41762 | * @static
|
41763 | * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode
|
41764 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
41765 | * @returns {$protobuf.Writer} Writer
|
41766 | */
|
41767 | CancelOperationRequest.encode = function encode(message, writer) {
|
41768 | if (!writer)
|
41769 | writer = $Writer.create();
|
41770 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
41771 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
41772 | return writer;
|
41773 | };
|
41774 |
|
41775 | /**
|
41776 | * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages.
|
41777 | * @function encodeDelimited
|
41778 | * @memberof google.longrunning.CancelOperationRequest
|
41779 | * @static
|
41780 | * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode
|
41781 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
41782 | * @returns {$protobuf.Writer} Writer
|
41783 | */
|
41784 | CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
41785 | return this.encode(message, writer).ldelim();
|
41786 | };
|
41787 |
|
41788 | /**
|
41789 | * Decodes a CancelOperationRequest message from the specified reader or buffer.
|
41790 | * @function decode
|
41791 | * @memberof google.longrunning.CancelOperationRequest
|
41792 | * @static
|
41793 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
41794 | * @param {number} [length] Message length if known beforehand
|
41795 | * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest
|
41796 | * @throws {Error} If the payload is not a reader or valid buffer
|
41797 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
41798 | */
|
41799 | CancelOperationRequest.decode = function decode(reader, length) {
|
41800 | if (!(reader instanceof $Reader))
|
41801 | reader = $Reader.create(reader);
|
41802 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest();
|
41803 | while (reader.pos < end) {
|
41804 | var tag = reader.uint32();
|
41805 | switch (tag >>> 3) {
|
41806 | case 1: {
|
41807 | message.name = reader.string();
|
41808 | break;
|
41809 | }
|
41810 | default:
|
41811 | reader.skipType(tag & 7);
|
41812 | break;
|
41813 | }
|
41814 | }
|
41815 | return message;
|
41816 | };
|
41817 |
|
41818 | /**
|
41819 | * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited.
|
41820 | * @function decodeDelimited
|
41821 | * @memberof google.longrunning.CancelOperationRequest
|
41822 | * @static
|
41823 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
41824 | * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest
|
41825 | * @throws {Error} If the payload is not a reader or valid buffer
|
41826 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
41827 | */
|
41828 | CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) {
|
41829 | if (!(reader instanceof $Reader))
|
41830 | reader = new $Reader(reader);
|
41831 | return this.decode(reader, reader.uint32());
|
41832 | };
|
41833 |
|
41834 | /**
|
41835 | * Verifies a CancelOperationRequest message.
|
41836 | * @function verify
|
41837 | * @memberof google.longrunning.CancelOperationRequest
|
41838 | * @static
|
41839 | * @param {Object.<string,*>} message Plain object to verify
|
41840 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
41841 | */
|
41842 | CancelOperationRequest.verify = function verify(message) {
|
41843 | if (typeof message !== "object" || message === null)
|
41844 | return "object expected";
|
41845 | if (message.name != null && message.hasOwnProperty("name"))
|
41846 | if (!$util.isString(message.name))
|
41847 | return "name: string expected";
|
41848 | return null;
|
41849 | };
|
41850 |
|
41851 | /**
|
41852 | * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types.
|
41853 | * @function fromObject
|
41854 | * @memberof google.longrunning.CancelOperationRequest
|
41855 | * @static
|
41856 | * @param {Object.<string,*>} object Plain object
|
41857 | * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest
|
41858 | */
|
41859 | CancelOperationRequest.fromObject = function fromObject(object) {
|
41860 | if (object instanceof $root.google.longrunning.CancelOperationRequest)
|
41861 | return object;
|
41862 | var message = new $root.google.longrunning.CancelOperationRequest();
|
41863 | if (object.name != null)
|
41864 | message.name = String(object.name);
|
41865 | return message;
|
41866 | };
|
41867 |
|
41868 | /**
|
41869 | * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified.
|
41870 | * @function toObject
|
41871 | * @memberof google.longrunning.CancelOperationRequest
|
41872 | * @static
|
41873 | * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest
|
41874 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
41875 | * @returns {Object.<string,*>} Plain object
|
41876 | */
|
41877 | CancelOperationRequest.toObject = function toObject(message, options) {
|
41878 | if (!options)
|
41879 | options = {};
|
41880 | var object = {};
|
41881 | if (options.defaults)
|
41882 | object.name = "";
|
41883 | if (message.name != null && message.hasOwnProperty("name"))
|
41884 | object.name = message.name;
|
41885 | return object;
|
41886 | };
|
41887 |
|
41888 | /**
|
41889 | * Converts this CancelOperationRequest to JSON.
|
41890 | * @function toJSON
|
41891 | * @memberof google.longrunning.CancelOperationRequest
|
41892 | * @instance
|
41893 | * @returns {Object.<string,*>} JSON object
|
41894 | */
|
41895 | CancelOperationRequest.prototype.toJSON = function toJSON() {
|
41896 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
41897 | };
|
41898 |
|
41899 | /**
|
41900 | * Gets the default type url for CancelOperationRequest
|
41901 | * @function getTypeUrl
|
41902 | * @memberof google.longrunning.CancelOperationRequest
|
41903 | * @static
|
41904 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
41905 | * @returns {string} The default type url
|
41906 | */
|
41907 | CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
41908 | if (typeUrlPrefix === undefined) {
|
41909 | typeUrlPrefix = "type.googleapis.com";
|
41910 | }
|
41911 | return typeUrlPrefix + "/google.longrunning.CancelOperationRequest";
|
41912 | };
|
41913 |
|
41914 | return CancelOperationRequest;
|
41915 | })();
|
41916 |
|
41917 | longrunning.DeleteOperationRequest = (function() {
|
41918 |
|
41919 | /**
|
41920 | * Properties of a DeleteOperationRequest.
|
41921 | * @memberof google.longrunning
|
41922 | * @interface IDeleteOperationRequest
|
41923 | * @property {string|null} [name] DeleteOperationRequest name
|
41924 | */
|
41925 |
|
41926 | /**
|
41927 | * Constructs a new DeleteOperationRequest.
|
41928 | * @memberof google.longrunning
|
41929 | * @classdesc Represents a DeleteOperationRequest.
|
41930 | * @implements IDeleteOperationRequest
|
41931 | * @constructor
|
41932 | * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set
|
41933 | */
|
41934 | function DeleteOperationRequest(properties) {
|
41935 | if (properties)
|
41936 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
41937 | if (properties[keys[i]] != null)
|
41938 | this[keys[i]] = properties[keys[i]];
|
41939 | }
|
41940 |
|
41941 | /**
|
41942 | * DeleteOperationRequest name.
|
41943 | * @member {string} name
|
41944 | * @memberof google.longrunning.DeleteOperationRequest
|
41945 | * @instance
|
41946 | */
|
41947 | DeleteOperationRequest.prototype.name = "";
|
41948 |
|
41949 | /**
|
41950 | * Creates a new DeleteOperationRequest instance using the specified properties.
|
41951 | * @function create
|
41952 | * @memberof google.longrunning.DeleteOperationRequest
|
41953 | * @static
|
41954 | * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set
|
41955 | * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance
|
41956 | */
|
41957 | DeleteOperationRequest.create = function create(properties) {
|
41958 | return new DeleteOperationRequest(properties);
|
41959 | };
|
41960 |
|
41961 | /**
|
41962 | * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages.
|
41963 | * @function encode
|
41964 | * @memberof google.longrunning.DeleteOperationRequest
|
41965 | * @static
|
41966 | * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode
|
41967 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
41968 | * @returns {$protobuf.Writer} Writer
|
41969 | */
|
41970 | DeleteOperationRequest.encode = function encode(message, writer) {
|
41971 | if (!writer)
|
41972 | writer = $Writer.create();
|
41973 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
41974 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
41975 | return writer;
|
41976 | };
|
41977 |
|
41978 | /**
|
41979 | * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages.
|
41980 | * @function encodeDelimited
|
41981 | * @memberof google.longrunning.DeleteOperationRequest
|
41982 | * @static
|
41983 | * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode
|
41984 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
41985 | * @returns {$protobuf.Writer} Writer
|
41986 | */
|
41987 | DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
41988 | return this.encode(message, writer).ldelim();
|
41989 | };
|
41990 |
|
41991 | /**
|
41992 | * Decodes a DeleteOperationRequest message from the specified reader or buffer.
|
41993 | * @function decode
|
41994 | * @memberof google.longrunning.DeleteOperationRequest
|
41995 | * @static
|
41996 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
41997 | * @param {number} [length] Message length if known beforehand
|
41998 | * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest
|
41999 | * @throws {Error} If the payload is not a reader or valid buffer
|
42000 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
42001 | */
|
42002 | DeleteOperationRequest.decode = function decode(reader, length) {
|
42003 | if (!(reader instanceof $Reader))
|
42004 | reader = $Reader.create(reader);
|
42005 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest();
|
42006 | while (reader.pos < end) {
|
42007 | var tag = reader.uint32();
|
42008 | switch (tag >>> 3) {
|
42009 | case 1: {
|
42010 | message.name = reader.string();
|
42011 | break;
|
42012 | }
|
42013 | default:
|
42014 | reader.skipType(tag & 7);
|
42015 | break;
|
42016 | }
|
42017 | }
|
42018 | return message;
|
42019 | };
|
42020 |
|
42021 | /**
|
42022 | * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited.
|
42023 | * @function decodeDelimited
|
42024 | * @memberof google.longrunning.DeleteOperationRequest
|
42025 | * @static
|
42026 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
42027 | * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest
|
42028 | * @throws {Error} If the payload is not a reader or valid buffer
|
42029 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
42030 | */
|
42031 | DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) {
|
42032 | if (!(reader instanceof $Reader))
|
42033 | reader = new $Reader(reader);
|
42034 | return this.decode(reader, reader.uint32());
|
42035 | };
|
42036 |
|
42037 | /**
|
42038 | * Verifies a DeleteOperationRequest message.
|
42039 | * @function verify
|
42040 | * @memberof google.longrunning.DeleteOperationRequest
|
42041 | * @static
|
42042 | * @param {Object.<string,*>} message Plain object to verify
|
42043 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
42044 | */
|
42045 | DeleteOperationRequest.verify = function verify(message) {
|
42046 | if (typeof message !== "object" || message === null)
|
42047 | return "object expected";
|
42048 | if (message.name != null && message.hasOwnProperty("name"))
|
42049 | if (!$util.isString(message.name))
|
42050 | return "name: string expected";
|
42051 | return null;
|
42052 | };
|
42053 |
|
42054 | /**
|
42055 | * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types.
|
42056 | * @function fromObject
|
42057 | * @memberof google.longrunning.DeleteOperationRequest
|
42058 | * @static
|
42059 | * @param {Object.<string,*>} object Plain object
|
42060 | * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest
|
42061 | */
|
42062 | DeleteOperationRequest.fromObject = function fromObject(object) {
|
42063 | if (object instanceof $root.google.longrunning.DeleteOperationRequest)
|
42064 | return object;
|
42065 | var message = new $root.google.longrunning.DeleteOperationRequest();
|
42066 | if (object.name != null)
|
42067 | message.name = String(object.name);
|
42068 | return message;
|
42069 | };
|
42070 |
|
42071 | /**
|
42072 | * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified.
|
42073 | * @function toObject
|
42074 | * @memberof google.longrunning.DeleteOperationRequest
|
42075 | * @static
|
42076 | * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest
|
42077 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
42078 | * @returns {Object.<string,*>} Plain object
|
42079 | */
|
42080 | DeleteOperationRequest.toObject = function toObject(message, options) {
|
42081 | if (!options)
|
42082 | options = {};
|
42083 | var object = {};
|
42084 | if (options.defaults)
|
42085 | object.name = "";
|
42086 | if (message.name != null && message.hasOwnProperty("name"))
|
42087 | object.name = message.name;
|
42088 | return object;
|
42089 | };
|
42090 |
|
42091 | /**
|
42092 | * Converts this DeleteOperationRequest to JSON.
|
42093 | * @function toJSON
|
42094 | * @memberof google.longrunning.DeleteOperationRequest
|
42095 | * @instance
|
42096 | * @returns {Object.<string,*>} JSON object
|
42097 | */
|
42098 | DeleteOperationRequest.prototype.toJSON = function toJSON() {
|
42099 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
42100 | };
|
42101 |
|
42102 | /**
|
42103 | * Gets the default type url for DeleteOperationRequest
|
42104 | * @function getTypeUrl
|
42105 | * @memberof google.longrunning.DeleteOperationRequest
|
42106 | * @static
|
42107 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
42108 | * @returns {string} The default type url
|
42109 | */
|
42110 | DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
42111 | if (typeUrlPrefix === undefined) {
|
42112 | typeUrlPrefix = "type.googleapis.com";
|
42113 | }
|
42114 | return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest";
|
42115 | };
|
42116 |
|
42117 | return DeleteOperationRequest;
|
42118 | })();
|
42119 |
|
42120 | longrunning.WaitOperationRequest = (function() {
|
42121 |
|
42122 | /**
|
42123 | * Properties of a WaitOperationRequest.
|
42124 | * @memberof google.longrunning
|
42125 | * @interface IWaitOperationRequest
|
42126 | * @property {string|null} [name] WaitOperationRequest name
|
42127 | * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout
|
42128 | */
|
42129 |
|
42130 | /**
|
42131 | * Constructs a new WaitOperationRequest.
|
42132 | * @memberof google.longrunning
|
42133 | * @classdesc Represents a WaitOperationRequest.
|
42134 | * @implements IWaitOperationRequest
|
42135 | * @constructor
|
42136 | * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set
|
42137 | */
|
42138 | function WaitOperationRequest(properties) {
|
42139 | if (properties)
|
42140 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
42141 | if (properties[keys[i]] != null)
|
42142 | this[keys[i]] = properties[keys[i]];
|
42143 | }
|
42144 |
|
42145 | /**
|
42146 | * WaitOperationRequest name.
|
42147 | * @member {string} name
|
42148 | * @memberof google.longrunning.WaitOperationRequest
|
42149 | * @instance
|
42150 | */
|
42151 | WaitOperationRequest.prototype.name = "";
|
42152 |
|
42153 | /**
|
42154 | * WaitOperationRequest timeout.
|
42155 | * @member {google.protobuf.IDuration|null|undefined} timeout
|
42156 | * @memberof google.longrunning.WaitOperationRequest
|
42157 | * @instance
|
42158 | */
|
42159 | WaitOperationRequest.prototype.timeout = null;
|
42160 |
|
42161 | /**
|
42162 | * Creates a new WaitOperationRequest instance using the specified properties.
|
42163 | * @function create
|
42164 | * @memberof google.longrunning.WaitOperationRequest
|
42165 | * @static
|
42166 | * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set
|
42167 | * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance
|
42168 | */
|
42169 | WaitOperationRequest.create = function create(properties) {
|
42170 | return new WaitOperationRequest(properties);
|
42171 | };
|
42172 |
|
42173 | /**
|
42174 | * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages.
|
42175 | * @function encode
|
42176 | * @memberof google.longrunning.WaitOperationRequest
|
42177 | * @static
|
42178 | * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode
|
42179 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
42180 | * @returns {$protobuf.Writer} Writer
|
42181 | */
|
42182 | WaitOperationRequest.encode = function encode(message, writer) {
|
42183 | if (!writer)
|
42184 | writer = $Writer.create();
|
42185 | if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
42186 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
42187 | if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout"))
|
42188 | $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
42189 | return writer;
|
42190 | };
|
42191 |
|
42192 | /**
|
42193 | * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages.
|
42194 | * @function encodeDelimited
|
42195 | * @memberof google.longrunning.WaitOperationRequest
|
42196 | * @static
|
42197 | * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode
|
42198 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
42199 | * @returns {$protobuf.Writer} Writer
|
42200 | */
|
42201 | WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
42202 | return this.encode(message, writer).ldelim();
|
42203 | };
|
42204 |
|
42205 | /**
|
42206 | * Decodes a WaitOperationRequest message from the specified reader or buffer.
|
42207 | * @function decode
|
42208 | * @memberof google.longrunning.WaitOperationRequest
|
42209 | * @static
|
42210 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
42211 | * @param {number} [length] Message length if known beforehand
|
42212 | * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest
|
42213 | * @throws {Error} If the payload is not a reader or valid buffer
|
42214 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
42215 | */
|
42216 | WaitOperationRequest.decode = function decode(reader, length) {
|
42217 | if (!(reader instanceof $Reader))
|
42218 | reader = $Reader.create(reader);
|
42219 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest();
|
42220 | while (reader.pos < end) {
|
42221 | var tag = reader.uint32();
|
42222 | switch (tag >>> 3) {
|
42223 | case 1: {
|
42224 | message.name = reader.string();
|
42225 | break;
|
42226 | }
|
42227 | case 2: {
|
42228 | message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32());
|
42229 | break;
|
42230 | }
|
42231 | default:
|
42232 | reader.skipType(tag & 7);
|
42233 | break;
|
42234 | }
|
42235 | }
|
42236 | return message;
|
42237 | };
|
42238 |
|
42239 | /**
|
42240 | * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited.
|
42241 | * @function decodeDelimited
|
42242 | * @memberof google.longrunning.WaitOperationRequest
|
42243 | * @static
|
42244 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
42245 | * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest
|
42246 | * @throws {Error} If the payload is not a reader or valid buffer
|
42247 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
42248 | */
|
42249 | WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) {
|
42250 | if (!(reader instanceof $Reader))
|
42251 | reader = new $Reader(reader);
|
42252 | return this.decode(reader, reader.uint32());
|
42253 | };
|
42254 |
|
42255 | /**
|
42256 | * Verifies a WaitOperationRequest message.
|
42257 | * @function verify
|
42258 | * @memberof google.longrunning.WaitOperationRequest
|
42259 | * @static
|
42260 | * @param {Object.<string,*>} message Plain object to verify
|
42261 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
42262 | */
|
42263 | WaitOperationRequest.verify = function verify(message) {
|
42264 | if (typeof message !== "object" || message === null)
|
42265 | return "object expected";
|
42266 | if (message.name != null && message.hasOwnProperty("name"))
|
42267 | if (!$util.isString(message.name))
|
42268 | return "name: string expected";
|
42269 | if (message.timeout != null && message.hasOwnProperty("timeout")) {
|
42270 | var error = $root.google.protobuf.Duration.verify(message.timeout);
|
42271 | if (error)
|
42272 | return "timeout." + error;
|
42273 | }
|
42274 | return null;
|
42275 | };
|
42276 |
|
42277 | /**
|
42278 | * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types.
|
42279 | * @function fromObject
|
42280 | * @memberof google.longrunning.WaitOperationRequest
|
42281 | * @static
|
42282 | * @param {Object.<string,*>} object Plain object
|
42283 | * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest
|
42284 | */
|
42285 | WaitOperationRequest.fromObject = function fromObject(object) {
|
42286 | if (object instanceof $root.google.longrunning.WaitOperationRequest)
|
42287 | return object;
|
42288 | var message = new $root.google.longrunning.WaitOperationRequest();
|
42289 | if (object.name != null)
|
42290 | message.name = String(object.name);
|
42291 | if (object.timeout != null) {
|
42292 | if (typeof object.timeout !== "object")
|
42293 | throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected");
|
42294 | message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout);
|
42295 | }
|
42296 | return message;
|
42297 | };
|
42298 |
|
42299 | /**
|
42300 | * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified.
|
42301 | * @function toObject
|
42302 | * @memberof google.longrunning.WaitOperationRequest
|
42303 | * @static
|
42304 | * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest
|
42305 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
42306 | * @returns {Object.<string,*>} Plain object
|
42307 | */
|
42308 | WaitOperationRequest.toObject = function toObject(message, options) {
|
42309 | if (!options)
|
42310 | options = {};
|
42311 | var object = {};
|
42312 | if (options.defaults) {
|
42313 | object.name = "";
|
42314 | object.timeout = null;
|
42315 | }
|
42316 | if (message.name != null && message.hasOwnProperty("name"))
|
42317 | object.name = message.name;
|
42318 | if (message.timeout != null && message.hasOwnProperty("timeout"))
|
42319 | object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options);
|
42320 | return object;
|
42321 | };
|
42322 |
|
42323 | /**
|
42324 | * Converts this WaitOperationRequest to JSON.
|
42325 | * @function toJSON
|
42326 | * @memberof google.longrunning.WaitOperationRequest
|
42327 | * @instance
|
42328 | * @returns {Object.<string,*>} JSON object
|
42329 | */
|
42330 | WaitOperationRequest.prototype.toJSON = function toJSON() {
|
42331 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
42332 | };
|
42333 |
|
42334 | /**
|
42335 | * Gets the default type url for WaitOperationRequest
|
42336 | * @function getTypeUrl
|
42337 | * @memberof google.longrunning.WaitOperationRequest
|
42338 | * @static
|
42339 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
42340 | * @returns {string} The default type url
|
42341 | */
|
42342 | WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
42343 | if (typeUrlPrefix === undefined) {
|
42344 | typeUrlPrefix = "type.googleapis.com";
|
42345 | }
|
42346 | return typeUrlPrefix + "/google.longrunning.WaitOperationRequest";
|
42347 | };
|
42348 |
|
42349 | return WaitOperationRequest;
|
42350 | })();
|
42351 |
|
42352 | longrunning.OperationInfo = (function() {
|
42353 |
|
42354 | /**
|
42355 | * Properties of an OperationInfo.
|
42356 | * @memberof google.longrunning
|
42357 | * @interface IOperationInfo
|
42358 | * @property {string|null} [responseType] OperationInfo responseType
|
42359 | * @property {string|null} [metadataType] OperationInfo metadataType
|
42360 | */
|
42361 |
|
42362 | /**
|
42363 | * Constructs a new OperationInfo.
|
42364 | * @memberof google.longrunning
|
42365 | * @classdesc Represents an OperationInfo.
|
42366 | * @implements IOperationInfo
|
42367 | * @constructor
|
42368 | * @param {google.longrunning.IOperationInfo=} [properties] Properties to set
|
42369 | */
|
42370 | function OperationInfo(properties) {
|
42371 | if (properties)
|
42372 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
42373 | if (properties[keys[i]] != null)
|
42374 | this[keys[i]] = properties[keys[i]];
|
42375 | }
|
42376 |
|
42377 | /**
|
42378 | * OperationInfo responseType.
|
42379 | * @member {string} responseType
|
42380 | * @memberof google.longrunning.OperationInfo
|
42381 | * @instance
|
42382 | */
|
42383 | OperationInfo.prototype.responseType = "";
|
42384 |
|
42385 | /**
|
42386 | * OperationInfo metadataType.
|
42387 | * @member {string} metadataType
|
42388 | * @memberof google.longrunning.OperationInfo
|
42389 | * @instance
|
42390 | */
|
42391 | OperationInfo.prototype.metadataType = "";
|
42392 |
|
42393 | /**
|
42394 | * Creates a new OperationInfo instance using the specified properties.
|
42395 | * @function create
|
42396 | * @memberof google.longrunning.OperationInfo
|
42397 | * @static
|
42398 | * @param {google.longrunning.IOperationInfo=} [properties] Properties to set
|
42399 | * @returns {google.longrunning.OperationInfo} OperationInfo instance
|
42400 | */
|
42401 | OperationInfo.create = function create(properties) {
|
42402 | return new OperationInfo(properties);
|
42403 | };
|
42404 |
|
42405 | /**
|
42406 | * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages.
|
42407 | * @function encode
|
42408 | * @memberof google.longrunning.OperationInfo
|
42409 | * @static
|
42410 | * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode
|
42411 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
42412 | * @returns {$protobuf.Writer} Writer
|
42413 | */
|
42414 | OperationInfo.encode = function encode(message, writer) {
|
42415 | if (!writer)
|
42416 | writer = $Writer.create();
|
42417 | if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType"))
|
42418 | writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType);
|
42419 | if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType"))
|
42420 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType);
|
42421 | return writer;
|
42422 | };
|
42423 |
|
42424 | /**
|
42425 | * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages.
|
42426 | * @function encodeDelimited
|
42427 | * @memberof google.longrunning.OperationInfo
|
42428 | * @static
|
42429 | * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode
|
42430 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
42431 | * @returns {$protobuf.Writer} Writer
|
42432 | */
|
42433 | OperationInfo.encodeDelimited = function encodeDelimited(message, writer) {
|
42434 | return this.encode(message, writer).ldelim();
|
42435 | };
|
42436 |
|
42437 | /**
|
42438 | * Decodes an OperationInfo message from the specified reader or buffer.
|
42439 | * @function decode
|
42440 | * @memberof google.longrunning.OperationInfo
|
42441 | * @static
|
42442 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
42443 | * @param {number} [length] Message length if known beforehand
|
42444 | * @returns {google.longrunning.OperationInfo} OperationInfo
|
42445 | * @throws {Error} If the payload is not a reader or valid buffer
|
42446 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
42447 | */
|
42448 | OperationInfo.decode = function decode(reader, length) {
|
42449 | if (!(reader instanceof $Reader))
|
42450 | reader = $Reader.create(reader);
|
42451 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo();
|
42452 | while (reader.pos < end) {
|
42453 | var tag = reader.uint32();
|
42454 | switch (tag >>> 3) {
|
42455 | case 1: {
|
42456 | message.responseType = reader.string();
|
42457 | break;
|
42458 | }
|
42459 | case 2: {
|
42460 | message.metadataType = reader.string();
|
42461 | break;
|
42462 | }
|
42463 | default:
|
42464 | reader.skipType(tag & 7);
|
42465 | break;
|
42466 | }
|
42467 | }
|
42468 | return message;
|
42469 | };
|
42470 |
|
42471 | /**
|
42472 | * Decodes an OperationInfo message from the specified reader or buffer, length delimited.
|
42473 | * @function decodeDelimited
|
42474 | * @memberof google.longrunning.OperationInfo
|
42475 | * @static
|
42476 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
42477 | * @returns {google.longrunning.OperationInfo} OperationInfo
|
42478 | * @throws {Error} If the payload is not a reader or valid buffer
|
42479 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
42480 | */
|
42481 | OperationInfo.decodeDelimited = function decodeDelimited(reader) {
|
42482 | if (!(reader instanceof $Reader))
|
42483 | reader = new $Reader(reader);
|
42484 | return this.decode(reader, reader.uint32());
|
42485 | };
|
42486 |
|
42487 | /**
|
42488 | * Verifies an OperationInfo message.
|
42489 | * @function verify
|
42490 | * @memberof google.longrunning.OperationInfo
|
42491 | * @static
|
42492 | * @param {Object.<string,*>} message Plain object to verify
|
42493 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
42494 | */
|
42495 | OperationInfo.verify = function verify(message) {
|
42496 | if (typeof message !== "object" || message === null)
|
42497 | return "object expected";
|
42498 | if (message.responseType != null && message.hasOwnProperty("responseType"))
|
42499 | if (!$util.isString(message.responseType))
|
42500 | return "responseType: string expected";
|
42501 | if (message.metadataType != null && message.hasOwnProperty("metadataType"))
|
42502 | if (!$util.isString(message.metadataType))
|
42503 | return "metadataType: string expected";
|
42504 | return null;
|
42505 | };
|
42506 |
|
42507 | /**
|
42508 | * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types.
|
42509 | * @function fromObject
|
42510 | * @memberof google.longrunning.OperationInfo
|
42511 | * @static
|
42512 | * @param {Object.<string,*>} object Plain object
|
42513 | * @returns {google.longrunning.OperationInfo} OperationInfo
|
42514 | */
|
42515 | OperationInfo.fromObject = function fromObject(object) {
|
42516 | if (object instanceof $root.google.longrunning.OperationInfo)
|
42517 | return object;
|
42518 | var message = new $root.google.longrunning.OperationInfo();
|
42519 | if (object.responseType != null)
|
42520 | message.responseType = String(object.responseType);
|
42521 | if (object.metadataType != null)
|
42522 | message.metadataType = String(object.metadataType);
|
42523 | return message;
|
42524 | };
|
42525 |
|
42526 | /**
|
42527 | * Creates a plain object from an OperationInfo message. Also converts values to other types if specified.
|
42528 | * @function toObject
|
42529 | * @memberof google.longrunning.OperationInfo
|
42530 | * @static
|
42531 | * @param {google.longrunning.OperationInfo} message OperationInfo
|
42532 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
42533 | * @returns {Object.<string,*>} Plain object
|
42534 | */
|
42535 | OperationInfo.toObject = function toObject(message, options) {
|
42536 | if (!options)
|
42537 | options = {};
|
42538 | var object = {};
|
42539 | if (options.defaults) {
|
42540 | object.responseType = "";
|
42541 | object.metadataType = "";
|
42542 | }
|
42543 | if (message.responseType != null && message.hasOwnProperty("responseType"))
|
42544 | object.responseType = message.responseType;
|
42545 | if (message.metadataType != null && message.hasOwnProperty("metadataType"))
|
42546 | object.metadataType = message.metadataType;
|
42547 | return object;
|
42548 | };
|
42549 |
|
42550 | /**
|
42551 | * Converts this OperationInfo to JSON.
|
42552 | * @function toJSON
|
42553 | * @memberof google.longrunning.OperationInfo
|
42554 | * @instance
|
42555 | * @returns {Object.<string,*>} JSON object
|
42556 | */
|
42557 | OperationInfo.prototype.toJSON = function toJSON() {
|
42558 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
42559 | };
|
42560 |
|
42561 | /**
|
42562 | * Gets the default type url for OperationInfo
|
42563 | * @function getTypeUrl
|
42564 | * @memberof google.longrunning.OperationInfo
|
42565 | * @static
|
42566 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
42567 | * @returns {string} The default type url
|
42568 | */
|
42569 | OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
42570 | if (typeUrlPrefix === undefined) {
|
42571 | typeUrlPrefix = "type.googleapis.com";
|
42572 | }
|
42573 | return typeUrlPrefix + "/google.longrunning.OperationInfo";
|
42574 | };
|
42575 |
|
42576 | return OperationInfo;
|
42577 | })();
|
42578 |
|
42579 | return longrunning;
|
42580 | })();
|
42581 |
|
42582 | google.rpc = (function() {
|
42583 |
|
42584 | /**
|
42585 | * Namespace rpc.
|
42586 | * @memberof google
|
42587 | * @namespace
|
42588 | */
|
42589 | var rpc = {};
|
42590 |
|
42591 | rpc.Status = (function() {
|
42592 |
|
42593 | /**
|
42594 | * Properties of a Status.
|
42595 | * @memberof google.rpc
|
42596 | * @interface IStatus
|
42597 | * @property {number|null} [code] Status code
|
42598 | * @property {string|null} [message] Status message
|
42599 | * @property {Array.<google.protobuf.IAny>|null} [details] Status details
|
42600 | */
|
42601 |
|
42602 | /**
|
42603 | * Constructs a new Status.
|
42604 | * @memberof google.rpc
|
42605 | * @classdesc Represents a Status.
|
42606 | * @implements IStatus
|
42607 | * @constructor
|
42608 | * @param {google.rpc.IStatus=} [properties] Properties to set
|
42609 | */
|
42610 | function Status(properties) {
|
42611 | this.details = [];
|
42612 | if (properties)
|
42613 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
42614 | if (properties[keys[i]] != null)
|
42615 | this[keys[i]] = properties[keys[i]];
|
42616 | }
|
42617 |
|
42618 | /**
|
42619 | * Status code.
|
42620 | * @member {number} code
|
42621 | * @memberof google.rpc.Status
|
42622 | * @instance
|
42623 | */
|
42624 | Status.prototype.code = 0;
|
42625 |
|
42626 | /**
|
42627 | * Status message.
|
42628 | * @member {string} message
|
42629 | * @memberof google.rpc.Status
|
42630 | * @instance
|
42631 | */
|
42632 | Status.prototype.message = "";
|
42633 |
|
42634 | /**
|
42635 | * Status details.
|
42636 | * @member {Array.<google.protobuf.IAny>} details
|
42637 | * @memberof google.rpc.Status
|
42638 | * @instance
|
42639 | */
|
42640 | Status.prototype.details = $util.emptyArray;
|
42641 |
|
42642 | /**
|
42643 | * Creates a new Status instance using the specified properties.
|
42644 | * @function create
|
42645 | * @memberof google.rpc.Status
|
42646 | * @static
|
42647 | * @param {google.rpc.IStatus=} [properties] Properties to set
|
42648 | * @returns {google.rpc.Status} Status instance
|
42649 | */
|
42650 | Status.create = function create(properties) {
|
42651 | return new Status(properties);
|
42652 | };
|
42653 |
|
42654 | /**
|
42655 | * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages.
|
42656 | * @function encode
|
42657 | * @memberof google.rpc.Status
|
42658 | * @static
|
42659 | * @param {google.rpc.IStatus} message Status message or plain object to encode
|
42660 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
42661 | * @returns {$protobuf.Writer} Writer
|
42662 | */
|
42663 | Status.encode = function encode(message, writer) {
|
42664 | if (!writer)
|
42665 | writer = $Writer.create();
|
42666 | if (message.code != null && Object.hasOwnProperty.call(message, "code"))
|
42667 | writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code);
|
42668 | if (message.message != null && Object.hasOwnProperty.call(message, "message"))
|
42669 | writer.uint32(/* id 2, wireType 2 =*/18).string(message.message);
|
42670 | if (message.details != null && message.details.length)
|
42671 | for (var i = 0; i < message.details.length; ++i)
|
42672 | $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
42673 | return writer;
|
42674 | };
|
42675 |
|
42676 | /**
|
42677 | * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages.
|
42678 | * @function encodeDelimited
|
42679 | * @memberof google.rpc.Status
|
42680 | * @static
|
42681 | * @param {google.rpc.IStatus} message Status message or plain object to encode
|
42682 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
42683 | * @returns {$protobuf.Writer} Writer
|
42684 | */
|
42685 | Status.encodeDelimited = function encodeDelimited(message, writer) {
|
42686 | return this.encode(message, writer).ldelim();
|
42687 | };
|
42688 |
|
42689 | /**
|
42690 | * Decodes a Status message from the specified reader or buffer.
|
42691 | * @function decode
|
42692 | * @memberof google.rpc.Status
|
42693 | * @static
|
42694 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
42695 | * @param {number} [length] Message length if known beforehand
|
42696 | * @returns {google.rpc.Status} Status
|
42697 | * @throws {Error} If the payload is not a reader or valid buffer
|
42698 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
42699 | */
|
42700 | Status.decode = function decode(reader, length) {
|
42701 | if (!(reader instanceof $Reader))
|
42702 | reader = $Reader.create(reader);
|
42703 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status();
|
42704 | while (reader.pos < end) {
|
42705 | var tag = reader.uint32();
|
42706 | switch (tag >>> 3) {
|
42707 | case 1: {
|
42708 | message.code = reader.int32();
|
42709 | break;
|
42710 | }
|
42711 | case 2: {
|
42712 | message.message = reader.string();
|
42713 | break;
|
42714 | }
|
42715 | case 3: {
|
42716 | if (!(message.details && message.details.length))
|
42717 | message.details = [];
|
42718 | message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32()));
|
42719 | break;
|
42720 | }
|
42721 | default:
|
42722 | reader.skipType(tag & 7);
|
42723 | break;
|
42724 | }
|
42725 | }
|
42726 | return message;
|
42727 | };
|
42728 |
|
42729 | /**
|
42730 | * Decodes a Status message from the specified reader or buffer, length delimited.
|
42731 | * @function decodeDelimited
|
42732 | * @memberof google.rpc.Status
|
42733 | * @static
|
42734 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
42735 | * @returns {google.rpc.Status} Status
|
42736 | * @throws {Error} If the payload is not a reader or valid buffer
|
42737 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
42738 | */
|
42739 | Status.decodeDelimited = function decodeDelimited(reader) {
|
42740 | if (!(reader instanceof $Reader))
|
42741 | reader = new $Reader(reader);
|
42742 | return this.decode(reader, reader.uint32());
|
42743 | };
|
42744 |
|
42745 | /**
|
42746 | * Verifies a Status message.
|
42747 | * @function verify
|
42748 | * @memberof google.rpc.Status
|
42749 | * @static
|
42750 | * @param {Object.<string,*>} message Plain object to verify
|
42751 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
42752 | */
|
42753 | Status.verify = function verify(message) {
|
42754 | if (typeof message !== "object" || message === null)
|
42755 | return "object expected";
|
42756 | if (message.code != null && message.hasOwnProperty("code"))
|
42757 | if (!$util.isInteger(message.code))
|
42758 | return "code: integer expected";
|
42759 | if (message.message != null && message.hasOwnProperty("message"))
|
42760 | if (!$util.isString(message.message))
|
42761 | return "message: string expected";
|
42762 | if (message.details != null && message.hasOwnProperty("details")) {
|
42763 | if (!Array.isArray(message.details))
|
42764 | return "details: array expected";
|
42765 | for (var i = 0; i < message.details.length; ++i) {
|
42766 | var error = $root.google.protobuf.Any.verify(message.details[i]);
|
42767 | if (error)
|
42768 | return "details." + error;
|
42769 | }
|
42770 | }
|
42771 | return null;
|
42772 | };
|
42773 |
|
42774 | /**
|
42775 | * Creates a Status message from a plain object. Also converts values to their respective internal types.
|
42776 | * @function fromObject
|
42777 | * @memberof google.rpc.Status
|
42778 | * @static
|
42779 | * @param {Object.<string,*>} object Plain object
|
42780 | * @returns {google.rpc.Status} Status
|
42781 | */
|
42782 | Status.fromObject = function fromObject(object) {
|
42783 | if (object instanceof $root.google.rpc.Status)
|
42784 | return object;
|
42785 | var message = new $root.google.rpc.Status();
|
42786 | if (object.code != null)
|
42787 | message.code = object.code | 0;
|
42788 | if (object.message != null)
|
42789 | message.message = String(object.message);
|
42790 | if (object.details) {
|
42791 | if (!Array.isArray(object.details))
|
42792 | throw TypeError(".google.rpc.Status.details: array expected");
|
42793 | message.details = [];
|
42794 | for (var i = 0; i < object.details.length; ++i) {
|
42795 | if (typeof object.details[i] !== "object")
|
42796 | throw TypeError(".google.rpc.Status.details: object expected");
|
42797 | message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]);
|
42798 | }
|
42799 | }
|
42800 | return message;
|
42801 | };
|
42802 |
|
42803 | /**
|
42804 | * Creates a plain object from a Status message. Also converts values to other types if specified.
|
42805 | * @function toObject
|
42806 | * @memberof google.rpc.Status
|
42807 | * @static
|
42808 | * @param {google.rpc.Status} message Status
|
42809 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
42810 | * @returns {Object.<string,*>} Plain object
|
42811 | */
|
42812 | Status.toObject = function toObject(message, options) {
|
42813 | if (!options)
|
42814 | options = {};
|
42815 | var object = {};
|
42816 | if (options.arrays || options.defaults)
|
42817 | object.details = [];
|
42818 | if (options.defaults) {
|
42819 | object.code = 0;
|
42820 | object.message = "";
|
42821 | }
|
42822 | if (message.code != null && message.hasOwnProperty("code"))
|
42823 | object.code = message.code;
|
42824 | if (message.message != null && message.hasOwnProperty("message"))
|
42825 | object.message = message.message;
|
42826 | if (message.details && message.details.length) {
|
42827 | object.details = [];
|
42828 | for (var j = 0; j < message.details.length; ++j)
|
42829 | object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options);
|
42830 | }
|
42831 | return object;
|
42832 | };
|
42833 |
|
42834 | /**
|
42835 | * Converts this Status to JSON.
|
42836 | * @function toJSON
|
42837 | * @memberof google.rpc.Status
|
42838 | * @instance
|
42839 | * @returns {Object.<string,*>} JSON object
|
42840 | */
|
42841 | Status.prototype.toJSON = function toJSON() {
|
42842 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
42843 | };
|
42844 |
|
42845 | /**
|
42846 | * Gets the default type url for Status
|
42847 | * @function getTypeUrl
|
42848 | * @memberof google.rpc.Status
|
42849 | * @static
|
42850 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
42851 | * @returns {string} The default type url
|
42852 | */
|
42853 | Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
42854 | if (typeUrlPrefix === undefined) {
|
42855 | typeUrlPrefix = "type.googleapis.com";
|
42856 | }
|
42857 | return typeUrlPrefix + "/google.rpc.Status";
|
42858 | };
|
42859 |
|
42860 | return Status;
|
42861 | })();
|
42862 |
|
42863 | return rpc;
|
42864 | })();
|
42865 |
|
42866 | google.type = (function() {
|
42867 |
|
42868 | /**
|
42869 | * Namespace type.
|
42870 | * @memberof google
|
42871 | * @namespace
|
42872 | */
|
42873 | var type = {};
|
42874 |
|
42875 | type.LatLng = (function() {
|
42876 |
|
42877 | /**
|
42878 | * Properties of a LatLng.
|
42879 | * @memberof google.type
|
42880 | * @interface ILatLng
|
42881 | * @property {number|null} [latitude] LatLng latitude
|
42882 | * @property {number|null} [longitude] LatLng longitude
|
42883 | */
|
42884 |
|
42885 | /**
|
42886 | * Constructs a new LatLng.
|
42887 | * @memberof google.type
|
42888 | * @classdesc Represents a LatLng.
|
42889 | * @implements ILatLng
|
42890 | * @constructor
|
42891 | * @param {google.type.ILatLng=} [properties] Properties to set
|
42892 | */
|
42893 | function LatLng(properties) {
|
42894 | if (properties)
|
42895 | for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
42896 | if (properties[keys[i]] != null)
|
42897 | this[keys[i]] = properties[keys[i]];
|
42898 | }
|
42899 |
|
42900 | /**
|
42901 | * LatLng latitude.
|
42902 | * @member {number} latitude
|
42903 | * @memberof google.type.LatLng
|
42904 | * @instance
|
42905 | */
|
42906 | LatLng.prototype.latitude = 0;
|
42907 |
|
42908 | /**
|
42909 | * LatLng longitude.
|
42910 | * @member {number} longitude
|
42911 | * @memberof google.type.LatLng
|
42912 | * @instance
|
42913 | */
|
42914 | LatLng.prototype.longitude = 0;
|
42915 |
|
42916 | /**
|
42917 | * Creates a new LatLng instance using the specified properties.
|
42918 | * @function create
|
42919 | * @memberof google.type.LatLng
|
42920 | * @static
|
42921 | * @param {google.type.ILatLng=} [properties] Properties to set
|
42922 | * @returns {google.type.LatLng} LatLng instance
|
42923 | */
|
42924 | LatLng.create = function create(properties) {
|
42925 | return new LatLng(properties);
|
42926 | };
|
42927 |
|
42928 | /**
|
42929 | * Encodes the specified LatLng message. Does not implicitly {@link google.type.LatLng.verify|verify} messages.
|
42930 | * @function encode
|
42931 | * @memberof google.type.LatLng
|
42932 | * @static
|
42933 | * @param {google.type.ILatLng} message LatLng message or plain object to encode
|
42934 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
42935 | * @returns {$protobuf.Writer} Writer
|
42936 | */
|
42937 | LatLng.encode = function encode(message, writer) {
|
42938 | if (!writer)
|
42939 | writer = $Writer.create();
|
42940 | if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude"))
|
42941 | writer.uint32(/* id 1, wireType 1 =*/9).double(message.latitude);
|
42942 | if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude"))
|
42943 | writer.uint32(/* id 2, wireType 1 =*/17).double(message.longitude);
|
42944 | return writer;
|
42945 | };
|
42946 |
|
42947 | /**
|
42948 | * Encodes the specified LatLng message, length delimited. Does not implicitly {@link google.type.LatLng.verify|verify} messages.
|
42949 | * @function encodeDelimited
|
42950 | * @memberof google.type.LatLng
|
42951 | * @static
|
42952 | * @param {google.type.ILatLng} message LatLng message or plain object to encode
|
42953 | * @param {$protobuf.Writer} [writer] Writer to encode to
|
42954 | * @returns {$protobuf.Writer} Writer
|
42955 | */
|
42956 | LatLng.encodeDelimited = function encodeDelimited(message, writer) {
|
42957 | return this.encode(message, writer).ldelim();
|
42958 | };
|
42959 |
|
42960 | /**
|
42961 | * Decodes a LatLng message from the specified reader or buffer.
|
42962 | * @function decode
|
42963 | * @memberof google.type.LatLng
|
42964 | * @static
|
42965 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
42966 | * @param {number} [length] Message length if known beforehand
|
42967 | * @returns {google.type.LatLng} LatLng
|
42968 | * @throws {Error} If the payload is not a reader or valid buffer
|
42969 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
42970 | */
|
42971 | LatLng.decode = function decode(reader, length) {
|
42972 | if (!(reader instanceof $Reader))
|
42973 | reader = $Reader.create(reader);
|
42974 | var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.LatLng();
|
42975 | while (reader.pos < end) {
|
42976 | var tag = reader.uint32();
|
42977 | switch (tag >>> 3) {
|
42978 | case 1: {
|
42979 | message.latitude = reader.double();
|
42980 | break;
|
42981 | }
|
42982 | case 2: {
|
42983 | message.longitude = reader.double();
|
42984 | break;
|
42985 | }
|
42986 | default:
|
42987 | reader.skipType(tag & 7);
|
42988 | break;
|
42989 | }
|
42990 | }
|
42991 | return message;
|
42992 | };
|
42993 |
|
42994 | /**
|
42995 | * Decodes a LatLng message from the specified reader or buffer, length delimited.
|
42996 | * @function decodeDelimited
|
42997 | * @memberof google.type.LatLng
|
42998 | * @static
|
42999 | * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
43000 | * @returns {google.type.LatLng} LatLng
|
43001 | * @throws {Error} If the payload is not a reader or valid buffer
|
43002 | * @throws {$protobuf.util.ProtocolError} If required fields are missing
|
43003 | */
|
43004 | LatLng.decodeDelimited = function decodeDelimited(reader) {
|
43005 | if (!(reader instanceof $Reader))
|
43006 | reader = new $Reader(reader);
|
43007 | return this.decode(reader, reader.uint32());
|
43008 | };
|
43009 |
|
43010 | /**
|
43011 | * Verifies a LatLng message.
|
43012 | * @function verify
|
43013 | * @memberof google.type.LatLng
|
43014 | * @static
|
43015 | * @param {Object.<string,*>} message Plain object to verify
|
43016 | * @returns {string|null} `null` if valid, otherwise the reason why it is not
|
43017 | */
|
43018 | LatLng.verify = function verify(message) {
|
43019 | if (typeof message !== "object" || message === null)
|
43020 | return "object expected";
|
43021 | if (message.latitude != null && message.hasOwnProperty("latitude"))
|
43022 | if (typeof message.latitude !== "number")
|
43023 | return "latitude: number expected";
|
43024 | if (message.longitude != null && message.hasOwnProperty("longitude"))
|
43025 | if (typeof message.longitude !== "number")
|
43026 | return "longitude: number expected";
|
43027 | return null;
|
43028 | };
|
43029 |
|
43030 | /**
|
43031 | * Creates a LatLng message from a plain object. Also converts values to their respective internal types.
|
43032 | * @function fromObject
|
43033 | * @memberof google.type.LatLng
|
43034 | * @static
|
43035 | * @param {Object.<string,*>} object Plain object
|
43036 | * @returns {google.type.LatLng} LatLng
|
43037 | */
|
43038 | LatLng.fromObject = function fromObject(object) {
|
43039 | if (object instanceof $root.google.type.LatLng)
|
43040 | return object;
|
43041 | var message = new $root.google.type.LatLng();
|
43042 | if (object.latitude != null)
|
43043 | message.latitude = Number(object.latitude);
|
43044 | if (object.longitude != null)
|
43045 | message.longitude = Number(object.longitude);
|
43046 | return message;
|
43047 | };
|
43048 |
|
43049 | /**
|
43050 | * Creates a plain object from a LatLng message. Also converts values to other types if specified.
|
43051 | * @function toObject
|
43052 | * @memberof google.type.LatLng
|
43053 | * @static
|
43054 | * @param {google.type.LatLng} message LatLng
|
43055 | * @param {$protobuf.IConversionOptions} [options] Conversion options
|
43056 | * @returns {Object.<string,*>} Plain object
|
43057 | */
|
43058 | LatLng.toObject = function toObject(message, options) {
|
43059 | if (!options)
|
43060 | options = {};
|
43061 | var object = {};
|
43062 | if (options.defaults) {
|
43063 | object.latitude = 0;
|
43064 | object.longitude = 0;
|
43065 | }
|
43066 | if (message.latitude != null && message.hasOwnProperty("latitude"))
|
43067 | object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude;
|
43068 | if (message.longitude != null && message.hasOwnProperty("longitude"))
|
43069 | object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude;
|
43070 | return object;
|
43071 | };
|
43072 |
|
43073 | /**
|
43074 | * Converts this LatLng to JSON.
|
43075 | * @function toJSON
|
43076 | * @memberof google.type.LatLng
|
43077 | * @instance
|
43078 | * @returns {Object.<string,*>} JSON object
|
43079 | */
|
43080 | LatLng.prototype.toJSON = function toJSON() {
|
43081 | return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
43082 | };
|
43083 |
|
43084 | /**
|
43085 | * Gets the default type url for LatLng
|
43086 | * @function getTypeUrl
|
43087 | * @memberof google.type.LatLng
|
43088 | * @static
|
43089 | * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
43090 | * @returns {string} The default type url
|
43091 | */
|
43092 | LatLng.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
43093 | if (typeUrlPrefix === undefined) {
|
43094 | typeUrlPrefix = "type.googleapis.com";
|
43095 | }
|
43096 | return typeUrlPrefix + "/google.type.LatLng";
|
43097 | };
|
43098 |
|
43099 | return LatLng;
|
43100 | })();
|
43101 |
|
43102 | return type;
|
43103 | })();
|
43104 |
|
43105 | return google;
|
43106 | })();
|
43107 |
|
43108 | return $root;
|
43109 | });
|