protobuf-platform 1.0.10 → 1.0.12

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,1838 @@
1
+ // source: user.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 = (function() {
17
+ if (this) { return this; }
18
+ if (typeof window !== 'undefined') { return window; }
19
+ if (typeof global !== 'undefined') { return global; }
20
+ if (typeof self !== 'undefined') { return self; }
21
+ return Function('return this')();
22
+ }.call(null));
23
+
24
+ goog.exportSymbol('proto.user.LoggedInResponse', null, global);
25
+ goog.exportSymbol('proto.user.LoginRequest', null, global);
26
+ goog.exportSymbol('proto.user.PingRequest', null, global);
27
+ goog.exportSymbol('proto.user.PongResponse', null, global);
28
+ goog.exportSymbol('proto.user.RegistrationRequest', null, global);
29
+ goog.exportSymbol('proto.user.UserDataRequest', null, global);
30
+ goog.exportSymbol('proto.user.UserDataResponse', null, global);
31
+ /**
32
+ * Generated by JsPbCodeGenerator.
33
+ * @param {Array=} opt_data Optional initial data array, typically from a
34
+ * server response, or constructed directly in Javascript. The array is used
35
+ * in place and becomes part of the constructed object. It is not cloned.
36
+ * If no data is provided, the constructed object will be empty, but still
37
+ * valid.
38
+ * @extends {jspb.Message}
39
+ * @constructor
40
+ */
41
+ proto.user.PingRequest = function(opt_data) {
42
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
43
+ };
44
+ goog.inherits(proto.user.PingRequest, jspb.Message);
45
+ if (goog.DEBUG && !COMPILED) {
46
+ /**
47
+ * @public
48
+ * @override
49
+ */
50
+ proto.user.PingRequest.displayName = 'proto.user.PingRequest';
51
+ }
52
+ /**
53
+ * Generated by JsPbCodeGenerator.
54
+ * @param {Array=} opt_data Optional initial data array, typically from a
55
+ * server response, or constructed directly in Javascript. The array is used
56
+ * in place and becomes part of the constructed object. It is not cloned.
57
+ * If no data is provided, the constructed object will be empty, but still
58
+ * valid.
59
+ * @extends {jspb.Message}
60
+ * @constructor
61
+ */
62
+ proto.user.PongResponse = function(opt_data) {
63
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
64
+ };
65
+ goog.inherits(proto.user.PongResponse, jspb.Message);
66
+ if (goog.DEBUG && !COMPILED) {
67
+ /**
68
+ * @public
69
+ * @override
70
+ */
71
+ proto.user.PongResponse.displayName = 'proto.user.PongResponse';
72
+ }
73
+ /**
74
+ * Generated by JsPbCodeGenerator.
75
+ * @param {Array=} opt_data Optional initial data array, typically from a
76
+ * server response, or constructed directly in Javascript. The array is used
77
+ * in place and becomes part of the constructed object. It is not cloned.
78
+ * If no data is provided, the constructed object will be empty, but still
79
+ * valid.
80
+ * @extends {jspb.Message}
81
+ * @constructor
82
+ */
83
+ proto.user.RegistrationRequest = function(opt_data) {
84
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
85
+ };
86
+ goog.inherits(proto.user.RegistrationRequest, jspb.Message);
87
+ if (goog.DEBUG && !COMPILED) {
88
+ /**
89
+ * @public
90
+ * @override
91
+ */
92
+ proto.user.RegistrationRequest.displayName = 'proto.user.RegistrationRequest';
93
+ }
94
+ /**
95
+ * Generated by JsPbCodeGenerator.
96
+ * @param {Array=} opt_data Optional initial data array, typically from a
97
+ * server response, or constructed directly in Javascript. The array is used
98
+ * in place and becomes part of the constructed object. It is not cloned.
99
+ * If no data is provided, the constructed object will be empty, but still
100
+ * valid.
101
+ * @extends {jspb.Message}
102
+ * @constructor
103
+ */
104
+ proto.user.LoggedInResponse = function(opt_data) {
105
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
106
+ };
107
+ goog.inherits(proto.user.LoggedInResponse, jspb.Message);
108
+ if (goog.DEBUG && !COMPILED) {
109
+ /**
110
+ * @public
111
+ * @override
112
+ */
113
+ proto.user.LoggedInResponse.displayName = 'proto.user.LoggedInResponse';
114
+ }
115
+ /**
116
+ * Generated by JsPbCodeGenerator.
117
+ * @param {Array=} opt_data Optional initial data array, typically from a
118
+ * server response, or constructed directly in Javascript. The array is used
119
+ * in place and becomes part of the constructed object. It is not cloned.
120
+ * If no data is provided, the constructed object will be empty, but still
121
+ * valid.
122
+ * @extends {jspb.Message}
123
+ * @constructor
124
+ */
125
+ proto.user.LoginRequest = function(opt_data) {
126
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
127
+ };
128
+ goog.inherits(proto.user.LoginRequest, jspb.Message);
129
+ if (goog.DEBUG && !COMPILED) {
130
+ /**
131
+ * @public
132
+ * @override
133
+ */
134
+ proto.user.LoginRequest.displayName = 'proto.user.LoginRequest';
135
+ }
136
+ /**
137
+ * Generated by JsPbCodeGenerator.
138
+ * @param {Array=} opt_data Optional initial data array, typically from a
139
+ * server response, or constructed directly in Javascript. The array is used
140
+ * in place and becomes part of the constructed object. It is not cloned.
141
+ * If no data is provided, the constructed object will be empty, but still
142
+ * valid.
143
+ * @extends {jspb.Message}
144
+ * @constructor
145
+ */
146
+ proto.user.UserDataRequest = function(opt_data) {
147
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
148
+ };
149
+ goog.inherits(proto.user.UserDataRequest, jspb.Message);
150
+ if (goog.DEBUG && !COMPILED) {
151
+ /**
152
+ * @public
153
+ * @override
154
+ */
155
+ proto.user.UserDataRequest.displayName = 'proto.user.UserDataRequest';
156
+ }
157
+ /**
158
+ * Generated by JsPbCodeGenerator.
159
+ * @param {Array=} opt_data Optional initial data array, typically from a
160
+ * server response, or constructed directly in Javascript. The array is used
161
+ * in place and becomes part of the constructed object. It is not cloned.
162
+ * If no data is provided, the constructed object will be empty, but still
163
+ * valid.
164
+ * @extends {jspb.Message}
165
+ * @constructor
166
+ */
167
+ proto.user.UserDataResponse = function(opt_data) {
168
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
169
+ };
170
+ goog.inherits(proto.user.UserDataResponse, jspb.Message);
171
+ if (goog.DEBUG && !COMPILED) {
172
+ /**
173
+ * @public
174
+ * @override
175
+ */
176
+ proto.user.UserDataResponse.displayName = 'proto.user.UserDataResponse';
177
+ }
178
+
179
+
180
+
181
+ if (jspb.Message.GENERATE_TO_OBJECT) {
182
+ /**
183
+ * Creates an object representation of this proto.
184
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
185
+ * Optional fields that are not set will be set to undefined.
186
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
187
+ * For the list of reserved names please see:
188
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
189
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
190
+ * JSPB instance for transitional soy proto support:
191
+ * http://goto/soy-param-migration
192
+ * @return {!Object}
193
+ */
194
+ proto.user.PingRequest.prototype.toObject = function(opt_includeInstance) {
195
+ return proto.user.PingRequest.toObject(opt_includeInstance, this);
196
+ };
197
+
198
+
199
+ /**
200
+ * Static version of the {@see toObject} method.
201
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
202
+ * the JSPB instance for transitional soy proto support:
203
+ * http://goto/soy-param-migration
204
+ * @param {!proto.user.PingRequest} msg The msg instance to transform.
205
+ * @return {!Object}
206
+ * @suppress {unusedLocalVariables} f is only used for nested messages
207
+ */
208
+ proto.user.PingRequest.toObject = function(includeInstance, msg) {
209
+ var f, obj = {
210
+ ping: jspb.Message.getFieldWithDefault(msg, 1, "")
211
+ };
212
+
213
+ if (includeInstance) {
214
+ obj.$jspbMessageInstance = msg;
215
+ }
216
+ return obj;
217
+ };
218
+ }
219
+
220
+
221
+ /**
222
+ * Deserializes binary data (in protobuf wire format).
223
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
224
+ * @return {!proto.user.PingRequest}
225
+ */
226
+ proto.user.PingRequest.deserializeBinary = function(bytes) {
227
+ var reader = new jspb.BinaryReader(bytes);
228
+ var msg = new proto.user.PingRequest;
229
+ return proto.user.PingRequest.deserializeBinaryFromReader(msg, reader);
230
+ };
231
+
232
+
233
+ /**
234
+ * Deserializes binary data (in protobuf wire format) from the
235
+ * given reader into the given message object.
236
+ * @param {!proto.user.PingRequest} msg The message object to deserialize into.
237
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
238
+ * @return {!proto.user.PingRequest}
239
+ */
240
+ proto.user.PingRequest.deserializeBinaryFromReader = function(msg, reader) {
241
+ while (reader.nextField()) {
242
+ if (reader.isEndGroup()) {
243
+ break;
244
+ }
245
+ var field = reader.getFieldNumber();
246
+ switch (field) {
247
+ case 1:
248
+ var value = /** @type {string} */ (reader.readString());
249
+ msg.setPing(value);
250
+ break;
251
+ default:
252
+ reader.skipField();
253
+ break;
254
+ }
255
+ }
256
+ return msg;
257
+ };
258
+
259
+
260
+ /**
261
+ * Serializes the message to binary data (in protobuf wire format).
262
+ * @return {!Uint8Array}
263
+ */
264
+ proto.user.PingRequest.prototype.serializeBinary = function() {
265
+ var writer = new jspb.BinaryWriter();
266
+ proto.user.PingRequest.serializeBinaryToWriter(this, writer);
267
+ return writer.getResultBuffer();
268
+ };
269
+
270
+
271
+ /**
272
+ * Serializes the given message to binary data (in protobuf wire
273
+ * format), writing to the given BinaryWriter.
274
+ * @param {!proto.user.PingRequest} message
275
+ * @param {!jspb.BinaryWriter} writer
276
+ * @suppress {unusedLocalVariables} f is only used for nested messages
277
+ */
278
+ proto.user.PingRequest.serializeBinaryToWriter = function(message, writer) {
279
+ var f = undefined;
280
+ f = message.getPing();
281
+ if (f.length > 0) {
282
+ writer.writeString(
283
+ 1,
284
+ f
285
+ );
286
+ }
287
+ };
288
+
289
+
290
+ /**
291
+ * optional string ping = 1;
292
+ * @return {string}
293
+ */
294
+ proto.user.PingRequest.prototype.getPing = function() {
295
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
296
+ };
297
+
298
+
299
+ /**
300
+ * @param {string} value
301
+ * @return {!proto.user.PingRequest} returns this
302
+ */
303
+ proto.user.PingRequest.prototype.setPing = function(value) {
304
+ return jspb.Message.setProto3StringField(this, 1, value);
305
+ };
306
+
307
+
308
+
309
+
310
+
311
+ if (jspb.Message.GENERATE_TO_OBJECT) {
312
+ /**
313
+ * Creates an object representation of this proto.
314
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
315
+ * Optional fields that are not set will be set to undefined.
316
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
317
+ * For the list of reserved names please see:
318
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
319
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
320
+ * JSPB instance for transitional soy proto support:
321
+ * http://goto/soy-param-migration
322
+ * @return {!Object}
323
+ */
324
+ proto.user.PongResponse.prototype.toObject = function(opt_includeInstance) {
325
+ return proto.user.PongResponse.toObject(opt_includeInstance, this);
326
+ };
327
+
328
+
329
+ /**
330
+ * Static version of the {@see toObject} method.
331
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
332
+ * the JSPB instance for transitional soy proto support:
333
+ * http://goto/soy-param-migration
334
+ * @param {!proto.user.PongResponse} msg The msg instance to transform.
335
+ * @return {!Object}
336
+ * @suppress {unusedLocalVariables} f is only used for nested messages
337
+ */
338
+ proto.user.PongResponse.toObject = function(includeInstance, msg) {
339
+ var f, obj = {
340
+ pong: jspb.Message.getFieldWithDefault(msg, 1, "")
341
+ };
342
+
343
+ if (includeInstance) {
344
+ obj.$jspbMessageInstance = msg;
345
+ }
346
+ return obj;
347
+ };
348
+ }
349
+
350
+
351
+ /**
352
+ * Deserializes binary data (in protobuf wire format).
353
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
354
+ * @return {!proto.user.PongResponse}
355
+ */
356
+ proto.user.PongResponse.deserializeBinary = function(bytes) {
357
+ var reader = new jspb.BinaryReader(bytes);
358
+ var msg = new proto.user.PongResponse;
359
+ return proto.user.PongResponse.deserializeBinaryFromReader(msg, reader);
360
+ };
361
+
362
+
363
+ /**
364
+ * Deserializes binary data (in protobuf wire format) from the
365
+ * given reader into the given message object.
366
+ * @param {!proto.user.PongResponse} msg The message object to deserialize into.
367
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
368
+ * @return {!proto.user.PongResponse}
369
+ */
370
+ proto.user.PongResponse.deserializeBinaryFromReader = function(msg, reader) {
371
+ while (reader.nextField()) {
372
+ if (reader.isEndGroup()) {
373
+ break;
374
+ }
375
+ var field = reader.getFieldNumber();
376
+ switch (field) {
377
+ case 1:
378
+ var value = /** @type {string} */ (reader.readString());
379
+ msg.setPong(value);
380
+ break;
381
+ default:
382
+ reader.skipField();
383
+ break;
384
+ }
385
+ }
386
+ return msg;
387
+ };
388
+
389
+
390
+ /**
391
+ * Serializes the message to binary data (in protobuf wire format).
392
+ * @return {!Uint8Array}
393
+ */
394
+ proto.user.PongResponse.prototype.serializeBinary = function() {
395
+ var writer = new jspb.BinaryWriter();
396
+ proto.user.PongResponse.serializeBinaryToWriter(this, writer);
397
+ return writer.getResultBuffer();
398
+ };
399
+
400
+
401
+ /**
402
+ * Serializes the given message to binary data (in protobuf wire
403
+ * format), writing to the given BinaryWriter.
404
+ * @param {!proto.user.PongResponse} message
405
+ * @param {!jspb.BinaryWriter} writer
406
+ * @suppress {unusedLocalVariables} f is only used for nested messages
407
+ */
408
+ proto.user.PongResponse.serializeBinaryToWriter = function(message, writer) {
409
+ var f = undefined;
410
+ f = message.getPong();
411
+ if (f.length > 0) {
412
+ writer.writeString(
413
+ 1,
414
+ f
415
+ );
416
+ }
417
+ };
418
+
419
+
420
+ /**
421
+ * optional string pong = 1;
422
+ * @return {string}
423
+ */
424
+ proto.user.PongResponse.prototype.getPong = function() {
425
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
426
+ };
427
+
428
+
429
+ /**
430
+ * @param {string} value
431
+ * @return {!proto.user.PongResponse} returns this
432
+ */
433
+ proto.user.PongResponse.prototype.setPong = function(value) {
434
+ return jspb.Message.setProto3StringField(this, 1, value);
435
+ };
436
+
437
+
438
+
439
+
440
+
441
+ if (jspb.Message.GENERATE_TO_OBJECT) {
442
+ /**
443
+ * Creates an object representation of this proto.
444
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
445
+ * Optional fields that are not set will be set to undefined.
446
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
447
+ * For the list of reserved names please see:
448
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
449
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
450
+ * JSPB instance for transitional soy proto support:
451
+ * http://goto/soy-param-migration
452
+ * @return {!Object}
453
+ */
454
+ proto.user.RegistrationRequest.prototype.toObject = function(opt_includeInstance) {
455
+ return proto.user.RegistrationRequest.toObject(opt_includeInstance, this);
456
+ };
457
+
458
+
459
+ /**
460
+ * Static version of the {@see toObject} method.
461
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
462
+ * the JSPB instance for transitional soy proto support:
463
+ * http://goto/soy-param-migration
464
+ * @param {!proto.user.RegistrationRequest} msg The msg instance to transform.
465
+ * @return {!Object}
466
+ * @suppress {unusedLocalVariables} f is only used for nested messages
467
+ */
468
+ proto.user.RegistrationRequest.toObject = function(includeInstance, msg) {
469
+ var f, obj = {
470
+ email: jspb.Message.getFieldWithDefault(msg, 1, ""),
471
+ password: jspb.Message.getFieldWithDefault(msg, 2, ""),
472
+ currency: jspb.Message.getFieldWithDefault(msg, 3, ""),
473
+ country: jspb.Message.getFieldWithDefault(msg, 4, ""),
474
+ firstName: jspb.Message.getFieldWithDefault(msg, 5, ""),
475
+ lastName: jspb.Message.getFieldWithDefault(msg, 6, ""),
476
+ birthday: jspb.Message.getFieldWithDefault(msg, 7, ""),
477
+ locale: jspb.Message.getFieldWithDefault(msg, 8, "")
478
+ };
479
+
480
+ if (includeInstance) {
481
+ obj.$jspbMessageInstance = msg;
482
+ }
483
+ return obj;
484
+ };
485
+ }
486
+
487
+
488
+ /**
489
+ * Deserializes binary data (in protobuf wire format).
490
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
491
+ * @return {!proto.user.RegistrationRequest}
492
+ */
493
+ proto.user.RegistrationRequest.deserializeBinary = function(bytes) {
494
+ var reader = new jspb.BinaryReader(bytes);
495
+ var msg = new proto.user.RegistrationRequest;
496
+ return proto.user.RegistrationRequest.deserializeBinaryFromReader(msg, reader);
497
+ };
498
+
499
+
500
+ /**
501
+ * Deserializes binary data (in protobuf wire format) from the
502
+ * given reader into the given message object.
503
+ * @param {!proto.user.RegistrationRequest} msg The message object to deserialize into.
504
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
505
+ * @return {!proto.user.RegistrationRequest}
506
+ */
507
+ proto.user.RegistrationRequest.deserializeBinaryFromReader = function(msg, reader) {
508
+ while (reader.nextField()) {
509
+ if (reader.isEndGroup()) {
510
+ break;
511
+ }
512
+ var field = reader.getFieldNumber();
513
+ switch (field) {
514
+ case 1:
515
+ var value = /** @type {string} */ (reader.readString());
516
+ msg.setEmail(value);
517
+ break;
518
+ case 2:
519
+ var value = /** @type {string} */ (reader.readString());
520
+ msg.setPassword(value);
521
+ break;
522
+ case 3:
523
+ var value = /** @type {string} */ (reader.readString());
524
+ msg.setCurrency(value);
525
+ break;
526
+ case 4:
527
+ var value = /** @type {string} */ (reader.readString());
528
+ msg.setCountry(value);
529
+ break;
530
+ case 5:
531
+ var value = /** @type {string} */ (reader.readString());
532
+ msg.setFirstName(value);
533
+ break;
534
+ case 6:
535
+ var value = /** @type {string} */ (reader.readString());
536
+ msg.setLastName(value);
537
+ break;
538
+ case 7:
539
+ var value = /** @type {string} */ (reader.readString());
540
+ msg.setBirthday(value);
541
+ break;
542
+ case 8:
543
+ var value = /** @type {string} */ (reader.readString());
544
+ msg.setLocale(value);
545
+ break;
546
+ default:
547
+ reader.skipField();
548
+ break;
549
+ }
550
+ }
551
+ return msg;
552
+ };
553
+
554
+
555
+ /**
556
+ * Serializes the message to binary data (in protobuf wire format).
557
+ * @return {!Uint8Array}
558
+ */
559
+ proto.user.RegistrationRequest.prototype.serializeBinary = function() {
560
+ var writer = new jspb.BinaryWriter();
561
+ proto.user.RegistrationRequest.serializeBinaryToWriter(this, writer);
562
+ return writer.getResultBuffer();
563
+ };
564
+
565
+
566
+ /**
567
+ * Serializes the given message to binary data (in protobuf wire
568
+ * format), writing to the given BinaryWriter.
569
+ * @param {!proto.user.RegistrationRequest} message
570
+ * @param {!jspb.BinaryWriter} writer
571
+ * @suppress {unusedLocalVariables} f is only used for nested messages
572
+ */
573
+ proto.user.RegistrationRequest.serializeBinaryToWriter = function(message, writer) {
574
+ var f = undefined;
575
+ f = message.getEmail();
576
+ if (f.length > 0) {
577
+ writer.writeString(
578
+ 1,
579
+ f
580
+ );
581
+ }
582
+ f = message.getPassword();
583
+ if (f.length > 0) {
584
+ writer.writeString(
585
+ 2,
586
+ f
587
+ );
588
+ }
589
+ f = message.getCurrency();
590
+ if (f.length > 0) {
591
+ writer.writeString(
592
+ 3,
593
+ f
594
+ );
595
+ }
596
+ f = message.getCountry();
597
+ if (f.length > 0) {
598
+ writer.writeString(
599
+ 4,
600
+ f
601
+ );
602
+ }
603
+ f = /** @type {string} */ (jspb.Message.getField(message, 5));
604
+ if (f != null) {
605
+ writer.writeString(
606
+ 5,
607
+ f
608
+ );
609
+ }
610
+ f = /** @type {string} */ (jspb.Message.getField(message, 6));
611
+ if (f != null) {
612
+ writer.writeString(
613
+ 6,
614
+ f
615
+ );
616
+ }
617
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
618
+ if (f != null) {
619
+ writer.writeString(
620
+ 7,
621
+ f
622
+ );
623
+ }
624
+ f = /** @type {string} */ (jspb.Message.getField(message, 8));
625
+ if (f != null) {
626
+ writer.writeString(
627
+ 8,
628
+ f
629
+ );
630
+ }
631
+ };
632
+
633
+
634
+ /**
635
+ * optional string email = 1;
636
+ * @return {string}
637
+ */
638
+ proto.user.RegistrationRequest.prototype.getEmail = function() {
639
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
640
+ };
641
+
642
+
643
+ /**
644
+ * @param {string} value
645
+ * @return {!proto.user.RegistrationRequest} returns this
646
+ */
647
+ proto.user.RegistrationRequest.prototype.setEmail = function(value) {
648
+ return jspb.Message.setProto3StringField(this, 1, value);
649
+ };
650
+
651
+
652
+ /**
653
+ * optional string password = 2;
654
+ * @return {string}
655
+ */
656
+ proto.user.RegistrationRequest.prototype.getPassword = function() {
657
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
658
+ };
659
+
660
+
661
+ /**
662
+ * @param {string} value
663
+ * @return {!proto.user.RegistrationRequest} returns this
664
+ */
665
+ proto.user.RegistrationRequest.prototype.setPassword = function(value) {
666
+ return jspb.Message.setProto3StringField(this, 2, value);
667
+ };
668
+
669
+
670
+ /**
671
+ * optional string currency = 3;
672
+ * @return {string}
673
+ */
674
+ proto.user.RegistrationRequest.prototype.getCurrency = function() {
675
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
676
+ };
677
+
678
+
679
+ /**
680
+ * @param {string} value
681
+ * @return {!proto.user.RegistrationRequest} returns this
682
+ */
683
+ proto.user.RegistrationRequest.prototype.setCurrency = function(value) {
684
+ return jspb.Message.setProto3StringField(this, 3, value);
685
+ };
686
+
687
+
688
+ /**
689
+ * optional string country = 4;
690
+ * @return {string}
691
+ */
692
+ proto.user.RegistrationRequest.prototype.getCountry = function() {
693
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
694
+ };
695
+
696
+
697
+ /**
698
+ * @param {string} value
699
+ * @return {!proto.user.RegistrationRequest} returns this
700
+ */
701
+ proto.user.RegistrationRequest.prototype.setCountry = function(value) {
702
+ return jspb.Message.setProto3StringField(this, 4, value);
703
+ };
704
+
705
+
706
+ /**
707
+ * optional string first_name = 5;
708
+ * @return {string}
709
+ */
710
+ proto.user.RegistrationRequest.prototype.getFirstName = function() {
711
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
712
+ };
713
+
714
+
715
+ /**
716
+ * @param {string} value
717
+ * @return {!proto.user.RegistrationRequest} returns this
718
+ */
719
+ proto.user.RegistrationRequest.prototype.setFirstName = function(value) {
720
+ return jspb.Message.setField(this, 5, value);
721
+ };
722
+
723
+
724
+ /**
725
+ * Clears the field making it undefined.
726
+ * @return {!proto.user.RegistrationRequest} returns this
727
+ */
728
+ proto.user.RegistrationRequest.prototype.clearFirstName = function() {
729
+ return jspb.Message.setField(this, 5, undefined);
730
+ };
731
+
732
+
733
+ /**
734
+ * Returns whether this field is set.
735
+ * @return {boolean}
736
+ */
737
+ proto.user.RegistrationRequest.prototype.hasFirstName = function() {
738
+ return jspb.Message.getField(this, 5) != null;
739
+ };
740
+
741
+
742
+ /**
743
+ * optional string last_name = 6;
744
+ * @return {string}
745
+ */
746
+ proto.user.RegistrationRequest.prototype.getLastName = function() {
747
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
748
+ };
749
+
750
+
751
+ /**
752
+ * @param {string} value
753
+ * @return {!proto.user.RegistrationRequest} returns this
754
+ */
755
+ proto.user.RegistrationRequest.prototype.setLastName = function(value) {
756
+ return jspb.Message.setField(this, 6, value);
757
+ };
758
+
759
+
760
+ /**
761
+ * Clears the field making it undefined.
762
+ * @return {!proto.user.RegistrationRequest} returns this
763
+ */
764
+ proto.user.RegistrationRequest.prototype.clearLastName = function() {
765
+ return jspb.Message.setField(this, 6, undefined);
766
+ };
767
+
768
+
769
+ /**
770
+ * Returns whether this field is set.
771
+ * @return {boolean}
772
+ */
773
+ proto.user.RegistrationRequest.prototype.hasLastName = function() {
774
+ return jspb.Message.getField(this, 6) != null;
775
+ };
776
+
777
+
778
+ /**
779
+ * optional string birthday = 7;
780
+ * @return {string}
781
+ */
782
+ proto.user.RegistrationRequest.prototype.getBirthday = function() {
783
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
784
+ };
785
+
786
+
787
+ /**
788
+ * @param {string} value
789
+ * @return {!proto.user.RegistrationRequest} returns this
790
+ */
791
+ proto.user.RegistrationRequest.prototype.setBirthday = function(value) {
792
+ return jspb.Message.setField(this, 7, value);
793
+ };
794
+
795
+
796
+ /**
797
+ * Clears the field making it undefined.
798
+ * @return {!proto.user.RegistrationRequest} returns this
799
+ */
800
+ proto.user.RegistrationRequest.prototype.clearBirthday = function() {
801
+ return jspb.Message.setField(this, 7, undefined);
802
+ };
803
+
804
+
805
+ /**
806
+ * Returns whether this field is set.
807
+ * @return {boolean}
808
+ */
809
+ proto.user.RegistrationRequest.prototype.hasBirthday = function() {
810
+ return jspb.Message.getField(this, 7) != null;
811
+ };
812
+
813
+
814
+ /**
815
+ * optional string locale = 8;
816
+ * @return {string}
817
+ */
818
+ proto.user.RegistrationRequest.prototype.getLocale = function() {
819
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
820
+ };
821
+
822
+
823
+ /**
824
+ * @param {string} value
825
+ * @return {!proto.user.RegistrationRequest} returns this
826
+ */
827
+ proto.user.RegistrationRequest.prototype.setLocale = function(value) {
828
+ return jspb.Message.setField(this, 8, value);
829
+ };
830
+
831
+
832
+ /**
833
+ * Clears the field making it undefined.
834
+ * @return {!proto.user.RegistrationRequest} returns this
835
+ */
836
+ proto.user.RegistrationRequest.prototype.clearLocale = function() {
837
+ return jspb.Message.setField(this, 8, undefined);
838
+ };
839
+
840
+
841
+ /**
842
+ * Returns whether this field is set.
843
+ * @return {boolean}
844
+ */
845
+ proto.user.RegistrationRequest.prototype.hasLocale = function() {
846
+ return jspb.Message.getField(this, 8) != null;
847
+ };
848
+
849
+
850
+
851
+
852
+
853
+ if (jspb.Message.GENERATE_TO_OBJECT) {
854
+ /**
855
+ * Creates an object representation of this proto.
856
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
857
+ * Optional fields that are not set will be set to undefined.
858
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
859
+ * For the list of reserved names please see:
860
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
861
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
862
+ * JSPB instance for transitional soy proto support:
863
+ * http://goto/soy-param-migration
864
+ * @return {!Object}
865
+ */
866
+ proto.user.LoggedInResponse.prototype.toObject = function(opt_includeInstance) {
867
+ return proto.user.LoggedInResponse.toObject(opt_includeInstance, this);
868
+ };
869
+
870
+
871
+ /**
872
+ * Static version of the {@see toObject} method.
873
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
874
+ * the JSPB instance for transitional soy proto support:
875
+ * http://goto/soy-param-migration
876
+ * @param {!proto.user.LoggedInResponse} msg The msg instance to transform.
877
+ * @return {!Object}
878
+ * @suppress {unusedLocalVariables} f is only used for nested messages
879
+ */
880
+ proto.user.LoggedInResponse.toObject = function(includeInstance, msg) {
881
+ var f, obj = {
882
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
883
+ publicId: jspb.Message.getFieldWithDefault(msg, 2, ""),
884
+ currency: jspb.Message.getFieldWithDefault(msg, 3, ""),
885
+ country: jspb.Message.getFieldWithDefault(msg, 4, "")
886
+ };
887
+
888
+ if (includeInstance) {
889
+ obj.$jspbMessageInstance = msg;
890
+ }
891
+ return obj;
892
+ };
893
+ }
894
+
895
+
896
+ /**
897
+ * Deserializes binary data (in protobuf wire format).
898
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
899
+ * @return {!proto.user.LoggedInResponse}
900
+ */
901
+ proto.user.LoggedInResponse.deserializeBinary = function(bytes) {
902
+ var reader = new jspb.BinaryReader(bytes);
903
+ var msg = new proto.user.LoggedInResponse;
904
+ return proto.user.LoggedInResponse.deserializeBinaryFromReader(msg, reader);
905
+ };
906
+
907
+
908
+ /**
909
+ * Deserializes binary data (in protobuf wire format) from the
910
+ * given reader into the given message object.
911
+ * @param {!proto.user.LoggedInResponse} msg The message object to deserialize into.
912
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
913
+ * @return {!proto.user.LoggedInResponse}
914
+ */
915
+ proto.user.LoggedInResponse.deserializeBinaryFromReader = function(msg, reader) {
916
+ while (reader.nextField()) {
917
+ if (reader.isEndGroup()) {
918
+ break;
919
+ }
920
+ var field = reader.getFieldNumber();
921
+ switch (field) {
922
+ case 1:
923
+ var value = /** @type {number} */ (reader.readInt32());
924
+ msg.setId(value);
925
+ break;
926
+ case 2:
927
+ var value = /** @type {string} */ (reader.readString());
928
+ msg.setPublicId(value);
929
+ break;
930
+ case 3:
931
+ var value = /** @type {string} */ (reader.readString());
932
+ msg.setCurrency(value);
933
+ break;
934
+ case 4:
935
+ var value = /** @type {string} */ (reader.readString());
936
+ msg.setCountry(value);
937
+ break;
938
+ default:
939
+ reader.skipField();
940
+ break;
941
+ }
942
+ }
943
+ return msg;
944
+ };
945
+
946
+
947
+ /**
948
+ * Serializes the message to binary data (in protobuf wire format).
949
+ * @return {!Uint8Array}
950
+ */
951
+ proto.user.LoggedInResponse.prototype.serializeBinary = function() {
952
+ var writer = new jspb.BinaryWriter();
953
+ proto.user.LoggedInResponse.serializeBinaryToWriter(this, writer);
954
+ return writer.getResultBuffer();
955
+ };
956
+
957
+
958
+ /**
959
+ * Serializes the given message to binary data (in protobuf wire
960
+ * format), writing to the given BinaryWriter.
961
+ * @param {!proto.user.LoggedInResponse} message
962
+ * @param {!jspb.BinaryWriter} writer
963
+ * @suppress {unusedLocalVariables} f is only used for nested messages
964
+ */
965
+ proto.user.LoggedInResponse.serializeBinaryToWriter = function(message, writer) {
966
+ var f = undefined;
967
+ f = message.getId();
968
+ if (f !== 0) {
969
+ writer.writeInt32(
970
+ 1,
971
+ f
972
+ );
973
+ }
974
+ f = message.getPublicId();
975
+ if (f.length > 0) {
976
+ writer.writeString(
977
+ 2,
978
+ f
979
+ );
980
+ }
981
+ f = message.getCurrency();
982
+ if (f.length > 0) {
983
+ writer.writeString(
984
+ 3,
985
+ f
986
+ );
987
+ }
988
+ f = message.getCountry();
989
+ if (f.length > 0) {
990
+ writer.writeString(
991
+ 4,
992
+ f
993
+ );
994
+ }
995
+ };
996
+
997
+
998
+ /**
999
+ * optional int32 id = 1;
1000
+ * @return {number}
1001
+ */
1002
+ proto.user.LoggedInResponse.prototype.getId = function() {
1003
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1004
+ };
1005
+
1006
+
1007
+ /**
1008
+ * @param {number} value
1009
+ * @return {!proto.user.LoggedInResponse} returns this
1010
+ */
1011
+ proto.user.LoggedInResponse.prototype.setId = function(value) {
1012
+ return jspb.Message.setProto3IntField(this, 1, value);
1013
+ };
1014
+
1015
+
1016
+ /**
1017
+ * optional string public_id = 2;
1018
+ * @return {string}
1019
+ */
1020
+ proto.user.LoggedInResponse.prototype.getPublicId = function() {
1021
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1022
+ };
1023
+
1024
+
1025
+ /**
1026
+ * @param {string} value
1027
+ * @return {!proto.user.LoggedInResponse} returns this
1028
+ */
1029
+ proto.user.LoggedInResponse.prototype.setPublicId = function(value) {
1030
+ return jspb.Message.setProto3StringField(this, 2, value);
1031
+ };
1032
+
1033
+
1034
+ /**
1035
+ * optional string currency = 3;
1036
+ * @return {string}
1037
+ */
1038
+ proto.user.LoggedInResponse.prototype.getCurrency = function() {
1039
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1040
+ };
1041
+
1042
+
1043
+ /**
1044
+ * @param {string} value
1045
+ * @return {!proto.user.LoggedInResponse} returns this
1046
+ */
1047
+ proto.user.LoggedInResponse.prototype.setCurrency = function(value) {
1048
+ return jspb.Message.setProto3StringField(this, 3, value);
1049
+ };
1050
+
1051
+
1052
+ /**
1053
+ * optional string country = 4;
1054
+ * @return {string}
1055
+ */
1056
+ proto.user.LoggedInResponse.prototype.getCountry = function() {
1057
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1058
+ };
1059
+
1060
+
1061
+ /**
1062
+ * @param {string} value
1063
+ * @return {!proto.user.LoggedInResponse} returns this
1064
+ */
1065
+ proto.user.LoggedInResponse.prototype.setCountry = function(value) {
1066
+ return jspb.Message.setProto3StringField(this, 4, value);
1067
+ };
1068
+
1069
+
1070
+
1071
+
1072
+
1073
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1074
+ /**
1075
+ * Creates an object representation of this proto.
1076
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1077
+ * Optional fields that are not set will be set to undefined.
1078
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1079
+ * For the list of reserved names please see:
1080
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1081
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1082
+ * JSPB instance for transitional soy proto support:
1083
+ * http://goto/soy-param-migration
1084
+ * @return {!Object}
1085
+ */
1086
+ proto.user.LoginRequest.prototype.toObject = function(opt_includeInstance) {
1087
+ return proto.user.LoginRequest.toObject(opt_includeInstance, this);
1088
+ };
1089
+
1090
+
1091
+ /**
1092
+ * Static version of the {@see toObject} method.
1093
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1094
+ * the JSPB instance for transitional soy proto support:
1095
+ * http://goto/soy-param-migration
1096
+ * @param {!proto.user.LoginRequest} msg The msg instance to transform.
1097
+ * @return {!Object}
1098
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1099
+ */
1100
+ proto.user.LoginRequest.toObject = function(includeInstance, msg) {
1101
+ var f, obj = {
1102
+ email: jspb.Message.getFieldWithDefault(msg, 1, ""),
1103
+ password: jspb.Message.getFieldWithDefault(msg, 2, "")
1104
+ };
1105
+
1106
+ if (includeInstance) {
1107
+ obj.$jspbMessageInstance = msg;
1108
+ }
1109
+ return obj;
1110
+ };
1111
+ }
1112
+
1113
+
1114
+ /**
1115
+ * Deserializes binary data (in protobuf wire format).
1116
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1117
+ * @return {!proto.user.LoginRequest}
1118
+ */
1119
+ proto.user.LoginRequest.deserializeBinary = function(bytes) {
1120
+ var reader = new jspb.BinaryReader(bytes);
1121
+ var msg = new proto.user.LoginRequest;
1122
+ return proto.user.LoginRequest.deserializeBinaryFromReader(msg, reader);
1123
+ };
1124
+
1125
+
1126
+ /**
1127
+ * Deserializes binary data (in protobuf wire format) from the
1128
+ * given reader into the given message object.
1129
+ * @param {!proto.user.LoginRequest} msg The message object to deserialize into.
1130
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1131
+ * @return {!proto.user.LoginRequest}
1132
+ */
1133
+ proto.user.LoginRequest.deserializeBinaryFromReader = function(msg, reader) {
1134
+ while (reader.nextField()) {
1135
+ if (reader.isEndGroup()) {
1136
+ break;
1137
+ }
1138
+ var field = reader.getFieldNumber();
1139
+ switch (field) {
1140
+ case 1:
1141
+ var value = /** @type {string} */ (reader.readString());
1142
+ msg.setEmail(value);
1143
+ break;
1144
+ case 2:
1145
+ var value = /** @type {string} */ (reader.readString());
1146
+ msg.setPassword(value);
1147
+ break;
1148
+ default:
1149
+ reader.skipField();
1150
+ break;
1151
+ }
1152
+ }
1153
+ return msg;
1154
+ };
1155
+
1156
+
1157
+ /**
1158
+ * Serializes the message to binary data (in protobuf wire format).
1159
+ * @return {!Uint8Array}
1160
+ */
1161
+ proto.user.LoginRequest.prototype.serializeBinary = function() {
1162
+ var writer = new jspb.BinaryWriter();
1163
+ proto.user.LoginRequest.serializeBinaryToWriter(this, writer);
1164
+ return writer.getResultBuffer();
1165
+ };
1166
+
1167
+
1168
+ /**
1169
+ * Serializes the given message to binary data (in protobuf wire
1170
+ * format), writing to the given BinaryWriter.
1171
+ * @param {!proto.user.LoginRequest} message
1172
+ * @param {!jspb.BinaryWriter} writer
1173
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1174
+ */
1175
+ proto.user.LoginRequest.serializeBinaryToWriter = function(message, writer) {
1176
+ var f = undefined;
1177
+ f = message.getEmail();
1178
+ if (f.length > 0) {
1179
+ writer.writeString(
1180
+ 1,
1181
+ f
1182
+ );
1183
+ }
1184
+ f = message.getPassword();
1185
+ if (f.length > 0) {
1186
+ writer.writeString(
1187
+ 2,
1188
+ f
1189
+ );
1190
+ }
1191
+ };
1192
+
1193
+
1194
+ /**
1195
+ * optional string email = 1;
1196
+ * @return {string}
1197
+ */
1198
+ proto.user.LoginRequest.prototype.getEmail = function() {
1199
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1200
+ };
1201
+
1202
+
1203
+ /**
1204
+ * @param {string} value
1205
+ * @return {!proto.user.LoginRequest} returns this
1206
+ */
1207
+ proto.user.LoginRequest.prototype.setEmail = function(value) {
1208
+ return jspb.Message.setProto3StringField(this, 1, value);
1209
+ };
1210
+
1211
+
1212
+ /**
1213
+ * optional string password = 2;
1214
+ * @return {string}
1215
+ */
1216
+ proto.user.LoginRequest.prototype.getPassword = function() {
1217
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1218
+ };
1219
+
1220
+
1221
+ /**
1222
+ * @param {string} value
1223
+ * @return {!proto.user.LoginRequest} returns this
1224
+ */
1225
+ proto.user.LoginRequest.prototype.setPassword = function(value) {
1226
+ return jspb.Message.setProto3StringField(this, 2, value);
1227
+ };
1228
+
1229
+
1230
+
1231
+
1232
+
1233
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1234
+ /**
1235
+ * Creates an object representation of this proto.
1236
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1237
+ * Optional fields that are not set will be set to undefined.
1238
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1239
+ * For the list of reserved names please see:
1240
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1241
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1242
+ * JSPB instance for transitional soy proto support:
1243
+ * http://goto/soy-param-migration
1244
+ * @return {!Object}
1245
+ */
1246
+ proto.user.UserDataRequest.prototype.toObject = function(opt_includeInstance) {
1247
+ return proto.user.UserDataRequest.toObject(opt_includeInstance, this);
1248
+ };
1249
+
1250
+
1251
+ /**
1252
+ * Static version of the {@see toObject} method.
1253
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1254
+ * the JSPB instance for transitional soy proto support:
1255
+ * http://goto/soy-param-migration
1256
+ * @param {!proto.user.UserDataRequest} msg The msg instance to transform.
1257
+ * @return {!Object}
1258
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1259
+ */
1260
+ proto.user.UserDataRequest.toObject = function(includeInstance, msg) {
1261
+ var f, obj = {
1262
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0)
1263
+ };
1264
+
1265
+ if (includeInstance) {
1266
+ obj.$jspbMessageInstance = msg;
1267
+ }
1268
+ return obj;
1269
+ };
1270
+ }
1271
+
1272
+
1273
+ /**
1274
+ * Deserializes binary data (in protobuf wire format).
1275
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1276
+ * @return {!proto.user.UserDataRequest}
1277
+ */
1278
+ proto.user.UserDataRequest.deserializeBinary = function(bytes) {
1279
+ var reader = new jspb.BinaryReader(bytes);
1280
+ var msg = new proto.user.UserDataRequest;
1281
+ return proto.user.UserDataRequest.deserializeBinaryFromReader(msg, reader);
1282
+ };
1283
+
1284
+
1285
+ /**
1286
+ * Deserializes binary data (in protobuf wire format) from the
1287
+ * given reader into the given message object.
1288
+ * @param {!proto.user.UserDataRequest} msg The message object to deserialize into.
1289
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1290
+ * @return {!proto.user.UserDataRequest}
1291
+ */
1292
+ proto.user.UserDataRequest.deserializeBinaryFromReader = function(msg, reader) {
1293
+ while (reader.nextField()) {
1294
+ if (reader.isEndGroup()) {
1295
+ break;
1296
+ }
1297
+ var field = reader.getFieldNumber();
1298
+ switch (field) {
1299
+ case 1:
1300
+ var value = /** @type {number} */ (reader.readInt32());
1301
+ msg.setId(value);
1302
+ break;
1303
+ default:
1304
+ reader.skipField();
1305
+ break;
1306
+ }
1307
+ }
1308
+ return msg;
1309
+ };
1310
+
1311
+
1312
+ /**
1313
+ * Serializes the message to binary data (in protobuf wire format).
1314
+ * @return {!Uint8Array}
1315
+ */
1316
+ proto.user.UserDataRequest.prototype.serializeBinary = function() {
1317
+ var writer = new jspb.BinaryWriter();
1318
+ proto.user.UserDataRequest.serializeBinaryToWriter(this, writer);
1319
+ return writer.getResultBuffer();
1320
+ };
1321
+
1322
+
1323
+ /**
1324
+ * Serializes the given message to binary data (in protobuf wire
1325
+ * format), writing to the given BinaryWriter.
1326
+ * @param {!proto.user.UserDataRequest} message
1327
+ * @param {!jspb.BinaryWriter} writer
1328
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1329
+ */
1330
+ proto.user.UserDataRequest.serializeBinaryToWriter = function(message, writer) {
1331
+ var f = undefined;
1332
+ f = message.getId();
1333
+ if (f !== 0) {
1334
+ writer.writeInt32(
1335
+ 1,
1336
+ f
1337
+ );
1338
+ }
1339
+ };
1340
+
1341
+
1342
+ /**
1343
+ * optional int32 id = 1;
1344
+ * @return {number}
1345
+ */
1346
+ proto.user.UserDataRequest.prototype.getId = function() {
1347
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1348
+ };
1349
+
1350
+
1351
+ /**
1352
+ * @param {number} value
1353
+ * @return {!proto.user.UserDataRequest} returns this
1354
+ */
1355
+ proto.user.UserDataRequest.prototype.setId = function(value) {
1356
+ return jspb.Message.setProto3IntField(this, 1, value);
1357
+ };
1358
+
1359
+
1360
+
1361
+
1362
+
1363
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1364
+ /**
1365
+ * Creates an object representation of this proto.
1366
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1367
+ * Optional fields that are not set will be set to undefined.
1368
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1369
+ * For the list of reserved names please see:
1370
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1371
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1372
+ * JSPB instance for transitional soy proto support:
1373
+ * http://goto/soy-param-migration
1374
+ * @return {!Object}
1375
+ */
1376
+ proto.user.UserDataResponse.prototype.toObject = function(opt_includeInstance) {
1377
+ return proto.user.UserDataResponse.toObject(opt_includeInstance, this);
1378
+ };
1379
+
1380
+
1381
+ /**
1382
+ * Static version of the {@see toObject} method.
1383
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1384
+ * the JSPB instance for transitional soy proto support:
1385
+ * http://goto/soy-param-migration
1386
+ * @param {!proto.user.UserDataResponse} msg The msg instance to transform.
1387
+ * @return {!Object}
1388
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1389
+ */
1390
+ proto.user.UserDataResponse.toObject = function(includeInstance, msg) {
1391
+ var f, obj = {
1392
+ id: jspb.Message.getFieldWithDefault(msg, 1, 0),
1393
+ publicId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1394
+ email: jspb.Message.getFieldWithDefault(msg, 3, ""),
1395
+ currency: jspb.Message.getFieldWithDefault(msg, 4, ""),
1396
+ country: jspb.Message.getFieldWithDefault(msg, 5, ""),
1397
+ firstName: jspb.Message.getFieldWithDefault(msg, 6, ""),
1398
+ lastName: jspb.Message.getFieldWithDefault(msg, 7, ""),
1399
+ birthday: jspb.Message.getFieldWithDefault(msg, 8, ""),
1400
+ locale: jspb.Message.getFieldWithDefault(msg, 9, "")
1401
+ };
1402
+
1403
+ if (includeInstance) {
1404
+ obj.$jspbMessageInstance = msg;
1405
+ }
1406
+ return obj;
1407
+ };
1408
+ }
1409
+
1410
+
1411
+ /**
1412
+ * Deserializes binary data (in protobuf wire format).
1413
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1414
+ * @return {!proto.user.UserDataResponse}
1415
+ */
1416
+ proto.user.UserDataResponse.deserializeBinary = function(bytes) {
1417
+ var reader = new jspb.BinaryReader(bytes);
1418
+ var msg = new proto.user.UserDataResponse;
1419
+ return proto.user.UserDataResponse.deserializeBinaryFromReader(msg, reader);
1420
+ };
1421
+
1422
+
1423
+ /**
1424
+ * Deserializes binary data (in protobuf wire format) from the
1425
+ * given reader into the given message object.
1426
+ * @param {!proto.user.UserDataResponse} msg The message object to deserialize into.
1427
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1428
+ * @return {!proto.user.UserDataResponse}
1429
+ */
1430
+ proto.user.UserDataResponse.deserializeBinaryFromReader = function(msg, reader) {
1431
+ while (reader.nextField()) {
1432
+ if (reader.isEndGroup()) {
1433
+ break;
1434
+ }
1435
+ var field = reader.getFieldNumber();
1436
+ switch (field) {
1437
+ case 1:
1438
+ var value = /** @type {number} */ (reader.readInt32());
1439
+ msg.setId(value);
1440
+ break;
1441
+ case 2:
1442
+ var value = /** @type {string} */ (reader.readString());
1443
+ msg.setPublicId(value);
1444
+ break;
1445
+ case 3:
1446
+ var value = /** @type {string} */ (reader.readString());
1447
+ msg.setEmail(value);
1448
+ break;
1449
+ case 4:
1450
+ var value = /** @type {string} */ (reader.readString());
1451
+ msg.setCurrency(value);
1452
+ break;
1453
+ case 5:
1454
+ var value = /** @type {string} */ (reader.readString());
1455
+ msg.setCountry(value);
1456
+ break;
1457
+ case 6:
1458
+ var value = /** @type {string} */ (reader.readString());
1459
+ msg.setFirstName(value);
1460
+ break;
1461
+ case 7:
1462
+ var value = /** @type {string} */ (reader.readString());
1463
+ msg.setLastName(value);
1464
+ break;
1465
+ case 8:
1466
+ var value = /** @type {string} */ (reader.readString());
1467
+ msg.setBirthday(value);
1468
+ break;
1469
+ case 9:
1470
+ var value = /** @type {string} */ (reader.readString());
1471
+ msg.setLocale(value);
1472
+ break;
1473
+ default:
1474
+ reader.skipField();
1475
+ break;
1476
+ }
1477
+ }
1478
+ return msg;
1479
+ };
1480
+
1481
+
1482
+ /**
1483
+ * Serializes the message to binary data (in protobuf wire format).
1484
+ * @return {!Uint8Array}
1485
+ */
1486
+ proto.user.UserDataResponse.prototype.serializeBinary = function() {
1487
+ var writer = new jspb.BinaryWriter();
1488
+ proto.user.UserDataResponse.serializeBinaryToWriter(this, writer);
1489
+ return writer.getResultBuffer();
1490
+ };
1491
+
1492
+
1493
+ /**
1494
+ * Serializes the given message to binary data (in protobuf wire
1495
+ * format), writing to the given BinaryWriter.
1496
+ * @param {!proto.user.UserDataResponse} message
1497
+ * @param {!jspb.BinaryWriter} writer
1498
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1499
+ */
1500
+ proto.user.UserDataResponse.serializeBinaryToWriter = function(message, writer) {
1501
+ var f = undefined;
1502
+ f = message.getId();
1503
+ if (f !== 0) {
1504
+ writer.writeInt32(
1505
+ 1,
1506
+ f
1507
+ );
1508
+ }
1509
+ f = message.getPublicId();
1510
+ if (f.length > 0) {
1511
+ writer.writeString(
1512
+ 2,
1513
+ f
1514
+ );
1515
+ }
1516
+ f = message.getEmail();
1517
+ if (f.length > 0) {
1518
+ writer.writeString(
1519
+ 3,
1520
+ f
1521
+ );
1522
+ }
1523
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
1524
+ if (f != null) {
1525
+ writer.writeString(
1526
+ 4,
1527
+ f
1528
+ );
1529
+ }
1530
+ f = /** @type {string} */ (jspb.Message.getField(message, 5));
1531
+ if (f != null) {
1532
+ writer.writeString(
1533
+ 5,
1534
+ f
1535
+ );
1536
+ }
1537
+ f = /** @type {string} */ (jspb.Message.getField(message, 6));
1538
+ if (f != null) {
1539
+ writer.writeString(
1540
+ 6,
1541
+ f
1542
+ );
1543
+ }
1544
+ f = /** @type {string} */ (jspb.Message.getField(message, 7));
1545
+ if (f != null) {
1546
+ writer.writeString(
1547
+ 7,
1548
+ f
1549
+ );
1550
+ }
1551
+ f = /** @type {string} */ (jspb.Message.getField(message, 8));
1552
+ if (f != null) {
1553
+ writer.writeString(
1554
+ 8,
1555
+ f
1556
+ );
1557
+ }
1558
+ f = /** @type {string} */ (jspb.Message.getField(message, 9));
1559
+ if (f != null) {
1560
+ writer.writeString(
1561
+ 9,
1562
+ f
1563
+ );
1564
+ }
1565
+ };
1566
+
1567
+
1568
+ /**
1569
+ * optional int32 id = 1;
1570
+ * @return {number}
1571
+ */
1572
+ proto.user.UserDataResponse.prototype.getId = function() {
1573
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1574
+ };
1575
+
1576
+
1577
+ /**
1578
+ * @param {number} value
1579
+ * @return {!proto.user.UserDataResponse} returns this
1580
+ */
1581
+ proto.user.UserDataResponse.prototype.setId = function(value) {
1582
+ return jspb.Message.setProto3IntField(this, 1, value);
1583
+ };
1584
+
1585
+
1586
+ /**
1587
+ * optional string public_id = 2;
1588
+ * @return {string}
1589
+ */
1590
+ proto.user.UserDataResponse.prototype.getPublicId = function() {
1591
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1592
+ };
1593
+
1594
+
1595
+ /**
1596
+ * @param {string} value
1597
+ * @return {!proto.user.UserDataResponse} returns this
1598
+ */
1599
+ proto.user.UserDataResponse.prototype.setPublicId = function(value) {
1600
+ return jspb.Message.setProto3StringField(this, 2, value);
1601
+ };
1602
+
1603
+
1604
+ /**
1605
+ * optional string email = 3;
1606
+ * @return {string}
1607
+ */
1608
+ proto.user.UserDataResponse.prototype.getEmail = function() {
1609
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1610
+ };
1611
+
1612
+
1613
+ /**
1614
+ * @param {string} value
1615
+ * @return {!proto.user.UserDataResponse} returns this
1616
+ */
1617
+ proto.user.UserDataResponse.prototype.setEmail = function(value) {
1618
+ return jspb.Message.setProto3StringField(this, 3, value);
1619
+ };
1620
+
1621
+
1622
+ /**
1623
+ * optional string currency = 4;
1624
+ * @return {string}
1625
+ */
1626
+ proto.user.UserDataResponse.prototype.getCurrency = function() {
1627
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1628
+ };
1629
+
1630
+
1631
+ /**
1632
+ * @param {string} value
1633
+ * @return {!proto.user.UserDataResponse} returns this
1634
+ */
1635
+ proto.user.UserDataResponse.prototype.setCurrency = function(value) {
1636
+ return jspb.Message.setField(this, 4, value);
1637
+ };
1638
+
1639
+
1640
+ /**
1641
+ * Clears the field making it undefined.
1642
+ * @return {!proto.user.UserDataResponse} returns this
1643
+ */
1644
+ proto.user.UserDataResponse.prototype.clearCurrency = function() {
1645
+ return jspb.Message.setField(this, 4, undefined);
1646
+ };
1647
+
1648
+
1649
+ /**
1650
+ * Returns whether this field is set.
1651
+ * @return {boolean}
1652
+ */
1653
+ proto.user.UserDataResponse.prototype.hasCurrency = function() {
1654
+ return jspb.Message.getField(this, 4) != null;
1655
+ };
1656
+
1657
+
1658
+ /**
1659
+ * optional string country = 5;
1660
+ * @return {string}
1661
+ */
1662
+ proto.user.UserDataResponse.prototype.getCountry = function() {
1663
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
1664
+ };
1665
+
1666
+
1667
+ /**
1668
+ * @param {string} value
1669
+ * @return {!proto.user.UserDataResponse} returns this
1670
+ */
1671
+ proto.user.UserDataResponse.prototype.setCountry = function(value) {
1672
+ return jspb.Message.setField(this, 5, value);
1673
+ };
1674
+
1675
+
1676
+ /**
1677
+ * Clears the field making it undefined.
1678
+ * @return {!proto.user.UserDataResponse} returns this
1679
+ */
1680
+ proto.user.UserDataResponse.prototype.clearCountry = function() {
1681
+ return jspb.Message.setField(this, 5, undefined);
1682
+ };
1683
+
1684
+
1685
+ /**
1686
+ * Returns whether this field is set.
1687
+ * @return {boolean}
1688
+ */
1689
+ proto.user.UserDataResponse.prototype.hasCountry = function() {
1690
+ return jspb.Message.getField(this, 5) != null;
1691
+ };
1692
+
1693
+
1694
+ /**
1695
+ * optional string first_name = 6;
1696
+ * @return {string}
1697
+ */
1698
+ proto.user.UserDataResponse.prototype.getFirstName = function() {
1699
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
1700
+ };
1701
+
1702
+
1703
+ /**
1704
+ * @param {string} value
1705
+ * @return {!proto.user.UserDataResponse} returns this
1706
+ */
1707
+ proto.user.UserDataResponse.prototype.setFirstName = function(value) {
1708
+ return jspb.Message.setField(this, 6, value);
1709
+ };
1710
+
1711
+
1712
+ /**
1713
+ * Clears the field making it undefined.
1714
+ * @return {!proto.user.UserDataResponse} returns this
1715
+ */
1716
+ proto.user.UserDataResponse.prototype.clearFirstName = function() {
1717
+ return jspb.Message.setField(this, 6, undefined);
1718
+ };
1719
+
1720
+
1721
+ /**
1722
+ * Returns whether this field is set.
1723
+ * @return {boolean}
1724
+ */
1725
+ proto.user.UserDataResponse.prototype.hasFirstName = function() {
1726
+ return jspb.Message.getField(this, 6) != null;
1727
+ };
1728
+
1729
+
1730
+ /**
1731
+ * optional string last_name = 7;
1732
+ * @return {string}
1733
+ */
1734
+ proto.user.UserDataResponse.prototype.getLastName = function() {
1735
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
1736
+ };
1737
+
1738
+
1739
+ /**
1740
+ * @param {string} value
1741
+ * @return {!proto.user.UserDataResponse} returns this
1742
+ */
1743
+ proto.user.UserDataResponse.prototype.setLastName = function(value) {
1744
+ return jspb.Message.setField(this, 7, value);
1745
+ };
1746
+
1747
+
1748
+ /**
1749
+ * Clears the field making it undefined.
1750
+ * @return {!proto.user.UserDataResponse} returns this
1751
+ */
1752
+ proto.user.UserDataResponse.prototype.clearLastName = function() {
1753
+ return jspb.Message.setField(this, 7, undefined);
1754
+ };
1755
+
1756
+
1757
+ /**
1758
+ * Returns whether this field is set.
1759
+ * @return {boolean}
1760
+ */
1761
+ proto.user.UserDataResponse.prototype.hasLastName = function() {
1762
+ return jspb.Message.getField(this, 7) != null;
1763
+ };
1764
+
1765
+
1766
+ /**
1767
+ * optional string birthday = 8;
1768
+ * @return {string}
1769
+ */
1770
+ proto.user.UserDataResponse.prototype.getBirthday = function() {
1771
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
1772
+ };
1773
+
1774
+
1775
+ /**
1776
+ * @param {string} value
1777
+ * @return {!proto.user.UserDataResponse} returns this
1778
+ */
1779
+ proto.user.UserDataResponse.prototype.setBirthday = function(value) {
1780
+ return jspb.Message.setField(this, 8, value);
1781
+ };
1782
+
1783
+
1784
+ /**
1785
+ * Clears the field making it undefined.
1786
+ * @return {!proto.user.UserDataResponse} returns this
1787
+ */
1788
+ proto.user.UserDataResponse.prototype.clearBirthday = function() {
1789
+ return jspb.Message.setField(this, 8, undefined);
1790
+ };
1791
+
1792
+
1793
+ /**
1794
+ * Returns whether this field is set.
1795
+ * @return {boolean}
1796
+ */
1797
+ proto.user.UserDataResponse.prototype.hasBirthday = function() {
1798
+ return jspb.Message.getField(this, 8) != null;
1799
+ };
1800
+
1801
+
1802
+ /**
1803
+ * optional string locale = 9;
1804
+ * @return {string}
1805
+ */
1806
+ proto.user.UserDataResponse.prototype.getLocale = function() {
1807
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
1808
+ };
1809
+
1810
+
1811
+ /**
1812
+ * @param {string} value
1813
+ * @return {!proto.user.UserDataResponse} returns this
1814
+ */
1815
+ proto.user.UserDataResponse.prototype.setLocale = function(value) {
1816
+ return jspb.Message.setField(this, 9, value);
1817
+ };
1818
+
1819
+
1820
+ /**
1821
+ * Clears the field making it undefined.
1822
+ * @return {!proto.user.UserDataResponse} returns this
1823
+ */
1824
+ proto.user.UserDataResponse.prototype.clearLocale = function() {
1825
+ return jspb.Message.setField(this, 9, undefined);
1826
+ };
1827
+
1828
+
1829
+ /**
1830
+ * Returns whether this field is set.
1831
+ * @return {boolean}
1832
+ */
1833
+ proto.user.UserDataResponse.prototype.hasLocale = function() {
1834
+ return jspb.Message.getField(this, 9) != null;
1835
+ };
1836
+
1837
+
1838
+ goog.object.extend(exports, proto.user);