@aceplus/smartace-api 3.4.0-alpha.1 → 3.4.0-alpha.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4534 @@
1
+ // source: spic.asset.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global =
17
+ (typeof globalThis !== 'undefined' && globalThis) ||
18
+ (typeof window !== 'undefined' && window) ||
19
+ (typeof global !== 'undefined' && global) ||
20
+ (typeof self !== 'undefined' && self) ||
21
+ (function () { return this; }).call(null) ||
22
+ Function('return this')();
23
+
24
+ var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
25
+ goog.object.extend(proto, google_protobuf_empty_pb);
26
+ var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js');
27
+ goog.object.extend(proto, google_protobuf_wrappers_pb);
28
+ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
29
+ goog.object.extend(proto, google_protobuf_timestamp_pb);
30
+ var platform_location_pb = require('./platform.location_pb.js');
31
+ goog.object.extend(proto, platform_location_pb);
32
+ var platform_pagination_pb = require('./platform.pagination_pb.js');
33
+ goog.object.extend(proto, platform_pagination_pb);
34
+ var google_api_annotations_pb = require('./google/api/annotations_pb.js');
35
+ goog.object.extend(proto, google_api_annotations_pb);
36
+ goog.exportSymbol('proto.Spic.AssetProto', null, global);
37
+ goog.exportSymbol('proto.Spic.AssetProto.BatteryStatus', null, global);
38
+ goog.exportSymbol('proto.Spic.AssetProto.Component', null, global);
39
+ goog.exportSymbol('proto.Spic.AssetProto.CreateRequest', null, global);
40
+ goog.exportSymbol('proto.Spic.AssetProto.DeleteRequest', null, global);
41
+ goog.exportSymbol('proto.Spic.AssetProto.DeleteRequest.SearchCase', null, global);
42
+ goog.exportSymbol('proto.Spic.AssetProto.DeviceType', null, global);
43
+ goog.exportSymbol('proto.Spic.AssetProto.Image', null, global);
44
+ goog.exportSymbol('proto.Spic.AssetProto.Image.RetrieveReply', null, global);
45
+ goog.exportSymbol('proto.Spic.AssetProto.Image.RetrieveRequest', null, global);
46
+ goog.exportSymbol('proto.Spic.AssetProto.LocationSearchReply', null, global);
47
+ goog.exportSymbol('proto.Spic.AssetProto.LocationSearchRequest', null, global);
48
+ goog.exportSymbol('proto.Spic.AssetProto.ReplaceBatteryRequest', null, global);
49
+ goog.exportSymbol('proto.Spic.AssetProto.RetrieveRequest', null, global);
50
+ goog.exportSymbol('proto.Spic.AssetProto.RetrieveRequest.SearchCase', null, global);
51
+ goog.exportSymbol('proto.Spic.AssetProto.SearchReply', null, global);
52
+ goog.exportSymbol('proto.Spic.AssetProto.SearchRequest', null, global);
53
+ goog.exportSymbol('proto.Spic.AssetProto.SpicType', null, global);
54
+ goog.exportSymbol('proto.Spic.AssetProto.UpdateRequest', null, global);
55
+ goog.exportSymbol('proto.Spic.AssetWithLocation', null, global);
56
+ goog.exportSymbol('proto.Spic.AssetWithLocationAndDistance', null, global);
57
+ /**
58
+ * Generated by JsPbCodeGenerator.
59
+ * @param {Array=} opt_data Optional initial data array, typically from a
60
+ * server response, or constructed directly in Javascript. The array is used
61
+ * in place and becomes part of the constructed object. It is not cloned.
62
+ * If no data is provided, the constructed object will be empty, but still
63
+ * valid.
64
+ * @extends {jspb.Message}
65
+ * @constructor
66
+ */
67
+ proto.Spic.AssetProto = function(opt_data) {
68
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.Spic.AssetProto.repeatedFields_, null);
69
+ };
70
+ goog.inherits(proto.Spic.AssetProto, jspb.Message);
71
+ if (goog.DEBUG && !COMPILED) {
72
+ /**
73
+ * @public
74
+ * @override
75
+ */
76
+ proto.Spic.AssetProto.displayName = 'proto.Spic.AssetProto';
77
+ }
78
+ /**
79
+ * Generated by JsPbCodeGenerator.
80
+ * @param {Array=} opt_data Optional initial data array, typically from a
81
+ * server response, or constructed directly in Javascript. The array is used
82
+ * in place and becomes part of the constructed object. It is not cloned.
83
+ * If no data is provided, the constructed object will be empty, but still
84
+ * valid.
85
+ * @extends {jspb.Message}
86
+ * @constructor
87
+ */
88
+ proto.Spic.AssetProto.CreateRequest = function(opt_data) {
89
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
90
+ };
91
+ goog.inherits(proto.Spic.AssetProto.CreateRequest, jspb.Message);
92
+ if (goog.DEBUG && !COMPILED) {
93
+ /**
94
+ * @public
95
+ * @override
96
+ */
97
+ proto.Spic.AssetProto.CreateRequest.displayName = 'proto.Spic.AssetProto.CreateRequest';
98
+ }
99
+ /**
100
+ * Generated by JsPbCodeGenerator.
101
+ * @param {Array=} opt_data Optional initial data array, typically from a
102
+ * server response, or constructed directly in Javascript. The array is used
103
+ * in place and becomes part of the constructed object. It is not cloned.
104
+ * If no data is provided, the constructed object will be empty, but still
105
+ * valid.
106
+ * @extends {jspb.Message}
107
+ * @constructor
108
+ */
109
+ proto.Spic.AssetProto.RetrieveRequest = function(opt_data) {
110
+ jspb.Message.initialize(this, opt_data, 0, -1, null, proto.Spic.AssetProto.RetrieveRequest.oneofGroups_);
111
+ };
112
+ goog.inherits(proto.Spic.AssetProto.RetrieveRequest, jspb.Message);
113
+ if (goog.DEBUG && !COMPILED) {
114
+ /**
115
+ * @public
116
+ * @override
117
+ */
118
+ proto.Spic.AssetProto.RetrieveRequest.displayName = 'proto.Spic.AssetProto.RetrieveRequest';
119
+ }
120
+ /**
121
+ * Generated by JsPbCodeGenerator.
122
+ * @param {Array=} opt_data Optional initial data array, typically from a
123
+ * server response, or constructed directly in Javascript. The array is used
124
+ * in place and becomes part of the constructed object. It is not cloned.
125
+ * If no data is provided, the constructed object will be empty, but still
126
+ * valid.
127
+ * @extends {jspb.Message}
128
+ * @constructor
129
+ */
130
+ proto.Spic.AssetProto.UpdateRequest = function(opt_data) {
131
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
132
+ };
133
+ goog.inherits(proto.Spic.AssetProto.UpdateRequest, jspb.Message);
134
+ if (goog.DEBUG && !COMPILED) {
135
+ /**
136
+ * @public
137
+ * @override
138
+ */
139
+ proto.Spic.AssetProto.UpdateRequest.displayName = 'proto.Spic.AssetProto.UpdateRequest';
140
+ }
141
+ /**
142
+ * Generated by JsPbCodeGenerator.
143
+ * @param {Array=} opt_data Optional initial data array, typically from a
144
+ * server response, or constructed directly in Javascript. The array is used
145
+ * in place and becomes part of the constructed object. It is not cloned.
146
+ * If no data is provided, the constructed object will be empty, but still
147
+ * valid.
148
+ * @extends {jspb.Message}
149
+ * @constructor
150
+ */
151
+ proto.Spic.AssetProto.DeleteRequest = function(opt_data) {
152
+ jspb.Message.initialize(this, opt_data, 0, -1, null, proto.Spic.AssetProto.DeleteRequest.oneofGroups_);
153
+ };
154
+ goog.inherits(proto.Spic.AssetProto.DeleteRequest, jspb.Message);
155
+ if (goog.DEBUG && !COMPILED) {
156
+ /**
157
+ * @public
158
+ * @override
159
+ */
160
+ proto.Spic.AssetProto.DeleteRequest.displayName = 'proto.Spic.AssetProto.DeleteRequest';
161
+ }
162
+ /**
163
+ * Generated by JsPbCodeGenerator.
164
+ * @param {Array=} opt_data Optional initial data array, typically from a
165
+ * server response, or constructed directly in Javascript. The array is used
166
+ * in place and becomes part of the constructed object. It is not cloned.
167
+ * If no data is provided, the constructed object will be empty, but still
168
+ * valid.
169
+ * @extends {jspb.Message}
170
+ * @constructor
171
+ */
172
+ proto.Spic.AssetProto.SearchRequest = function(opt_data) {
173
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
174
+ };
175
+ goog.inherits(proto.Spic.AssetProto.SearchRequest, jspb.Message);
176
+ if (goog.DEBUG && !COMPILED) {
177
+ /**
178
+ * @public
179
+ * @override
180
+ */
181
+ proto.Spic.AssetProto.SearchRequest.displayName = 'proto.Spic.AssetProto.SearchRequest';
182
+ }
183
+ /**
184
+ * Generated by JsPbCodeGenerator.
185
+ * @param {Array=} opt_data Optional initial data array, typically from a
186
+ * server response, or constructed directly in Javascript. The array is used
187
+ * in place and becomes part of the constructed object. It is not cloned.
188
+ * If no data is provided, the constructed object will be empty, but still
189
+ * valid.
190
+ * @extends {jspb.Message}
191
+ * @constructor
192
+ */
193
+ proto.Spic.AssetProto.SearchReply = function(opt_data) {
194
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.Spic.AssetProto.SearchReply.repeatedFields_, null);
195
+ };
196
+ goog.inherits(proto.Spic.AssetProto.SearchReply, jspb.Message);
197
+ if (goog.DEBUG && !COMPILED) {
198
+ /**
199
+ * @public
200
+ * @override
201
+ */
202
+ proto.Spic.AssetProto.SearchReply.displayName = 'proto.Spic.AssetProto.SearchReply';
203
+ }
204
+ /**
205
+ * Generated by JsPbCodeGenerator.
206
+ * @param {Array=} opt_data Optional initial data array, typically from a
207
+ * server response, or constructed directly in Javascript. The array is used
208
+ * in place and becomes part of the constructed object. It is not cloned.
209
+ * If no data is provided, the constructed object will be empty, but still
210
+ * valid.
211
+ * @extends {jspb.Message}
212
+ * @constructor
213
+ */
214
+ proto.Spic.AssetProto.LocationSearchRequest = function(opt_data) {
215
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
216
+ };
217
+ goog.inherits(proto.Spic.AssetProto.LocationSearchRequest, jspb.Message);
218
+ if (goog.DEBUG && !COMPILED) {
219
+ /**
220
+ * @public
221
+ * @override
222
+ */
223
+ proto.Spic.AssetProto.LocationSearchRequest.displayName = 'proto.Spic.AssetProto.LocationSearchRequest';
224
+ }
225
+ /**
226
+ * Generated by JsPbCodeGenerator.
227
+ * @param {Array=} opt_data Optional initial data array, typically from a
228
+ * server response, or constructed directly in Javascript. The array is used
229
+ * in place and becomes part of the constructed object. It is not cloned.
230
+ * If no data is provided, the constructed object will be empty, but still
231
+ * valid.
232
+ * @extends {jspb.Message}
233
+ * @constructor
234
+ */
235
+ proto.Spic.AssetProto.LocationSearchReply = function(opt_data) {
236
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.Spic.AssetProto.LocationSearchReply.repeatedFields_, null);
237
+ };
238
+ goog.inherits(proto.Spic.AssetProto.LocationSearchReply, jspb.Message);
239
+ if (goog.DEBUG && !COMPILED) {
240
+ /**
241
+ * @public
242
+ * @override
243
+ */
244
+ proto.Spic.AssetProto.LocationSearchReply.displayName = 'proto.Spic.AssetProto.LocationSearchReply';
245
+ }
246
+ /**
247
+ * Generated by JsPbCodeGenerator.
248
+ * @param {Array=} opt_data Optional initial data array, typically from a
249
+ * server response, or constructed directly in Javascript. The array is used
250
+ * in place and becomes part of the constructed object. It is not cloned.
251
+ * If no data is provided, the constructed object will be empty, but still
252
+ * valid.
253
+ * @extends {jspb.Message}
254
+ * @constructor
255
+ */
256
+ proto.Spic.AssetProto.ReplaceBatteryRequest = function(opt_data) {
257
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
258
+ };
259
+ goog.inherits(proto.Spic.AssetProto.ReplaceBatteryRequest, jspb.Message);
260
+ if (goog.DEBUG && !COMPILED) {
261
+ /**
262
+ * @public
263
+ * @override
264
+ */
265
+ proto.Spic.AssetProto.ReplaceBatteryRequest.displayName = 'proto.Spic.AssetProto.ReplaceBatteryRequest';
266
+ }
267
+ /**
268
+ * Generated by JsPbCodeGenerator.
269
+ * @param {Array=} opt_data Optional initial data array, typically from a
270
+ * server response, or constructed directly in Javascript. The array is used
271
+ * in place and becomes part of the constructed object. It is not cloned.
272
+ * If no data is provided, the constructed object will be empty, but still
273
+ * valid.
274
+ * @extends {jspb.Message}
275
+ * @constructor
276
+ */
277
+ proto.Spic.AssetProto.Image = function(opt_data) {
278
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
279
+ };
280
+ goog.inherits(proto.Spic.AssetProto.Image, jspb.Message);
281
+ if (goog.DEBUG && !COMPILED) {
282
+ /**
283
+ * @public
284
+ * @override
285
+ */
286
+ proto.Spic.AssetProto.Image.displayName = 'proto.Spic.AssetProto.Image';
287
+ }
288
+ /**
289
+ * Generated by JsPbCodeGenerator.
290
+ * @param {Array=} opt_data Optional initial data array, typically from a
291
+ * server response, or constructed directly in Javascript. The array is used
292
+ * in place and becomes part of the constructed object. It is not cloned.
293
+ * If no data is provided, the constructed object will be empty, but still
294
+ * valid.
295
+ * @extends {jspb.Message}
296
+ * @constructor
297
+ */
298
+ proto.Spic.AssetProto.Image.RetrieveRequest = function(opt_data) {
299
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
300
+ };
301
+ goog.inherits(proto.Spic.AssetProto.Image.RetrieveRequest, jspb.Message);
302
+ if (goog.DEBUG && !COMPILED) {
303
+ /**
304
+ * @public
305
+ * @override
306
+ */
307
+ proto.Spic.AssetProto.Image.RetrieveRequest.displayName = 'proto.Spic.AssetProto.Image.RetrieveRequest';
308
+ }
309
+ /**
310
+ * Generated by JsPbCodeGenerator.
311
+ * @param {Array=} opt_data Optional initial data array, typically from a
312
+ * server response, or constructed directly in Javascript. The array is used
313
+ * in place and becomes part of the constructed object. It is not cloned.
314
+ * If no data is provided, the constructed object will be empty, but still
315
+ * valid.
316
+ * @extends {jspb.Message}
317
+ * @constructor
318
+ */
319
+ proto.Spic.AssetProto.Image.RetrieveReply = function(opt_data) {
320
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
321
+ };
322
+ goog.inherits(proto.Spic.AssetProto.Image.RetrieveReply, jspb.Message);
323
+ if (goog.DEBUG && !COMPILED) {
324
+ /**
325
+ * @public
326
+ * @override
327
+ */
328
+ proto.Spic.AssetProto.Image.RetrieveReply.displayName = 'proto.Spic.AssetProto.Image.RetrieveReply';
329
+ }
330
+ /**
331
+ * Generated by JsPbCodeGenerator.
332
+ * @param {Array=} opt_data Optional initial data array, typically from a
333
+ * server response, or constructed directly in Javascript. The array is used
334
+ * in place and becomes part of the constructed object. It is not cloned.
335
+ * If no data is provided, the constructed object will be empty, but still
336
+ * valid.
337
+ * @extends {jspb.Message}
338
+ * @constructor
339
+ */
340
+ proto.Spic.AssetProto.Component = function(opt_data) {
341
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
342
+ };
343
+ goog.inherits(proto.Spic.AssetProto.Component, jspb.Message);
344
+ if (goog.DEBUG && !COMPILED) {
345
+ /**
346
+ * @public
347
+ * @override
348
+ */
349
+ proto.Spic.AssetProto.Component.displayName = 'proto.Spic.AssetProto.Component';
350
+ }
351
+ /**
352
+ * Generated by JsPbCodeGenerator.
353
+ * @param {Array=} opt_data Optional initial data array, typically from a
354
+ * server response, or constructed directly in Javascript. The array is used
355
+ * in place and becomes part of the constructed object. It is not cloned.
356
+ * If no data is provided, the constructed object will be empty, but still
357
+ * valid.
358
+ * @extends {jspb.Message}
359
+ * @constructor
360
+ */
361
+ proto.Spic.AssetWithLocation = function(opt_data) {
362
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
363
+ };
364
+ goog.inherits(proto.Spic.AssetWithLocation, jspb.Message);
365
+ if (goog.DEBUG && !COMPILED) {
366
+ /**
367
+ * @public
368
+ * @override
369
+ */
370
+ proto.Spic.AssetWithLocation.displayName = 'proto.Spic.AssetWithLocation';
371
+ }
372
+ /**
373
+ * Generated by JsPbCodeGenerator.
374
+ * @param {Array=} opt_data Optional initial data array, typically from a
375
+ * server response, or constructed directly in Javascript. The array is used
376
+ * in place and becomes part of the constructed object. It is not cloned.
377
+ * If no data is provided, the constructed object will be empty, but still
378
+ * valid.
379
+ * @extends {jspb.Message}
380
+ * @constructor
381
+ */
382
+ proto.Spic.AssetWithLocationAndDistance = function(opt_data) {
383
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
384
+ };
385
+ goog.inherits(proto.Spic.AssetWithLocationAndDistance, jspb.Message);
386
+ if (goog.DEBUG && !COMPILED) {
387
+ /**
388
+ * @public
389
+ * @override
390
+ */
391
+ proto.Spic.AssetWithLocationAndDistance.displayName = 'proto.Spic.AssetWithLocationAndDistance';
392
+ }
393
+
394
+ /**
395
+ * List of repeated fields within this message type.
396
+ * @private {!Array<number>}
397
+ * @const
398
+ */
399
+ proto.Spic.AssetProto.repeatedFields_ = [19];
400
+
401
+
402
+
403
+ if (jspb.Message.GENERATE_TO_OBJECT) {
404
+ /**
405
+ * Creates an object representation of this proto.
406
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
407
+ * Optional fields that are not set will be set to undefined.
408
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
409
+ * For the list of reserved names please see:
410
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
411
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
412
+ * JSPB instance for transitional soy proto support:
413
+ * http://goto/soy-param-migration
414
+ * @return {!Object}
415
+ */
416
+ proto.Spic.AssetProto.prototype.toObject = function(opt_includeInstance) {
417
+ return proto.Spic.AssetProto.toObject(opt_includeInstance, this);
418
+ };
419
+
420
+
421
+ /**
422
+ * Static version of the {@see toObject} method.
423
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
424
+ * the JSPB instance for transitional soy proto support:
425
+ * http://goto/soy-param-migration
426
+ * @param {!proto.Spic.AssetProto} msg The msg instance to transform.
427
+ * @return {!Object}
428
+ * @suppress {unusedLocalVariables} f is only used for nested messages
429
+ */
430
+ proto.Spic.AssetProto.toObject = function(includeInstance, msg) {
431
+ var f, obj = {
432
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
433
+ name: jspb.Message.getFieldWithDefault(msg, 2, ""),
434
+ locationId: jspb.Message.getFieldWithDefault(msg, 3, 0),
435
+ uid: jspb.Message.getFieldWithDefault(msg, 4, ""),
436
+ lastStatusUpdate: (f = msg.getLastStatusUpdate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
437
+ groupId: jspb.Message.getFieldWithDefault(msg, 8, ""),
438
+ clientId: jspb.Message.getFieldWithDefault(msg, 9, 0),
439
+ isMaintenance: jspb.Message.getBooleanFieldWithDefault(msg, 10, false),
440
+ imageBlob: jspb.Message.getFieldWithDefault(msg, 11, ""),
441
+ batteryPlaced: (f = msg.getBatteryPlaced()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
442
+ batteryPercentage: jspb.Message.getFieldWithDefault(msg, 13, 0),
443
+ communicationTime: jspb.Message.getFieldWithDefault(msg, 14, 0),
444
+ lastConfigString: jspb.Message.getFieldWithDefault(msg, 15, ""),
445
+ lastConfigUpdated: (f = msg.getLastConfigUpdated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
446
+ spicType: jspb.Message.getFieldWithDefault(msg, 17, 0),
447
+ batteryStatus: jspb.Message.getFieldWithDefault(msg, 18, 0),
448
+ componentsList: jspb.Message.toObjectList(msg.getComponentsList(),
449
+ proto.Spic.AssetProto.Component.toObject, includeInstance),
450
+ deviceType: jspb.Message.getFieldWithDefault(msg, 20, 0)
451
+ };
452
+
453
+ if (includeInstance) {
454
+ obj.$jspbMessageInstance = msg;
455
+ }
456
+ return obj;
457
+ };
458
+ }
459
+
460
+
461
+ /**
462
+ * Deserializes binary data (in protobuf wire format).
463
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
464
+ * @return {!proto.Spic.AssetProto}
465
+ */
466
+ proto.Spic.AssetProto.deserializeBinary = function(bytes) {
467
+ var reader = new jspb.BinaryReader(bytes);
468
+ var msg = new proto.Spic.AssetProto;
469
+ return proto.Spic.AssetProto.deserializeBinaryFromReader(msg, reader);
470
+ };
471
+
472
+
473
+ /**
474
+ * Deserializes binary data (in protobuf wire format) from the
475
+ * given reader into the given message object.
476
+ * @param {!proto.Spic.AssetProto} msg The message object to deserialize into.
477
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
478
+ * @return {!proto.Spic.AssetProto}
479
+ */
480
+ proto.Spic.AssetProto.deserializeBinaryFromReader = function(msg, reader) {
481
+ while (reader.nextField()) {
482
+ if (reader.isEndGroup()) {
483
+ break;
484
+ }
485
+ var field = reader.getFieldNumber();
486
+ switch (field) {
487
+ case 1:
488
+ var value = /** @type {number} */ (reader.readInt64());
489
+ msg.setId(value);
490
+ break;
491
+ case 2:
492
+ var value = /** @type {string} */ (reader.readString());
493
+ msg.setName(value);
494
+ break;
495
+ case 3:
496
+ var value = /** @type {number} */ (reader.readInt64());
497
+ msg.setLocationId(value);
498
+ break;
499
+ case 4:
500
+ var value = /** @type {string} */ (reader.readString());
501
+ msg.setUid(value);
502
+ break;
503
+ case 7:
504
+ var value = new google_protobuf_timestamp_pb.Timestamp;
505
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
506
+ msg.setLastStatusUpdate(value);
507
+ break;
508
+ case 8:
509
+ var value = /** @type {string} */ (reader.readString());
510
+ msg.setGroupId(value);
511
+ break;
512
+ case 9:
513
+ var value = /** @type {number} */ (reader.readInt32());
514
+ msg.setClientId(value);
515
+ break;
516
+ case 10:
517
+ var value = /** @type {boolean} */ (reader.readBool());
518
+ msg.setIsMaintenance(value);
519
+ break;
520
+ case 11:
521
+ var value = /** @type {string} */ (reader.readString());
522
+ msg.setImageBlob(value);
523
+ break;
524
+ case 12:
525
+ var value = new google_protobuf_timestamp_pb.Timestamp;
526
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
527
+ msg.setBatteryPlaced(value);
528
+ break;
529
+ case 13:
530
+ var value = /** @type {number} */ (reader.readInt32());
531
+ msg.setBatteryPercentage(value);
532
+ break;
533
+ case 14:
534
+ var value = /** @type {number} */ (reader.readInt64());
535
+ msg.setCommunicationTime(value);
536
+ break;
537
+ case 15:
538
+ var value = /** @type {string} */ (reader.readString());
539
+ msg.setLastConfigString(value);
540
+ break;
541
+ case 16:
542
+ var value = new google_protobuf_timestamp_pb.Timestamp;
543
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
544
+ msg.setLastConfigUpdated(value);
545
+ break;
546
+ case 17:
547
+ var value = /** @type {!proto.Spic.AssetProto.SpicType} */ (reader.readEnum());
548
+ msg.setSpicType(value);
549
+ break;
550
+ case 18:
551
+ var value = /** @type {!proto.Spic.AssetProto.BatteryStatus} */ (reader.readEnum());
552
+ msg.setBatteryStatus(value);
553
+ break;
554
+ case 19:
555
+ var value = new proto.Spic.AssetProto.Component;
556
+ reader.readMessage(value,proto.Spic.AssetProto.Component.deserializeBinaryFromReader);
557
+ msg.addComponents(value);
558
+ break;
559
+ case 20:
560
+ var value = /** @type {!proto.Spic.AssetProto.DeviceType} */ (reader.readEnum());
561
+ msg.setDeviceType(value);
562
+ break;
563
+ default:
564
+ reader.skipField();
565
+ break;
566
+ }
567
+ }
568
+ return msg;
569
+ };
570
+
571
+
572
+ /**
573
+ * Serializes the message to binary data (in protobuf wire format).
574
+ * @return {!Uint8Array}
575
+ */
576
+ proto.Spic.AssetProto.prototype.serializeBinary = function() {
577
+ var writer = new jspb.BinaryWriter();
578
+ proto.Spic.AssetProto.serializeBinaryToWriter(this, writer);
579
+ return writer.getResultBuffer();
580
+ };
581
+
582
+
583
+ /**
584
+ * Serializes the given message to binary data (in protobuf wire
585
+ * format), writing to the given BinaryWriter.
586
+ * @param {!proto.Spic.AssetProto} message
587
+ * @param {!jspb.BinaryWriter} writer
588
+ * @suppress {unusedLocalVariables} f is only used for nested messages
589
+ */
590
+ proto.Spic.AssetProto.serializeBinaryToWriter = function(message, writer) {
591
+ var f = undefined;
592
+ f = message.getId();
593
+ if (f !== 0) {
594
+ writer.writeInt64(
595
+ 1,
596
+ f
597
+ );
598
+ }
599
+ f = message.getName();
600
+ if (f.length > 0) {
601
+ writer.writeString(
602
+ 2,
603
+ f
604
+ );
605
+ }
606
+ f = message.getLocationId();
607
+ if (f !== 0) {
608
+ writer.writeInt64(
609
+ 3,
610
+ f
611
+ );
612
+ }
613
+ f = message.getUid();
614
+ if (f.length > 0) {
615
+ writer.writeString(
616
+ 4,
617
+ f
618
+ );
619
+ }
620
+ f = message.getLastStatusUpdate();
621
+ if (f != null) {
622
+ writer.writeMessage(
623
+ 7,
624
+ f,
625
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
626
+ );
627
+ }
628
+ f = message.getGroupId();
629
+ if (f.length > 0) {
630
+ writer.writeString(
631
+ 8,
632
+ f
633
+ );
634
+ }
635
+ f = message.getClientId();
636
+ if (f !== 0) {
637
+ writer.writeInt32(
638
+ 9,
639
+ f
640
+ );
641
+ }
642
+ f = message.getIsMaintenance();
643
+ if (f) {
644
+ writer.writeBool(
645
+ 10,
646
+ f
647
+ );
648
+ }
649
+ f = message.getImageBlob();
650
+ if (f.length > 0) {
651
+ writer.writeString(
652
+ 11,
653
+ f
654
+ );
655
+ }
656
+ f = message.getBatteryPlaced();
657
+ if (f != null) {
658
+ writer.writeMessage(
659
+ 12,
660
+ f,
661
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
662
+ );
663
+ }
664
+ f = message.getBatteryPercentage();
665
+ if (f !== 0) {
666
+ writer.writeInt32(
667
+ 13,
668
+ f
669
+ );
670
+ }
671
+ f = message.getCommunicationTime();
672
+ if (f !== 0) {
673
+ writer.writeInt64(
674
+ 14,
675
+ f
676
+ );
677
+ }
678
+ f = message.getLastConfigString();
679
+ if (f.length > 0) {
680
+ writer.writeString(
681
+ 15,
682
+ f
683
+ );
684
+ }
685
+ f = message.getLastConfigUpdated();
686
+ if (f != null) {
687
+ writer.writeMessage(
688
+ 16,
689
+ f,
690
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
691
+ );
692
+ }
693
+ f = message.getSpicType();
694
+ if (f !== 0.0) {
695
+ writer.writeEnum(
696
+ 17,
697
+ f
698
+ );
699
+ }
700
+ f = message.getBatteryStatus();
701
+ if (f !== 0.0) {
702
+ writer.writeEnum(
703
+ 18,
704
+ f
705
+ );
706
+ }
707
+ f = message.getComponentsList();
708
+ if (f.length > 0) {
709
+ writer.writeRepeatedMessage(
710
+ 19,
711
+ f,
712
+ proto.Spic.AssetProto.Component.serializeBinaryToWriter
713
+ );
714
+ }
715
+ f = message.getDeviceType();
716
+ if (f !== 0.0) {
717
+ writer.writeEnum(
718
+ 20,
719
+ f
720
+ );
721
+ }
722
+ };
723
+
724
+
725
+ /**
726
+ * @enum {number}
727
+ */
728
+ proto.Spic.AssetProto.BatteryStatus = {
729
+ UNKOWWN: 0,
730
+ OK: 1,
731
+ REPLACE_WARNING: 2,
732
+ CRITICAL: 3
733
+ };
734
+
735
+ /**
736
+ * @enum {number}
737
+ */
738
+ proto.Spic.AssetProto.DeviceType = {
739
+ SPICV2: 0,
740
+ SPICV3: 1
741
+ };
742
+
743
+ /**
744
+ * @enum {number}
745
+ */
746
+ proto.Spic.AssetProto.SpicType = {
747
+ CABINET: 0,
748
+ MANHOLE: 1,
749
+ CLOSURE: 2
750
+ };
751
+
752
+
753
+
754
+
755
+ if (jspb.Message.GENERATE_TO_OBJECT) {
756
+ /**
757
+ * Creates an object representation of this proto.
758
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
759
+ * Optional fields that are not set will be set to undefined.
760
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
761
+ * For the list of reserved names please see:
762
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
763
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
764
+ * JSPB instance for transitional soy proto support:
765
+ * http://goto/soy-param-migration
766
+ * @return {!Object}
767
+ */
768
+ proto.Spic.AssetProto.CreateRequest.prototype.toObject = function(opt_includeInstance) {
769
+ return proto.Spic.AssetProto.CreateRequest.toObject(opt_includeInstance, this);
770
+ };
771
+
772
+
773
+ /**
774
+ * Static version of the {@see toObject} method.
775
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
776
+ * the JSPB instance for transitional soy proto support:
777
+ * http://goto/soy-param-migration
778
+ * @param {!proto.Spic.AssetProto.CreateRequest} msg The msg instance to transform.
779
+ * @return {!Object}
780
+ * @suppress {unusedLocalVariables} f is only used for nested messages
781
+ */
782
+ proto.Spic.AssetProto.CreateRequest.toObject = function(includeInstance, msg) {
783
+ var f, obj = {
784
+ name: jspb.Message.getFieldWithDefault(msg, 1, ""),
785
+ locationId: jspb.Message.getFieldWithDefault(msg, 2, 0),
786
+ uid: jspb.Message.getFieldWithDefault(msg, 3, ""),
787
+ image: (f = msg.getImage()) && google_protobuf_wrappers_pb.BytesValue.toObject(includeInstance, f),
788
+ extIo1Name: jspb.Message.getFieldWithDefault(msg, 5, ""),
789
+ extIo2Name: jspb.Message.getFieldWithDefault(msg, 6, ""),
790
+ groupId: jspb.Message.getFieldWithDefault(msg, 7, ""),
791
+ clientId: jspb.Message.getFieldWithDefault(msg, 8, 0),
792
+ spicType: jspb.Message.getFieldWithDefault(msg, 9, 0)
793
+ };
794
+
795
+ if (includeInstance) {
796
+ obj.$jspbMessageInstance = msg;
797
+ }
798
+ return obj;
799
+ };
800
+ }
801
+
802
+
803
+ /**
804
+ * Deserializes binary data (in protobuf wire format).
805
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
806
+ * @return {!proto.Spic.AssetProto.CreateRequest}
807
+ */
808
+ proto.Spic.AssetProto.CreateRequest.deserializeBinary = function(bytes) {
809
+ var reader = new jspb.BinaryReader(bytes);
810
+ var msg = new proto.Spic.AssetProto.CreateRequest;
811
+ return proto.Spic.AssetProto.CreateRequest.deserializeBinaryFromReader(msg, reader);
812
+ };
813
+
814
+
815
+ /**
816
+ * Deserializes binary data (in protobuf wire format) from the
817
+ * given reader into the given message object.
818
+ * @param {!proto.Spic.AssetProto.CreateRequest} msg The message object to deserialize into.
819
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
820
+ * @return {!proto.Spic.AssetProto.CreateRequest}
821
+ */
822
+ proto.Spic.AssetProto.CreateRequest.deserializeBinaryFromReader = function(msg, reader) {
823
+ while (reader.nextField()) {
824
+ if (reader.isEndGroup()) {
825
+ break;
826
+ }
827
+ var field = reader.getFieldNumber();
828
+ switch (field) {
829
+ case 1:
830
+ var value = /** @type {string} */ (reader.readString());
831
+ msg.setName(value);
832
+ break;
833
+ case 2:
834
+ var value = /** @type {number} */ (reader.readInt64());
835
+ msg.setLocationId(value);
836
+ break;
837
+ case 3:
838
+ var value = /** @type {string} */ (reader.readString());
839
+ msg.setUid(value);
840
+ break;
841
+ case 4:
842
+ var value = new google_protobuf_wrappers_pb.BytesValue;
843
+ reader.readMessage(value,google_protobuf_wrappers_pb.BytesValue.deserializeBinaryFromReader);
844
+ msg.setImage(value);
845
+ break;
846
+ case 5:
847
+ var value = /** @type {string} */ (reader.readString());
848
+ msg.setExtIo1Name(value);
849
+ break;
850
+ case 6:
851
+ var value = /** @type {string} */ (reader.readString());
852
+ msg.setExtIo2Name(value);
853
+ break;
854
+ case 7:
855
+ var value = /** @type {string} */ (reader.readString());
856
+ msg.setGroupId(value);
857
+ break;
858
+ case 8:
859
+ var value = /** @type {number} */ (reader.readInt32());
860
+ msg.setClientId(value);
861
+ break;
862
+ case 9:
863
+ var value = /** @type {!proto.Spic.AssetProto.SpicType} */ (reader.readEnum());
864
+ msg.setSpicType(value);
865
+ break;
866
+ default:
867
+ reader.skipField();
868
+ break;
869
+ }
870
+ }
871
+ return msg;
872
+ };
873
+
874
+
875
+ /**
876
+ * Serializes the message to binary data (in protobuf wire format).
877
+ * @return {!Uint8Array}
878
+ */
879
+ proto.Spic.AssetProto.CreateRequest.prototype.serializeBinary = function() {
880
+ var writer = new jspb.BinaryWriter();
881
+ proto.Spic.AssetProto.CreateRequest.serializeBinaryToWriter(this, writer);
882
+ return writer.getResultBuffer();
883
+ };
884
+
885
+
886
+ /**
887
+ * Serializes the given message to binary data (in protobuf wire
888
+ * format), writing to the given BinaryWriter.
889
+ * @param {!proto.Spic.AssetProto.CreateRequest} message
890
+ * @param {!jspb.BinaryWriter} writer
891
+ * @suppress {unusedLocalVariables} f is only used for nested messages
892
+ */
893
+ proto.Spic.AssetProto.CreateRequest.serializeBinaryToWriter = function(message, writer) {
894
+ var f = undefined;
895
+ f = message.getName();
896
+ if (f.length > 0) {
897
+ writer.writeString(
898
+ 1,
899
+ f
900
+ );
901
+ }
902
+ f = message.getLocationId();
903
+ if (f !== 0) {
904
+ writer.writeInt64(
905
+ 2,
906
+ f
907
+ );
908
+ }
909
+ f = message.getUid();
910
+ if (f.length > 0) {
911
+ writer.writeString(
912
+ 3,
913
+ f
914
+ );
915
+ }
916
+ f = message.getImage();
917
+ if (f != null) {
918
+ writer.writeMessage(
919
+ 4,
920
+ f,
921
+ google_protobuf_wrappers_pb.BytesValue.serializeBinaryToWriter
922
+ );
923
+ }
924
+ f = message.getExtIo1Name();
925
+ if (f.length > 0) {
926
+ writer.writeString(
927
+ 5,
928
+ f
929
+ );
930
+ }
931
+ f = message.getExtIo2Name();
932
+ if (f.length > 0) {
933
+ writer.writeString(
934
+ 6,
935
+ f
936
+ );
937
+ }
938
+ f = message.getGroupId();
939
+ if (f.length > 0) {
940
+ writer.writeString(
941
+ 7,
942
+ f
943
+ );
944
+ }
945
+ f = message.getClientId();
946
+ if (f !== 0) {
947
+ writer.writeInt32(
948
+ 8,
949
+ f
950
+ );
951
+ }
952
+ f = message.getSpicType();
953
+ if (f !== 0.0) {
954
+ writer.writeEnum(
955
+ 9,
956
+ f
957
+ );
958
+ }
959
+ };
960
+
961
+
962
+ /**
963
+ * optional string name = 1;
964
+ * @return {string}
965
+ */
966
+ proto.Spic.AssetProto.CreateRequest.prototype.getName = function() {
967
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
968
+ };
969
+
970
+
971
+ /**
972
+ * @param {string} value
973
+ * @return {!proto.Spic.AssetProto.CreateRequest} returns this
974
+ */
975
+ proto.Spic.AssetProto.CreateRequest.prototype.setName = function(value) {
976
+ return jspb.Message.setProto3StringField(this, 1, value);
977
+ };
978
+
979
+
980
+ /**
981
+ * optional int64 location_id = 2;
982
+ * @return {number}
983
+ */
984
+ proto.Spic.AssetProto.CreateRequest.prototype.getLocationId = function() {
985
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
986
+ };
987
+
988
+
989
+ /**
990
+ * @param {number} value
991
+ * @return {!proto.Spic.AssetProto.CreateRequest} returns this
992
+ */
993
+ proto.Spic.AssetProto.CreateRequest.prototype.setLocationId = function(value) {
994
+ return jspb.Message.setProto3IntField(this, 2, value);
995
+ };
996
+
997
+
998
+ /**
999
+ * optional string uid = 3;
1000
+ * @return {string}
1001
+ */
1002
+ proto.Spic.AssetProto.CreateRequest.prototype.getUid = function() {
1003
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1004
+ };
1005
+
1006
+
1007
+ /**
1008
+ * @param {string} value
1009
+ * @return {!proto.Spic.AssetProto.CreateRequest} returns this
1010
+ */
1011
+ proto.Spic.AssetProto.CreateRequest.prototype.setUid = function(value) {
1012
+ return jspb.Message.setProto3StringField(this, 3, value);
1013
+ };
1014
+
1015
+
1016
+ /**
1017
+ * optional google.protobuf.BytesValue image = 4;
1018
+ * @return {?proto.google.protobuf.BytesValue}
1019
+ */
1020
+ proto.Spic.AssetProto.CreateRequest.prototype.getImage = function() {
1021
+ return /** @type{?proto.google.protobuf.BytesValue} */ (
1022
+ jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BytesValue, 4));
1023
+ };
1024
+
1025
+
1026
+ /**
1027
+ * @param {?proto.google.protobuf.BytesValue|undefined} value
1028
+ * @return {!proto.Spic.AssetProto.CreateRequest} returns this
1029
+ */
1030
+ proto.Spic.AssetProto.CreateRequest.prototype.setImage = function(value) {
1031
+ return jspb.Message.setWrapperField(this, 4, value);
1032
+ };
1033
+
1034
+
1035
+ /**
1036
+ * Clears the message field making it undefined.
1037
+ * @return {!proto.Spic.AssetProto.CreateRequest} returns this
1038
+ */
1039
+ proto.Spic.AssetProto.CreateRequest.prototype.clearImage = function() {
1040
+ return this.setImage(undefined);
1041
+ };
1042
+
1043
+
1044
+ /**
1045
+ * Returns whether this field is set.
1046
+ * @return {boolean}
1047
+ */
1048
+ proto.Spic.AssetProto.CreateRequest.prototype.hasImage = function() {
1049
+ return jspb.Message.getField(this, 4) != null;
1050
+ };
1051
+
1052
+
1053
+ /**
1054
+ * optional string ext_io_1_name = 5;
1055
+ * @return {string}
1056
+ */
1057
+ proto.Spic.AssetProto.CreateRequest.prototype.getExtIo1Name = function() {
1058
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
1059
+ };
1060
+
1061
+
1062
+ /**
1063
+ * @param {string} value
1064
+ * @return {!proto.Spic.AssetProto.CreateRequest} returns this
1065
+ */
1066
+ proto.Spic.AssetProto.CreateRequest.prototype.setExtIo1Name = function(value) {
1067
+ return jspb.Message.setProto3StringField(this, 5, value);
1068
+ };
1069
+
1070
+
1071
+ /**
1072
+ * optional string ext_io_2_name = 6;
1073
+ * @return {string}
1074
+ */
1075
+ proto.Spic.AssetProto.CreateRequest.prototype.getExtIo2Name = function() {
1076
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1077
+ };
1078
+
1079
+
1080
+ /**
1081
+ * @param {string} value
1082
+ * @return {!proto.Spic.AssetProto.CreateRequest} returns this
1083
+ */
1084
+ proto.Spic.AssetProto.CreateRequest.prototype.setExtIo2Name = function(value) {
1085
+ return jspb.Message.setProto3StringField(this, 6, value);
1086
+ };
1087
+
1088
+
1089
+ /**
1090
+ * optional string group_id = 7;
1091
+ * @return {string}
1092
+ */
1093
+ proto.Spic.AssetProto.CreateRequest.prototype.getGroupId = function() {
1094
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
1095
+ };
1096
+
1097
+
1098
+ /**
1099
+ * @param {string} value
1100
+ * @return {!proto.Spic.AssetProto.CreateRequest} returns this
1101
+ */
1102
+ proto.Spic.AssetProto.CreateRequest.prototype.setGroupId = function(value) {
1103
+ return jspb.Message.setProto3StringField(this, 7, value);
1104
+ };
1105
+
1106
+
1107
+ /**
1108
+ * optional int32 client_id = 8;
1109
+ * @return {number}
1110
+ */
1111
+ proto.Spic.AssetProto.CreateRequest.prototype.getClientId = function() {
1112
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
1113
+ };
1114
+
1115
+
1116
+ /**
1117
+ * @param {number} value
1118
+ * @return {!proto.Spic.AssetProto.CreateRequest} returns this
1119
+ */
1120
+ proto.Spic.AssetProto.CreateRequest.prototype.setClientId = function(value) {
1121
+ return jspb.Message.setProto3IntField(this, 8, value);
1122
+ };
1123
+
1124
+
1125
+ /**
1126
+ * optional SpicType spic_type = 9;
1127
+ * @return {!proto.Spic.AssetProto.SpicType}
1128
+ */
1129
+ proto.Spic.AssetProto.CreateRequest.prototype.getSpicType = function() {
1130
+ return /** @type {!proto.Spic.AssetProto.SpicType} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
1131
+ };
1132
+
1133
+
1134
+ /**
1135
+ * @param {!proto.Spic.AssetProto.SpicType} value
1136
+ * @return {!proto.Spic.AssetProto.CreateRequest} returns this
1137
+ */
1138
+ proto.Spic.AssetProto.CreateRequest.prototype.setSpicType = function(value) {
1139
+ return jspb.Message.setProto3EnumField(this, 9, value);
1140
+ };
1141
+
1142
+
1143
+
1144
+ /**
1145
+ * Oneof group definitions for this message. Each group defines the field
1146
+ * numbers belonging to that group. When of these fields' value is set, all
1147
+ * other fields in the group are cleared. During deserialization, if multiple
1148
+ * fields are encountered for a group, only the last value seen will be kept.
1149
+ * @private {!Array<!Array<number>>}
1150
+ * @const
1151
+ */
1152
+ proto.Spic.AssetProto.RetrieveRequest.oneofGroups_ = [[1,2]];
1153
+
1154
+ /**
1155
+ * @enum {number}
1156
+ */
1157
+ proto.Spic.AssetProto.RetrieveRequest.SearchCase = {
1158
+ SEARCH_NOT_SET: 0,
1159
+ ID: 1,
1160
+ UID: 2
1161
+ };
1162
+
1163
+ /**
1164
+ * @return {proto.Spic.AssetProto.RetrieveRequest.SearchCase}
1165
+ */
1166
+ proto.Spic.AssetProto.RetrieveRequest.prototype.getSearchCase = function() {
1167
+ return /** @type {proto.Spic.AssetProto.RetrieveRequest.SearchCase} */(jspb.Message.computeOneofCase(this, proto.Spic.AssetProto.RetrieveRequest.oneofGroups_[0]));
1168
+ };
1169
+
1170
+
1171
+
1172
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1173
+ /**
1174
+ * Creates an object representation of this proto.
1175
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1176
+ * Optional fields that are not set will be set to undefined.
1177
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1178
+ * For the list of reserved names please see:
1179
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1180
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1181
+ * JSPB instance for transitional soy proto support:
1182
+ * http://goto/soy-param-migration
1183
+ * @return {!Object}
1184
+ */
1185
+ proto.Spic.AssetProto.RetrieveRequest.prototype.toObject = function(opt_includeInstance) {
1186
+ return proto.Spic.AssetProto.RetrieveRequest.toObject(opt_includeInstance, this);
1187
+ };
1188
+
1189
+
1190
+ /**
1191
+ * Static version of the {@see toObject} method.
1192
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1193
+ * the JSPB instance for transitional soy proto support:
1194
+ * http://goto/soy-param-migration
1195
+ * @param {!proto.Spic.AssetProto.RetrieveRequest} msg The msg instance to transform.
1196
+ * @return {!Object}
1197
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1198
+ */
1199
+ proto.Spic.AssetProto.RetrieveRequest.toObject = function(includeInstance, msg) {
1200
+ var f, obj = {
1201
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
1202
+ uid: jspb.Message.getFieldWithDefault(msg, 2, "")
1203
+ };
1204
+
1205
+ if (includeInstance) {
1206
+ obj.$jspbMessageInstance = msg;
1207
+ }
1208
+ return obj;
1209
+ };
1210
+ }
1211
+
1212
+
1213
+ /**
1214
+ * Deserializes binary data (in protobuf wire format).
1215
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1216
+ * @return {!proto.Spic.AssetProto.RetrieveRequest}
1217
+ */
1218
+ proto.Spic.AssetProto.RetrieveRequest.deserializeBinary = function(bytes) {
1219
+ var reader = new jspb.BinaryReader(bytes);
1220
+ var msg = new proto.Spic.AssetProto.RetrieveRequest;
1221
+ return proto.Spic.AssetProto.RetrieveRequest.deserializeBinaryFromReader(msg, reader);
1222
+ };
1223
+
1224
+
1225
+ /**
1226
+ * Deserializes binary data (in protobuf wire format) from the
1227
+ * given reader into the given message object.
1228
+ * @param {!proto.Spic.AssetProto.RetrieveRequest} msg The message object to deserialize into.
1229
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1230
+ * @return {!proto.Spic.AssetProto.RetrieveRequest}
1231
+ */
1232
+ proto.Spic.AssetProto.RetrieveRequest.deserializeBinaryFromReader = function(msg, reader) {
1233
+ while (reader.nextField()) {
1234
+ if (reader.isEndGroup()) {
1235
+ break;
1236
+ }
1237
+ var field = reader.getFieldNumber();
1238
+ switch (field) {
1239
+ case 1:
1240
+ var value = /** @type {number} */ (reader.readInt64());
1241
+ msg.setId(value);
1242
+ break;
1243
+ case 2:
1244
+ var value = /** @type {string} */ (reader.readString());
1245
+ msg.setUid(value);
1246
+ break;
1247
+ default:
1248
+ reader.skipField();
1249
+ break;
1250
+ }
1251
+ }
1252
+ return msg;
1253
+ };
1254
+
1255
+
1256
+ /**
1257
+ * Serializes the message to binary data (in protobuf wire format).
1258
+ * @return {!Uint8Array}
1259
+ */
1260
+ proto.Spic.AssetProto.RetrieveRequest.prototype.serializeBinary = function() {
1261
+ var writer = new jspb.BinaryWriter();
1262
+ proto.Spic.AssetProto.RetrieveRequest.serializeBinaryToWriter(this, writer);
1263
+ return writer.getResultBuffer();
1264
+ };
1265
+
1266
+
1267
+ /**
1268
+ * Serializes the given message to binary data (in protobuf wire
1269
+ * format), writing to the given BinaryWriter.
1270
+ * @param {!proto.Spic.AssetProto.RetrieveRequest} message
1271
+ * @param {!jspb.BinaryWriter} writer
1272
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1273
+ */
1274
+ proto.Spic.AssetProto.RetrieveRequest.serializeBinaryToWriter = function(message, writer) {
1275
+ var f = undefined;
1276
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
1277
+ if (f != null) {
1278
+ writer.writeInt64(
1279
+ 1,
1280
+ f
1281
+ );
1282
+ }
1283
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1284
+ if (f != null) {
1285
+ writer.writeString(
1286
+ 2,
1287
+ f
1288
+ );
1289
+ }
1290
+ };
1291
+
1292
+
1293
+ /**
1294
+ * optional int64 id = 1;
1295
+ * @return {number}
1296
+ */
1297
+ proto.Spic.AssetProto.RetrieveRequest.prototype.getId = function() {
1298
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1299
+ };
1300
+
1301
+
1302
+ /**
1303
+ * @param {number} value
1304
+ * @return {!proto.Spic.AssetProto.RetrieveRequest} returns this
1305
+ */
1306
+ proto.Spic.AssetProto.RetrieveRequest.prototype.setId = function(value) {
1307
+ return jspb.Message.setOneofField(this, 1, proto.Spic.AssetProto.RetrieveRequest.oneofGroups_[0], value);
1308
+ };
1309
+
1310
+
1311
+ /**
1312
+ * Clears the field making it undefined.
1313
+ * @return {!proto.Spic.AssetProto.RetrieveRequest} returns this
1314
+ */
1315
+ proto.Spic.AssetProto.RetrieveRequest.prototype.clearId = function() {
1316
+ return jspb.Message.setOneofField(this, 1, proto.Spic.AssetProto.RetrieveRequest.oneofGroups_[0], undefined);
1317
+ };
1318
+
1319
+
1320
+ /**
1321
+ * Returns whether this field is set.
1322
+ * @return {boolean}
1323
+ */
1324
+ proto.Spic.AssetProto.RetrieveRequest.prototype.hasId = function() {
1325
+ return jspb.Message.getField(this, 1) != null;
1326
+ };
1327
+
1328
+
1329
+ /**
1330
+ * optional string uid = 2;
1331
+ * @return {string}
1332
+ */
1333
+ proto.Spic.AssetProto.RetrieveRequest.prototype.getUid = function() {
1334
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1335
+ };
1336
+
1337
+
1338
+ /**
1339
+ * @param {string} value
1340
+ * @return {!proto.Spic.AssetProto.RetrieveRequest} returns this
1341
+ */
1342
+ proto.Spic.AssetProto.RetrieveRequest.prototype.setUid = function(value) {
1343
+ return jspb.Message.setOneofField(this, 2, proto.Spic.AssetProto.RetrieveRequest.oneofGroups_[0], value);
1344
+ };
1345
+
1346
+
1347
+ /**
1348
+ * Clears the field making it undefined.
1349
+ * @return {!proto.Spic.AssetProto.RetrieveRequest} returns this
1350
+ */
1351
+ proto.Spic.AssetProto.RetrieveRequest.prototype.clearUid = function() {
1352
+ return jspb.Message.setOneofField(this, 2, proto.Spic.AssetProto.RetrieveRequest.oneofGroups_[0], undefined);
1353
+ };
1354
+
1355
+
1356
+ /**
1357
+ * Returns whether this field is set.
1358
+ * @return {boolean}
1359
+ */
1360
+ proto.Spic.AssetProto.RetrieveRequest.prototype.hasUid = function() {
1361
+ return jspb.Message.getField(this, 2) != null;
1362
+ };
1363
+
1364
+
1365
+
1366
+
1367
+
1368
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1369
+ /**
1370
+ * Creates an object representation of this proto.
1371
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1372
+ * Optional fields that are not set will be set to undefined.
1373
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1374
+ * For the list of reserved names please see:
1375
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1376
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1377
+ * JSPB instance for transitional soy proto support:
1378
+ * http://goto/soy-param-migration
1379
+ * @return {!Object}
1380
+ */
1381
+ proto.Spic.AssetProto.UpdateRequest.prototype.toObject = function(opt_includeInstance) {
1382
+ return proto.Spic.AssetProto.UpdateRequest.toObject(opt_includeInstance, this);
1383
+ };
1384
+
1385
+
1386
+ /**
1387
+ * Static version of the {@see toObject} method.
1388
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1389
+ * the JSPB instance for transitional soy proto support:
1390
+ * http://goto/soy-param-migration
1391
+ * @param {!proto.Spic.AssetProto.UpdateRequest} msg The msg instance to transform.
1392
+ * @return {!Object}
1393
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1394
+ */
1395
+ proto.Spic.AssetProto.UpdateRequest.toObject = function(includeInstance, msg) {
1396
+ var f, obj = {
1397
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
1398
+ name: jspb.Message.getFieldWithDefault(msg, 2, ""),
1399
+ locationId: jspb.Message.getFieldWithDefault(msg, 3, 0),
1400
+ uid: jspb.Message.getFieldWithDefault(msg, 4, ""),
1401
+ image: (f = msg.getImage()) && google_protobuf_wrappers_pb.BytesValue.toObject(includeInstance, f),
1402
+ extIo1Name: jspb.Message.getFieldWithDefault(msg, 6, ""),
1403
+ extIo2Name: jspb.Message.getFieldWithDefault(msg, 7, ""),
1404
+ groupId: jspb.Message.getFieldWithDefault(msg, 8, ""),
1405
+ clientId: jspb.Message.getFieldWithDefault(msg, 9, 0),
1406
+ spicType: jspb.Message.getFieldWithDefault(msg, 10, 0)
1407
+ };
1408
+
1409
+ if (includeInstance) {
1410
+ obj.$jspbMessageInstance = msg;
1411
+ }
1412
+ return obj;
1413
+ };
1414
+ }
1415
+
1416
+
1417
+ /**
1418
+ * Deserializes binary data (in protobuf wire format).
1419
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1420
+ * @return {!proto.Spic.AssetProto.UpdateRequest}
1421
+ */
1422
+ proto.Spic.AssetProto.UpdateRequest.deserializeBinary = function(bytes) {
1423
+ var reader = new jspb.BinaryReader(bytes);
1424
+ var msg = new proto.Spic.AssetProto.UpdateRequest;
1425
+ return proto.Spic.AssetProto.UpdateRequest.deserializeBinaryFromReader(msg, reader);
1426
+ };
1427
+
1428
+
1429
+ /**
1430
+ * Deserializes binary data (in protobuf wire format) from the
1431
+ * given reader into the given message object.
1432
+ * @param {!proto.Spic.AssetProto.UpdateRequest} msg The message object to deserialize into.
1433
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1434
+ * @return {!proto.Spic.AssetProto.UpdateRequest}
1435
+ */
1436
+ proto.Spic.AssetProto.UpdateRequest.deserializeBinaryFromReader = function(msg, reader) {
1437
+ while (reader.nextField()) {
1438
+ if (reader.isEndGroup()) {
1439
+ break;
1440
+ }
1441
+ var field = reader.getFieldNumber();
1442
+ switch (field) {
1443
+ case 1:
1444
+ var value = /** @type {number} */ (reader.readInt64());
1445
+ msg.setId(value);
1446
+ break;
1447
+ case 2:
1448
+ var value = /** @type {string} */ (reader.readString());
1449
+ msg.setName(value);
1450
+ break;
1451
+ case 3:
1452
+ var value = /** @type {number} */ (reader.readInt64());
1453
+ msg.setLocationId(value);
1454
+ break;
1455
+ case 4:
1456
+ var value = /** @type {string} */ (reader.readString());
1457
+ msg.setUid(value);
1458
+ break;
1459
+ case 5:
1460
+ var value = new google_protobuf_wrappers_pb.BytesValue;
1461
+ reader.readMessage(value,google_protobuf_wrappers_pb.BytesValue.deserializeBinaryFromReader);
1462
+ msg.setImage(value);
1463
+ break;
1464
+ case 6:
1465
+ var value = /** @type {string} */ (reader.readString());
1466
+ msg.setExtIo1Name(value);
1467
+ break;
1468
+ case 7:
1469
+ var value = /** @type {string} */ (reader.readString());
1470
+ msg.setExtIo2Name(value);
1471
+ break;
1472
+ case 8:
1473
+ var value = /** @type {string} */ (reader.readString());
1474
+ msg.setGroupId(value);
1475
+ break;
1476
+ case 9:
1477
+ var value = /** @type {number} */ (reader.readInt32());
1478
+ msg.setClientId(value);
1479
+ break;
1480
+ case 10:
1481
+ var value = /** @type {!proto.Spic.AssetProto.SpicType} */ (reader.readEnum());
1482
+ msg.setSpicType(value);
1483
+ break;
1484
+ default:
1485
+ reader.skipField();
1486
+ break;
1487
+ }
1488
+ }
1489
+ return msg;
1490
+ };
1491
+
1492
+
1493
+ /**
1494
+ * Serializes the message to binary data (in protobuf wire format).
1495
+ * @return {!Uint8Array}
1496
+ */
1497
+ proto.Spic.AssetProto.UpdateRequest.prototype.serializeBinary = function() {
1498
+ var writer = new jspb.BinaryWriter();
1499
+ proto.Spic.AssetProto.UpdateRequest.serializeBinaryToWriter(this, writer);
1500
+ return writer.getResultBuffer();
1501
+ };
1502
+
1503
+
1504
+ /**
1505
+ * Serializes the given message to binary data (in protobuf wire
1506
+ * format), writing to the given BinaryWriter.
1507
+ * @param {!proto.Spic.AssetProto.UpdateRequest} message
1508
+ * @param {!jspb.BinaryWriter} writer
1509
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1510
+ */
1511
+ proto.Spic.AssetProto.UpdateRequest.serializeBinaryToWriter = function(message, writer) {
1512
+ var f = undefined;
1513
+ f = message.getId();
1514
+ if (f !== 0) {
1515
+ writer.writeInt64(
1516
+ 1,
1517
+ f
1518
+ );
1519
+ }
1520
+ f = message.getName();
1521
+ if (f.length > 0) {
1522
+ writer.writeString(
1523
+ 2,
1524
+ f
1525
+ );
1526
+ }
1527
+ f = message.getLocationId();
1528
+ if (f !== 0) {
1529
+ writer.writeInt64(
1530
+ 3,
1531
+ f
1532
+ );
1533
+ }
1534
+ f = message.getUid();
1535
+ if (f.length > 0) {
1536
+ writer.writeString(
1537
+ 4,
1538
+ f
1539
+ );
1540
+ }
1541
+ f = message.getImage();
1542
+ if (f != null) {
1543
+ writer.writeMessage(
1544
+ 5,
1545
+ f,
1546
+ google_protobuf_wrappers_pb.BytesValue.serializeBinaryToWriter
1547
+ );
1548
+ }
1549
+ f = message.getExtIo1Name();
1550
+ if (f.length > 0) {
1551
+ writer.writeString(
1552
+ 6,
1553
+ f
1554
+ );
1555
+ }
1556
+ f = message.getExtIo2Name();
1557
+ if (f.length > 0) {
1558
+ writer.writeString(
1559
+ 7,
1560
+ f
1561
+ );
1562
+ }
1563
+ f = message.getGroupId();
1564
+ if (f.length > 0) {
1565
+ writer.writeString(
1566
+ 8,
1567
+ f
1568
+ );
1569
+ }
1570
+ f = message.getClientId();
1571
+ if (f !== 0) {
1572
+ writer.writeInt32(
1573
+ 9,
1574
+ f
1575
+ );
1576
+ }
1577
+ f = message.getSpicType();
1578
+ if (f !== 0.0) {
1579
+ writer.writeEnum(
1580
+ 10,
1581
+ f
1582
+ );
1583
+ }
1584
+ };
1585
+
1586
+
1587
+ /**
1588
+ * optional int64 id = 1;
1589
+ * @return {number}
1590
+ */
1591
+ proto.Spic.AssetProto.UpdateRequest.prototype.getId = function() {
1592
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1593
+ };
1594
+
1595
+
1596
+ /**
1597
+ * @param {number} value
1598
+ * @return {!proto.Spic.AssetProto.UpdateRequest} returns this
1599
+ */
1600
+ proto.Spic.AssetProto.UpdateRequest.prototype.setId = function(value) {
1601
+ return jspb.Message.setProto3IntField(this, 1, value);
1602
+ };
1603
+
1604
+
1605
+ /**
1606
+ * optional string name = 2;
1607
+ * @return {string}
1608
+ */
1609
+ proto.Spic.AssetProto.UpdateRequest.prototype.getName = function() {
1610
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1611
+ };
1612
+
1613
+
1614
+ /**
1615
+ * @param {string} value
1616
+ * @return {!proto.Spic.AssetProto.UpdateRequest} returns this
1617
+ */
1618
+ proto.Spic.AssetProto.UpdateRequest.prototype.setName = function(value) {
1619
+ return jspb.Message.setProto3StringField(this, 2, value);
1620
+ };
1621
+
1622
+
1623
+ /**
1624
+ * optional int64 location_id = 3;
1625
+ * @return {number}
1626
+ */
1627
+ proto.Spic.AssetProto.UpdateRequest.prototype.getLocationId = function() {
1628
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1629
+ };
1630
+
1631
+
1632
+ /**
1633
+ * @param {number} value
1634
+ * @return {!proto.Spic.AssetProto.UpdateRequest} returns this
1635
+ */
1636
+ proto.Spic.AssetProto.UpdateRequest.prototype.setLocationId = function(value) {
1637
+ return jspb.Message.setProto3IntField(this, 3, value);
1638
+ };
1639
+
1640
+
1641
+ /**
1642
+ * optional string uid = 4;
1643
+ * @return {string}
1644
+ */
1645
+ proto.Spic.AssetProto.UpdateRequest.prototype.getUid = function() {
1646
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1647
+ };
1648
+
1649
+
1650
+ /**
1651
+ * @param {string} value
1652
+ * @return {!proto.Spic.AssetProto.UpdateRequest} returns this
1653
+ */
1654
+ proto.Spic.AssetProto.UpdateRequest.prototype.setUid = function(value) {
1655
+ return jspb.Message.setProto3StringField(this, 4, value);
1656
+ };
1657
+
1658
+
1659
+ /**
1660
+ * optional google.protobuf.BytesValue image = 5;
1661
+ * @return {?proto.google.protobuf.BytesValue}
1662
+ */
1663
+ proto.Spic.AssetProto.UpdateRequest.prototype.getImage = function() {
1664
+ return /** @type{?proto.google.protobuf.BytesValue} */ (
1665
+ jspb.Message.getWrapperField(this, google_protobuf_wrappers_pb.BytesValue, 5));
1666
+ };
1667
+
1668
+
1669
+ /**
1670
+ * @param {?proto.google.protobuf.BytesValue|undefined} value
1671
+ * @return {!proto.Spic.AssetProto.UpdateRequest} returns this
1672
+ */
1673
+ proto.Spic.AssetProto.UpdateRequest.prototype.setImage = function(value) {
1674
+ return jspb.Message.setWrapperField(this, 5, value);
1675
+ };
1676
+
1677
+
1678
+ /**
1679
+ * Clears the message field making it undefined.
1680
+ * @return {!proto.Spic.AssetProto.UpdateRequest} returns this
1681
+ */
1682
+ proto.Spic.AssetProto.UpdateRequest.prototype.clearImage = function() {
1683
+ return this.setImage(undefined);
1684
+ };
1685
+
1686
+
1687
+ /**
1688
+ * Returns whether this field is set.
1689
+ * @return {boolean}
1690
+ */
1691
+ proto.Spic.AssetProto.UpdateRequest.prototype.hasImage = function() {
1692
+ return jspb.Message.getField(this, 5) != null;
1693
+ };
1694
+
1695
+
1696
+ /**
1697
+ * optional string ext_io_1_name = 6;
1698
+ * @return {string}
1699
+ */
1700
+ proto.Spic.AssetProto.UpdateRequest.prototype.getExtIo1Name = function() {
1701
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1702
+ };
1703
+
1704
+
1705
+ /**
1706
+ * @param {string} value
1707
+ * @return {!proto.Spic.AssetProto.UpdateRequest} returns this
1708
+ */
1709
+ proto.Spic.AssetProto.UpdateRequest.prototype.setExtIo1Name = function(value) {
1710
+ return jspb.Message.setProto3StringField(this, 6, value);
1711
+ };
1712
+
1713
+
1714
+ /**
1715
+ * optional string ext_io_2_name = 7;
1716
+ * @return {string}
1717
+ */
1718
+ proto.Spic.AssetProto.UpdateRequest.prototype.getExtIo2Name = function() {
1719
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
1720
+ };
1721
+
1722
+
1723
+ /**
1724
+ * @param {string} value
1725
+ * @return {!proto.Spic.AssetProto.UpdateRequest} returns this
1726
+ */
1727
+ proto.Spic.AssetProto.UpdateRequest.prototype.setExtIo2Name = function(value) {
1728
+ return jspb.Message.setProto3StringField(this, 7, value);
1729
+ };
1730
+
1731
+
1732
+ /**
1733
+ * optional string group_id = 8;
1734
+ * @return {string}
1735
+ */
1736
+ proto.Spic.AssetProto.UpdateRequest.prototype.getGroupId = function() {
1737
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
1738
+ };
1739
+
1740
+
1741
+ /**
1742
+ * @param {string} value
1743
+ * @return {!proto.Spic.AssetProto.UpdateRequest} returns this
1744
+ */
1745
+ proto.Spic.AssetProto.UpdateRequest.prototype.setGroupId = function(value) {
1746
+ return jspb.Message.setProto3StringField(this, 8, value);
1747
+ };
1748
+
1749
+
1750
+ /**
1751
+ * optional int32 client_id = 9;
1752
+ * @return {number}
1753
+ */
1754
+ proto.Spic.AssetProto.UpdateRequest.prototype.getClientId = function() {
1755
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
1756
+ };
1757
+
1758
+
1759
+ /**
1760
+ * @param {number} value
1761
+ * @return {!proto.Spic.AssetProto.UpdateRequest} returns this
1762
+ */
1763
+ proto.Spic.AssetProto.UpdateRequest.prototype.setClientId = function(value) {
1764
+ return jspb.Message.setProto3IntField(this, 9, value);
1765
+ };
1766
+
1767
+
1768
+ /**
1769
+ * optional SpicType spic_type = 10;
1770
+ * @return {!proto.Spic.AssetProto.SpicType}
1771
+ */
1772
+ proto.Spic.AssetProto.UpdateRequest.prototype.getSpicType = function() {
1773
+ return /** @type {!proto.Spic.AssetProto.SpicType} */ (jspb.Message.getFieldWithDefault(this, 10, 0));
1774
+ };
1775
+
1776
+
1777
+ /**
1778
+ * @param {!proto.Spic.AssetProto.SpicType} value
1779
+ * @return {!proto.Spic.AssetProto.UpdateRequest} returns this
1780
+ */
1781
+ proto.Spic.AssetProto.UpdateRequest.prototype.setSpicType = function(value) {
1782
+ return jspb.Message.setProto3EnumField(this, 10, value);
1783
+ };
1784
+
1785
+
1786
+
1787
+ /**
1788
+ * Oneof group definitions for this message. Each group defines the field
1789
+ * numbers belonging to that group. When of these fields' value is set, all
1790
+ * other fields in the group are cleared. During deserialization, if multiple
1791
+ * fields are encountered for a group, only the last value seen will be kept.
1792
+ * @private {!Array<!Array<number>>}
1793
+ * @const
1794
+ */
1795
+ proto.Spic.AssetProto.DeleteRequest.oneofGroups_ = [[1,2]];
1796
+
1797
+ /**
1798
+ * @enum {number}
1799
+ */
1800
+ proto.Spic.AssetProto.DeleteRequest.SearchCase = {
1801
+ SEARCH_NOT_SET: 0,
1802
+ ID: 1,
1803
+ UID: 2
1804
+ };
1805
+
1806
+ /**
1807
+ * @return {proto.Spic.AssetProto.DeleteRequest.SearchCase}
1808
+ */
1809
+ proto.Spic.AssetProto.DeleteRequest.prototype.getSearchCase = function() {
1810
+ return /** @type {proto.Spic.AssetProto.DeleteRequest.SearchCase} */(jspb.Message.computeOneofCase(this, proto.Spic.AssetProto.DeleteRequest.oneofGroups_[0]));
1811
+ };
1812
+
1813
+
1814
+
1815
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1816
+ /**
1817
+ * Creates an object representation of this proto.
1818
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1819
+ * Optional fields that are not set will be set to undefined.
1820
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1821
+ * For the list of reserved names please see:
1822
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1823
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1824
+ * JSPB instance for transitional soy proto support:
1825
+ * http://goto/soy-param-migration
1826
+ * @return {!Object}
1827
+ */
1828
+ proto.Spic.AssetProto.DeleteRequest.prototype.toObject = function(opt_includeInstance) {
1829
+ return proto.Spic.AssetProto.DeleteRequest.toObject(opt_includeInstance, this);
1830
+ };
1831
+
1832
+
1833
+ /**
1834
+ * Static version of the {@see toObject} method.
1835
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1836
+ * the JSPB instance for transitional soy proto support:
1837
+ * http://goto/soy-param-migration
1838
+ * @param {!proto.Spic.AssetProto.DeleteRequest} msg The msg instance to transform.
1839
+ * @return {!Object}
1840
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1841
+ */
1842
+ proto.Spic.AssetProto.DeleteRequest.toObject = function(includeInstance, msg) {
1843
+ var f, obj = {
1844
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
1845
+ uid: jspb.Message.getFieldWithDefault(msg, 2, "")
1846
+ };
1847
+
1848
+ if (includeInstance) {
1849
+ obj.$jspbMessageInstance = msg;
1850
+ }
1851
+ return obj;
1852
+ };
1853
+ }
1854
+
1855
+
1856
+ /**
1857
+ * Deserializes binary data (in protobuf wire format).
1858
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1859
+ * @return {!proto.Spic.AssetProto.DeleteRequest}
1860
+ */
1861
+ proto.Spic.AssetProto.DeleteRequest.deserializeBinary = function(bytes) {
1862
+ var reader = new jspb.BinaryReader(bytes);
1863
+ var msg = new proto.Spic.AssetProto.DeleteRequest;
1864
+ return proto.Spic.AssetProto.DeleteRequest.deserializeBinaryFromReader(msg, reader);
1865
+ };
1866
+
1867
+
1868
+ /**
1869
+ * Deserializes binary data (in protobuf wire format) from the
1870
+ * given reader into the given message object.
1871
+ * @param {!proto.Spic.AssetProto.DeleteRequest} msg The message object to deserialize into.
1872
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1873
+ * @return {!proto.Spic.AssetProto.DeleteRequest}
1874
+ */
1875
+ proto.Spic.AssetProto.DeleteRequest.deserializeBinaryFromReader = function(msg, reader) {
1876
+ while (reader.nextField()) {
1877
+ if (reader.isEndGroup()) {
1878
+ break;
1879
+ }
1880
+ var field = reader.getFieldNumber();
1881
+ switch (field) {
1882
+ case 1:
1883
+ var value = /** @type {number} */ (reader.readInt64());
1884
+ msg.setId(value);
1885
+ break;
1886
+ case 2:
1887
+ var value = /** @type {string} */ (reader.readString());
1888
+ msg.setUid(value);
1889
+ break;
1890
+ default:
1891
+ reader.skipField();
1892
+ break;
1893
+ }
1894
+ }
1895
+ return msg;
1896
+ };
1897
+
1898
+
1899
+ /**
1900
+ * Serializes the message to binary data (in protobuf wire format).
1901
+ * @return {!Uint8Array}
1902
+ */
1903
+ proto.Spic.AssetProto.DeleteRequest.prototype.serializeBinary = function() {
1904
+ var writer = new jspb.BinaryWriter();
1905
+ proto.Spic.AssetProto.DeleteRequest.serializeBinaryToWriter(this, writer);
1906
+ return writer.getResultBuffer();
1907
+ };
1908
+
1909
+
1910
+ /**
1911
+ * Serializes the given message to binary data (in protobuf wire
1912
+ * format), writing to the given BinaryWriter.
1913
+ * @param {!proto.Spic.AssetProto.DeleteRequest} message
1914
+ * @param {!jspb.BinaryWriter} writer
1915
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1916
+ */
1917
+ proto.Spic.AssetProto.DeleteRequest.serializeBinaryToWriter = function(message, writer) {
1918
+ var f = undefined;
1919
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
1920
+ if (f != null) {
1921
+ writer.writeInt64(
1922
+ 1,
1923
+ f
1924
+ );
1925
+ }
1926
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1927
+ if (f != null) {
1928
+ writer.writeString(
1929
+ 2,
1930
+ f
1931
+ );
1932
+ }
1933
+ };
1934
+
1935
+
1936
+ /**
1937
+ * optional int64 id = 1;
1938
+ * @return {number}
1939
+ */
1940
+ proto.Spic.AssetProto.DeleteRequest.prototype.getId = function() {
1941
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1942
+ };
1943
+
1944
+
1945
+ /**
1946
+ * @param {number} value
1947
+ * @return {!proto.Spic.AssetProto.DeleteRequest} returns this
1948
+ */
1949
+ proto.Spic.AssetProto.DeleteRequest.prototype.setId = function(value) {
1950
+ return jspb.Message.setOneofField(this, 1, proto.Spic.AssetProto.DeleteRequest.oneofGroups_[0], value);
1951
+ };
1952
+
1953
+
1954
+ /**
1955
+ * Clears the field making it undefined.
1956
+ * @return {!proto.Spic.AssetProto.DeleteRequest} returns this
1957
+ */
1958
+ proto.Spic.AssetProto.DeleteRequest.prototype.clearId = function() {
1959
+ return jspb.Message.setOneofField(this, 1, proto.Spic.AssetProto.DeleteRequest.oneofGroups_[0], undefined);
1960
+ };
1961
+
1962
+
1963
+ /**
1964
+ * Returns whether this field is set.
1965
+ * @return {boolean}
1966
+ */
1967
+ proto.Spic.AssetProto.DeleteRequest.prototype.hasId = function() {
1968
+ return jspb.Message.getField(this, 1) != null;
1969
+ };
1970
+
1971
+
1972
+ /**
1973
+ * optional string uid = 2;
1974
+ * @return {string}
1975
+ */
1976
+ proto.Spic.AssetProto.DeleteRequest.prototype.getUid = function() {
1977
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1978
+ };
1979
+
1980
+
1981
+ /**
1982
+ * @param {string} value
1983
+ * @return {!proto.Spic.AssetProto.DeleteRequest} returns this
1984
+ */
1985
+ proto.Spic.AssetProto.DeleteRequest.prototype.setUid = function(value) {
1986
+ return jspb.Message.setOneofField(this, 2, proto.Spic.AssetProto.DeleteRequest.oneofGroups_[0], value);
1987
+ };
1988
+
1989
+
1990
+ /**
1991
+ * Clears the field making it undefined.
1992
+ * @return {!proto.Spic.AssetProto.DeleteRequest} returns this
1993
+ */
1994
+ proto.Spic.AssetProto.DeleteRequest.prototype.clearUid = function() {
1995
+ return jspb.Message.setOneofField(this, 2, proto.Spic.AssetProto.DeleteRequest.oneofGroups_[0], undefined);
1996
+ };
1997
+
1998
+
1999
+ /**
2000
+ * Returns whether this field is set.
2001
+ * @return {boolean}
2002
+ */
2003
+ proto.Spic.AssetProto.DeleteRequest.prototype.hasUid = function() {
2004
+ return jspb.Message.getField(this, 2) != null;
2005
+ };
2006
+
2007
+
2008
+
2009
+
2010
+
2011
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2012
+ /**
2013
+ * Creates an object representation of this proto.
2014
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2015
+ * Optional fields that are not set will be set to undefined.
2016
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2017
+ * For the list of reserved names please see:
2018
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2019
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2020
+ * JSPB instance for transitional soy proto support:
2021
+ * http://goto/soy-param-migration
2022
+ * @return {!Object}
2023
+ */
2024
+ proto.Spic.AssetProto.SearchRequest.prototype.toObject = function(opt_includeInstance) {
2025
+ return proto.Spic.AssetProto.SearchRequest.toObject(opt_includeInstance, this);
2026
+ };
2027
+
2028
+
2029
+ /**
2030
+ * Static version of the {@see toObject} method.
2031
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2032
+ * the JSPB instance for transitional soy proto support:
2033
+ * http://goto/soy-param-migration
2034
+ * @param {!proto.Spic.AssetProto.SearchRequest} msg The msg instance to transform.
2035
+ * @return {!Object}
2036
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2037
+ */
2038
+ proto.Spic.AssetProto.SearchRequest.toObject = function(includeInstance, msg) {
2039
+ var f, obj = {
2040
+ name: jspb.Message.getFieldWithDefault(msg, 1, ""),
2041
+ locationId: jspb.Message.getFieldWithDefault(msg, 2, 0),
2042
+ groupId: jspb.Message.getFieldWithDefault(msg, 3, ""),
2043
+ page: jspb.Message.getFieldWithDefault(msg, 4, 0),
2044
+ count: jspb.Message.getFieldWithDefault(msg, 5, 0),
2045
+ spicType: jspb.Message.getFieldWithDefault(msg, 6, 0)
2046
+ };
2047
+
2048
+ if (includeInstance) {
2049
+ obj.$jspbMessageInstance = msg;
2050
+ }
2051
+ return obj;
2052
+ };
2053
+ }
2054
+
2055
+
2056
+ /**
2057
+ * Deserializes binary data (in protobuf wire format).
2058
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2059
+ * @return {!proto.Spic.AssetProto.SearchRequest}
2060
+ */
2061
+ proto.Spic.AssetProto.SearchRequest.deserializeBinary = function(bytes) {
2062
+ var reader = new jspb.BinaryReader(bytes);
2063
+ var msg = new proto.Spic.AssetProto.SearchRequest;
2064
+ return proto.Spic.AssetProto.SearchRequest.deserializeBinaryFromReader(msg, reader);
2065
+ };
2066
+
2067
+
2068
+ /**
2069
+ * Deserializes binary data (in protobuf wire format) from the
2070
+ * given reader into the given message object.
2071
+ * @param {!proto.Spic.AssetProto.SearchRequest} msg The message object to deserialize into.
2072
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2073
+ * @return {!proto.Spic.AssetProto.SearchRequest}
2074
+ */
2075
+ proto.Spic.AssetProto.SearchRequest.deserializeBinaryFromReader = function(msg, reader) {
2076
+ while (reader.nextField()) {
2077
+ if (reader.isEndGroup()) {
2078
+ break;
2079
+ }
2080
+ var field = reader.getFieldNumber();
2081
+ switch (field) {
2082
+ case 1:
2083
+ var value = /** @type {string} */ (reader.readString());
2084
+ msg.setName(value);
2085
+ break;
2086
+ case 2:
2087
+ var value = /** @type {number} */ (reader.readInt64());
2088
+ msg.setLocationId(value);
2089
+ break;
2090
+ case 3:
2091
+ var value = /** @type {string} */ (reader.readString());
2092
+ msg.setGroupId(value);
2093
+ break;
2094
+ case 4:
2095
+ var value = /** @type {number} */ (reader.readInt32());
2096
+ msg.setPage(value);
2097
+ break;
2098
+ case 5:
2099
+ var value = /** @type {number} */ (reader.readInt32());
2100
+ msg.setCount(value);
2101
+ break;
2102
+ case 6:
2103
+ var value = /** @type {!proto.Spic.AssetProto.SpicType} */ (reader.readEnum());
2104
+ msg.setSpicType(value);
2105
+ break;
2106
+ default:
2107
+ reader.skipField();
2108
+ break;
2109
+ }
2110
+ }
2111
+ return msg;
2112
+ };
2113
+
2114
+
2115
+ /**
2116
+ * Serializes the message to binary data (in protobuf wire format).
2117
+ * @return {!Uint8Array}
2118
+ */
2119
+ proto.Spic.AssetProto.SearchRequest.prototype.serializeBinary = function() {
2120
+ var writer = new jspb.BinaryWriter();
2121
+ proto.Spic.AssetProto.SearchRequest.serializeBinaryToWriter(this, writer);
2122
+ return writer.getResultBuffer();
2123
+ };
2124
+
2125
+
2126
+ /**
2127
+ * Serializes the given message to binary data (in protobuf wire
2128
+ * format), writing to the given BinaryWriter.
2129
+ * @param {!proto.Spic.AssetProto.SearchRequest} message
2130
+ * @param {!jspb.BinaryWriter} writer
2131
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2132
+ */
2133
+ proto.Spic.AssetProto.SearchRequest.serializeBinaryToWriter = function(message, writer) {
2134
+ var f = undefined;
2135
+ f = message.getName();
2136
+ if (f.length > 0) {
2137
+ writer.writeString(
2138
+ 1,
2139
+ f
2140
+ );
2141
+ }
2142
+ f = message.getLocationId();
2143
+ if (f !== 0) {
2144
+ writer.writeInt64(
2145
+ 2,
2146
+ f
2147
+ );
2148
+ }
2149
+ f = message.getGroupId();
2150
+ if (f.length > 0) {
2151
+ writer.writeString(
2152
+ 3,
2153
+ f
2154
+ );
2155
+ }
2156
+ f = message.getPage();
2157
+ if (f !== 0) {
2158
+ writer.writeInt32(
2159
+ 4,
2160
+ f
2161
+ );
2162
+ }
2163
+ f = message.getCount();
2164
+ if (f !== 0) {
2165
+ writer.writeInt32(
2166
+ 5,
2167
+ f
2168
+ );
2169
+ }
2170
+ f = message.getSpicType();
2171
+ if (f !== 0.0) {
2172
+ writer.writeEnum(
2173
+ 6,
2174
+ f
2175
+ );
2176
+ }
2177
+ };
2178
+
2179
+
2180
+ /**
2181
+ * optional string name = 1;
2182
+ * @return {string}
2183
+ */
2184
+ proto.Spic.AssetProto.SearchRequest.prototype.getName = function() {
2185
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2186
+ };
2187
+
2188
+
2189
+ /**
2190
+ * @param {string} value
2191
+ * @return {!proto.Spic.AssetProto.SearchRequest} returns this
2192
+ */
2193
+ proto.Spic.AssetProto.SearchRequest.prototype.setName = function(value) {
2194
+ return jspb.Message.setProto3StringField(this, 1, value);
2195
+ };
2196
+
2197
+
2198
+ /**
2199
+ * optional int64 location_id = 2;
2200
+ * @return {number}
2201
+ */
2202
+ proto.Spic.AssetProto.SearchRequest.prototype.getLocationId = function() {
2203
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
2204
+ };
2205
+
2206
+
2207
+ /**
2208
+ * @param {number} value
2209
+ * @return {!proto.Spic.AssetProto.SearchRequest} returns this
2210
+ */
2211
+ proto.Spic.AssetProto.SearchRequest.prototype.setLocationId = function(value) {
2212
+ return jspb.Message.setProto3IntField(this, 2, value);
2213
+ };
2214
+
2215
+
2216
+ /**
2217
+ * optional string group_id = 3;
2218
+ * @return {string}
2219
+ */
2220
+ proto.Spic.AssetProto.SearchRequest.prototype.getGroupId = function() {
2221
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2222
+ };
2223
+
2224
+
2225
+ /**
2226
+ * @param {string} value
2227
+ * @return {!proto.Spic.AssetProto.SearchRequest} returns this
2228
+ */
2229
+ proto.Spic.AssetProto.SearchRequest.prototype.setGroupId = function(value) {
2230
+ return jspb.Message.setProto3StringField(this, 3, value);
2231
+ };
2232
+
2233
+
2234
+ /**
2235
+ * optional int32 page = 4;
2236
+ * @return {number}
2237
+ */
2238
+ proto.Spic.AssetProto.SearchRequest.prototype.getPage = function() {
2239
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
2240
+ };
2241
+
2242
+
2243
+ /**
2244
+ * @param {number} value
2245
+ * @return {!proto.Spic.AssetProto.SearchRequest} returns this
2246
+ */
2247
+ proto.Spic.AssetProto.SearchRequest.prototype.setPage = function(value) {
2248
+ return jspb.Message.setProto3IntField(this, 4, value);
2249
+ };
2250
+
2251
+
2252
+ /**
2253
+ * optional int32 count = 5;
2254
+ * @return {number}
2255
+ */
2256
+ proto.Spic.AssetProto.SearchRequest.prototype.getCount = function() {
2257
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
2258
+ };
2259
+
2260
+
2261
+ /**
2262
+ * @param {number} value
2263
+ * @return {!proto.Spic.AssetProto.SearchRequest} returns this
2264
+ */
2265
+ proto.Spic.AssetProto.SearchRequest.prototype.setCount = function(value) {
2266
+ return jspb.Message.setProto3IntField(this, 5, value);
2267
+ };
2268
+
2269
+
2270
+ /**
2271
+ * optional SpicType spic_type = 6;
2272
+ * @return {!proto.Spic.AssetProto.SpicType}
2273
+ */
2274
+ proto.Spic.AssetProto.SearchRequest.prototype.getSpicType = function() {
2275
+ return /** @type {!proto.Spic.AssetProto.SpicType} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
2276
+ };
2277
+
2278
+
2279
+ /**
2280
+ * @param {!proto.Spic.AssetProto.SpicType} value
2281
+ * @return {!proto.Spic.AssetProto.SearchRequest} returns this
2282
+ */
2283
+ proto.Spic.AssetProto.SearchRequest.prototype.setSpicType = function(value) {
2284
+ return jspb.Message.setProto3EnumField(this, 6, value);
2285
+ };
2286
+
2287
+
2288
+
2289
+ /**
2290
+ * List of repeated fields within this message type.
2291
+ * @private {!Array<number>}
2292
+ * @const
2293
+ */
2294
+ proto.Spic.AssetProto.SearchReply.repeatedFields_ = [1];
2295
+
2296
+
2297
+
2298
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2299
+ /**
2300
+ * Creates an object representation of this proto.
2301
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2302
+ * Optional fields that are not set will be set to undefined.
2303
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2304
+ * For the list of reserved names please see:
2305
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2306
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2307
+ * JSPB instance for transitional soy proto support:
2308
+ * http://goto/soy-param-migration
2309
+ * @return {!Object}
2310
+ */
2311
+ proto.Spic.AssetProto.SearchReply.prototype.toObject = function(opt_includeInstance) {
2312
+ return proto.Spic.AssetProto.SearchReply.toObject(opt_includeInstance, this);
2313
+ };
2314
+
2315
+
2316
+ /**
2317
+ * Static version of the {@see toObject} method.
2318
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2319
+ * the JSPB instance for transitional soy proto support:
2320
+ * http://goto/soy-param-migration
2321
+ * @param {!proto.Spic.AssetProto.SearchReply} msg The msg instance to transform.
2322
+ * @return {!Object}
2323
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2324
+ */
2325
+ proto.Spic.AssetProto.SearchReply.toObject = function(includeInstance, msg) {
2326
+ var f, obj = {
2327
+ assetsList: jspb.Message.toObjectList(msg.getAssetsList(),
2328
+ proto.Spic.AssetWithLocation.toObject, includeInstance),
2329
+ pagination: (f = msg.getPagination()) && platform_pagination_pb.PaginationProto.toObject(includeInstance, f)
2330
+ };
2331
+
2332
+ if (includeInstance) {
2333
+ obj.$jspbMessageInstance = msg;
2334
+ }
2335
+ return obj;
2336
+ };
2337
+ }
2338
+
2339
+
2340
+ /**
2341
+ * Deserializes binary data (in protobuf wire format).
2342
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2343
+ * @return {!proto.Spic.AssetProto.SearchReply}
2344
+ */
2345
+ proto.Spic.AssetProto.SearchReply.deserializeBinary = function(bytes) {
2346
+ var reader = new jspb.BinaryReader(bytes);
2347
+ var msg = new proto.Spic.AssetProto.SearchReply;
2348
+ return proto.Spic.AssetProto.SearchReply.deserializeBinaryFromReader(msg, reader);
2349
+ };
2350
+
2351
+
2352
+ /**
2353
+ * Deserializes binary data (in protobuf wire format) from the
2354
+ * given reader into the given message object.
2355
+ * @param {!proto.Spic.AssetProto.SearchReply} msg The message object to deserialize into.
2356
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2357
+ * @return {!proto.Spic.AssetProto.SearchReply}
2358
+ */
2359
+ proto.Spic.AssetProto.SearchReply.deserializeBinaryFromReader = function(msg, reader) {
2360
+ while (reader.nextField()) {
2361
+ if (reader.isEndGroup()) {
2362
+ break;
2363
+ }
2364
+ var field = reader.getFieldNumber();
2365
+ switch (field) {
2366
+ case 1:
2367
+ var value = new proto.Spic.AssetWithLocation;
2368
+ reader.readMessage(value,proto.Spic.AssetWithLocation.deserializeBinaryFromReader);
2369
+ msg.addAssets(value);
2370
+ break;
2371
+ case 2:
2372
+ var value = new platform_pagination_pb.PaginationProto;
2373
+ reader.readMessage(value,platform_pagination_pb.PaginationProto.deserializeBinaryFromReader);
2374
+ msg.setPagination(value);
2375
+ break;
2376
+ default:
2377
+ reader.skipField();
2378
+ break;
2379
+ }
2380
+ }
2381
+ return msg;
2382
+ };
2383
+
2384
+
2385
+ /**
2386
+ * Serializes the message to binary data (in protobuf wire format).
2387
+ * @return {!Uint8Array}
2388
+ */
2389
+ proto.Spic.AssetProto.SearchReply.prototype.serializeBinary = function() {
2390
+ var writer = new jspb.BinaryWriter();
2391
+ proto.Spic.AssetProto.SearchReply.serializeBinaryToWriter(this, writer);
2392
+ return writer.getResultBuffer();
2393
+ };
2394
+
2395
+
2396
+ /**
2397
+ * Serializes the given message to binary data (in protobuf wire
2398
+ * format), writing to the given BinaryWriter.
2399
+ * @param {!proto.Spic.AssetProto.SearchReply} message
2400
+ * @param {!jspb.BinaryWriter} writer
2401
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2402
+ */
2403
+ proto.Spic.AssetProto.SearchReply.serializeBinaryToWriter = function(message, writer) {
2404
+ var f = undefined;
2405
+ f = message.getAssetsList();
2406
+ if (f.length > 0) {
2407
+ writer.writeRepeatedMessage(
2408
+ 1,
2409
+ f,
2410
+ proto.Spic.AssetWithLocation.serializeBinaryToWriter
2411
+ );
2412
+ }
2413
+ f = message.getPagination();
2414
+ if (f != null) {
2415
+ writer.writeMessage(
2416
+ 2,
2417
+ f,
2418
+ platform_pagination_pb.PaginationProto.serializeBinaryToWriter
2419
+ );
2420
+ }
2421
+ };
2422
+
2423
+
2424
+ /**
2425
+ * repeated AssetWithLocation assets = 1;
2426
+ * @return {!Array<!proto.Spic.AssetWithLocation>}
2427
+ */
2428
+ proto.Spic.AssetProto.SearchReply.prototype.getAssetsList = function() {
2429
+ return /** @type{!Array<!proto.Spic.AssetWithLocation>} */ (
2430
+ jspb.Message.getRepeatedWrapperField(this, proto.Spic.AssetWithLocation, 1));
2431
+ };
2432
+
2433
+
2434
+ /**
2435
+ * @param {!Array<!proto.Spic.AssetWithLocation>} value
2436
+ * @return {!proto.Spic.AssetProto.SearchReply} returns this
2437
+ */
2438
+ proto.Spic.AssetProto.SearchReply.prototype.setAssetsList = function(value) {
2439
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
2440
+ };
2441
+
2442
+
2443
+ /**
2444
+ * @param {!proto.Spic.AssetWithLocation=} opt_value
2445
+ * @param {number=} opt_index
2446
+ * @return {!proto.Spic.AssetWithLocation}
2447
+ */
2448
+ proto.Spic.AssetProto.SearchReply.prototype.addAssets = function(opt_value, opt_index) {
2449
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.Spic.AssetWithLocation, opt_index);
2450
+ };
2451
+
2452
+
2453
+ /**
2454
+ * Clears the list making it empty but non-null.
2455
+ * @return {!proto.Spic.AssetProto.SearchReply} returns this
2456
+ */
2457
+ proto.Spic.AssetProto.SearchReply.prototype.clearAssetsList = function() {
2458
+ return this.setAssetsList([]);
2459
+ };
2460
+
2461
+
2462
+ /**
2463
+ * optional Platform.PaginationProto pagination = 2;
2464
+ * @return {?proto.Platform.PaginationProto}
2465
+ */
2466
+ proto.Spic.AssetProto.SearchReply.prototype.getPagination = function() {
2467
+ return /** @type{?proto.Platform.PaginationProto} */ (
2468
+ jspb.Message.getWrapperField(this, platform_pagination_pb.PaginationProto, 2));
2469
+ };
2470
+
2471
+
2472
+ /**
2473
+ * @param {?proto.Platform.PaginationProto|undefined} value
2474
+ * @return {!proto.Spic.AssetProto.SearchReply} returns this
2475
+ */
2476
+ proto.Spic.AssetProto.SearchReply.prototype.setPagination = function(value) {
2477
+ return jspb.Message.setWrapperField(this, 2, value);
2478
+ };
2479
+
2480
+
2481
+ /**
2482
+ * Clears the message field making it undefined.
2483
+ * @return {!proto.Spic.AssetProto.SearchReply} returns this
2484
+ */
2485
+ proto.Spic.AssetProto.SearchReply.prototype.clearPagination = function() {
2486
+ return this.setPagination(undefined);
2487
+ };
2488
+
2489
+
2490
+ /**
2491
+ * Returns whether this field is set.
2492
+ * @return {boolean}
2493
+ */
2494
+ proto.Spic.AssetProto.SearchReply.prototype.hasPagination = function() {
2495
+ return jspb.Message.getField(this, 2) != null;
2496
+ };
2497
+
2498
+
2499
+
2500
+
2501
+
2502
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2503
+ /**
2504
+ * Creates an object representation of this proto.
2505
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2506
+ * Optional fields that are not set will be set to undefined.
2507
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2508
+ * For the list of reserved names please see:
2509
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2510
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2511
+ * JSPB instance for transitional soy proto support:
2512
+ * http://goto/soy-param-migration
2513
+ * @return {!Object}
2514
+ */
2515
+ proto.Spic.AssetProto.LocationSearchRequest.prototype.toObject = function(opt_includeInstance) {
2516
+ return proto.Spic.AssetProto.LocationSearchRequest.toObject(opt_includeInstance, this);
2517
+ };
2518
+
2519
+
2520
+ /**
2521
+ * Static version of the {@see toObject} method.
2522
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2523
+ * the JSPB instance for transitional soy proto support:
2524
+ * http://goto/soy-param-migration
2525
+ * @param {!proto.Spic.AssetProto.LocationSearchRequest} msg The msg instance to transform.
2526
+ * @return {!Object}
2527
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2528
+ */
2529
+ proto.Spic.AssetProto.LocationSearchRequest.toObject = function(includeInstance, msg) {
2530
+ var f, obj = {
2531
+ latitude: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0),
2532
+ longitude: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
2533
+ limit: jspb.Message.getFieldWithDefault(msg, 3, 0)
2534
+ };
2535
+
2536
+ if (includeInstance) {
2537
+ obj.$jspbMessageInstance = msg;
2538
+ }
2539
+ return obj;
2540
+ };
2541
+ }
2542
+
2543
+
2544
+ /**
2545
+ * Deserializes binary data (in protobuf wire format).
2546
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2547
+ * @return {!proto.Spic.AssetProto.LocationSearchRequest}
2548
+ */
2549
+ proto.Spic.AssetProto.LocationSearchRequest.deserializeBinary = function(bytes) {
2550
+ var reader = new jspb.BinaryReader(bytes);
2551
+ var msg = new proto.Spic.AssetProto.LocationSearchRequest;
2552
+ return proto.Spic.AssetProto.LocationSearchRequest.deserializeBinaryFromReader(msg, reader);
2553
+ };
2554
+
2555
+
2556
+ /**
2557
+ * Deserializes binary data (in protobuf wire format) from the
2558
+ * given reader into the given message object.
2559
+ * @param {!proto.Spic.AssetProto.LocationSearchRequest} msg The message object to deserialize into.
2560
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2561
+ * @return {!proto.Spic.AssetProto.LocationSearchRequest}
2562
+ */
2563
+ proto.Spic.AssetProto.LocationSearchRequest.deserializeBinaryFromReader = function(msg, reader) {
2564
+ while (reader.nextField()) {
2565
+ if (reader.isEndGroup()) {
2566
+ break;
2567
+ }
2568
+ var field = reader.getFieldNumber();
2569
+ switch (field) {
2570
+ case 1:
2571
+ var value = /** @type {number} */ (reader.readDouble());
2572
+ msg.setLatitude(value);
2573
+ break;
2574
+ case 2:
2575
+ var value = /** @type {number} */ (reader.readDouble());
2576
+ msg.setLongitude(value);
2577
+ break;
2578
+ case 3:
2579
+ var value = /** @type {number} */ (reader.readInt32());
2580
+ msg.setLimit(value);
2581
+ break;
2582
+ default:
2583
+ reader.skipField();
2584
+ break;
2585
+ }
2586
+ }
2587
+ return msg;
2588
+ };
2589
+
2590
+
2591
+ /**
2592
+ * Serializes the message to binary data (in protobuf wire format).
2593
+ * @return {!Uint8Array}
2594
+ */
2595
+ proto.Spic.AssetProto.LocationSearchRequest.prototype.serializeBinary = function() {
2596
+ var writer = new jspb.BinaryWriter();
2597
+ proto.Spic.AssetProto.LocationSearchRequest.serializeBinaryToWriter(this, writer);
2598
+ return writer.getResultBuffer();
2599
+ };
2600
+
2601
+
2602
+ /**
2603
+ * Serializes the given message to binary data (in protobuf wire
2604
+ * format), writing to the given BinaryWriter.
2605
+ * @param {!proto.Spic.AssetProto.LocationSearchRequest} message
2606
+ * @param {!jspb.BinaryWriter} writer
2607
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2608
+ */
2609
+ proto.Spic.AssetProto.LocationSearchRequest.serializeBinaryToWriter = function(message, writer) {
2610
+ var f = undefined;
2611
+ f = message.getLatitude();
2612
+ if (f !== 0.0) {
2613
+ writer.writeDouble(
2614
+ 1,
2615
+ f
2616
+ );
2617
+ }
2618
+ f = message.getLongitude();
2619
+ if (f !== 0.0) {
2620
+ writer.writeDouble(
2621
+ 2,
2622
+ f
2623
+ );
2624
+ }
2625
+ f = message.getLimit();
2626
+ if (f !== 0) {
2627
+ writer.writeInt32(
2628
+ 3,
2629
+ f
2630
+ );
2631
+ }
2632
+ };
2633
+
2634
+
2635
+ /**
2636
+ * optional double latitude = 1;
2637
+ * @return {number}
2638
+ */
2639
+ proto.Spic.AssetProto.LocationSearchRequest.prototype.getLatitude = function() {
2640
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0));
2641
+ };
2642
+
2643
+
2644
+ /**
2645
+ * @param {number} value
2646
+ * @return {!proto.Spic.AssetProto.LocationSearchRequest} returns this
2647
+ */
2648
+ proto.Spic.AssetProto.LocationSearchRequest.prototype.setLatitude = function(value) {
2649
+ return jspb.Message.setProto3FloatField(this, 1, value);
2650
+ };
2651
+
2652
+
2653
+ /**
2654
+ * optional double longitude = 2;
2655
+ * @return {number}
2656
+ */
2657
+ proto.Spic.AssetProto.LocationSearchRequest.prototype.getLongitude = function() {
2658
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
2659
+ };
2660
+
2661
+
2662
+ /**
2663
+ * @param {number} value
2664
+ * @return {!proto.Spic.AssetProto.LocationSearchRequest} returns this
2665
+ */
2666
+ proto.Spic.AssetProto.LocationSearchRequest.prototype.setLongitude = function(value) {
2667
+ return jspb.Message.setProto3FloatField(this, 2, value);
2668
+ };
2669
+
2670
+
2671
+ /**
2672
+ * optional int32 limit = 3;
2673
+ * @return {number}
2674
+ */
2675
+ proto.Spic.AssetProto.LocationSearchRequest.prototype.getLimit = function() {
2676
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
2677
+ };
2678
+
2679
+
2680
+ /**
2681
+ * @param {number} value
2682
+ * @return {!proto.Spic.AssetProto.LocationSearchRequest} returns this
2683
+ */
2684
+ proto.Spic.AssetProto.LocationSearchRequest.prototype.setLimit = function(value) {
2685
+ return jspb.Message.setProto3IntField(this, 3, value);
2686
+ };
2687
+
2688
+
2689
+
2690
+ /**
2691
+ * List of repeated fields within this message type.
2692
+ * @private {!Array<number>}
2693
+ * @const
2694
+ */
2695
+ proto.Spic.AssetProto.LocationSearchReply.repeatedFields_ = [1];
2696
+
2697
+
2698
+
2699
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2700
+ /**
2701
+ * Creates an object representation of this proto.
2702
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2703
+ * Optional fields that are not set will be set to undefined.
2704
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2705
+ * For the list of reserved names please see:
2706
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2707
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2708
+ * JSPB instance for transitional soy proto support:
2709
+ * http://goto/soy-param-migration
2710
+ * @return {!Object}
2711
+ */
2712
+ proto.Spic.AssetProto.LocationSearchReply.prototype.toObject = function(opt_includeInstance) {
2713
+ return proto.Spic.AssetProto.LocationSearchReply.toObject(opt_includeInstance, this);
2714
+ };
2715
+
2716
+
2717
+ /**
2718
+ * Static version of the {@see toObject} method.
2719
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2720
+ * the JSPB instance for transitional soy proto support:
2721
+ * http://goto/soy-param-migration
2722
+ * @param {!proto.Spic.AssetProto.LocationSearchReply} msg The msg instance to transform.
2723
+ * @return {!Object}
2724
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2725
+ */
2726
+ proto.Spic.AssetProto.LocationSearchReply.toObject = function(includeInstance, msg) {
2727
+ var f, obj = {
2728
+ assetsList: jspb.Message.toObjectList(msg.getAssetsList(),
2729
+ proto.Spic.AssetWithLocationAndDistance.toObject, includeInstance)
2730
+ };
2731
+
2732
+ if (includeInstance) {
2733
+ obj.$jspbMessageInstance = msg;
2734
+ }
2735
+ return obj;
2736
+ };
2737
+ }
2738
+
2739
+
2740
+ /**
2741
+ * Deserializes binary data (in protobuf wire format).
2742
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2743
+ * @return {!proto.Spic.AssetProto.LocationSearchReply}
2744
+ */
2745
+ proto.Spic.AssetProto.LocationSearchReply.deserializeBinary = function(bytes) {
2746
+ var reader = new jspb.BinaryReader(bytes);
2747
+ var msg = new proto.Spic.AssetProto.LocationSearchReply;
2748
+ return proto.Spic.AssetProto.LocationSearchReply.deserializeBinaryFromReader(msg, reader);
2749
+ };
2750
+
2751
+
2752
+ /**
2753
+ * Deserializes binary data (in protobuf wire format) from the
2754
+ * given reader into the given message object.
2755
+ * @param {!proto.Spic.AssetProto.LocationSearchReply} msg The message object to deserialize into.
2756
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2757
+ * @return {!proto.Spic.AssetProto.LocationSearchReply}
2758
+ */
2759
+ proto.Spic.AssetProto.LocationSearchReply.deserializeBinaryFromReader = function(msg, reader) {
2760
+ while (reader.nextField()) {
2761
+ if (reader.isEndGroup()) {
2762
+ break;
2763
+ }
2764
+ var field = reader.getFieldNumber();
2765
+ switch (field) {
2766
+ case 1:
2767
+ var value = new proto.Spic.AssetWithLocationAndDistance;
2768
+ reader.readMessage(value,proto.Spic.AssetWithLocationAndDistance.deserializeBinaryFromReader);
2769
+ msg.addAssets(value);
2770
+ break;
2771
+ default:
2772
+ reader.skipField();
2773
+ break;
2774
+ }
2775
+ }
2776
+ return msg;
2777
+ };
2778
+
2779
+
2780
+ /**
2781
+ * Serializes the message to binary data (in protobuf wire format).
2782
+ * @return {!Uint8Array}
2783
+ */
2784
+ proto.Spic.AssetProto.LocationSearchReply.prototype.serializeBinary = function() {
2785
+ var writer = new jspb.BinaryWriter();
2786
+ proto.Spic.AssetProto.LocationSearchReply.serializeBinaryToWriter(this, writer);
2787
+ return writer.getResultBuffer();
2788
+ };
2789
+
2790
+
2791
+ /**
2792
+ * Serializes the given message to binary data (in protobuf wire
2793
+ * format), writing to the given BinaryWriter.
2794
+ * @param {!proto.Spic.AssetProto.LocationSearchReply} message
2795
+ * @param {!jspb.BinaryWriter} writer
2796
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2797
+ */
2798
+ proto.Spic.AssetProto.LocationSearchReply.serializeBinaryToWriter = function(message, writer) {
2799
+ var f = undefined;
2800
+ f = message.getAssetsList();
2801
+ if (f.length > 0) {
2802
+ writer.writeRepeatedMessage(
2803
+ 1,
2804
+ f,
2805
+ proto.Spic.AssetWithLocationAndDistance.serializeBinaryToWriter
2806
+ );
2807
+ }
2808
+ };
2809
+
2810
+
2811
+ /**
2812
+ * repeated AssetWithLocationAndDistance assets = 1;
2813
+ * @return {!Array<!proto.Spic.AssetWithLocationAndDistance>}
2814
+ */
2815
+ proto.Spic.AssetProto.LocationSearchReply.prototype.getAssetsList = function() {
2816
+ return /** @type{!Array<!proto.Spic.AssetWithLocationAndDistance>} */ (
2817
+ jspb.Message.getRepeatedWrapperField(this, proto.Spic.AssetWithLocationAndDistance, 1));
2818
+ };
2819
+
2820
+
2821
+ /**
2822
+ * @param {!Array<!proto.Spic.AssetWithLocationAndDistance>} value
2823
+ * @return {!proto.Spic.AssetProto.LocationSearchReply} returns this
2824
+ */
2825
+ proto.Spic.AssetProto.LocationSearchReply.prototype.setAssetsList = function(value) {
2826
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
2827
+ };
2828
+
2829
+
2830
+ /**
2831
+ * @param {!proto.Spic.AssetWithLocationAndDistance=} opt_value
2832
+ * @param {number=} opt_index
2833
+ * @return {!proto.Spic.AssetWithLocationAndDistance}
2834
+ */
2835
+ proto.Spic.AssetProto.LocationSearchReply.prototype.addAssets = function(opt_value, opt_index) {
2836
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.Spic.AssetWithLocationAndDistance, opt_index);
2837
+ };
2838
+
2839
+
2840
+ /**
2841
+ * Clears the list making it empty but non-null.
2842
+ * @return {!proto.Spic.AssetProto.LocationSearchReply} returns this
2843
+ */
2844
+ proto.Spic.AssetProto.LocationSearchReply.prototype.clearAssetsList = function() {
2845
+ return this.setAssetsList([]);
2846
+ };
2847
+
2848
+
2849
+
2850
+
2851
+
2852
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2853
+ /**
2854
+ * Creates an object representation of this proto.
2855
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2856
+ * Optional fields that are not set will be set to undefined.
2857
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2858
+ * For the list of reserved names please see:
2859
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2860
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2861
+ * JSPB instance for transitional soy proto support:
2862
+ * http://goto/soy-param-migration
2863
+ * @return {!Object}
2864
+ */
2865
+ proto.Spic.AssetProto.ReplaceBatteryRequest.prototype.toObject = function(opt_includeInstance) {
2866
+ return proto.Spic.AssetProto.ReplaceBatteryRequest.toObject(opt_includeInstance, this);
2867
+ };
2868
+
2869
+
2870
+ /**
2871
+ * Static version of the {@see toObject} method.
2872
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2873
+ * the JSPB instance for transitional soy proto support:
2874
+ * http://goto/soy-param-migration
2875
+ * @param {!proto.Spic.AssetProto.ReplaceBatteryRequest} msg The msg instance to transform.
2876
+ * @return {!Object}
2877
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2878
+ */
2879
+ proto.Spic.AssetProto.ReplaceBatteryRequest.toObject = function(includeInstance, msg) {
2880
+ var f, obj = {
2881
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
2882
+ };
2883
+
2884
+ if (includeInstance) {
2885
+ obj.$jspbMessageInstance = msg;
2886
+ }
2887
+ return obj;
2888
+ };
2889
+ }
2890
+
2891
+
2892
+ /**
2893
+ * Deserializes binary data (in protobuf wire format).
2894
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2895
+ * @return {!proto.Spic.AssetProto.ReplaceBatteryRequest}
2896
+ */
2897
+ proto.Spic.AssetProto.ReplaceBatteryRequest.deserializeBinary = function(bytes) {
2898
+ var reader = new jspb.BinaryReader(bytes);
2899
+ var msg = new proto.Spic.AssetProto.ReplaceBatteryRequest;
2900
+ return proto.Spic.AssetProto.ReplaceBatteryRequest.deserializeBinaryFromReader(msg, reader);
2901
+ };
2902
+
2903
+
2904
+ /**
2905
+ * Deserializes binary data (in protobuf wire format) from the
2906
+ * given reader into the given message object.
2907
+ * @param {!proto.Spic.AssetProto.ReplaceBatteryRequest} msg The message object to deserialize into.
2908
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2909
+ * @return {!proto.Spic.AssetProto.ReplaceBatteryRequest}
2910
+ */
2911
+ proto.Spic.AssetProto.ReplaceBatteryRequest.deserializeBinaryFromReader = function(msg, reader) {
2912
+ while (reader.nextField()) {
2913
+ if (reader.isEndGroup()) {
2914
+ break;
2915
+ }
2916
+ var field = reader.getFieldNumber();
2917
+ switch (field) {
2918
+ case 1:
2919
+ var value = /** @type {number} */ (reader.readInt64());
2920
+ msg.setId(value);
2921
+ break;
2922
+ default:
2923
+ reader.skipField();
2924
+ break;
2925
+ }
2926
+ }
2927
+ return msg;
2928
+ };
2929
+
2930
+
2931
+ /**
2932
+ * Serializes the message to binary data (in protobuf wire format).
2933
+ * @return {!Uint8Array}
2934
+ */
2935
+ proto.Spic.AssetProto.ReplaceBatteryRequest.prototype.serializeBinary = function() {
2936
+ var writer = new jspb.BinaryWriter();
2937
+ proto.Spic.AssetProto.ReplaceBatteryRequest.serializeBinaryToWriter(this, writer);
2938
+ return writer.getResultBuffer();
2939
+ };
2940
+
2941
+
2942
+ /**
2943
+ * Serializes the given message to binary data (in protobuf wire
2944
+ * format), writing to the given BinaryWriter.
2945
+ * @param {!proto.Spic.AssetProto.ReplaceBatteryRequest} message
2946
+ * @param {!jspb.BinaryWriter} writer
2947
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2948
+ */
2949
+ proto.Spic.AssetProto.ReplaceBatteryRequest.serializeBinaryToWriter = function(message, writer) {
2950
+ var f = undefined;
2951
+ f = message.getId();
2952
+ if (f !== 0) {
2953
+ writer.writeInt64(
2954
+ 1,
2955
+ f
2956
+ );
2957
+ }
2958
+ };
2959
+
2960
+
2961
+ /**
2962
+ * optional int64 id = 1;
2963
+ * @return {number}
2964
+ */
2965
+ proto.Spic.AssetProto.ReplaceBatteryRequest.prototype.getId = function() {
2966
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2967
+ };
2968
+
2969
+
2970
+ /**
2971
+ * @param {number} value
2972
+ * @return {!proto.Spic.AssetProto.ReplaceBatteryRequest} returns this
2973
+ */
2974
+ proto.Spic.AssetProto.ReplaceBatteryRequest.prototype.setId = function(value) {
2975
+ return jspb.Message.setProto3IntField(this, 1, value);
2976
+ };
2977
+
2978
+
2979
+
2980
+
2981
+
2982
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2983
+ /**
2984
+ * Creates an object representation of this proto.
2985
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2986
+ * Optional fields that are not set will be set to undefined.
2987
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2988
+ * For the list of reserved names please see:
2989
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2990
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2991
+ * JSPB instance for transitional soy proto support:
2992
+ * http://goto/soy-param-migration
2993
+ * @return {!Object}
2994
+ */
2995
+ proto.Spic.AssetProto.Image.prototype.toObject = function(opt_includeInstance) {
2996
+ return proto.Spic.AssetProto.Image.toObject(opt_includeInstance, this);
2997
+ };
2998
+
2999
+
3000
+ /**
3001
+ * Static version of the {@see toObject} method.
3002
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3003
+ * the JSPB instance for transitional soy proto support:
3004
+ * http://goto/soy-param-migration
3005
+ * @param {!proto.Spic.AssetProto.Image} msg The msg instance to transform.
3006
+ * @return {!Object}
3007
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3008
+ */
3009
+ proto.Spic.AssetProto.Image.toObject = function(includeInstance, msg) {
3010
+ var f, obj = {
3011
+
3012
+ };
3013
+
3014
+ if (includeInstance) {
3015
+ obj.$jspbMessageInstance = msg;
3016
+ }
3017
+ return obj;
3018
+ };
3019
+ }
3020
+
3021
+
3022
+ /**
3023
+ * Deserializes binary data (in protobuf wire format).
3024
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3025
+ * @return {!proto.Spic.AssetProto.Image}
3026
+ */
3027
+ proto.Spic.AssetProto.Image.deserializeBinary = function(bytes) {
3028
+ var reader = new jspb.BinaryReader(bytes);
3029
+ var msg = new proto.Spic.AssetProto.Image;
3030
+ return proto.Spic.AssetProto.Image.deserializeBinaryFromReader(msg, reader);
3031
+ };
3032
+
3033
+
3034
+ /**
3035
+ * Deserializes binary data (in protobuf wire format) from the
3036
+ * given reader into the given message object.
3037
+ * @param {!proto.Spic.AssetProto.Image} msg The message object to deserialize into.
3038
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3039
+ * @return {!proto.Spic.AssetProto.Image}
3040
+ */
3041
+ proto.Spic.AssetProto.Image.deserializeBinaryFromReader = function(msg, reader) {
3042
+ while (reader.nextField()) {
3043
+ if (reader.isEndGroup()) {
3044
+ break;
3045
+ }
3046
+ var field = reader.getFieldNumber();
3047
+ switch (field) {
3048
+ default:
3049
+ reader.skipField();
3050
+ break;
3051
+ }
3052
+ }
3053
+ return msg;
3054
+ };
3055
+
3056
+
3057
+ /**
3058
+ * Serializes the message to binary data (in protobuf wire format).
3059
+ * @return {!Uint8Array}
3060
+ */
3061
+ proto.Spic.AssetProto.Image.prototype.serializeBinary = function() {
3062
+ var writer = new jspb.BinaryWriter();
3063
+ proto.Spic.AssetProto.Image.serializeBinaryToWriter(this, writer);
3064
+ return writer.getResultBuffer();
3065
+ };
3066
+
3067
+
3068
+ /**
3069
+ * Serializes the given message to binary data (in protobuf wire
3070
+ * format), writing to the given BinaryWriter.
3071
+ * @param {!proto.Spic.AssetProto.Image} message
3072
+ * @param {!jspb.BinaryWriter} writer
3073
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3074
+ */
3075
+ proto.Spic.AssetProto.Image.serializeBinaryToWriter = function(message, writer) {
3076
+ var f = undefined;
3077
+ };
3078
+
3079
+
3080
+
3081
+
3082
+
3083
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3084
+ /**
3085
+ * Creates an object representation of this proto.
3086
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3087
+ * Optional fields that are not set will be set to undefined.
3088
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3089
+ * For the list of reserved names please see:
3090
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3091
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3092
+ * JSPB instance for transitional soy proto support:
3093
+ * http://goto/soy-param-migration
3094
+ * @return {!Object}
3095
+ */
3096
+ proto.Spic.AssetProto.Image.RetrieveRequest.prototype.toObject = function(opt_includeInstance) {
3097
+ return proto.Spic.AssetProto.Image.RetrieveRequest.toObject(opt_includeInstance, this);
3098
+ };
3099
+
3100
+
3101
+ /**
3102
+ * Static version of the {@see toObject} method.
3103
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3104
+ * the JSPB instance for transitional soy proto support:
3105
+ * http://goto/soy-param-migration
3106
+ * @param {!proto.Spic.AssetProto.Image.RetrieveRequest} msg The msg instance to transform.
3107
+ * @return {!Object}
3108
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3109
+ */
3110
+ proto.Spic.AssetProto.Image.RetrieveRequest.toObject = function(includeInstance, msg) {
3111
+ var f, obj = {
3112
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
3113
+ };
3114
+
3115
+ if (includeInstance) {
3116
+ obj.$jspbMessageInstance = msg;
3117
+ }
3118
+ return obj;
3119
+ };
3120
+ }
3121
+
3122
+
3123
+ /**
3124
+ * Deserializes binary data (in protobuf wire format).
3125
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3126
+ * @return {!proto.Spic.AssetProto.Image.RetrieveRequest}
3127
+ */
3128
+ proto.Spic.AssetProto.Image.RetrieveRequest.deserializeBinary = function(bytes) {
3129
+ var reader = new jspb.BinaryReader(bytes);
3130
+ var msg = new proto.Spic.AssetProto.Image.RetrieveRequest;
3131
+ return proto.Spic.AssetProto.Image.RetrieveRequest.deserializeBinaryFromReader(msg, reader);
3132
+ };
3133
+
3134
+
3135
+ /**
3136
+ * Deserializes binary data (in protobuf wire format) from the
3137
+ * given reader into the given message object.
3138
+ * @param {!proto.Spic.AssetProto.Image.RetrieveRequest} msg The message object to deserialize into.
3139
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3140
+ * @return {!proto.Spic.AssetProto.Image.RetrieveRequest}
3141
+ */
3142
+ proto.Spic.AssetProto.Image.RetrieveRequest.deserializeBinaryFromReader = function(msg, reader) {
3143
+ while (reader.nextField()) {
3144
+ if (reader.isEndGroup()) {
3145
+ break;
3146
+ }
3147
+ var field = reader.getFieldNumber();
3148
+ switch (field) {
3149
+ case 1:
3150
+ var value = /** @type {number} */ (reader.readInt64());
3151
+ msg.setId(value);
3152
+ break;
3153
+ default:
3154
+ reader.skipField();
3155
+ break;
3156
+ }
3157
+ }
3158
+ return msg;
3159
+ };
3160
+
3161
+
3162
+ /**
3163
+ * Serializes the message to binary data (in protobuf wire format).
3164
+ * @return {!Uint8Array}
3165
+ */
3166
+ proto.Spic.AssetProto.Image.RetrieveRequest.prototype.serializeBinary = function() {
3167
+ var writer = new jspb.BinaryWriter();
3168
+ proto.Spic.AssetProto.Image.RetrieveRequest.serializeBinaryToWriter(this, writer);
3169
+ return writer.getResultBuffer();
3170
+ };
3171
+
3172
+
3173
+ /**
3174
+ * Serializes the given message to binary data (in protobuf wire
3175
+ * format), writing to the given BinaryWriter.
3176
+ * @param {!proto.Spic.AssetProto.Image.RetrieveRequest} message
3177
+ * @param {!jspb.BinaryWriter} writer
3178
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3179
+ */
3180
+ proto.Spic.AssetProto.Image.RetrieveRequest.serializeBinaryToWriter = function(message, writer) {
3181
+ var f = undefined;
3182
+ f = message.getId();
3183
+ if (f !== 0) {
3184
+ writer.writeInt64(
3185
+ 1,
3186
+ f
3187
+ );
3188
+ }
3189
+ };
3190
+
3191
+
3192
+ /**
3193
+ * optional int64 id = 1;
3194
+ * @return {number}
3195
+ */
3196
+ proto.Spic.AssetProto.Image.RetrieveRequest.prototype.getId = function() {
3197
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
3198
+ };
3199
+
3200
+
3201
+ /**
3202
+ * @param {number} value
3203
+ * @return {!proto.Spic.AssetProto.Image.RetrieveRequest} returns this
3204
+ */
3205
+ proto.Spic.AssetProto.Image.RetrieveRequest.prototype.setId = function(value) {
3206
+ return jspb.Message.setProto3IntField(this, 1, value);
3207
+ };
3208
+
3209
+
3210
+
3211
+
3212
+
3213
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3214
+ /**
3215
+ * Creates an object representation of this proto.
3216
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3217
+ * Optional fields that are not set will be set to undefined.
3218
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3219
+ * For the list of reserved names please see:
3220
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3221
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3222
+ * JSPB instance for transitional soy proto support:
3223
+ * http://goto/soy-param-migration
3224
+ * @return {!Object}
3225
+ */
3226
+ proto.Spic.AssetProto.Image.RetrieveReply.prototype.toObject = function(opt_includeInstance) {
3227
+ return proto.Spic.AssetProto.Image.RetrieveReply.toObject(opt_includeInstance, this);
3228
+ };
3229
+
3230
+
3231
+ /**
3232
+ * Static version of the {@see toObject} method.
3233
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3234
+ * the JSPB instance for transitional soy proto support:
3235
+ * http://goto/soy-param-migration
3236
+ * @param {!proto.Spic.AssetProto.Image.RetrieveReply} msg The msg instance to transform.
3237
+ * @return {!Object}
3238
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3239
+ */
3240
+ proto.Spic.AssetProto.Image.RetrieveReply.toObject = function(includeInstance, msg) {
3241
+ var f, obj = {
3242
+ data: msg.getData_asB64()
3243
+ };
3244
+
3245
+ if (includeInstance) {
3246
+ obj.$jspbMessageInstance = msg;
3247
+ }
3248
+ return obj;
3249
+ };
3250
+ }
3251
+
3252
+
3253
+ /**
3254
+ * Deserializes binary data (in protobuf wire format).
3255
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3256
+ * @return {!proto.Spic.AssetProto.Image.RetrieveReply}
3257
+ */
3258
+ proto.Spic.AssetProto.Image.RetrieveReply.deserializeBinary = function(bytes) {
3259
+ var reader = new jspb.BinaryReader(bytes);
3260
+ var msg = new proto.Spic.AssetProto.Image.RetrieveReply;
3261
+ return proto.Spic.AssetProto.Image.RetrieveReply.deserializeBinaryFromReader(msg, reader);
3262
+ };
3263
+
3264
+
3265
+ /**
3266
+ * Deserializes binary data (in protobuf wire format) from the
3267
+ * given reader into the given message object.
3268
+ * @param {!proto.Spic.AssetProto.Image.RetrieveReply} msg The message object to deserialize into.
3269
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3270
+ * @return {!proto.Spic.AssetProto.Image.RetrieveReply}
3271
+ */
3272
+ proto.Spic.AssetProto.Image.RetrieveReply.deserializeBinaryFromReader = function(msg, reader) {
3273
+ while (reader.nextField()) {
3274
+ if (reader.isEndGroup()) {
3275
+ break;
3276
+ }
3277
+ var field = reader.getFieldNumber();
3278
+ switch (field) {
3279
+ case 1:
3280
+ var value = /** @type {!Uint8Array} */ (reader.readBytes());
3281
+ msg.setData(value);
3282
+ break;
3283
+ default:
3284
+ reader.skipField();
3285
+ break;
3286
+ }
3287
+ }
3288
+ return msg;
3289
+ };
3290
+
3291
+
3292
+ /**
3293
+ * Serializes the message to binary data (in protobuf wire format).
3294
+ * @return {!Uint8Array}
3295
+ */
3296
+ proto.Spic.AssetProto.Image.RetrieveReply.prototype.serializeBinary = function() {
3297
+ var writer = new jspb.BinaryWriter();
3298
+ proto.Spic.AssetProto.Image.RetrieveReply.serializeBinaryToWriter(this, writer);
3299
+ return writer.getResultBuffer();
3300
+ };
3301
+
3302
+
3303
+ /**
3304
+ * Serializes the given message to binary data (in protobuf wire
3305
+ * format), writing to the given BinaryWriter.
3306
+ * @param {!proto.Spic.AssetProto.Image.RetrieveReply} message
3307
+ * @param {!jspb.BinaryWriter} writer
3308
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3309
+ */
3310
+ proto.Spic.AssetProto.Image.RetrieveReply.serializeBinaryToWriter = function(message, writer) {
3311
+ var f = undefined;
3312
+ f = message.getData_asU8();
3313
+ if (f.length > 0) {
3314
+ writer.writeBytes(
3315
+ 1,
3316
+ f
3317
+ );
3318
+ }
3319
+ };
3320
+
3321
+
3322
+ /**
3323
+ * optional bytes data = 1;
3324
+ * @return {!(string|Uint8Array)}
3325
+ */
3326
+ proto.Spic.AssetProto.Image.RetrieveReply.prototype.getData = function() {
3327
+ return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3328
+ };
3329
+
3330
+
3331
+ /**
3332
+ * optional bytes data = 1;
3333
+ * This is a type-conversion wrapper around `getData()`
3334
+ * @return {string}
3335
+ */
3336
+ proto.Spic.AssetProto.Image.RetrieveReply.prototype.getData_asB64 = function() {
3337
+ return /** @type {string} */ (jspb.Message.bytesAsB64(
3338
+ this.getData()));
3339
+ };
3340
+
3341
+
3342
+ /**
3343
+ * optional bytes data = 1;
3344
+ * Note that Uint8Array is not supported on all browsers.
3345
+ * @see http://caniuse.com/Uint8Array
3346
+ * This is a type-conversion wrapper around `getData()`
3347
+ * @return {!Uint8Array}
3348
+ */
3349
+ proto.Spic.AssetProto.Image.RetrieveReply.prototype.getData_asU8 = function() {
3350
+ return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
3351
+ this.getData()));
3352
+ };
3353
+
3354
+
3355
+ /**
3356
+ * @param {!(string|Uint8Array)} value
3357
+ * @return {!proto.Spic.AssetProto.Image.RetrieveReply} returns this
3358
+ */
3359
+ proto.Spic.AssetProto.Image.RetrieveReply.prototype.setData = function(value) {
3360
+ return jspb.Message.setProto3BytesField(this, 1, value);
3361
+ };
3362
+
3363
+
3364
+
3365
+
3366
+
3367
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3368
+ /**
3369
+ * Creates an object representation of this proto.
3370
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3371
+ * Optional fields that are not set will be set to undefined.
3372
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3373
+ * For the list of reserved names please see:
3374
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3375
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3376
+ * JSPB instance for transitional soy proto support:
3377
+ * http://goto/soy-param-migration
3378
+ * @return {!Object}
3379
+ */
3380
+ proto.Spic.AssetProto.Component.prototype.toObject = function(opt_includeInstance) {
3381
+ return proto.Spic.AssetProto.Component.toObject(opt_includeInstance, this);
3382
+ };
3383
+
3384
+
3385
+ /**
3386
+ * Static version of the {@see toObject} method.
3387
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3388
+ * the JSPB instance for transitional soy proto support:
3389
+ * http://goto/soy-param-migration
3390
+ * @param {!proto.Spic.AssetProto.Component} msg The msg instance to transform.
3391
+ * @return {!Object}
3392
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3393
+ */
3394
+ proto.Spic.AssetProto.Component.toObject = function(includeInstance, msg) {
3395
+ var f, obj = {
3396
+ name: jspb.Message.getFieldWithDefault(msg, 1, ""),
3397
+ value: jspb.Message.getFieldWithDefault(msg, 2, ""),
3398
+ domain: jspb.Message.getFieldWithDefault(msg, 3, ""),
3399
+ lastUpdated: (f = msg.getLastUpdated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
3400
+ attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : []
3401
+ };
3402
+
3403
+ if (includeInstance) {
3404
+ obj.$jspbMessageInstance = msg;
3405
+ }
3406
+ return obj;
3407
+ };
3408
+ }
3409
+
3410
+
3411
+ /**
3412
+ * Deserializes binary data (in protobuf wire format).
3413
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3414
+ * @return {!proto.Spic.AssetProto.Component}
3415
+ */
3416
+ proto.Spic.AssetProto.Component.deserializeBinary = function(bytes) {
3417
+ var reader = new jspb.BinaryReader(bytes);
3418
+ var msg = new proto.Spic.AssetProto.Component;
3419
+ return proto.Spic.AssetProto.Component.deserializeBinaryFromReader(msg, reader);
3420
+ };
3421
+
3422
+
3423
+ /**
3424
+ * Deserializes binary data (in protobuf wire format) from the
3425
+ * given reader into the given message object.
3426
+ * @param {!proto.Spic.AssetProto.Component} msg The message object to deserialize into.
3427
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3428
+ * @return {!proto.Spic.AssetProto.Component}
3429
+ */
3430
+ proto.Spic.AssetProto.Component.deserializeBinaryFromReader = function(msg, reader) {
3431
+ while (reader.nextField()) {
3432
+ if (reader.isEndGroup()) {
3433
+ break;
3434
+ }
3435
+ var field = reader.getFieldNumber();
3436
+ switch (field) {
3437
+ case 1:
3438
+ var value = /** @type {string} */ (reader.readString());
3439
+ msg.setName(value);
3440
+ break;
3441
+ case 2:
3442
+ var value = /** @type {string} */ (reader.readString());
3443
+ msg.setValue(value);
3444
+ break;
3445
+ case 3:
3446
+ var value = /** @type {string} */ (reader.readString());
3447
+ msg.setDomain(value);
3448
+ break;
3449
+ case 4:
3450
+ var value = new google_protobuf_timestamp_pb.Timestamp;
3451
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
3452
+ msg.setLastUpdated(value);
3453
+ break;
3454
+ case 5:
3455
+ var value = msg.getAttributesMap();
3456
+ reader.readMessage(value, function(message, reader) {
3457
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
3458
+ });
3459
+ break;
3460
+ default:
3461
+ reader.skipField();
3462
+ break;
3463
+ }
3464
+ }
3465
+ return msg;
3466
+ };
3467
+
3468
+
3469
+ /**
3470
+ * Serializes the message to binary data (in protobuf wire format).
3471
+ * @return {!Uint8Array}
3472
+ */
3473
+ proto.Spic.AssetProto.Component.prototype.serializeBinary = function() {
3474
+ var writer = new jspb.BinaryWriter();
3475
+ proto.Spic.AssetProto.Component.serializeBinaryToWriter(this, writer);
3476
+ return writer.getResultBuffer();
3477
+ };
3478
+
3479
+
3480
+ /**
3481
+ * Serializes the given message to binary data (in protobuf wire
3482
+ * format), writing to the given BinaryWriter.
3483
+ * @param {!proto.Spic.AssetProto.Component} message
3484
+ * @param {!jspb.BinaryWriter} writer
3485
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3486
+ */
3487
+ proto.Spic.AssetProto.Component.serializeBinaryToWriter = function(message, writer) {
3488
+ var f = undefined;
3489
+ f = message.getName();
3490
+ if (f.length > 0) {
3491
+ writer.writeString(
3492
+ 1,
3493
+ f
3494
+ );
3495
+ }
3496
+ f = message.getValue();
3497
+ if (f.length > 0) {
3498
+ writer.writeString(
3499
+ 2,
3500
+ f
3501
+ );
3502
+ }
3503
+ f = message.getDomain();
3504
+ if (f.length > 0) {
3505
+ writer.writeString(
3506
+ 3,
3507
+ f
3508
+ );
3509
+ }
3510
+ f = message.getLastUpdated();
3511
+ if (f != null) {
3512
+ writer.writeMessage(
3513
+ 4,
3514
+ f,
3515
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
3516
+ );
3517
+ }
3518
+ f = message.getAttributesMap(true);
3519
+ if (f && f.getLength() > 0) {
3520
+ f.serializeBinary(5, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
3521
+ }
3522
+ };
3523
+
3524
+
3525
+ /**
3526
+ * optional string name = 1;
3527
+ * @return {string}
3528
+ */
3529
+ proto.Spic.AssetProto.Component.prototype.getName = function() {
3530
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3531
+ };
3532
+
3533
+
3534
+ /**
3535
+ * @param {string} value
3536
+ * @return {!proto.Spic.AssetProto.Component} returns this
3537
+ */
3538
+ proto.Spic.AssetProto.Component.prototype.setName = function(value) {
3539
+ return jspb.Message.setProto3StringField(this, 1, value);
3540
+ };
3541
+
3542
+
3543
+ /**
3544
+ * optional string value = 2;
3545
+ * @return {string}
3546
+ */
3547
+ proto.Spic.AssetProto.Component.prototype.getValue = function() {
3548
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3549
+ };
3550
+
3551
+
3552
+ /**
3553
+ * @param {string} value
3554
+ * @return {!proto.Spic.AssetProto.Component} returns this
3555
+ */
3556
+ proto.Spic.AssetProto.Component.prototype.setValue = function(value) {
3557
+ return jspb.Message.setProto3StringField(this, 2, value);
3558
+ };
3559
+
3560
+
3561
+ /**
3562
+ * optional string domain = 3;
3563
+ * @return {string}
3564
+ */
3565
+ proto.Spic.AssetProto.Component.prototype.getDomain = function() {
3566
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
3567
+ };
3568
+
3569
+
3570
+ /**
3571
+ * @param {string} value
3572
+ * @return {!proto.Spic.AssetProto.Component} returns this
3573
+ */
3574
+ proto.Spic.AssetProto.Component.prototype.setDomain = function(value) {
3575
+ return jspb.Message.setProto3StringField(this, 3, value);
3576
+ };
3577
+
3578
+
3579
+ /**
3580
+ * optional google.protobuf.Timestamp last_updated = 4;
3581
+ * @return {?proto.google.protobuf.Timestamp}
3582
+ */
3583
+ proto.Spic.AssetProto.Component.prototype.getLastUpdated = function() {
3584
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
3585
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
3586
+ };
3587
+
3588
+
3589
+ /**
3590
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
3591
+ * @return {!proto.Spic.AssetProto.Component} returns this
3592
+ */
3593
+ proto.Spic.AssetProto.Component.prototype.setLastUpdated = function(value) {
3594
+ return jspb.Message.setWrapperField(this, 4, value);
3595
+ };
3596
+
3597
+
3598
+ /**
3599
+ * Clears the message field making it undefined.
3600
+ * @return {!proto.Spic.AssetProto.Component} returns this
3601
+ */
3602
+ proto.Spic.AssetProto.Component.prototype.clearLastUpdated = function() {
3603
+ return this.setLastUpdated(undefined);
3604
+ };
3605
+
3606
+
3607
+ /**
3608
+ * Returns whether this field is set.
3609
+ * @return {boolean}
3610
+ */
3611
+ proto.Spic.AssetProto.Component.prototype.hasLastUpdated = function() {
3612
+ return jspb.Message.getField(this, 4) != null;
3613
+ };
3614
+
3615
+
3616
+ /**
3617
+ * map<string, string> attributes = 5;
3618
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
3619
+ * empty, instead returning `undefined`
3620
+ * @return {!jspb.Map<string,string>}
3621
+ */
3622
+ proto.Spic.AssetProto.Component.prototype.getAttributesMap = function(opt_noLazyCreate) {
3623
+ return /** @type {!jspb.Map<string,string>} */ (
3624
+ jspb.Message.getMapField(this, 5, opt_noLazyCreate,
3625
+ null));
3626
+ };
3627
+
3628
+
3629
+ /**
3630
+ * Clears values from the map. The map will be non-null.
3631
+ * @return {!proto.Spic.AssetProto.Component} returns this
3632
+ */
3633
+ proto.Spic.AssetProto.Component.prototype.clearAttributesMap = function() {
3634
+ this.getAttributesMap().clear();
3635
+ return this;
3636
+ };
3637
+
3638
+
3639
+ /**
3640
+ * optional int64 id = 1;
3641
+ * @return {number}
3642
+ */
3643
+ proto.Spic.AssetProto.prototype.getId = function() {
3644
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
3645
+ };
3646
+
3647
+
3648
+ /**
3649
+ * @param {number} value
3650
+ * @return {!proto.Spic.AssetProto} returns this
3651
+ */
3652
+ proto.Spic.AssetProto.prototype.setId = function(value) {
3653
+ return jspb.Message.setProto3IntField(this, 1, value);
3654
+ };
3655
+
3656
+
3657
+ /**
3658
+ * optional string name = 2;
3659
+ * @return {string}
3660
+ */
3661
+ proto.Spic.AssetProto.prototype.getName = function() {
3662
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3663
+ };
3664
+
3665
+
3666
+ /**
3667
+ * @param {string} value
3668
+ * @return {!proto.Spic.AssetProto} returns this
3669
+ */
3670
+ proto.Spic.AssetProto.prototype.setName = function(value) {
3671
+ return jspb.Message.setProto3StringField(this, 2, value);
3672
+ };
3673
+
3674
+
3675
+ /**
3676
+ * optional int64 location_id = 3;
3677
+ * @return {number}
3678
+ */
3679
+ proto.Spic.AssetProto.prototype.getLocationId = function() {
3680
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
3681
+ };
3682
+
3683
+
3684
+ /**
3685
+ * @param {number} value
3686
+ * @return {!proto.Spic.AssetProto} returns this
3687
+ */
3688
+ proto.Spic.AssetProto.prototype.setLocationId = function(value) {
3689
+ return jspb.Message.setProto3IntField(this, 3, value);
3690
+ };
3691
+
3692
+
3693
+ /**
3694
+ * optional string uid = 4;
3695
+ * @return {string}
3696
+ */
3697
+ proto.Spic.AssetProto.prototype.getUid = function() {
3698
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
3699
+ };
3700
+
3701
+
3702
+ /**
3703
+ * @param {string} value
3704
+ * @return {!proto.Spic.AssetProto} returns this
3705
+ */
3706
+ proto.Spic.AssetProto.prototype.setUid = function(value) {
3707
+ return jspb.Message.setProto3StringField(this, 4, value);
3708
+ };
3709
+
3710
+
3711
+ /**
3712
+ * optional google.protobuf.Timestamp last_status_update = 7;
3713
+ * @return {?proto.google.protobuf.Timestamp}
3714
+ */
3715
+ proto.Spic.AssetProto.prototype.getLastStatusUpdate = function() {
3716
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
3717
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7));
3718
+ };
3719
+
3720
+
3721
+ /**
3722
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
3723
+ * @return {!proto.Spic.AssetProto} returns this
3724
+ */
3725
+ proto.Spic.AssetProto.prototype.setLastStatusUpdate = function(value) {
3726
+ return jspb.Message.setWrapperField(this, 7, value);
3727
+ };
3728
+
3729
+
3730
+ /**
3731
+ * Clears the message field making it undefined.
3732
+ * @return {!proto.Spic.AssetProto} returns this
3733
+ */
3734
+ proto.Spic.AssetProto.prototype.clearLastStatusUpdate = function() {
3735
+ return this.setLastStatusUpdate(undefined);
3736
+ };
3737
+
3738
+
3739
+ /**
3740
+ * Returns whether this field is set.
3741
+ * @return {boolean}
3742
+ */
3743
+ proto.Spic.AssetProto.prototype.hasLastStatusUpdate = function() {
3744
+ return jspb.Message.getField(this, 7) != null;
3745
+ };
3746
+
3747
+
3748
+ /**
3749
+ * optional string group_id = 8;
3750
+ * @return {string}
3751
+ */
3752
+ proto.Spic.AssetProto.prototype.getGroupId = function() {
3753
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
3754
+ };
3755
+
3756
+
3757
+ /**
3758
+ * @param {string} value
3759
+ * @return {!proto.Spic.AssetProto} returns this
3760
+ */
3761
+ proto.Spic.AssetProto.prototype.setGroupId = function(value) {
3762
+ return jspb.Message.setProto3StringField(this, 8, value);
3763
+ };
3764
+
3765
+
3766
+ /**
3767
+ * optional int32 client_id = 9;
3768
+ * @return {number}
3769
+ */
3770
+ proto.Spic.AssetProto.prototype.getClientId = function() {
3771
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
3772
+ };
3773
+
3774
+
3775
+ /**
3776
+ * @param {number} value
3777
+ * @return {!proto.Spic.AssetProto} returns this
3778
+ */
3779
+ proto.Spic.AssetProto.prototype.setClientId = function(value) {
3780
+ return jspb.Message.setProto3IntField(this, 9, value);
3781
+ };
3782
+
3783
+
3784
+ /**
3785
+ * optional bool is_maintenance = 10;
3786
+ * @return {boolean}
3787
+ */
3788
+ proto.Spic.AssetProto.prototype.getIsMaintenance = function() {
3789
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false));
3790
+ };
3791
+
3792
+
3793
+ /**
3794
+ * @param {boolean} value
3795
+ * @return {!proto.Spic.AssetProto} returns this
3796
+ */
3797
+ proto.Spic.AssetProto.prototype.setIsMaintenance = function(value) {
3798
+ return jspb.Message.setProto3BooleanField(this, 10, value);
3799
+ };
3800
+
3801
+
3802
+ /**
3803
+ * optional string image_blob = 11;
3804
+ * @return {string}
3805
+ */
3806
+ proto.Spic.AssetProto.prototype.getImageBlob = function() {
3807
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
3808
+ };
3809
+
3810
+
3811
+ /**
3812
+ * @param {string} value
3813
+ * @return {!proto.Spic.AssetProto} returns this
3814
+ */
3815
+ proto.Spic.AssetProto.prototype.setImageBlob = function(value) {
3816
+ return jspb.Message.setProto3StringField(this, 11, value);
3817
+ };
3818
+
3819
+
3820
+ /**
3821
+ * optional google.protobuf.Timestamp battery_placed = 12;
3822
+ * @return {?proto.google.protobuf.Timestamp}
3823
+ */
3824
+ proto.Spic.AssetProto.prototype.getBatteryPlaced = function() {
3825
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
3826
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 12));
3827
+ };
3828
+
3829
+
3830
+ /**
3831
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
3832
+ * @return {!proto.Spic.AssetProto} returns this
3833
+ */
3834
+ proto.Spic.AssetProto.prototype.setBatteryPlaced = function(value) {
3835
+ return jspb.Message.setWrapperField(this, 12, value);
3836
+ };
3837
+
3838
+
3839
+ /**
3840
+ * Clears the message field making it undefined.
3841
+ * @return {!proto.Spic.AssetProto} returns this
3842
+ */
3843
+ proto.Spic.AssetProto.prototype.clearBatteryPlaced = function() {
3844
+ return this.setBatteryPlaced(undefined);
3845
+ };
3846
+
3847
+
3848
+ /**
3849
+ * Returns whether this field is set.
3850
+ * @return {boolean}
3851
+ */
3852
+ proto.Spic.AssetProto.prototype.hasBatteryPlaced = function() {
3853
+ return jspb.Message.getField(this, 12) != null;
3854
+ };
3855
+
3856
+
3857
+ /**
3858
+ * optional int32 battery_percentage = 13;
3859
+ * @return {number}
3860
+ */
3861
+ proto.Spic.AssetProto.prototype.getBatteryPercentage = function() {
3862
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 13, 0));
3863
+ };
3864
+
3865
+
3866
+ /**
3867
+ * @param {number} value
3868
+ * @return {!proto.Spic.AssetProto} returns this
3869
+ */
3870
+ proto.Spic.AssetProto.prototype.setBatteryPercentage = function(value) {
3871
+ return jspb.Message.setProto3IntField(this, 13, value);
3872
+ };
3873
+
3874
+
3875
+ /**
3876
+ * optional int64 communication_time = 14;
3877
+ * @return {number}
3878
+ */
3879
+ proto.Spic.AssetProto.prototype.getCommunicationTime = function() {
3880
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0));
3881
+ };
3882
+
3883
+
3884
+ /**
3885
+ * @param {number} value
3886
+ * @return {!proto.Spic.AssetProto} returns this
3887
+ */
3888
+ proto.Spic.AssetProto.prototype.setCommunicationTime = function(value) {
3889
+ return jspb.Message.setProto3IntField(this, 14, value);
3890
+ };
3891
+
3892
+
3893
+ /**
3894
+ * optional string last_config_string = 15;
3895
+ * @return {string}
3896
+ */
3897
+ proto.Spic.AssetProto.prototype.getLastConfigString = function() {
3898
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, ""));
3899
+ };
3900
+
3901
+
3902
+ /**
3903
+ * @param {string} value
3904
+ * @return {!proto.Spic.AssetProto} returns this
3905
+ */
3906
+ proto.Spic.AssetProto.prototype.setLastConfigString = function(value) {
3907
+ return jspb.Message.setProto3StringField(this, 15, value);
3908
+ };
3909
+
3910
+
3911
+ /**
3912
+ * optional google.protobuf.Timestamp last_config_updated = 16;
3913
+ * @return {?proto.google.protobuf.Timestamp}
3914
+ */
3915
+ proto.Spic.AssetProto.prototype.getLastConfigUpdated = function() {
3916
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
3917
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 16));
3918
+ };
3919
+
3920
+
3921
+ /**
3922
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
3923
+ * @return {!proto.Spic.AssetProto} returns this
3924
+ */
3925
+ proto.Spic.AssetProto.prototype.setLastConfigUpdated = function(value) {
3926
+ return jspb.Message.setWrapperField(this, 16, value);
3927
+ };
3928
+
3929
+
3930
+ /**
3931
+ * Clears the message field making it undefined.
3932
+ * @return {!proto.Spic.AssetProto} returns this
3933
+ */
3934
+ proto.Spic.AssetProto.prototype.clearLastConfigUpdated = function() {
3935
+ return this.setLastConfigUpdated(undefined);
3936
+ };
3937
+
3938
+
3939
+ /**
3940
+ * Returns whether this field is set.
3941
+ * @return {boolean}
3942
+ */
3943
+ proto.Spic.AssetProto.prototype.hasLastConfigUpdated = function() {
3944
+ return jspb.Message.getField(this, 16) != null;
3945
+ };
3946
+
3947
+
3948
+ /**
3949
+ * optional SpicType spic_type = 17;
3950
+ * @return {!proto.Spic.AssetProto.SpicType}
3951
+ */
3952
+ proto.Spic.AssetProto.prototype.getSpicType = function() {
3953
+ return /** @type {!proto.Spic.AssetProto.SpicType} */ (jspb.Message.getFieldWithDefault(this, 17, 0));
3954
+ };
3955
+
3956
+
3957
+ /**
3958
+ * @param {!proto.Spic.AssetProto.SpicType} value
3959
+ * @return {!proto.Spic.AssetProto} returns this
3960
+ */
3961
+ proto.Spic.AssetProto.prototype.setSpicType = function(value) {
3962
+ return jspb.Message.setProto3EnumField(this, 17, value);
3963
+ };
3964
+
3965
+
3966
+ /**
3967
+ * optional BatteryStatus battery_status = 18;
3968
+ * @return {!proto.Spic.AssetProto.BatteryStatus}
3969
+ */
3970
+ proto.Spic.AssetProto.prototype.getBatteryStatus = function() {
3971
+ return /** @type {!proto.Spic.AssetProto.BatteryStatus} */ (jspb.Message.getFieldWithDefault(this, 18, 0));
3972
+ };
3973
+
3974
+
3975
+ /**
3976
+ * @param {!proto.Spic.AssetProto.BatteryStatus} value
3977
+ * @return {!proto.Spic.AssetProto} returns this
3978
+ */
3979
+ proto.Spic.AssetProto.prototype.setBatteryStatus = function(value) {
3980
+ return jspb.Message.setProto3EnumField(this, 18, value);
3981
+ };
3982
+
3983
+
3984
+ /**
3985
+ * repeated Component components = 19;
3986
+ * @return {!Array<!proto.Spic.AssetProto.Component>}
3987
+ */
3988
+ proto.Spic.AssetProto.prototype.getComponentsList = function() {
3989
+ return /** @type{!Array<!proto.Spic.AssetProto.Component>} */ (
3990
+ jspb.Message.getRepeatedWrapperField(this, proto.Spic.AssetProto.Component, 19));
3991
+ };
3992
+
3993
+
3994
+ /**
3995
+ * @param {!Array<!proto.Spic.AssetProto.Component>} value
3996
+ * @return {!proto.Spic.AssetProto} returns this
3997
+ */
3998
+ proto.Spic.AssetProto.prototype.setComponentsList = function(value) {
3999
+ return jspb.Message.setRepeatedWrapperField(this, 19, value);
4000
+ };
4001
+
4002
+
4003
+ /**
4004
+ * @param {!proto.Spic.AssetProto.Component=} opt_value
4005
+ * @param {number=} opt_index
4006
+ * @return {!proto.Spic.AssetProto.Component}
4007
+ */
4008
+ proto.Spic.AssetProto.prototype.addComponents = function(opt_value, opt_index) {
4009
+ return jspb.Message.addToRepeatedWrapperField(this, 19, opt_value, proto.Spic.AssetProto.Component, opt_index);
4010
+ };
4011
+
4012
+
4013
+ /**
4014
+ * Clears the list making it empty but non-null.
4015
+ * @return {!proto.Spic.AssetProto} returns this
4016
+ */
4017
+ proto.Spic.AssetProto.prototype.clearComponentsList = function() {
4018
+ return this.setComponentsList([]);
4019
+ };
4020
+
4021
+
4022
+ /**
4023
+ * optional DeviceType device_type = 20;
4024
+ * @return {!proto.Spic.AssetProto.DeviceType}
4025
+ */
4026
+ proto.Spic.AssetProto.prototype.getDeviceType = function() {
4027
+ return /** @type {!proto.Spic.AssetProto.DeviceType} */ (jspb.Message.getFieldWithDefault(this, 20, 0));
4028
+ };
4029
+
4030
+
4031
+ /**
4032
+ * @param {!proto.Spic.AssetProto.DeviceType} value
4033
+ * @return {!proto.Spic.AssetProto} returns this
4034
+ */
4035
+ proto.Spic.AssetProto.prototype.setDeviceType = function(value) {
4036
+ return jspb.Message.setProto3EnumField(this, 20, value);
4037
+ };
4038
+
4039
+
4040
+
4041
+
4042
+
4043
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4044
+ /**
4045
+ * Creates an object representation of this proto.
4046
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4047
+ * Optional fields that are not set will be set to undefined.
4048
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4049
+ * For the list of reserved names please see:
4050
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4051
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4052
+ * JSPB instance for transitional soy proto support:
4053
+ * http://goto/soy-param-migration
4054
+ * @return {!Object}
4055
+ */
4056
+ proto.Spic.AssetWithLocation.prototype.toObject = function(opt_includeInstance) {
4057
+ return proto.Spic.AssetWithLocation.toObject(opt_includeInstance, this);
4058
+ };
4059
+
4060
+
4061
+ /**
4062
+ * Static version of the {@see toObject} method.
4063
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4064
+ * the JSPB instance for transitional soy proto support:
4065
+ * http://goto/soy-param-migration
4066
+ * @param {!proto.Spic.AssetWithLocation} msg The msg instance to transform.
4067
+ * @return {!Object}
4068
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4069
+ */
4070
+ proto.Spic.AssetWithLocation.toObject = function(includeInstance, msg) {
4071
+ var f, obj = {
4072
+ asset: (f = msg.getAsset()) && proto.Spic.AssetProto.toObject(includeInstance, f),
4073
+ location: (f = msg.getLocation()) && platform_location_pb.LocationProto.toObject(includeInstance, f),
4074
+ openingRange: jspb.Message.getFieldWithDefault(msg, 3, 0)
4075
+ };
4076
+
4077
+ if (includeInstance) {
4078
+ obj.$jspbMessageInstance = msg;
4079
+ }
4080
+ return obj;
4081
+ };
4082
+ }
4083
+
4084
+
4085
+ /**
4086
+ * Deserializes binary data (in protobuf wire format).
4087
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4088
+ * @return {!proto.Spic.AssetWithLocation}
4089
+ */
4090
+ proto.Spic.AssetWithLocation.deserializeBinary = function(bytes) {
4091
+ var reader = new jspb.BinaryReader(bytes);
4092
+ var msg = new proto.Spic.AssetWithLocation;
4093
+ return proto.Spic.AssetWithLocation.deserializeBinaryFromReader(msg, reader);
4094
+ };
4095
+
4096
+
4097
+ /**
4098
+ * Deserializes binary data (in protobuf wire format) from the
4099
+ * given reader into the given message object.
4100
+ * @param {!proto.Spic.AssetWithLocation} msg The message object to deserialize into.
4101
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4102
+ * @return {!proto.Spic.AssetWithLocation}
4103
+ */
4104
+ proto.Spic.AssetWithLocation.deserializeBinaryFromReader = function(msg, reader) {
4105
+ while (reader.nextField()) {
4106
+ if (reader.isEndGroup()) {
4107
+ break;
4108
+ }
4109
+ var field = reader.getFieldNumber();
4110
+ switch (field) {
4111
+ case 1:
4112
+ var value = new proto.Spic.AssetProto;
4113
+ reader.readMessage(value,proto.Spic.AssetProto.deserializeBinaryFromReader);
4114
+ msg.setAsset(value);
4115
+ break;
4116
+ case 2:
4117
+ var value = new platform_location_pb.LocationProto;
4118
+ reader.readMessage(value,platform_location_pb.LocationProto.deserializeBinaryFromReader);
4119
+ msg.setLocation(value);
4120
+ break;
4121
+ case 3:
4122
+ var value = /** @type {number} */ (reader.readInt32());
4123
+ msg.setOpeningRange(value);
4124
+ break;
4125
+ default:
4126
+ reader.skipField();
4127
+ break;
4128
+ }
4129
+ }
4130
+ return msg;
4131
+ };
4132
+
4133
+
4134
+ /**
4135
+ * Serializes the message to binary data (in protobuf wire format).
4136
+ * @return {!Uint8Array}
4137
+ */
4138
+ proto.Spic.AssetWithLocation.prototype.serializeBinary = function() {
4139
+ var writer = new jspb.BinaryWriter();
4140
+ proto.Spic.AssetWithLocation.serializeBinaryToWriter(this, writer);
4141
+ return writer.getResultBuffer();
4142
+ };
4143
+
4144
+
4145
+ /**
4146
+ * Serializes the given message to binary data (in protobuf wire
4147
+ * format), writing to the given BinaryWriter.
4148
+ * @param {!proto.Spic.AssetWithLocation} message
4149
+ * @param {!jspb.BinaryWriter} writer
4150
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4151
+ */
4152
+ proto.Spic.AssetWithLocation.serializeBinaryToWriter = function(message, writer) {
4153
+ var f = undefined;
4154
+ f = message.getAsset();
4155
+ if (f != null) {
4156
+ writer.writeMessage(
4157
+ 1,
4158
+ f,
4159
+ proto.Spic.AssetProto.serializeBinaryToWriter
4160
+ );
4161
+ }
4162
+ f = message.getLocation();
4163
+ if (f != null) {
4164
+ writer.writeMessage(
4165
+ 2,
4166
+ f,
4167
+ platform_location_pb.LocationProto.serializeBinaryToWriter
4168
+ );
4169
+ }
4170
+ f = message.getOpeningRange();
4171
+ if (f !== 0) {
4172
+ writer.writeInt32(
4173
+ 3,
4174
+ f
4175
+ );
4176
+ }
4177
+ };
4178
+
4179
+
4180
+ /**
4181
+ * optional AssetProto asset = 1;
4182
+ * @return {?proto.Spic.AssetProto}
4183
+ */
4184
+ proto.Spic.AssetWithLocation.prototype.getAsset = function() {
4185
+ return /** @type{?proto.Spic.AssetProto} */ (
4186
+ jspb.Message.getWrapperField(this, proto.Spic.AssetProto, 1));
4187
+ };
4188
+
4189
+
4190
+ /**
4191
+ * @param {?proto.Spic.AssetProto|undefined} value
4192
+ * @return {!proto.Spic.AssetWithLocation} returns this
4193
+ */
4194
+ proto.Spic.AssetWithLocation.prototype.setAsset = function(value) {
4195
+ return jspb.Message.setWrapperField(this, 1, value);
4196
+ };
4197
+
4198
+
4199
+ /**
4200
+ * Clears the message field making it undefined.
4201
+ * @return {!proto.Spic.AssetWithLocation} returns this
4202
+ */
4203
+ proto.Spic.AssetWithLocation.prototype.clearAsset = function() {
4204
+ return this.setAsset(undefined);
4205
+ };
4206
+
4207
+
4208
+ /**
4209
+ * Returns whether this field is set.
4210
+ * @return {boolean}
4211
+ */
4212
+ proto.Spic.AssetWithLocation.prototype.hasAsset = function() {
4213
+ return jspb.Message.getField(this, 1) != null;
4214
+ };
4215
+
4216
+
4217
+ /**
4218
+ * optional Platform.LocationProto location = 2;
4219
+ * @return {?proto.Platform.LocationProto}
4220
+ */
4221
+ proto.Spic.AssetWithLocation.prototype.getLocation = function() {
4222
+ return /** @type{?proto.Platform.LocationProto} */ (
4223
+ jspb.Message.getWrapperField(this, platform_location_pb.LocationProto, 2));
4224
+ };
4225
+
4226
+
4227
+ /**
4228
+ * @param {?proto.Platform.LocationProto|undefined} value
4229
+ * @return {!proto.Spic.AssetWithLocation} returns this
4230
+ */
4231
+ proto.Spic.AssetWithLocation.prototype.setLocation = function(value) {
4232
+ return jspb.Message.setWrapperField(this, 2, value);
4233
+ };
4234
+
4235
+
4236
+ /**
4237
+ * Clears the message field making it undefined.
4238
+ * @return {!proto.Spic.AssetWithLocation} returns this
4239
+ */
4240
+ proto.Spic.AssetWithLocation.prototype.clearLocation = function() {
4241
+ return this.setLocation(undefined);
4242
+ };
4243
+
4244
+
4245
+ /**
4246
+ * Returns whether this field is set.
4247
+ * @return {boolean}
4248
+ */
4249
+ proto.Spic.AssetWithLocation.prototype.hasLocation = function() {
4250
+ return jspb.Message.getField(this, 2) != null;
4251
+ };
4252
+
4253
+
4254
+ /**
4255
+ * optional int32 opening_range = 3;
4256
+ * @return {number}
4257
+ */
4258
+ proto.Spic.AssetWithLocation.prototype.getOpeningRange = function() {
4259
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
4260
+ };
4261
+
4262
+
4263
+ /**
4264
+ * @param {number} value
4265
+ * @return {!proto.Spic.AssetWithLocation} returns this
4266
+ */
4267
+ proto.Spic.AssetWithLocation.prototype.setOpeningRange = function(value) {
4268
+ return jspb.Message.setProto3IntField(this, 3, value);
4269
+ };
4270
+
4271
+
4272
+
4273
+
4274
+
4275
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4276
+ /**
4277
+ * Creates an object representation of this proto.
4278
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4279
+ * Optional fields that are not set will be set to undefined.
4280
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4281
+ * For the list of reserved names please see:
4282
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4283
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4284
+ * JSPB instance for transitional soy proto support:
4285
+ * http://goto/soy-param-migration
4286
+ * @return {!Object}
4287
+ */
4288
+ proto.Spic.AssetWithLocationAndDistance.prototype.toObject = function(opt_includeInstance) {
4289
+ return proto.Spic.AssetWithLocationAndDistance.toObject(opt_includeInstance, this);
4290
+ };
4291
+
4292
+
4293
+ /**
4294
+ * Static version of the {@see toObject} method.
4295
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4296
+ * the JSPB instance for transitional soy proto support:
4297
+ * http://goto/soy-param-migration
4298
+ * @param {!proto.Spic.AssetWithLocationAndDistance} msg The msg instance to transform.
4299
+ * @return {!Object}
4300
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4301
+ */
4302
+ proto.Spic.AssetWithLocationAndDistance.toObject = function(includeInstance, msg) {
4303
+ var f, obj = {
4304
+ asset: (f = msg.getAsset()) && proto.Spic.AssetProto.toObject(includeInstance, f),
4305
+ location: (f = msg.getLocation()) && platform_location_pb.LocationProto.toObject(includeInstance, f),
4306
+ openingRange: jspb.Message.getFieldWithDefault(msg, 3, 0),
4307
+ distance: jspb.Message.getFieldWithDefault(msg, 4, 0)
4308
+ };
4309
+
4310
+ if (includeInstance) {
4311
+ obj.$jspbMessageInstance = msg;
4312
+ }
4313
+ return obj;
4314
+ };
4315
+ }
4316
+
4317
+
4318
+ /**
4319
+ * Deserializes binary data (in protobuf wire format).
4320
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4321
+ * @return {!proto.Spic.AssetWithLocationAndDistance}
4322
+ */
4323
+ proto.Spic.AssetWithLocationAndDistance.deserializeBinary = function(bytes) {
4324
+ var reader = new jspb.BinaryReader(bytes);
4325
+ var msg = new proto.Spic.AssetWithLocationAndDistance;
4326
+ return proto.Spic.AssetWithLocationAndDistance.deserializeBinaryFromReader(msg, reader);
4327
+ };
4328
+
4329
+
4330
+ /**
4331
+ * Deserializes binary data (in protobuf wire format) from the
4332
+ * given reader into the given message object.
4333
+ * @param {!proto.Spic.AssetWithLocationAndDistance} msg The message object to deserialize into.
4334
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4335
+ * @return {!proto.Spic.AssetWithLocationAndDistance}
4336
+ */
4337
+ proto.Spic.AssetWithLocationAndDistance.deserializeBinaryFromReader = function(msg, reader) {
4338
+ while (reader.nextField()) {
4339
+ if (reader.isEndGroup()) {
4340
+ break;
4341
+ }
4342
+ var field = reader.getFieldNumber();
4343
+ switch (field) {
4344
+ case 1:
4345
+ var value = new proto.Spic.AssetProto;
4346
+ reader.readMessage(value,proto.Spic.AssetProto.deserializeBinaryFromReader);
4347
+ msg.setAsset(value);
4348
+ break;
4349
+ case 2:
4350
+ var value = new platform_location_pb.LocationProto;
4351
+ reader.readMessage(value,platform_location_pb.LocationProto.deserializeBinaryFromReader);
4352
+ msg.setLocation(value);
4353
+ break;
4354
+ case 3:
4355
+ var value = /** @type {number} */ (reader.readInt32());
4356
+ msg.setOpeningRange(value);
4357
+ break;
4358
+ case 4:
4359
+ var value = /** @type {number} */ (reader.readInt32());
4360
+ msg.setDistance(value);
4361
+ break;
4362
+ default:
4363
+ reader.skipField();
4364
+ break;
4365
+ }
4366
+ }
4367
+ return msg;
4368
+ };
4369
+
4370
+
4371
+ /**
4372
+ * Serializes the message to binary data (in protobuf wire format).
4373
+ * @return {!Uint8Array}
4374
+ */
4375
+ proto.Spic.AssetWithLocationAndDistance.prototype.serializeBinary = function() {
4376
+ var writer = new jspb.BinaryWriter();
4377
+ proto.Spic.AssetWithLocationAndDistance.serializeBinaryToWriter(this, writer);
4378
+ return writer.getResultBuffer();
4379
+ };
4380
+
4381
+
4382
+ /**
4383
+ * Serializes the given message to binary data (in protobuf wire
4384
+ * format), writing to the given BinaryWriter.
4385
+ * @param {!proto.Spic.AssetWithLocationAndDistance} message
4386
+ * @param {!jspb.BinaryWriter} writer
4387
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4388
+ */
4389
+ proto.Spic.AssetWithLocationAndDistance.serializeBinaryToWriter = function(message, writer) {
4390
+ var f = undefined;
4391
+ f = message.getAsset();
4392
+ if (f != null) {
4393
+ writer.writeMessage(
4394
+ 1,
4395
+ f,
4396
+ proto.Spic.AssetProto.serializeBinaryToWriter
4397
+ );
4398
+ }
4399
+ f = message.getLocation();
4400
+ if (f != null) {
4401
+ writer.writeMessage(
4402
+ 2,
4403
+ f,
4404
+ platform_location_pb.LocationProto.serializeBinaryToWriter
4405
+ );
4406
+ }
4407
+ f = message.getOpeningRange();
4408
+ if (f !== 0) {
4409
+ writer.writeInt32(
4410
+ 3,
4411
+ f
4412
+ );
4413
+ }
4414
+ f = message.getDistance();
4415
+ if (f !== 0) {
4416
+ writer.writeInt32(
4417
+ 4,
4418
+ f
4419
+ );
4420
+ }
4421
+ };
4422
+
4423
+
4424
+ /**
4425
+ * optional AssetProto asset = 1;
4426
+ * @return {?proto.Spic.AssetProto}
4427
+ */
4428
+ proto.Spic.AssetWithLocationAndDistance.prototype.getAsset = function() {
4429
+ return /** @type{?proto.Spic.AssetProto} */ (
4430
+ jspb.Message.getWrapperField(this, proto.Spic.AssetProto, 1));
4431
+ };
4432
+
4433
+
4434
+ /**
4435
+ * @param {?proto.Spic.AssetProto|undefined} value
4436
+ * @return {!proto.Spic.AssetWithLocationAndDistance} returns this
4437
+ */
4438
+ proto.Spic.AssetWithLocationAndDistance.prototype.setAsset = function(value) {
4439
+ return jspb.Message.setWrapperField(this, 1, value);
4440
+ };
4441
+
4442
+
4443
+ /**
4444
+ * Clears the message field making it undefined.
4445
+ * @return {!proto.Spic.AssetWithLocationAndDistance} returns this
4446
+ */
4447
+ proto.Spic.AssetWithLocationAndDistance.prototype.clearAsset = function() {
4448
+ return this.setAsset(undefined);
4449
+ };
4450
+
4451
+
4452
+ /**
4453
+ * Returns whether this field is set.
4454
+ * @return {boolean}
4455
+ */
4456
+ proto.Spic.AssetWithLocationAndDistance.prototype.hasAsset = function() {
4457
+ return jspb.Message.getField(this, 1) != null;
4458
+ };
4459
+
4460
+
4461
+ /**
4462
+ * optional Platform.LocationProto location = 2;
4463
+ * @return {?proto.Platform.LocationProto}
4464
+ */
4465
+ proto.Spic.AssetWithLocationAndDistance.prototype.getLocation = function() {
4466
+ return /** @type{?proto.Platform.LocationProto} */ (
4467
+ jspb.Message.getWrapperField(this, platform_location_pb.LocationProto, 2));
4468
+ };
4469
+
4470
+
4471
+ /**
4472
+ * @param {?proto.Platform.LocationProto|undefined} value
4473
+ * @return {!proto.Spic.AssetWithLocationAndDistance} returns this
4474
+ */
4475
+ proto.Spic.AssetWithLocationAndDistance.prototype.setLocation = function(value) {
4476
+ return jspb.Message.setWrapperField(this, 2, value);
4477
+ };
4478
+
4479
+
4480
+ /**
4481
+ * Clears the message field making it undefined.
4482
+ * @return {!proto.Spic.AssetWithLocationAndDistance} returns this
4483
+ */
4484
+ proto.Spic.AssetWithLocationAndDistance.prototype.clearLocation = function() {
4485
+ return this.setLocation(undefined);
4486
+ };
4487
+
4488
+
4489
+ /**
4490
+ * Returns whether this field is set.
4491
+ * @return {boolean}
4492
+ */
4493
+ proto.Spic.AssetWithLocationAndDistance.prototype.hasLocation = function() {
4494
+ return jspb.Message.getField(this, 2) != null;
4495
+ };
4496
+
4497
+
4498
+ /**
4499
+ * optional int32 opening_range = 3;
4500
+ * @return {number}
4501
+ */
4502
+ proto.Spic.AssetWithLocationAndDistance.prototype.getOpeningRange = function() {
4503
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
4504
+ };
4505
+
4506
+
4507
+ /**
4508
+ * @param {number} value
4509
+ * @return {!proto.Spic.AssetWithLocationAndDistance} returns this
4510
+ */
4511
+ proto.Spic.AssetWithLocationAndDistance.prototype.setOpeningRange = function(value) {
4512
+ return jspb.Message.setProto3IntField(this, 3, value);
4513
+ };
4514
+
4515
+
4516
+ /**
4517
+ * optional int32 distance = 4;
4518
+ * @return {number}
4519
+ */
4520
+ proto.Spic.AssetWithLocationAndDistance.prototype.getDistance = function() {
4521
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
4522
+ };
4523
+
4524
+
4525
+ /**
4526
+ * @param {number} value
4527
+ * @return {!proto.Spic.AssetWithLocationAndDistance} returns this
4528
+ */
4529
+ proto.Spic.AssetWithLocationAndDistance.prototype.setDistance = function(value) {
4530
+ return jspb.Message.setProto3IntField(this, 4, value);
4531
+ };
4532
+
4533
+
4534
+ goog.object.extend(exports, proto.Spic);