@aceplus/smartace-api 2.0.0 → 2.1.0-drumtracker.10

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