@aldiokta/protocgen 1.1.63 → 1.1.65

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.
Files changed (27) hide show
  1. package/package.json +1 -1
  2. package/prisca/v1/accurate_oauth/accurate_oauth_grpc_pb.js +210 -0
  3. package/prisca/v1/accurate_oauth/accurate_oauth_pb.js +2330 -0
  4. package/prisca/v1/bidding/bidding_pb.js +43 -13
  5. package/prisca/v1/core/auth/auth_grpc_pb.js +99 -0
  6. package/prisca/v1/core/auth/auth_pb.js +2347 -851
  7. package/prisca/v1/core/file_upload/file_upload_grpc_pb.js +33 -0
  8. package/prisca/v1/core/file_upload/file_upload_pb.js +304 -0
  9. package/prisca/v1/core/messaging/notification_event_grpc_pb.js +211 -0
  10. package/prisca/v1/core/messaging/notification_event_pb.js +3015 -0
  11. package/prisca/v1/core/user_device/user_device_grpc_pb.js +144 -0
  12. package/prisca/v1/core/user_device/user_device_pb.js +2255 -0
  13. package/prisca/v1/general_ledger_account/general_ledger_account_grpc_pb.js +41 -0
  14. package/prisca/v1/general_ledger_account/general_ledger_account_pb.js +991 -0
  15. package/prisca/v1/good_receipt/good_receipt_pb.js +61 -1
  16. package/prisca/v1/invoice/invoice_pb.js +61 -1
  17. package/prisca/v1/purchase_order/purchase_order_grpc_pb.js +0 -1
  18. package/prisca/v1/purchase_order/purchase_order_pb.js +154 -138
  19. package/prisca/v1/purchase_requisition_trx/purchase_requisition_trx_grpc_pb.js +0 -1
  20. package/prisca/v1/purchase_requisition_trx/purchase_requisition_trx_pb.js +18 -71
  21. package/prisca/v1/quotation/quotation_grpc_pb.js +33 -0
  22. package/prisca/v1/quotation/quotation_pb.js +1030 -131
  23. package/prisca/v1/request_for_quotation/request_for_quotation_grpc_pb.js +33 -0
  24. package/prisca/v1/request_for_quotation/request_for_quotation_pb.js +603 -4
  25. package/prisca/v1/valuation/valuation_pb.js +93 -3
  26. package/prisca/v1/vendor_domain/vendor_domain_grpc_pb.js +66 -0
  27. package/prisca/v1/vendor_domain/vendor_domain_pb.js +940 -0
@@ -0,0 +1,2255 @@
1
+ // source: prisca/v1/core/user_device/user_device.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 = globalThis;
17
+
18
+ var prisca_v1_global_meta_meta_pb = require('../../../../prisca/v1/global/meta/meta_pb.js');
19
+ goog.object.extend(proto, prisca_v1_global_meta_meta_pb);
20
+ goog.exportSymbol('proto.GetListUserDeviceRequest', null, global);
21
+ goog.exportSymbol('proto.GetListUserDeviceResponse', null, global);
22
+ goog.exportSymbol('proto.ListDevicesByUserRequest', null, global);
23
+ goog.exportSymbol('proto.ListDevicesByUserResponse', null, global);
24
+ goog.exportSymbol('proto.RegisterDeviceRequest', null, global);
25
+ goog.exportSymbol('proto.RegisterDeviceResponse', null, global);
26
+ goog.exportSymbol('proto.UnregisterDeviceRequest', null, global);
27
+ goog.exportSymbol('proto.UnregisterDeviceResponse', null, global);
28
+ goog.exportSymbol('proto.UserDevice', null, global);
29
+ /**
30
+ * Generated by JsPbCodeGenerator.
31
+ * @param {Array=} opt_data Optional initial data array, typically from a
32
+ * server response, or constructed directly in Javascript. The array is used
33
+ * in place and becomes part of the constructed object. It is not cloned.
34
+ * If no data is provided, the constructed object will be empty, but still
35
+ * valid.
36
+ * @extends {jspb.Message}
37
+ * @constructor
38
+ */
39
+ proto.UserDevice = function(opt_data) {
40
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
41
+ };
42
+ goog.inherits(proto.UserDevice, jspb.Message);
43
+ if (goog.DEBUG && !COMPILED) {
44
+ /**
45
+ * @public
46
+ * @override
47
+ */
48
+ proto.UserDevice.displayName = 'proto.UserDevice';
49
+ }
50
+ /**
51
+ * Generated by JsPbCodeGenerator.
52
+ * @param {Array=} opt_data Optional initial data array, typically from a
53
+ * server response, or constructed directly in Javascript. The array is used
54
+ * in place and becomes part of the constructed object. It is not cloned.
55
+ * If no data is provided, the constructed object will be empty, but still
56
+ * valid.
57
+ * @extends {jspb.Message}
58
+ * @constructor
59
+ */
60
+ proto.RegisterDeviceRequest = function(opt_data) {
61
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
62
+ };
63
+ goog.inherits(proto.RegisterDeviceRequest, jspb.Message);
64
+ if (goog.DEBUG && !COMPILED) {
65
+ /**
66
+ * @public
67
+ * @override
68
+ */
69
+ proto.RegisterDeviceRequest.displayName = 'proto.RegisterDeviceRequest';
70
+ }
71
+ /**
72
+ * Generated by JsPbCodeGenerator.
73
+ * @param {Array=} opt_data Optional initial data array, typically from a
74
+ * server response, or constructed directly in Javascript. The array is used
75
+ * in place and becomes part of the constructed object. It is not cloned.
76
+ * If no data is provided, the constructed object will be empty, but still
77
+ * valid.
78
+ * @extends {jspb.Message}
79
+ * @constructor
80
+ */
81
+ proto.RegisterDeviceResponse = function(opt_data) {
82
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
83
+ };
84
+ goog.inherits(proto.RegisterDeviceResponse, jspb.Message);
85
+ if (goog.DEBUG && !COMPILED) {
86
+ /**
87
+ * @public
88
+ * @override
89
+ */
90
+ proto.RegisterDeviceResponse.displayName = 'proto.RegisterDeviceResponse';
91
+ }
92
+ /**
93
+ * Generated by JsPbCodeGenerator.
94
+ * @param {Array=} opt_data Optional initial data array, typically from a
95
+ * server response, or constructed directly in Javascript. The array is used
96
+ * in place and becomes part of the constructed object. It is not cloned.
97
+ * If no data is provided, the constructed object will be empty, but still
98
+ * valid.
99
+ * @extends {jspb.Message}
100
+ * @constructor
101
+ */
102
+ proto.UnregisterDeviceRequest = function(opt_data) {
103
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
104
+ };
105
+ goog.inherits(proto.UnregisterDeviceRequest, jspb.Message);
106
+ if (goog.DEBUG && !COMPILED) {
107
+ /**
108
+ * @public
109
+ * @override
110
+ */
111
+ proto.UnregisterDeviceRequest.displayName = 'proto.UnregisterDeviceRequest';
112
+ }
113
+ /**
114
+ * Generated by JsPbCodeGenerator.
115
+ * @param {Array=} opt_data Optional initial data array, typically from a
116
+ * server response, or constructed directly in Javascript. The array is used
117
+ * in place and becomes part of the constructed object. It is not cloned.
118
+ * If no data is provided, the constructed object will be empty, but still
119
+ * valid.
120
+ * @extends {jspb.Message}
121
+ * @constructor
122
+ */
123
+ proto.UnregisterDeviceResponse = function(opt_data) {
124
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
125
+ };
126
+ goog.inherits(proto.UnregisterDeviceResponse, jspb.Message);
127
+ if (goog.DEBUG && !COMPILED) {
128
+ /**
129
+ * @public
130
+ * @override
131
+ */
132
+ proto.UnregisterDeviceResponse.displayName = 'proto.UnregisterDeviceResponse';
133
+ }
134
+ /**
135
+ * Generated by JsPbCodeGenerator.
136
+ * @param {Array=} opt_data Optional initial data array, typically from a
137
+ * server response, or constructed directly in Javascript. The array is used
138
+ * in place and becomes part of the constructed object. It is not cloned.
139
+ * If no data is provided, the constructed object will be empty, but still
140
+ * valid.
141
+ * @extends {jspb.Message}
142
+ * @constructor
143
+ */
144
+ proto.ListDevicesByUserRequest = function(opt_data) {
145
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
146
+ };
147
+ goog.inherits(proto.ListDevicesByUserRequest, jspb.Message);
148
+ if (goog.DEBUG && !COMPILED) {
149
+ /**
150
+ * @public
151
+ * @override
152
+ */
153
+ proto.ListDevicesByUserRequest.displayName = 'proto.ListDevicesByUserRequest';
154
+ }
155
+ /**
156
+ * Generated by JsPbCodeGenerator.
157
+ * @param {Array=} opt_data Optional initial data array, typically from a
158
+ * server response, or constructed directly in Javascript. The array is used
159
+ * in place and becomes part of the constructed object. It is not cloned.
160
+ * If no data is provided, the constructed object will be empty, but still
161
+ * valid.
162
+ * @extends {jspb.Message}
163
+ * @constructor
164
+ */
165
+ proto.ListDevicesByUserResponse = function(opt_data) {
166
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.ListDevicesByUserResponse.repeatedFields_, null);
167
+ };
168
+ goog.inherits(proto.ListDevicesByUserResponse, jspb.Message);
169
+ if (goog.DEBUG && !COMPILED) {
170
+ /**
171
+ * @public
172
+ * @override
173
+ */
174
+ proto.ListDevicesByUserResponse.displayName = 'proto.ListDevicesByUserResponse';
175
+ }
176
+ /**
177
+ * Generated by JsPbCodeGenerator.
178
+ * @param {Array=} opt_data Optional initial data array, typically from a
179
+ * server response, or constructed directly in Javascript. The array is used
180
+ * in place and becomes part of the constructed object. It is not cloned.
181
+ * If no data is provided, the constructed object will be empty, but still
182
+ * valid.
183
+ * @extends {jspb.Message}
184
+ * @constructor
185
+ */
186
+ proto.GetListUserDeviceRequest = function(opt_data) {
187
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
188
+ };
189
+ goog.inherits(proto.GetListUserDeviceRequest, jspb.Message);
190
+ if (goog.DEBUG && !COMPILED) {
191
+ /**
192
+ * @public
193
+ * @override
194
+ */
195
+ proto.GetListUserDeviceRequest.displayName = 'proto.GetListUserDeviceRequest';
196
+ }
197
+ /**
198
+ * Generated by JsPbCodeGenerator.
199
+ * @param {Array=} opt_data Optional initial data array, typically from a
200
+ * server response, or constructed directly in Javascript. The array is used
201
+ * in place and becomes part of the constructed object. It is not cloned.
202
+ * If no data is provided, the constructed object will be empty, but still
203
+ * valid.
204
+ * @extends {jspb.Message}
205
+ * @constructor
206
+ */
207
+ proto.GetListUserDeviceResponse = function(opt_data) {
208
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.GetListUserDeviceResponse.repeatedFields_, null);
209
+ };
210
+ goog.inherits(proto.GetListUserDeviceResponse, jspb.Message);
211
+ if (goog.DEBUG && !COMPILED) {
212
+ /**
213
+ * @public
214
+ * @override
215
+ */
216
+ proto.GetListUserDeviceResponse.displayName = 'proto.GetListUserDeviceResponse';
217
+ }
218
+
219
+
220
+
221
+ if (jspb.Message.GENERATE_TO_OBJECT) {
222
+ /**
223
+ * Creates an object representation of this proto.
224
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
225
+ * Optional fields that are not set will be set to undefined.
226
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
227
+ * For the list of reserved names please see:
228
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
229
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
230
+ * JSPB instance for transitional soy proto support:
231
+ * http://goto/soy-param-migration
232
+ * @return {!Object}
233
+ */
234
+ proto.UserDevice.prototype.toObject = function(opt_includeInstance) {
235
+ return proto.UserDevice.toObject(opt_includeInstance, this);
236
+ };
237
+
238
+
239
+ /**
240
+ * Static version of the {@see toObject} method.
241
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
242
+ * the JSPB instance for transitional soy proto support:
243
+ * http://goto/soy-param-migration
244
+ * @param {!proto.UserDevice} msg The msg instance to transform.
245
+ * @return {!Object}
246
+ * @suppress {unusedLocalVariables} f is only used for nested messages
247
+ */
248
+ proto.UserDevice.toObject = function(includeInstance, msg) {
249
+ var f, obj = {
250
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
251
+ referenceId: jspb.Message.getFieldWithDefault(msg, 2, ""),
252
+ companiesReferencesId: jspb.Message.getFieldWithDefault(msg, 3, ""),
253
+ userReferenceId: jspb.Message.getFieldWithDefault(msg, 4, ""),
254
+ userType: jspb.Message.getFieldWithDefault(msg, 5, ""),
255
+ fcmToken: jspb.Message.getFieldWithDefault(msg, 6, ""),
256
+ platform: jspb.Message.getFieldWithDefault(msg, 7, ""),
257
+ deviceId: jspb.Message.getFieldWithDefault(msg, 8, ""),
258
+ appVersion: jspb.Message.getFieldWithDefault(msg, 9, ""),
259
+ lastSeenAt: jspb.Message.getFieldWithDefault(msg, 10, ""),
260
+ createdAt: jspb.Message.getFieldWithDefault(msg, 11, ""),
261
+ updatedAt: jspb.Message.getFieldWithDefault(msg, 12, "")
262
+ };
263
+
264
+ if (includeInstance) {
265
+ obj.$jspbMessageInstance = msg;
266
+ }
267
+ return obj;
268
+ };
269
+ }
270
+
271
+
272
+ /**
273
+ * Deserializes binary data (in protobuf wire format).
274
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
275
+ * @return {!proto.UserDevice}
276
+ */
277
+ proto.UserDevice.deserializeBinary = function(bytes) {
278
+ var reader = new jspb.BinaryReader(bytes);
279
+ var msg = new proto.UserDevice;
280
+ return proto.UserDevice.deserializeBinaryFromReader(msg, reader);
281
+ };
282
+
283
+
284
+ /**
285
+ * Deserializes binary data (in protobuf wire format) from the
286
+ * given reader into the given message object.
287
+ * @param {!proto.UserDevice} msg The message object to deserialize into.
288
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
289
+ * @return {!proto.UserDevice}
290
+ */
291
+ proto.UserDevice.deserializeBinaryFromReader = function(msg, reader) {
292
+ while (reader.nextField()) {
293
+ if (reader.isEndGroup()) {
294
+ break;
295
+ }
296
+ var field = reader.getFieldNumber();
297
+ switch (field) {
298
+ case 1:
299
+ var value = /** @type {number} */ (reader.readInt64());
300
+ msg.setId(value);
301
+ break;
302
+ case 2:
303
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
304
+ msg.setReferenceId(value);
305
+ break;
306
+ case 3:
307
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
308
+ msg.setCompaniesReferencesId(value);
309
+ break;
310
+ case 4:
311
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
312
+ msg.setUserReferenceId(value);
313
+ break;
314
+ case 5:
315
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
316
+ msg.setUserType(value);
317
+ break;
318
+ case 6:
319
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
320
+ msg.setFcmToken(value);
321
+ break;
322
+ case 7:
323
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
324
+ msg.setPlatform(value);
325
+ break;
326
+ case 8:
327
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
328
+ msg.setDeviceId(value);
329
+ break;
330
+ case 9:
331
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
332
+ msg.setAppVersion(value);
333
+ break;
334
+ case 10:
335
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
336
+ msg.setLastSeenAt(value);
337
+ break;
338
+ case 11:
339
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
340
+ msg.setCreatedAt(value);
341
+ break;
342
+ case 12:
343
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
344
+ msg.setUpdatedAt(value);
345
+ break;
346
+ default:
347
+ reader.skipField();
348
+ break;
349
+ }
350
+ }
351
+ return msg;
352
+ };
353
+
354
+
355
+ /**
356
+ * Serializes the message to binary data (in protobuf wire format).
357
+ * @return {!Uint8Array}
358
+ */
359
+ proto.UserDevice.prototype.serializeBinary = function() {
360
+ var writer = new jspb.BinaryWriter();
361
+ proto.UserDevice.serializeBinaryToWriter(this, writer);
362
+ return writer.getResultBuffer();
363
+ };
364
+
365
+
366
+ /**
367
+ * Serializes the given message to binary data (in protobuf wire
368
+ * format), writing to the given BinaryWriter.
369
+ * @param {!proto.UserDevice} message
370
+ * @param {!jspb.BinaryWriter} writer
371
+ * @suppress {unusedLocalVariables} f is only used for nested messages
372
+ */
373
+ proto.UserDevice.serializeBinaryToWriter = function(message, writer) {
374
+ var f = undefined;
375
+ f = message.getId();
376
+ if (f !== 0) {
377
+ writer.writeInt64(
378
+ 1,
379
+ f
380
+ );
381
+ }
382
+ f = message.getReferenceId();
383
+ if (f.length > 0) {
384
+ writer.writeString(
385
+ 2,
386
+ f
387
+ );
388
+ }
389
+ f = message.getCompaniesReferencesId();
390
+ if (f.length > 0) {
391
+ writer.writeString(
392
+ 3,
393
+ f
394
+ );
395
+ }
396
+ f = message.getUserReferenceId();
397
+ if (f.length > 0) {
398
+ writer.writeString(
399
+ 4,
400
+ f
401
+ );
402
+ }
403
+ f = message.getUserType();
404
+ if (f.length > 0) {
405
+ writer.writeString(
406
+ 5,
407
+ f
408
+ );
409
+ }
410
+ f = message.getFcmToken();
411
+ if (f.length > 0) {
412
+ writer.writeString(
413
+ 6,
414
+ f
415
+ );
416
+ }
417
+ f = message.getPlatform();
418
+ if (f.length > 0) {
419
+ writer.writeString(
420
+ 7,
421
+ f
422
+ );
423
+ }
424
+ f = message.getDeviceId();
425
+ if (f.length > 0) {
426
+ writer.writeString(
427
+ 8,
428
+ f
429
+ );
430
+ }
431
+ f = message.getAppVersion();
432
+ if (f.length > 0) {
433
+ writer.writeString(
434
+ 9,
435
+ f
436
+ );
437
+ }
438
+ f = message.getLastSeenAt();
439
+ if (f.length > 0) {
440
+ writer.writeString(
441
+ 10,
442
+ f
443
+ );
444
+ }
445
+ f = message.getCreatedAt();
446
+ if (f.length > 0) {
447
+ writer.writeString(
448
+ 11,
449
+ f
450
+ );
451
+ }
452
+ f = message.getUpdatedAt();
453
+ if (f.length > 0) {
454
+ writer.writeString(
455
+ 12,
456
+ f
457
+ );
458
+ }
459
+ };
460
+
461
+
462
+ /**
463
+ * optional int64 id = 1;
464
+ * @return {number}
465
+ */
466
+ proto.UserDevice.prototype.getId = function() {
467
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
468
+ };
469
+
470
+
471
+ /**
472
+ * @param {number} value
473
+ * @return {!proto.UserDevice} returns this
474
+ */
475
+ proto.UserDevice.prototype.setId = function(value) {
476
+ return jspb.Message.setProto3IntField(this, 1, value);
477
+ };
478
+
479
+
480
+ /**
481
+ * optional string reference_id = 2;
482
+ * @return {string}
483
+ */
484
+ proto.UserDevice.prototype.getReferenceId = function() {
485
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
486
+ };
487
+
488
+
489
+ /**
490
+ * @param {string} value
491
+ * @return {!proto.UserDevice} returns this
492
+ */
493
+ proto.UserDevice.prototype.setReferenceId = function(value) {
494
+ return jspb.Message.setProto3StringField(this, 2, value);
495
+ };
496
+
497
+
498
+ /**
499
+ * optional string companies_references_id = 3;
500
+ * @return {string}
501
+ */
502
+ proto.UserDevice.prototype.getCompaniesReferencesId = function() {
503
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
504
+ };
505
+
506
+
507
+ /**
508
+ * @param {string} value
509
+ * @return {!proto.UserDevice} returns this
510
+ */
511
+ proto.UserDevice.prototype.setCompaniesReferencesId = function(value) {
512
+ return jspb.Message.setProto3StringField(this, 3, value);
513
+ };
514
+
515
+
516
+ /**
517
+ * optional string user_reference_id = 4;
518
+ * @return {string}
519
+ */
520
+ proto.UserDevice.prototype.getUserReferenceId = function() {
521
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
522
+ };
523
+
524
+
525
+ /**
526
+ * @param {string} value
527
+ * @return {!proto.UserDevice} returns this
528
+ */
529
+ proto.UserDevice.prototype.setUserReferenceId = function(value) {
530
+ return jspb.Message.setProto3StringField(this, 4, value);
531
+ };
532
+
533
+
534
+ /**
535
+ * optional string user_type = 5;
536
+ * @return {string}
537
+ */
538
+ proto.UserDevice.prototype.getUserType = function() {
539
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
540
+ };
541
+
542
+
543
+ /**
544
+ * @param {string} value
545
+ * @return {!proto.UserDevice} returns this
546
+ */
547
+ proto.UserDevice.prototype.setUserType = function(value) {
548
+ return jspb.Message.setProto3StringField(this, 5, value);
549
+ };
550
+
551
+
552
+ /**
553
+ * optional string fcm_token = 6;
554
+ * @return {string}
555
+ */
556
+ proto.UserDevice.prototype.getFcmToken = function() {
557
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
558
+ };
559
+
560
+
561
+ /**
562
+ * @param {string} value
563
+ * @return {!proto.UserDevice} returns this
564
+ */
565
+ proto.UserDevice.prototype.setFcmToken = function(value) {
566
+ return jspb.Message.setProto3StringField(this, 6, value);
567
+ };
568
+
569
+
570
+ /**
571
+ * optional string platform = 7;
572
+ * @return {string}
573
+ */
574
+ proto.UserDevice.prototype.getPlatform = function() {
575
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
576
+ };
577
+
578
+
579
+ /**
580
+ * @param {string} value
581
+ * @return {!proto.UserDevice} returns this
582
+ */
583
+ proto.UserDevice.prototype.setPlatform = function(value) {
584
+ return jspb.Message.setProto3StringField(this, 7, value);
585
+ };
586
+
587
+
588
+ /**
589
+ * optional string device_id = 8;
590
+ * @return {string}
591
+ */
592
+ proto.UserDevice.prototype.getDeviceId = function() {
593
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
594
+ };
595
+
596
+
597
+ /**
598
+ * @param {string} value
599
+ * @return {!proto.UserDevice} returns this
600
+ */
601
+ proto.UserDevice.prototype.setDeviceId = function(value) {
602
+ return jspb.Message.setProto3StringField(this, 8, value);
603
+ };
604
+
605
+
606
+ /**
607
+ * optional string app_version = 9;
608
+ * @return {string}
609
+ */
610
+ proto.UserDevice.prototype.getAppVersion = function() {
611
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
612
+ };
613
+
614
+
615
+ /**
616
+ * @param {string} value
617
+ * @return {!proto.UserDevice} returns this
618
+ */
619
+ proto.UserDevice.prototype.setAppVersion = function(value) {
620
+ return jspb.Message.setProto3StringField(this, 9, value);
621
+ };
622
+
623
+
624
+ /**
625
+ * optional string last_seen_at = 10;
626
+ * @return {string}
627
+ */
628
+ proto.UserDevice.prototype.getLastSeenAt = function() {
629
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
630
+ };
631
+
632
+
633
+ /**
634
+ * @param {string} value
635
+ * @return {!proto.UserDevice} returns this
636
+ */
637
+ proto.UserDevice.prototype.setLastSeenAt = function(value) {
638
+ return jspb.Message.setProto3StringField(this, 10, value);
639
+ };
640
+
641
+
642
+ /**
643
+ * optional string created_at = 11;
644
+ * @return {string}
645
+ */
646
+ proto.UserDevice.prototype.getCreatedAt = function() {
647
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
648
+ };
649
+
650
+
651
+ /**
652
+ * @param {string} value
653
+ * @return {!proto.UserDevice} returns this
654
+ */
655
+ proto.UserDevice.prototype.setCreatedAt = function(value) {
656
+ return jspb.Message.setProto3StringField(this, 11, value);
657
+ };
658
+
659
+
660
+ /**
661
+ * optional string updated_at = 12;
662
+ * @return {string}
663
+ */
664
+ proto.UserDevice.prototype.getUpdatedAt = function() {
665
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
666
+ };
667
+
668
+
669
+ /**
670
+ * @param {string} value
671
+ * @return {!proto.UserDevice} returns this
672
+ */
673
+ proto.UserDevice.prototype.setUpdatedAt = function(value) {
674
+ return jspb.Message.setProto3StringField(this, 12, value);
675
+ };
676
+
677
+
678
+
679
+
680
+
681
+ if (jspb.Message.GENERATE_TO_OBJECT) {
682
+ /**
683
+ * Creates an object representation of this proto.
684
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
685
+ * Optional fields that are not set will be set to undefined.
686
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
687
+ * For the list of reserved names please see:
688
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
689
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
690
+ * JSPB instance for transitional soy proto support:
691
+ * http://goto/soy-param-migration
692
+ * @return {!Object}
693
+ */
694
+ proto.RegisterDeviceRequest.prototype.toObject = function(opt_includeInstance) {
695
+ return proto.RegisterDeviceRequest.toObject(opt_includeInstance, this);
696
+ };
697
+
698
+
699
+ /**
700
+ * Static version of the {@see toObject} method.
701
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
702
+ * the JSPB instance for transitional soy proto support:
703
+ * http://goto/soy-param-migration
704
+ * @param {!proto.RegisterDeviceRequest} msg The msg instance to transform.
705
+ * @return {!Object}
706
+ * @suppress {unusedLocalVariables} f is only used for nested messages
707
+ */
708
+ proto.RegisterDeviceRequest.toObject = function(includeInstance, msg) {
709
+ var f, obj = {
710
+ fcmToken: jspb.Message.getFieldWithDefault(msg, 1, ""),
711
+ platform: jspb.Message.getFieldWithDefault(msg, 2, ""),
712
+ deviceId: jspb.Message.getFieldWithDefault(msg, 3, ""),
713
+ appVersion: jspb.Message.getFieldWithDefault(msg, 4, ""),
714
+ userReferenceId: jspb.Message.getFieldWithDefault(msg, 5, ""),
715
+ userType: jspb.Message.getFieldWithDefault(msg, 6, "")
716
+ };
717
+
718
+ if (includeInstance) {
719
+ obj.$jspbMessageInstance = msg;
720
+ }
721
+ return obj;
722
+ };
723
+ }
724
+
725
+
726
+ /**
727
+ * Deserializes binary data (in protobuf wire format).
728
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
729
+ * @return {!proto.RegisterDeviceRequest}
730
+ */
731
+ proto.RegisterDeviceRequest.deserializeBinary = function(bytes) {
732
+ var reader = new jspb.BinaryReader(bytes);
733
+ var msg = new proto.RegisterDeviceRequest;
734
+ return proto.RegisterDeviceRequest.deserializeBinaryFromReader(msg, reader);
735
+ };
736
+
737
+
738
+ /**
739
+ * Deserializes binary data (in protobuf wire format) from the
740
+ * given reader into the given message object.
741
+ * @param {!proto.RegisterDeviceRequest} msg The message object to deserialize into.
742
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
743
+ * @return {!proto.RegisterDeviceRequest}
744
+ */
745
+ proto.RegisterDeviceRequest.deserializeBinaryFromReader = function(msg, reader) {
746
+ while (reader.nextField()) {
747
+ if (reader.isEndGroup()) {
748
+ break;
749
+ }
750
+ var field = reader.getFieldNumber();
751
+ switch (field) {
752
+ case 1:
753
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
754
+ msg.setFcmToken(value);
755
+ break;
756
+ case 2:
757
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
758
+ msg.setPlatform(value);
759
+ break;
760
+ case 3:
761
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
762
+ msg.setDeviceId(value);
763
+ break;
764
+ case 4:
765
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
766
+ msg.setAppVersion(value);
767
+ break;
768
+ case 5:
769
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
770
+ msg.setUserReferenceId(value);
771
+ break;
772
+ case 6:
773
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
774
+ msg.setUserType(value);
775
+ break;
776
+ default:
777
+ reader.skipField();
778
+ break;
779
+ }
780
+ }
781
+ return msg;
782
+ };
783
+
784
+
785
+ /**
786
+ * Serializes the message to binary data (in protobuf wire format).
787
+ * @return {!Uint8Array}
788
+ */
789
+ proto.RegisterDeviceRequest.prototype.serializeBinary = function() {
790
+ var writer = new jspb.BinaryWriter();
791
+ proto.RegisterDeviceRequest.serializeBinaryToWriter(this, writer);
792
+ return writer.getResultBuffer();
793
+ };
794
+
795
+
796
+ /**
797
+ * Serializes the given message to binary data (in protobuf wire
798
+ * format), writing to the given BinaryWriter.
799
+ * @param {!proto.RegisterDeviceRequest} message
800
+ * @param {!jspb.BinaryWriter} writer
801
+ * @suppress {unusedLocalVariables} f is only used for nested messages
802
+ */
803
+ proto.RegisterDeviceRequest.serializeBinaryToWriter = function(message, writer) {
804
+ var f = undefined;
805
+ f = message.getFcmToken();
806
+ if (f.length > 0) {
807
+ writer.writeString(
808
+ 1,
809
+ f
810
+ );
811
+ }
812
+ f = message.getPlatform();
813
+ if (f.length > 0) {
814
+ writer.writeString(
815
+ 2,
816
+ f
817
+ );
818
+ }
819
+ f = message.getDeviceId();
820
+ if (f.length > 0) {
821
+ writer.writeString(
822
+ 3,
823
+ f
824
+ );
825
+ }
826
+ f = message.getAppVersion();
827
+ if (f.length > 0) {
828
+ writer.writeString(
829
+ 4,
830
+ f
831
+ );
832
+ }
833
+ f = message.getUserReferenceId();
834
+ if (f.length > 0) {
835
+ writer.writeString(
836
+ 5,
837
+ f
838
+ );
839
+ }
840
+ f = message.getUserType();
841
+ if (f.length > 0) {
842
+ writer.writeString(
843
+ 6,
844
+ f
845
+ );
846
+ }
847
+ };
848
+
849
+
850
+ /**
851
+ * optional string fcm_token = 1;
852
+ * @return {string}
853
+ */
854
+ proto.RegisterDeviceRequest.prototype.getFcmToken = function() {
855
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
856
+ };
857
+
858
+
859
+ /**
860
+ * @param {string} value
861
+ * @return {!proto.RegisterDeviceRequest} returns this
862
+ */
863
+ proto.RegisterDeviceRequest.prototype.setFcmToken = function(value) {
864
+ return jspb.Message.setProto3StringField(this, 1, value);
865
+ };
866
+
867
+
868
+ /**
869
+ * optional string platform = 2;
870
+ * @return {string}
871
+ */
872
+ proto.RegisterDeviceRequest.prototype.getPlatform = function() {
873
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
874
+ };
875
+
876
+
877
+ /**
878
+ * @param {string} value
879
+ * @return {!proto.RegisterDeviceRequest} returns this
880
+ */
881
+ proto.RegisterDeviceRequest.prototype.setPlatform = function(value) {
882
+ return jspb.Message.setProto3StringField(this, 2, value);
883
+ };
884
+
885
+
886
+ /**
887
+ * optional string device_id = 3;
888
+ * @return {string}
889
+ */
890
+ proto.RegisterDeviceRequest.prototype.getDeviceId = function() {
891
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
892
+ };
893
+
894
+
895
+ /**
896
+ * @param {string} value
897
+ * @return {!proto.RegisterDeviceRequest} returns this
898
+ */
899
+ proto.RegisterDeviceRequest.prototype.setDeviceId = function(value) {
900
+ return jspb.Message.setProto3StringField(this, 3, value);
901
+ };
902
+
903
+
904
+ /**
905
+ * optional string app_version = 4;
906
+ * @return {string}
907
+ */
908
+ proto.RegisterDeviceRequest.prototype.getAppVersion = function() {
909
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
910
+ };
911
+
912
+
913
+ /**
914
+ * @param {string} value
915
+ * @return {!proto.RegisterDeviceRequest} returns this
916
+ */
917
+ proto.RegisterDeviceRequest.prototype.setAppVersion = function(value) {
918
+ return jspb.Message.setProto3StringField(this, 4, value);
919
+ };
920
+
921
+
922
+ /**
923
+ * optional string user_reference_id = 5;
924
+ * @return {string}
925
+ */
926
+ proto.RegisterDeviceRequest.prototype.getUserReferenceId = function() {
927
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
928
+ };
929
+
930
+
931
+ /**
932
+ * @param {string} value
933
+ * @return {!proto.RegisterDeviceRequest} returns this
934
+ */
935
+ proto.RegisterDeviceRequest.prototype.setUserReferenceId = function(value) {
936
+ return jspb.Message.setProto3StringField(this, 5, value);
937
+ };
938
+
939
+
940
+ /**
941
+ * optional string user_type = 6;
942
+ * @return {string}
943
+ */
944
+ proto.RegisterDeviceRequest.prototype.getUserType = function() {
945
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
946
+ };
947
+
948
+
949
+ /**
950
+ * @param {string} value
951
+ * @return {!proto.RegisterDeviceRequest} returns this
952
+ */
953
+ proto.RegisterDeviceRequest.prototype.setUserType = function(value) {
954
+ return jspb.Message.setProto3StringField(this, 6, value);
955
+ };
956
+
957
+
958
+
959
+
960
+
961
+ if (jspb.Message.GENERATE_TO_OBJECT) {
962
+ /**
963
+ * Creates an object representation of this proto.
964
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
965
+ * Optional fields that are not set will be set to undefined.
966
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
967
+ * For the list of reserved names please see:
968
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
969
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
970
+ * JSPB instance for transitional soy proto support:
971
+ * http://goto/soy-param-migration
972
+ * @return {!Object}
973
+ */
974
+ proto.RegisterDeviceResponse.prototype.toObject = function(opt_includeInstance) {
975
+ return proto.RegisterDeviceResponse.toObject(opt_includeInstance, this);
976
+ };
977
+
978
+
979
+ /**
980
+ * Static version of the {@see toObject} method.
981
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
982
+ * the JSPB instance for transitional soy proto support:
983
+ * http://goto/soy-param-migration
984
+ * @param {!proto.RegisterDeviceResponse} msg The msg instance to transform.
985
+ * @return {!Object}
986
+ * @suppress {unusedLocalVariables} f is only used for nested messages
987
+ */
988
+ proto.RegisterDeviceResponse.toObject = function(includeInstance, msg) {
989
+ var f, obj = {
990
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f),
991
+ userDevice: (f = msg.getUserDevice()) && proto.UserDevice.toObject(includeInstance, f)
992
+ };
993
+
994
+ if (includeInstance) {
995
+ obj.$jspbMessageInstance = msg;
996
+ }
997
+ return obj;
998
+ };
999
+ }
1000
+
1001
+
1002
+ /**
1003
+ * Deserializes binary data (in protobuf wire format).
1004
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1005
+ * @return {!proto.RegisterDeviceResponse}
1006
+ */
1007
+ proto.RegisterDeviceResponse.deserializeBinary = function(bytes) {
1008
+ var reader = new jspb.BinaryReader(bytes);
1009
+ var msg = new proto.RegisterDeviceResponse;
1010
+ return proto.RegisterDeviceResponse.deserializeBinaryFromReader(msg, reader);
1011
+ };
1012
+
1013
+
1014
+ /**
1015
+ * Deserializes binary data (in protobuf wire format) from the
1016
+ * given reader into the given message object.
1017
+ * @param {!proto.RegisterDeviceResponse} msg The message object to deserialize into.
1018
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1019
+ * @return {!proto.RegisterDeviceResponse}
1020
+ */
1021
+ proto.RegisterDeviceResponse.deserializeBinaryFromReader = function(msg, reader) {
1022
+ while (reader.nextField()) {
1023
+ if (reader.isEndGroup()) {
1024
+ break;
1025
+ }
1026
+ var field = reader.getFieldNumber();
1027
+ switch (field) {
1028
+ case 1:
1029
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
1030
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
1031
+ msg.setMeta(value);
1032
+ break;
1033
+ case 2:
1034
+ var value = new proto.UserDevice;
1035
+ reader.readMessage(value,proto.UserDevice.deserializeBinaryFromReader);
1036
+ msg.setUserDevice(value);
1037
+ break;
1038
+ default:
1039
+ reader.skipField();
1040
+ break;
1041
+ }
1042
+ }
1043
+ return msg;
1044
+ };
1045
+
1046
+
1047
+ /**
1048
+ * Serializes the message to binary data (in protobuf wire format).
1049
+ * @return {!Uint8Array}
1050
+ */
1051
+ proto.RegisterDeviceResponse.prototype.serializeBinary = function() {
1052
+ var writer = new jspb.BinaryWriter();
1053
+ proto.RegisterDeviceResponse.serializeBinaryToWriter(this, writer);
1054
+ return writer.getResultBuffer();
1055
+ };
1056
+
1057
+
1058
+ /**
1059
+ * Serializes the given message to binary data (in protobuf wire
1060
+ * format), writing to the given BinaryWriter.
1061
+ * @param {!proto.RegisterDeviceResponse} message
1062
+ * @param {!jspb.BinaryWriter} writer
1063
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1064
+ */
1065
+ proto.RegisterDeviceResponse.serializeBinaryToWriter = function(message, writer) {
1066
+ var f = undefined;
1067
+ f = message.getMeta();
1068
+ if (f != null) {
1069
+ writer.writeMessage(
1070
+ 1,
1071
+ f,
1072
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
1073
+ );
1074
+ }
1075
+ f = message.getUserDevice();
1076
+ if (f != null) {
1077
+ writer.writeMessage(
1078
+ 2,
1079
+ f,
1080
+ proto.UserDevice.serializeBinaryToWriter
1081
+ );
1082
+ }
1083
+ };
1084
+
1085
+
1086
+ /**
1087
+ * optional prisca.v1.global.meta.Meta meta = 1;
1088
+ * @return {?proto.prisca.v1.global.meta.Meta}
1089
+ */
1090
+ proto.RegisterDeviceResponse.prototype.getMeta = function() {
1091
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
1092
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 1));
1093
+ };
1094
+
1095
+
1096
+ /**
1097
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
1098
+ * @return {!proto.RegisterDeviceResponse} returns this
1099
+ */
1100
+ proto.RegisterDeviceResponse.prototype.setMeta = function(value) {
1101
+ return jspb.Message.setWrapperField(this, 1, value);
1102
+ };
1103
+
1104
+
1105
+ /**
1106
+ * Clears the message field making it undefined.
1107
+ * @return {!proto.RegisterDeviceResponse} returns this
1108
+ */
1109
+ proto.RegisterDeviceResponse.prototype.clearMeta = function() {
1110
+ return this.setMeta(undefined);
1111
+ };
1112
+
1113
+
1114
+ /**
1115
+ * Returns whether this field is set.
1116
+ * @return {boolean}
1117
+ */
1118
+ proto.RegisterDeviceResponse.prototype.hasMeta = function() {
1119
+ return jspb.Message.getField(this, 1) != null;
1120
+ };
1121
+
1122
+
1123
+ /**
1124
+ * optional UserDevice user_device = 2;
1125
+ * @return {?proto.UserDevice}
1126
+ */
1127
+ proto.RegisterDeviceResponse.prototype.getUserDevice = function() {
1128
+ return /** @type{?proto.UserDevice} */ (
1129
+ jspb.Message.getWrapperField(this, proto.UserDevice, 2));
1130
+ };
1131
+
1132
+
1133
+ /**
1134
+ * @param {?proto.UserDevice|undefined} value
1135
+ * @return {!proto.RegisterDeviceResponse} returns this
1136
+ */
1137
+ proto.RegisterDeviceResponse.prototype.setUserDevice = function(value) {
1138
+ return jspb.Message.setWrapperField(this, 2, value);
1139
+ };
1140
+
1141
+
1142
+ /**
1143
+ * Clears the message field making it undefined.
1144
+ * @return {!proto.RegisterDeviceResponse} returns this
1145
+ */
1146
+ proto.RegisterDeviceResponse.prototype.clearUserDevice = function() {
1147
+ return this.setUserDevice(undefined);
1148
+ };
1149
+
1150
+
1151
+ /**
1152
+ * Returns whether this field is set.
1153
+ * @return {boolean}
1154
+ */
1155
+ proto.RegisterDeviceResponse.prototype.hasUserDevice = function() {
1156
+ return jspb.Message.getField(this, 2) != null;
1157
+ };
1158
+
1159
+
1160
+
1161
+
1162
+
1163
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1164
+ /**
1165
+ * Creates an object representation of this proto.
1166
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1167
+ * Optional fields that are not set will be set to undefined.
1168
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1169
+ * For the list of reserved names please see:
1170
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1171
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1172
+ * JSPB instance for transitional soy proto support:
1173
+ * http://goto/soy-param-migration
1174
+ * @return {!Object}
1175
+ */
1176
+ proto.UnregisterDeviceRequest.prototype.toObject = function(opt_includeInstance) {
1177
+ return proto.UnregisterDeviceRequest.toObject(opt_includeInstance, this);
1178
+ };
1179
+
1180
+
1181
+ /**
1182
+ * Static version of the {@see toObject} method.
1183
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1184
+ * the JSPB instance for transitional soy proto support:
1185
+ * http://goto/soy-param-migration
1186
+ * @param {!proto.UnregisterDeviceRequest} msg The msg instance to transform.
1187
+ * @return {!Object}
1188
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1189
+ */
1190
+ proto.UnregisterDeviceRequest.toObject = function(includeInstance, msg) {
1191
+ var f, obj = {
1192
+ fcmToken: jspb.Message.getFieldWithDefault(msg, 1, "")
1193
+ };
1194
+
1195
+ if (includeInstance) {
1196
+ obj.$jspbMessageInstance = msg;
1197
+ }
1198
+ return obj;
1199
+ };
1200
+ }
1201
+
1202
+
1203
+ /**
1204
+ * Deserializes binary data (in protobuf wire format).
1205
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1206
+ * @return {!proto.UnregisterDeviceRequest}
1207
+ */
1208
+ proto.UnregisterDeviceRequest.deserializeBinary = function(bytes) {
1209
+ var reader = new jspb.BinaryReader(bytes);
1210
+ var msg = new proto.UnregisterDeviceRequest;
1211
+ return proto.UnregisterDeviceRequest.deserializeBinaryFromReader(msg, reader);
1212
+ };
1213
+
1214
+
1215
+ /**
1216
+ * Deserializes binary data (in protobuf wire format) from the
1217
+ * given reader into the given message object.
1218
+ * @param {!proto.UnregisterDeviceRequest} msg The message object to deserialize into.
1219
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1220
+ * @return {!proto.UnregisterDeviceRequest}
1221
+ */
1222
+ proto.UnregisterDeviceRequest.deserializeBinaryFromReader = function(msg, reader) {
1223
+ while (reader.nextField()) {
1224
+ if (reader.isEndGroup()) {
1225
+ break;
1226
+ }
1227
+ var field = reader.getFieldNumber();
1228
+ switch (field) {
1229
+ case 1:
1230
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1231
+ msg.setFcmToken(value);
1232
+ break;
1233
+ default:
1234
+ reader.skipField();
1235
+ break;
1236
+ }
1237
+ }
1238
+ return msg;
1239
+ };
1240
+
1241
+
1242
+ /**
1243
+ * Serializes the message to binary data (in protobuf wire format).
1244
+ * @return {!Uint8Array}
1245
+ */
1246
+ proto.UnregisterDeviceRequest.prototype.serializeBinary = function() {
1247
+ var writer = new jspb.BinaryWriter();
1248
+ proto.UnregisterDeviceRequest.serializeBinaryToWriter(this, writer);
1249
+ return writer.getResultBuffer();
1250
+ };
1251
+
1252
+
1253
+ /**
1254
+ * Serializes the given message to binary data (in protobuf wire
1255
+ * format), writing to the given BinaryWriter.
1256
+ * @param {!proto.UnregisterDeviceRequest} message
1257
+ * @param {!jspb.BinaryWriter} writer
1258
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1259
+ */
1260
+ proto.UnregisterDeviceRequest.serializeBinaryToWriter = function(message, writer) {
1261
+ var f = undefined;
1262
+ f = message.getFcmToken();
1263
+ if (f.length > 0) {
1264
+ writer.writeString(
1265
+ 1,
1266
+ f
1267
+ );
1268
+ }
1269
+ };
1270
+
1271
+
1272
+ /**
1273
+ * optional string fcm_token = 1;
1274
+ * @return {string}
1275
+ */
1276
+ proto.UnregisterDeviceRequest.prototype.getFcmToken = function() {
1277
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1278
+ };
1279
+
1280
+
1281
+ /**
1282
+ * @param {string} value
1283
+ * @return {!proto.UnregisterDeviceRequest} returns this
1284
+ */
1285
+ proto.UnregisterDeviceRequest.prototype.setFcmToken = function(value) {
1286
+ return jspb.Message.setProto3StringField(this, 1, value);
1287
+ };
1288
+
1289
+
1290
+
1291
+
1292
+
1293
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1294
+ /**
1295
+ * Creates an object representation of this proto.
1296
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1297
+ * Optional fields that are not set will be set to undefined.
1298
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1299
+ * For the list of reserved names please see:
1300
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1301
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1302
+ * JSPB instance for transitional soy proto support:
1303
+ * http://goto/soy-param-migration
1304
+ * @return {!Object}
1305
+ */
1306
+ proto.UnregisterDeviceResponse.prototype.toObject = function(opt_includeInstance) {
1307
+ return proto.UnregisterDeviceResponse.toObject(opt_includeInstance, this);
1308
+ };
1309
+
1310
+
1311
+ /**
1312
+ * Static version of the {@see toObject} method.
1313
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1314
+ * the JSPB instance for transitional soy proto support:
1315
+ * http://goto/soy-param-migration
1316
+ * @param {!proto.UnregisterDeviceResponse} msg The msg instance to transform.
1317
+ * @return {!Object}
1318
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1319
+ */
1320
+ proto.UnregisterDeviceResponse.toObject = function(includeInstance, msg) {
1321
+ var f, obj = {
1322
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f),
1323
+ fcmToken: jspb.Message.getFieldWithDefault(msg, 2, "")
1324
+ };
1325
+
1326
+ if (includeInstance) {
1327
+ obj.$jspbMessageInstance = msg;
1328
+ }
1329
+ return obj;
1330
+ };
1331
+ }
1332
+
1333
+
1334
+ /**
1335
+ * Deserializes binary data (in protobuf wire format).
1336
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1337
+ * @return {!proto.UnregisterDeviceResponse}
1338
+ */
1339
+ proto.UnregisterDeviceResponse.deserializeBinary = function(bytes) {
1340
+ var reader = new jspb.BinaryReader(bytes);
1341
+ var msg = new proto.UnregisterDeviceResponse;
1342
+ return proto.UnregisterDeviceResponse.deserializeBinaryFromReader(msg, reader);
1343
+ };
1344
+
1345
+
1346
+ /**
1347
+ * Deserializes binary data (in protobuf wire format) from the
1348
+ * given reader into the given message object.
1349
+ * @param {!proto.UnregisterDeviceResponse} msg The message object to deserialize into.
1350
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1351
+ * @return {!proto.UnregisterDeviceResponse}
1352
+ */
1353
+ proto.UnregisterDeviceResponse.deserializeBinaryFromReader = function(msg, reader) {
1354
+ while (reader.nextField()) {
1355
+ if (reader.isEndGroup()) {
1356
+ break;
1357
+ }
1358
+ var field = reader.getFieldNumber();
1359
+ switch (field) {
1360
+ case 1:
1361
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
1362
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
1363
+ msg.setMeta(value);
1364
+ break;
1365
+ case 2:
1366
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1367
+ msg.setFcmToken(value);
1368
+ break;
1369
+ default:
1370
+ reader.skipField();
1371
+ break;
1372
+ }
1373
+ }
1374
+ return msg;
1375
+ };
1376
+
1377
+
1378
+ /**
1379
+ * Serializes the message to binary data (in protobuf wire format).
1380
+ * @return {!Uint8Array}
1381
+ */
1382
+ proto.UnregisterDeviceResponse.prototype.serializeBinary = function() {
1383
+ var writer = new jspb.BinaryWriter();
1384
+ proto.UnregisterDeviceResponse.serializeBinaryToWriter(this, writer);
1385
+ return writer.getResultBuffer();
1386
+ };
1387
+
1388
+
1389
+ /**
1390
+ * Serializes the given message to binary data (in protobuf wire
1391
+ * format), writing to the given BinaryWriter.
1392
+ * @param {!proto.UnregisterDeviceResponse} message
1393
+ * @param {!jspb.BinaryWriter} writer
1394
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1395
+ */
1396
+ proto.UnregisterDeviceResponse.serializeBinaryToWriter = function(message, writer) {
1397
+ var f = undefined;
1398
+ f = message.getMeta();
1399
+ if (f != null) {
1400
+ writer.writeMessage(
1401
+ 1,
1402
+ f,
1403
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
1404
+ );
1405
+ }
1406
+ f = message.getFcmToken();
1407
+ if (f.length > 0) {
1408
+ writer.writeString(
1409
+ 2,
1410
+ f
1411
+ );
1412
+ }
1413
+ };
1414
+
1415
+
1416
+ /**
1417
+ * optional prisca.v1.global.meta.Meta meta = 1;
1418
+ * @return {?proto.prisca.v1.global.meta.Meta}
1419
+ */
1420
+ proto.UnregisterDeviceResponse.prototype.getMeta = function() {
1421
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
1422
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 1));
1423
+ };
1424
+
1425
+
1426
+ /**
1427
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
1428
+ * @return {!proto.UnregisterDeviceResponse} returns this
1429
+ */
1430
+ proto.UnregisterDeviceResponse.prototype.setMeta = function(value) {
1431
+ return jspb.Message.setWrapperField(this, 1, value);
1432
+ };
1433
+
1434
+
1435
+ /**
1436
+ * Clears the message field making it undefined.
1437
+ * @return {!proto.UnregisterDeviceResponse} returns this
1438
+ */
1439
+ proto.UnregisterDeviceResponse.prototype.clearMeta = function() {
1440
+ return this.setMeta(undefined);
1441
+ };
1442
+
1443
+
1444
+ /**
1445
+ * Returns whether this field is set.
1446
+ * @return {boolean}
1447
+ */
1448
+ proto.UnregisterDeviceResponse.prototype.hasMeta = function() {
1449
+ return jspb.Message.getField(this, 1) != null;
1450
+ };
1451
+
1452
+
1453
+ /**
1454
+ * optional string fcm_token = 2;
1455
+ * @return {string}
1456
+ */
1457
+ proto.UnregisterDeviceResponse.prototype.getFcmToken = function() {
1458
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1459
+ };
1460
+
1461
+
1462
+ /**
1463
+ * @param {string} value
1464
+ * @return {!proto.UnregisterDeviceResponse} returns this
1465
+ */
1466
+ proto.UnregisterDeviceResponse.prototype.setFcmToken = function(value) {
1467
+ return jspb.Message.setProto3StringField(this, 2, value);
1468
+ };
1469
+
1470
+
1471
+
1472
+
1473
+
1474
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1475
+ /**
1476
+ * Creates an object representation of this proto.
1477
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1478
+ * Optional fields that are not set will be set to undefined.
1479
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1480
+ * For the list of reserved names please see:
1481
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1482
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1483
+ * JSPB instance for transitional soy proto support:
1484
+ * http://goto/soy-param-migration
1485
+ * @return {!Object}
1486
+ */
1487
+ proto.ListDevicesByUserRequest.prototype.toObject = function(opt_includeInstance) {
1488
+ return proto.ListDevicesByUserRequest.toObject(opt_includeInstance, this);
1489
+ };
1490
+
1491
+
1492
+ /**
1493
+ * Static version of the {@see toObject} method.
1494
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1495
+ * the JSPB instance for transitional soy proto support:
1496
+ * http://goto/soy-param-migration
1497
+ * @param {!proto.ListDevicesByUserRequest} msg The msg instance to transform.
1498
+ * @return {!Object}
1499
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1500
+ */
1501
+ proto.ListDevicesByUserRequest.toObject = function(includeInstance, msg) {
1502
+ var f, obj = {
1503
+ userReferenceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1504
+ userType: jspb.Message.getFieldWithDefault(msg, 2, "")
1505
+ };
1506
+
1507
+ if (includeInstance) {
1508
+ obj.$jspbMessageInstance = msg;
1509
+ }
1510
+ return obj;
1511
+ };
1512
+ }
1513
+
1514
+
1515
+ /**
1516
+ * Deserializes binary data (in protobuf wire format).
1517
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1518
+ * @return {!proto.ListDevicesByUserRequest}
1519
+ */
1520
+ proto.ListDevicesByUserRequest.deserializeBinary = function(bytes) {
1521
+ var reader = new jspb.BinaryReader(bytes);
1522
+ var msg = new proto.ListDevicesByUserRequest;
1523
+ return proto.ListDevicesByUserRequest.deserializeBinaryFromReader(msg, reader);
1524
+ };
1525
+
1526
+
1527
+ /**
1528
+ * Deserializes binary data (in protobuf wire format) from the
1529
+ * given reader into the given message object.
1530
+ * @param {!proto.ListDevicesByUserRequest} msg The message object to deserialize into.
1531
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1532
+ * @return {!proto.ListDevicesByUserRequest}
1533
+ */
1534
+ proto.ListDevicesByUserRequest.deserializeBinaryFromReader = function(msg, reader) {
1535
+ while (reader.nextField()) {
1536
+ if (reader.isEndGroup()) {
1537
+ break;
1538
+ }
1539
+ var field = reader.getFieldNumber();
1540
+ switch (field) {
1541
+ case 1:
1542
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1543
+ msg.setUserReferenceId(value);
1544
+ break;
1545
+ case 2:
1546
+ var value = /** @type {string} */ (reader.readStringRequireUtf8());
1547
+ msg.setUserType(value);
1548
+ break;
1549
+ default:
1550
+ reader.skipField();
1551
+ break;
1552
+ }
1553
+ }
1554
+ return msg;
1555
+ };
1556
+
1557
+
1558
+ /**
1559
+ * Serializes the message to binary data (in protobuf wire format).
1560
+ * @return {!Uint8Array}
1561
+ */
1562
+ proto.ListDevicesByUserRequest.prototype.serializeBinary = function() {
1563
+ var writer = new jspb.BinaryWriter();
1564
+ proto.ListDevicesByUserRequest.serializeBinaryToWriter(this, writer);
1565
+ return writer.getResultBuffer();
1566
+ };
1567
+
1568
+
1569
+ /**
1570
+ * Serializes the given message to binary data (in protobuf wire
1571
+ * format), writing to the given BinaryWriter.
1572
+ * @param {!proto.ListDevicesByUserRequest} message
1573
+ * @param {!jspb.BinaryWriter} writer
1574
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1575
+ */
1576
+ proto.ListDevicesByUserRequest.serializeBinaryToWriter = function(message, writer) {
1577
+ var f = undefined;
1578
+ f = message.getUserReferenceId();
1579
+ if (f.length > 0) {
1580
+ writer.writeString(
1581
+ 1,
1582
+ f
1583
+ );
1584
+ }
1585
+ f = message.getUserType();
1586
+ if (f.length > 0) {
1587
+ writer.writeString(
1588
+ 2,
1589
+ f
1590
+ );
1591
+ }
1592
+ };
1593
+
1594
+
1595
+ /**
1596
+ * optional string user_reference_id = 1;
1597
+ * @return {string}
1598
+ */
1599
+ proto.ListDevicesByUserRequest.prototype.getUserReferenceId = function() {
1600
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1601
+ };
1602
+
1603
+
1604
+ /**
1605
+ * @param {string} value
1606
+ * @return {!proto.ListDevicesByUserRequest} returns this
1607
+ */
1608
+ proto.ListDevicesByUserRequest.prototype.setUserReferenceId = function(value) {
1609
+ return jspb.Message.setProto3StringField(this, 1, value);
1610
+ };
1611
+
1612
+
1613
+ /**
1614
+ * optional string user_type = 2;
1615
+ * @return {string}
1616
+ */
1617
+ proto.ListDevicesByUserRequest.prototype.getUserType = function() {
1618
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1619
+ };
1620
+
1621
+
1622
+ /**
1623
+ * @param {string} value
1624
+ * @return {!proto.ListDevicesByUserRequest} returns this
1625
+ */
1626
+ proto.ListDevicesByUserRequest.prototype.setUserType = function(value) {
1627
+ return jspb.Message.setProto3StringField(this, 2, value);
1628
+ };
1629
+
1630
+
1631
+
1632
+ /**
1633
+ * List of repeated fields within this message type.
1634
+ * @private {!Array<number>}
1635
+ * @const
1636
+ */
1637
+ proto.ListDevicesByUserResponse.repeatedFields_ = [2];
1638
+
1639
+
1640
+
1641
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1642
+ /**
1643
+ * Creates an object representation of this proto.
1644
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1645
+ * Optional fields that are not set will be set to undefined.
1646
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1647
+ * For the list of reserved names please see:
1648
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1649
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1650
+ * JSPB instance for transitional soy proto support:
1651
+ * http://goto/soy-param-migration
1652
+ * @return {!Object}
1653
+ */
1654
+ proto.ListDevicesByUserResponse.prototype.toObject = function(opt_includeInstance) {
1655
+ return proto.ListDevicesByUserResponse.toObject(opt_includeInstance, this);
1656
+ };
1657
+
1658
+
1659
+ /**
1660
+ * Static version of the {@see toObject} method.
1661
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1662
+ * the JSPB instance for transitional soy proto support:
1663
+ * http://goto/soy-param-migration
1664
+ * @param {!proto.ListDevicesByUserResponse} msg The msg instance to transform.
1665
+ * @return {!Object}
1666
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1667
+ */
1668
+ proto.ListDevicesByUserResponse.toObject = function(includeInstance, msg) {
1669
+ var f, obj = {
1670
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f),
1671
+ userDevicesList: jspb.Message.toObjectList(msg.getUserDevicesList(),
1672
+ proto.UserDevice.toObject, includeInstance)
1673
+ };
1674
+
1675
+ if (includeInstance) {
1676
+ obj.$jspbMessageInstance = msg;
1677
+ }
1678
+ return obj;
1679
+ };
1680
+ }
1681
+
1682
+
1683
+ /**
1684
+ * Deserializes binary data (in protobuf wire format).
1685
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1686
+ * @return {!proto.ListDevicesByUserResponse}
1687
+ */
1688
+ proto.ListDevicesByUserResponse.deserializeBinary = function(bytes) {
1689
+ var reader = new jspb.BinaryReader(bytes);
1690
+ var msg = new proto.ListDevicesByUserResponse;
1691
+ return proto.ListDevicesByUserResponse.deserializeBinaryFromReader(msg, reader);
1692
+ };
1693
+
1694
+
1695
+ /**
1696
+ * Deserializes binary data (in protobuf wire format) from the
1697
+ * given reader into the given message object.
1698
+ * @param {!proto.ListDevicesByUserResponse} msg The message object to deserialize into.
1699
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1700
+ * @return {!proto.ListDevicesByUserResponse}
1701
+ */
1702
+ proto.ListDevicesByUserResponse.deserializeBinaryFromReader = function(msg, reader) {
1703
+ while (reader.nextField()) {
1704
+ if (reader.isEndGroup()) {
1705
+ break;
1706
+ }
1707
+ var field = reader.getFieldNumber();
1708
+ switch (field) {
1709
+ case 1:
1710
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
1711
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
1712
+ msg.setMeta(value);
1713
+ break;
1714
+ case 2:
1715
+ var value = new proto.UserDevice;
1716
+ reader.readMessage(value,proto.UserDevice.deserializeBinaryFromReader);
1717
+ msg.addUserDevices(value);
1718
+ break;
1719
+ default:
1720
+ reader.skipField();
1721
+ break;
1722
+ }
1723
+ }
1724
+ return msg;
1725
+ };
1726
+
1727
+
1728
+ /**
1729
+ * Serializes the message to binary data (in protobuf wire format).
1730
+ * @return {!Uint8Array}
1731
+ */
1732
+ proto.ListDevicesByUserResponse.prototype.serializeBinary = function() {
1733
+ var writer = new jspb.BinaryWriter();
1734
+ proto.ListDevicesByUserResponse.serializeBinaryToWriter(this, writer);
1735
+ return writer.getResultBuffer();
1736
+ };
1737
+
1738
+
1739
+ /**
1740
+ * Serializes the given message to binary data (in protobuf wire
1741
+ * format), writing to the given BinaryWriter.
1742
+ * @param {!proto.ListDevicesByUserResponse} message
1743
+ * @param {!jspb.BinaryWriter} writer
1744
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1745
+ */
1746
+ proto.ListDevicesByUserResponse.serializeBinaryToWriter = function(message, writer) {
1747
+ var f = undefined;
1748
+ f = message.getMeta();
1749
+ if (f != null) {
1750
+ writer.writeMessage(
1751
+ 1,
1752
+ f,
1753
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
1754
+ );
1755
+ }
1756
+ f = message.getUserDevicesList();
1757
+ if (f.length > 0) {
1758
+ writer.writeRepeatedMessage(
1759
+ 2,
1760
+ f,
1761
+ proto.UserDevice.serializeBinaryToWriter
1762
+ );
1763
+ }
1764
+ };
1765
+
1766
+
1767
+ /**
1768
+ * optional prisca.v1.global.meta.Meta meta = 1;
1769
+ * @return {?proto.prisca.v1.global.meta.Meta}
1770
+ */
1771
+ proto.ListDevicesByUserResponse.prototype.getMeta = function() {
1772
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
1773
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 1));
1774
+ };
1775
+
1776
+
1777
+ /**
1778
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
1779
+ * @return {!proto.ListDevicesByUserResponse} returns this
1780
+ */
1781
+ proto.ListDevicesByUserResponse.prototype.setMeta = function(value) {
1782
+ return jspb.Message.setWrapperField(this, 1, value);
1783
+ };
1784
+
1785
+
1786
+ /**
1787
+ * Clears the message field making it undefined.
1788
+ * @return {!proto.ListDevicesByUserResponse} returns this
1789
+ */
1790
+ proto.ListDevicesByUserResponse.prototype.clearMeta = function() {
1791
+ return this.setMeta(undefined);
1792
+ };
1793
+
1794
+
1795
+ /**
1796
+ * Returns whether this field is set.
1797
+ * @return {boolean}
1798
+ */
1799
+ proto.ListDevicesByUserResponse.prototype.hasMeta = function() {
1800
+ return jspb.Message.getField(this, 1) != null;
1801
+ };
1802
+
1803
+
1804
+ /**
1805
+ * repeated UserDevice user_devices = 2;
1806
+ * @return {!Array<!proto.UserDevice>}
1807
+ */
1808
+ proto.ListDevicesByUserResponse.prototype.getUserDevicesList = function() {
1809
+ return /** @type{!Array<!proto.UserDevice>} */ (
1810
+ jspb.Message.getRepeatedWrapperField(this, proto.UserDevice, 2));
1811
+ };
1812
+
1813
+
1814
+ /**
1815
+ * @param {!Array<!proto.UserDevice>} value
1816
+ * @return {!proto.ListDevicesByUserResponse} returns this
1817
+ */
1818
+ proto.ListDevicesByUserResponse.prototype.setUserDevicesList = function(value) {
1819
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
1820
+ };
1821
+
1822
+
1823
+ /**
1824
+ * @param {!proto.UserDevice=} opt_value
1825
+ * @param {number=} opt_index
1826
+ * @return {!proto.UserDevice}
1827
+ */
1828
+ proto.ListDevicesByUserResponse.prototype.addUserDevices = function(opt_value, opt_index) {
1829
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.UserDevice, opt_index);
1830
+ };
1831
+
1832
+
1833
+ /**
1834
+ * Clears the list making it empty but non-null.
1835
+ * @return {!proto.ListDevicesByUserResponse} returns this
1836
+ */
1837
+ proto.ListDevicesByUserResponse.prototype.clearUserDevicesList = function() {
1838
+ return this.setUserDevicesList([]);
1839
+ };
1840
+
1841
+
1842
+
1843
+
1844
+
1845
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1846
+ /**
1847
+ * Creates an object representation of this proto.
1848
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1849
+ * Optional fields that are not set will be set to undefined.
1850
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1851
+ * For the list of reserved names please see:
1852
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1853
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1854
+ * JSPB instance for transitional soy proto support:
1855
+ * http://goto/soy-param-migration
1856
+ * @return {!Object}
1857
+ */
1858
+ proto.GetListUserDeviceRequest.prototype.toObject = function(opt_includeInstance) {
1859
+ return proto.GetListUserDeviceRequest.toObject(opt_includeInstance, this);
1860
+ };
1861
+
1862
+
1863
+ /**
1864
+ * Static version of the {@see toObject} method.
1865
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1866
+ * the JSPB instance for transitional soy proto support:
1867
+ * http://goto/soy-param-migration
1868
+ * @param {!proto.GetListUserDeviceRequest} msg The msg instance to transform.
1869
+ * @return {!Object}
1870
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1871
+ */
1872
+ proto.GetListUserDeviceRequest.toObject = function(includeInstance, msg) {
1873
+ var f, obj = {
1874
+ pagination: (f = msg.getPagination()) && prisca_v1_global_meta_meta_pb.PaginationRequest.toObject(includeInstance, f),
1875
+ query: (f = msg.getQuery()) && prisca_v1_global_meta_meta_pb.FilterRequest.toObject(includeInstance, f)
1876
+ };
1877
+
1878
+ if (includeInstance) {
1879
+ obj.$jspbMessageInstance = msg;
1880
+ }
1881
+ return obj;
1882
+ };
1883
+ }
1884
+
1885
+
1886
+ /**
1887
+ * Deserializes binary data (in protobuf wire format).
1888
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1889
+ * @return {!proto.GetListUserDeviceRequest}
1890
+ */
1891
+ proto.GetListUserDeviceRequest.deserializeBinary = function(bytes) {
1892
+ var reader = new jspb.BinaryReader(bytes);
1893
+ var msg = new proto.GetListUserDeviceRequest;
1894
+ return proto.GetListUserDeviceRequest.deserializeBinaryFromReader(msg, reader);
1895
+ };
1896
+
1897
+
1898
+ /**
1899
+ * Deserializes binary data (in protobuf wire format) from the
1900
+ * given reader into the given message object.
1901
+ * @param {!proto.GetListUserDeviceRequest} msg The message object to deserialize into.
1902
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1903
+ * @return {!proto.GetListUserDeviceRequest}
1904
+ */
1905
+ proto.GetListUserDeviceRequest.deserializeBinaryFromReader = function(msg, reader) {
1906
+ while (reader.nextField()) {
1907
+ if (reader.isEndGroup()) {
1908
+ break;
1909
+ }
1910
+ var field = reader.getFieldNumber();
1911
+ switch (field) {
1912
+ case 1:
1913
+ var value = new prisca_v1_global_meta_meta_pb.PaginationRequest;
1914
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.PaginationRequest.deserializeBinaryFromReader);
1915
+ msg.setPagination(value);
1916
+ break;
1917
+ case 2:
1918
+ var value = new prisca_v1_global_meta_meta_pb.FilterRequest;
1919
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.FilterRequest.deserializeBinaryFromReader);
1920
+ msg.setQuery(value);
1921
+ break;
1922
+ default:
1923
+ reader.skipField();
1924
+ break;
1925
+ }
1926
+ }
1927
+ return msg;
1928
+ };
1929
+
1930
+
1931
+ /**
1932
+ * Serializes the message to binary data (in protobuf wire format).
1933
+ * @return {!Uint8Array}
1934
+ */
1935
+ proto.GetListUserDeviceRequest.prototype.serializeBinary = function() {
1936
+ var writer = new jspb.BinaryWriter();
1937
+ proto.GetListUserDeviceRequest.serializeBinaryToWriter(this, writer);
1938
+ return writer.getResultBuffer();
1939
+ };
1940
+
1941
+
1942
+ /**
1943
+ * Serializes the given message to binary data (in protobuf wire
1944
+ * format), writing to the given BinaryWriter.
1945
+ * @param {!proto.GetListUserDeviceRequest} message
1946
+ * @param {!jspb.BinaryWriter} writer
1947
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1948
+ */
1949
+ proto.GetListUserDeviceRequest.serializeBinaryToWriter = function(message, writer) {
1950
+ var f = undefined;
1951
+ f = message.getPagination();
1952
+ if (f != null) {
1953
+ writer.writeMessage(
1954
+ 1,
1955
+ f,
1956
+ prisca_v1_global_meta_meta_pb.PaginationRequest.serializeBinaryToWriter
1957
+ );
1958
+ }
1959
+ f = message.getQuery();
1960
+ if (f != null) {
1961
+ writer.writeMessage(
1962
+ 2,
1963
+ f,
1964
+ prisca_v1_global_meta_meta_pb.FilterRequest.serializeBinaryToWriter
1965
+ );
1966
+ }
1967
+ };
1968
+
1969
+
1970
+ /**
1971
+ * optional prisca.v1.global.meta.PaginationRequest pagination = 1;
1972
+ * @return {?proto.prisca.v1.global.meta.PaginationRequest}
1973
+ */
1974
+ proto.GetListUserDeviceRequest.prototype.getPagination = function() {
1975
+ return /** @type{?proto.prisca.v1.global.meta.PaginationRequest} */ (
1976
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.PaginationRequest, 1));
1977
+ };
1978
+
1979
+
1980
+ /**
1981
+ * @param {?proto.prisca.v1.global.meta.PaginationRequest|undefined} value
1982
+ * @return {!proto.GetListUserDeviceRequest} returns this
1983
+ */
1984
+ proto.GetListUserDeviceRequest.prototype.setPagination = function(value) {
1985
+ return jspb.Message.setWrapperField(this, 1, value);
1986
+ };
1987
+
1988
+
1989
+ /**
1990
+ * Clears the message field making it undefined.
1991
+ * @return {!proto.GetListUserDeviceRequest} returns this
1992
+ */
1993
+ proto.GetListUserDeviceRequest.prototype.clearPagination = function() {
1994
+ return this.setPagination(undefined);
1995
+ };
1996
+
1997
+
1998
+ /**
1999
+ * Returns whether this field is set.
2000
+ * @return {boolean}
2001
+ */
2002
+ proto.GetListUserDeviceRequest.prototype.hasPagination = function() {
2003
+ return jspb.Message.getField(this, 1) != null;
2004
+ };
2005
+
2006
+
2007
+ /**
2008
+ * optional prisca.v1.global.meta.FilterRequest query = 2;
2009
+ * @return {?proto.prisca.v1.global.meta.FilterRequest}
2010
+ */
2011
+ proto.GetListUserDeviceRequest.prototype.getQuery = function() {
2012
+ return /** @type{?proto.prisca.v1.global.meta.FilterRequest} */ (
2013
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.FilterRequest, 2));
2014
+ };
2015
+
2016
+
2017
+ /**
2018
+ * @param {?proto.prisca.v1.global.meta.FilterRequest|undefined} value
2019
+ * @return {!proto.GetListUserDeviceRequest} returns this
2020
+ */
2021
+ proto.GetListUserDeviceRequest.prototype.setQuery = function(value) {
2022
+ return jspb.Message.setWrapperField(this, 2, value);
2023
+ };
2024
+
2025
+
2026
+ /**
2027
+ * Clears the message field making it undefined.
2028
+ * @return {!proto.GetListUserDeviceRequest} returns this
2029
+ */
2030
+ proto.GetListUserDeviceRequest.prototype.clearQuery = function() {
2031
+ return this.setQuery(undefined);
2032
+ };
2033
+
2034
+
2035
+ /**
2036
+ * Returns whether this field is set.
2037
+ * @return {boolean}
2038
+ */
2039
+ proto.GetListUserDeviceRequest.prototype.hasQuery = function() {
2040
+ return jspb.Message.getField(this, 2) != null;
2041
+ };
2042
+
2043
+
2044
+
2045
+ /**
2046
+ * List of repeated fields within this message type.
2047
+ * @private {!Array<number>}
2048
+ * @const
2049
+ */
2050
+ proto.GetListUserDeviceResponse.repeatedFields_ = [2];
2051
+
2052
+
2053
+
2054
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2055
+ /**
2056
+ * Creates an object representation of this proto.
2057
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2058
+ * Optional fields that are not set will be set to undefined.
2059
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2060
+ * For the list of reserved names please see:
2061
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2062
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2063
+ * JSPB instance for transitional soy proto support:
2064
+ * http://goto/soy-param-migration
2065
+ * @return {!Object}
2066
+ */
2067
+ proto.GetListUserDeviceResponse.prototype.toObject = function(opt_includeInstance) {
2068
+ return proto.GetListUserDeviceResponse.toObject(opt_includeInstance, this);
2069
+ };
2070
+
2071
+
2072
+ /**
2073
+ * Static version of the {@see toObject} method.
2074
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2075
+ * the JSPB instance for transitional soy proto support:
2076
+ * http://goto/soy-param-migration
2077
+ * @param {!proto.GetListUserDeviceResponse} msg The msg instance to transform.
2078
+ * @return {!Object}
2079
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2080
+ */
2081
+ proto.GetListUserDeviceResponse.toObject = function(includeInstance, msg) {
2082
+ var f, obj = {
2083
+ meta: (f = msg.getMeta()) && prisca_v1_global_meta_meta_pb.Meta.toObject(includeInstance, f),
2084
+ userDevicesList: jspb.Message.toObjectList(msg.getUserDevicesList(),
2085
+ proto.UserDevice.toObject, includeInstance)
2086
+ };
2087
+
2088
+ if (includeInstance) {
2089
+ obj.$jspbMessageInstance = msg;
2090
+ }
2091
+ return obj;
2092
+ };
2093
+ }
2094
+
2095
+
2096
+ /**
2097
+ * Deserializes binary data (in protobuf wire format).
2098
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2099
+ * @return {!proto.GetListUserDeviceResponse}
2100
+ */
2101
+ proto.GetListUserDeviceResponse.deserializeBinary = function(bytes) {
2102
+ var reader = new jspb.BinaryReader(bytes);
2103
+ var msg = new proto.GetListUserDeviceResponse;
2104
+ return proto.GetListUserDeviceResponse.deserializeBinaryFromReader(msg, reader);
2105
+ };
2106
+
2107
+
2108
+ /**
2109
+ * Deserializes binary data (in protobuf wire format) from the
2110
+ * given reader into the given message object.
2111
+ * @param {!proto.GetListUserDeviceResponse} msg The message object to deserialize into.
2112
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2113
+ * @return {!proto.GetListUserDeviceResponse}
2114
+ */
2115
+ proto.GetListUserDeviceResponse.deserializeBinaryFromReader = function(msg, reader) {
2116
+ while (reader.nextField()) {
2117
+ if (reader.isEndGroup()) {
2118
+ break;
2119
+ }
2120
+ var field = reader.getFieldNumber();
2121
+ switch (field) {
2122
+ case 1:
2123
+ var value = new prisca_v1_global_meta_meta_pb.Meta;
2124
+ reader.readMessage(value,prisca_v1_global_meta_meta_pb.Meta.deserializeBinaryFromReader);
2125
+ msg.setMeta(value);
2126
+ break;
2127
+ case 2:
2128
+ var value = new proto.UserDevice;
2129
+ reader.readMessage(value,proto.UserDevice.deserializeBinaryFromReader);
2130
+ msg.addUserDevices(value);
2131
+ break;
2132
+ default:
2133
+ reader.skipField();
2134
+ break;
2135
+ }
2136
+ }
2137
+ return msg;
2138
+ };
2139
+
2140
+
2141
+ /**
2142
+ * Serializes the message to binary data (in protobuf wire format).
2143
+ * @return {!Uint8Array}
2144
+ */
2145
+ proto.GetListUserDeviceResponse.prototype.serializeBinary = function() {
2146
+ var writer = new jspb.BinaryWriter();
2147
+ proto.GetListUserDeviceResponse.serializeBinaryToWriter(this, writer);
2148
+ return writer.getResultBuffer();
2149
+ };
2150
+
2151
+
2152
+ /**
2153
+ * Serializes the given message to binary data (in protobuf wire
2154
+ * format), writing to the given BinaryWriter.
2155
+ * @param {!proto.GetListUserDeviceResponse} message
2156
+ * @param {!jspb.BinaryWriter} writer
2157
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2158
+ */
2159
+ proto.GetListUserDeviceResponse.serializeBinaryToWriter = function(message, writer) {
2160
+ var f = undefined;
2161
+ f = message.getMeta();
2162
+ if (f != null) {
2163
+ writer.writeMessage(
2164
+ 1,
2165
+ f,
2166
+ prisca_v1_global_meta_meta_pb.Meta.serializeBinaryToWriter
2167
+ );
2168
+ }
2169
+ f = message.getUserDevicesList();
2170
+ if (f.length > 0) {
2171
+ writer.writeRepeatedMessage(
2172
+ 2,
2173
+ f,
2174
+ proto.UserDevice.serializeBinaryToWriter
2175
+ );
2176
+ }
2177
+ };
2178
+
2179
+
2180
+ /**
2181
+ * optional prisca.v1.global.meta.Meta meta = 1;
2182
+ * @return {?proto.prisca.v1.global.meta.Meta}
2183
+ */
2184
+ proto.GetListUserDeviceResponse.prototype.getMeta = function() {
2185
+ return /** @type{?proto.prisca.v1.global.meta.Meta} */ (
2186
+ jspb.Message.getWrapperField(this, prisca_v1_global_meta_meta_pb.Meta, 1));
2187
+ };
2188
+
2189
+
2190
+ /**
2191
+ * @param {?proto.prisca.v1.global.meta.Meta|undefined} value
2192
+ * @return {!proto.GetListUserDeviceResponse} returns this
2193
+ */
2194
+ proto.GetListUserDeviceResponse.prototype.setMeta = function(value) {
2195
+ return jspb.Message.setWrapperField(this, 1, value);
2196
+ };
2197
+
2198
+
2199
+ /**
2200
+ * Clears the message field making it undefined.
2201
+ * @return {!proto.GetListUserDeviceResponse} returns this
2202
+ */
2203
+ proto.GetListUserDeviceResponse.prototype.clearMeta = function() {
2204
+ return this.setMeta(undefined);
2205
+ };
2206
+
2207
+
2208
+ /**
2209
+ * Returns whether this field is set.
2210
+ * @return {boolean}
2211
+ */
2212
+ proto.GetListUserDeviceResponse.prototype.hasMeta = function() {
2213
+ return jspb.Message.getField(this, 1) != null;
2214
+ };
2215
+
2216
+
2217
+ /**
2218
+ * repeated UserDevice user_devices = 2;
2219
+ * @return {!Array<!proto.UserDevice>}
2220
+ */
2221
+ proto.GetListUserDeviceResponse.prototype.getUserDevicesList = function() {
2222
+ return /** @type{!Array<!proto.UserDevice>} */ (
2223
+ jspb.Message.getRepeatedWrapperField(this, proto.UserDevice, 2));
2224
+ };
2225
+
2226
+
2227
+ /**
2228
+ * @param {!Array<!proto.UserDevice>} value
2229
+ * @return {!proto.GetListUserDeviceResponse} returns this
2230
+ */
2231
+ proto.GetListUserDeviceResponse.prototype.setUserDevicesList = function(value) {
2232
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
2233
+ };
2234
+
2235
+
2236
+ /**
2237
+ * @param {!proto.UserDevice=} opt_value
2238
+ * @param {number=} opt_index
2239
+ * @return {!proto.UserDevice}
2240
+ */
2241
+ proto.GetListUserDeviceResponse.prototype.addUserDevices = function(opt_value, opt_index) {
2242
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.UserDevice, opt_index);
2243
+ };
2244
+
2245
+
2246
+ /**
2247
+ * Clears the list making it empty but non-null.
2248
+ * @return {!proto.GetListUserDeviceResponse} returns this
2249
+ */
2250
+ proto.GetListUserDeviceResponse.prototype.clearUserDevicesList = function() {
2251
+ return this.setUserDevicesList([]);
2252
+ };
2253
+
2254
+
2255
+ goog.object.extend(exports, proto);