@sniipwebmaster/kyc-client-grpcweb 21.8.3

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,932 @@
1
+ /**
2
+ * @fileoverview
3
+ * @enhanceable
4
+ * @public
5
+ */
6
+ // GENERATED CODE -- DO NOT EDIT!
7
+
8
+ var jspb = require('google-protobuf');
9
+ var goog = jspb;
10
+ var global = Function('return this')();
11
+
12
+ var google_api_annotations_pb = require('./google/api/annotations_pb.js');
13
+ var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
14
+ goog.exportSymbol('proto.kycserviceapi.DocumentStatus', null, global);
15
+ goog.exportSymbol('proto.kycserviceapi.DocumentType', null, global);
16
+ goog.exportSymbol('proto.kycserviceapi.RequestUserKycRequest', null, global);
17
+ goog.exportSymbol('proto.kycserviceapi.RequestedDocument', null, global);
18
+ goog.exportSymbol('proto.kycserviceapi.ResponseCode', null, global);
19
+ goog.exportSymbol('proto.kycserviceapi.UserKycRequest', null, global);
20
+
21
+ /**
22
+ * Generated by JsPbCodeGenerator.
23
+ * @param {Array=} opt_data Optional initial data array, typically from a
24
+ * server response, or constructed directly in Javascript. The array is used
25
+ * in place and becomes part of the constructed object. It is not cloned.
26
+ * If no data is provided, the constructed object will be empty, but still
27
+ * valid.
28
+ * @extends {jspb.Message}
29
+ * @constructor
30
+ */
31
+ proto.kycserviceapi.RequestUserKycRequest = function(opt_data) {
32
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
33
+ };
34
+ goog.inherits(proto.kycserviceapi.RequestUserKycRequest, jspb.Message);
35
+ if (goog.DEBUG && !COMPILED) {
36
+ proto.kycserviceapi.RequestUserKycRequest.displayName = 'proto.kycserviceapi.RequestUserKycRequest';
37
+ }
38
+
39
+
40
+ if (jspb.Message.GENERATE_TO_OBJECT) {
41
+ /**
42
+ * Creates an object representation of this proto suitable for use in Soy templates.
43
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
44
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
45
+ * For the list of reserved names please see:
46
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
47
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
48
+ * for transitional soy proto support: http://goto/soy-param-migration
49
+ * @return {!Object}
50
+ */
51
+ proto.kycserviceapi.RequestUserKycRequest.prototype.toObject = function(opt_includeInstance) {
52
+ return proto.kycserviceapi.RequestUserKycRequest.toObject(opt_includeInstance, this);
53
+ };
54
+
55
+
56
+ /**
57
+ * Static version of the {@see toObject} method.
58
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
59
+ * instance for transitional soy proto support:
60
+ * http://goto/soy-param-migration
61
+ * @param {!proto.kycserviceapi.RequestUserKycRequest} msg The msg instance to transform.
62
+ * @return {!Object}
63
+ */
64
+ proto.kycserviceapi.RequestUserKycRequest.toObject = function(includeInstance, msg) {
65
+ var f, obj = {
66
+ data: (f = msg.getData()) && proto.kycserviceapi.UserKycRequest.toObject(includeInstance, f)
67
+ };
68
+
69
+ if (includeInstance) {
70
+ obj.$jspbMessageInstance = msg;
71
+ }
72
+ return obj;
73
+ };
74
+ }
75
+
76
+
77
+ /**
78
+ * Deserializes binary data (in protobuf wire format).
79
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
80
+ * @return {!proto.kycserviceapi.RequestUserKycRequest}
81
+ */
82
+ proto.kycserviceapi.RequestUserKycRequest.deserializeBinary = function(bytes) {
83
+ var reader = new jspb.BinaryReader(bytes);
84
+ var msg = new proto.kycserviceapi.RequestUserKycRequest;
85
+ return proto.kycserviceapi.RequestUserKycRequest.deserializeBinaryFromReader(msg, reader);
86
+ };
87
+
88
+
89
+ /**
90
+ * Deserializes binary data (in protobuf wire format) from the
91
+ * given reader into the given message object.
92
+ * @param {!proto.kycserviceapi.RequestUserKycRequest} msg The message object to deserialize into.
93
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
94
+ * @return {!proto.kycserviceapi.RequestUserKycRequest}
95
+ */
96
+ proto.kycserviceapi.RequestUserKycRequest.deserializeBinaryFromReader = function(msg, reader) {
97
+ while (reader.nextField()) {
98
+ if (reader.isEndGroup()) {
99
+ break;
100
+ }
101
+ var field = reader.getFieldNumber();
102
+ switch (field) {
103
+ case 1:
104
+ var value = new proto.kycserviceapi.UserKycRequest;
105
+ reader.readMessage(value,proto.kycserviceapi.UserKycRequest.deserializeBinaryFromReader);
106
+ msg.setData(value);
107
+ break;
108
+ default:
109
+ reader.skipField();
110
+ break;
111
+ }
112
+ }
113
+ return msg;
114
+ };
115
+
116
+
117
+ /**
118
+ * Class method variant: serializes the given message to binary data
119
+ * (in protobuf wire format), writing to the given BinaryWriter.
120
+ * @param {!proto.kycserviceapi.RequestUserKycRequest} message
121
+ * @param {!jspb.BinaryWriter} writer
122
+ */
123
+ proto.kycserviceapi.RequestUserKycRequest.serializeBinaryToWriter = function(message, writer) {
124
+ message.serializeBinaryToWriter(writer);
125
+ };
126
+
127
+
128
+ /**
129
+ * Serializes the message to binary data (in protobuf wire format).
130
+ * @return {!Uint8Array}
131
+ */
132
+ proto.kycserviceapi.RequestUserKycRequest.prototype.serializeBinary = function() {
133
+ var writer = new jspb.BinaryWriter();
134
+ this.serializeBinaryToWriter(writer);
135
+ return writer.getResultBuffer();
136
+ };
137
+
138
+
139
+ /**
140
+ * Serializes the message to binary data (in protobuf wire format),
141
+ * writing to the given BinaryWriter.
142
+ * @param {!jspb.BinaryWriter} writer
143
+ */
144
+ proto.kycserviceapi.RequestUserKycRequest.prototype.serializeBinaryToWriter = function (writer) {
145
+ var f = undefined;
146
+ f = this.getData();
147
+ if (f != null) {
148
+ writer.writeMessage(
149
+ 1,
150
+ f,
151
+ proto.kycserviceapi.UserKycRequest.serializeBinaryToWriter
152
+ );
153
+ }
154
+ };
155
+
156
+
157
+ /**
158
+ * Creates a deep clone of this proto. No data is shared with the original.
159
+ * @return {!proto.kycserviceapi.RequestUserKycRequest} The clone.
160
+ */
161
+ proto.kycserviceapi.RequestUserKycRequest.prototype.cloneMessage = function() {
162
+ return /** @type {!proto.kycserviceapi.RequestUserKycRequest} */ (jspb.Message.cloneMessage(this));
163
+ };
164
+
165
+
166
+ /**
167
+ * optional UserKycRequest data = 1;
168
+ * @return {proto.kycserviceapi.UserKycRequest}
169
+ */
170
+ proto.kycserviceapi.RequestUserKycRequest.prototype.getData = function() {
171
+ return /** @type{proto.kycserviceapi.UserKycRequest} */ (
172
+ jspb.Message.getWrapperField(this, proto.kycserviceapi.UserKycRequest, 1));
173
+ };
174
+
175
+
176
+ /** @param {proto.kycserviceapi.UserKycRequest|undefined} value */
177
+ proto.kycserviceapi.RequestUserKycRequest.prototype.setData = function(value) {
178
+ jspb.Message.setWrapperField(this, 1, value);
179
+ };
180
+
181
+
182
+ proto.kycserviceapi.RequestUserKycRequest.prototype.clearData = function() {
183
+ this.setData(undefined);
184
+ };
185
+
186
+
187
+ /**
188
+ * Returns whether this field is set.
189
+ * @return{!boolean}
190
+ */
191
+ proto.kycserviceapi.RequestUserKycRequest.prototype.hasData = function() {
192
+ return jspb.Message.getField(this, 1) != null;
193
+ };
194
+
195
+
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.kycserviceapi.RequestedDocument = function(opt_data) {
208
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
209
+ };
210
+ goog.inherits(proto.kycserviceapi.RequestedDocument, jspb.Message);
211
+ if (goog.DEBUG && !COMPILED) {
212
+ proto.kycserviceapi.RequestedDocument.displayName = 'proto.kycserviceapi.RequestedDocument';
213
+ }
214
+
215
+
216
+ if (jspb.Message.GENERATE_TO_OBJECT) {
217
+ /**
218
+ * Creates an object representation of this proto suitable for use in Soy templates.
219
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
220
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
221
+ * For the list of reserved names please see:
222
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
223
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
224
+ * for transitional soy proto support: http://goto/soy-param-migration
225
+ * @return {!Object}
226
+ */
227
+ proto.kycserviceapi.RequestedDocument.prototype.toObject = function(opt_includeInstance) {
228
+ return proto.kycserviceapi.RequestedDocument.toObject(opt_includeInstance, this);
229
+ };
230
+
231
+
232
+ /**
233
+ * Static version of the {@see toObject} method.
234
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
235
+ * instance for transitional soy proto support:
236
+ * http://goto/soy-param-migration
237
+ * @param {!proto.kycserviceapi.RequestedDocument} msg The msg instance to transform.
238
+ * @return {!Object}
239
+ */
240
+ proto.kycserviceapi.RequestedDocument.toObject = function(includeInstance, msg) {
241
+ var f, obj = {
242
+ documentid: msg.getDocumentid(),
243
+ type: msg.getType(),
244
+ paymentmethodid: msg.getPaymentmethodid(),
245
+ required: msg.getRequired(),
246
+ status: msg.getStatus()
247
+ };
248
+
249
+ if (includeInstance) {
250
+ obj.$jspbMessageInstance = msg;
251
+ }
252
+ return obj;
253
+ };
254
+ }
255
+
256
+
257
+ /**
258
+ * Deserializes binary data (in protobuf wire format).
259
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
260
+ * @return {!proto.kycserviceapi.RequestedDocument}
261
+ */
262
+ proto.kycserviceapi.RequestedDocument.deserializeBinary = function(bytes) {
263
+ var reader = new jspb.BinaryReader(bytes);
264
+ var msg = new proto.kycserviceapi.RequestedDocument;
265
+ return proto.kycserviceapi.RequestedDocument.deserializeBinaryFromReader(msg, reader);
266
+ };
267
+
268
+
269
+ /**
270
+ * Deserializes binary data (in protobuf wire format) from the
271
+ * given reader into the given message object.
272
+ * @param {!proto.kycserviceapi.RequestedDocument} msg The message object to deserialize into.
273
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
274
+ * @return {!proto.kycserviceapi.RequestedDocument}
275
+ */
276
+ proto.kycserviceapi.RequestedDocument.deserializeBinaryFromReader = function(msg, reader) {
277
+ while (reader.nextField()) {
278
+ if (reader.isEndGroup()) {
279
+ break;
280
+ }
281
+ var field = reader.getFieldNumber();
282
+ switch (field) {
283
+ case 1:
284
+ var value = /** @type {number} */ (reader.readInt64());
285
+ msg.setDocumentid(value);
286
+ break;
287
+ case 2:
288
+ var value = /** @type {!proto.kycserviceapi.DocumentType} */ (reader.readEnum());
289
+ msg.setType(value);
290
+ break;
291
+ case 3:
292
+ var value = /** @type {number} */ (reader.readInt64());
293
+ msg.setPaymentmethodid(value);
294
+ break;
295
+ case 4:
296
+ var value = /** @type {boolean} */ (reader.readBool());
297
+ msg.setRequired(value);
298
+ break;
299
+ case 5:
300
+ var value = /** @type {!proto.kycserviceapi.DocumentStatus} */ (reader.readEnum());
301
+ msg.setStatus(value);
302
+ break;
303
+ default:
304
+ reader.skipField();
305
+ break;
306
+ }
307
+ }
308
+ return msg;
309
+ };
310
+
311
+
312
+ /**
313
+ * Class method variant: serializes the given message to binary data
314
+ * (in protobuf wire format), writing to the given BinaryWriter.
315
+ * @param {!proto.kycserviceapi.RequestedDocument} message
316
+ * @param {!jspb.BinaryWriter} writer
317
+ */
318
+ proto.kycserviceapi.RequestedDocument.serializeBinaryToWriter = function(message, writer) {
319
+ message.serializeBinaryToWriter(writer);
320
+ };
321
+
322
+
323
+ /**
324
+ * Serializes the message to binary data (in protobuf wire format).
325
+ * @return {!Uint8Array}
326
+ */
327
+ proto.kycserviceapi.RequestedDocument.prototype.serializeBinary = function() {
328
+ var writer = new jspb.BinaryWriter();
329
+ this.serializeBinaryToWriter(writer);
330
+ return writer.getResultBuffer();
331
+ };
332
+
333
+
334
+ /**
335
+ * Serializes the message to binary data (in protobuf wire format),
336
+ * writing to the given BinaryWriter.
337
+ * @param {!jspb.BinaryWriter} writer
338
+ */
339
+ proto.kycserviceapi.RequestedDocument.prototype.serializeBinaryToWriter = function (writer) {
340
+ var f = undefined;
341
+ f = this.getDocumentid();
342
+ if (f !== 0) {
343
+ writer.writeInt64(
344
+ 1,
345
+ f
346
+ );
347
+ }
348
+ f = this.getType();
349
+ if (f !== 0.0) {
350
+ writer.writeEnum(
351
+ 2,
352
+ f
353
+ );
354
+ }
355
+ f = this.getPaymentmethodid();
356
+ if (f !== 0) {
357
+ writer.writeInt64(
358
+ 3,
359
+ f
360
+ );
361
+ }
362
+ f = this.getRequired();
363
+ if (f) {
364
+ writer.writeBool(
365
+ 4,
366
+ f
367
+ );
368
+ }
369
+ f = this.getStatus();
370
+ if (f !== 0.0) {
371
+ writer.writeEnum(
372
+ 5,
373
+ f
374
+ );
375
+ }
376
+ };
377
+
378
+
379
+ /**
380
+ * Creates a deep clone of this proto. No data is shared with the original.
381
+ * @return {!proto.kycserviceapi.RequestedDocument} The clone.
382
+ */
383
+ proto.kycserviceapi.RequestedDocument.prototype.cloneMessage = function() {
384
+ return /** @type {!proto.kycserviceapi.RequestedDocument} */ (jspb.Message.cloneMessage(this));
385
+ };
386
+
387
+
388
+ /**
389
+ * optional int64 documentId = 1;
390
+ * @return {number}
391
+ */
392
+ proto.kycserviceapi.RequestedDocument.prototype.getDocumentid = function() {
393
+ return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
394
+ };
395
+
396
+
397
+ /** @param {number} value */
398
+ proto.kycserviceapi.RequestedDocument.prototype.setDocumentid = function(value) {
399
+ jspb.Message.setField(this, 1, value);
400
+ };
401
+
402
+
403
+ /**
404
+ * optional DocumentType type = 2;
405
+ * @return {!proto.kycserviceapi.DocumentType}
406
+ */
407
+ proto.kycserviceapi.RequestedDocument.prototype.getType = function() {
408
+ return /** @type {!proto.kycserviceapi.DocumentType} */ (jspb.Message.getFieldProto3(this, 2, 0));
409
+ };
410
+
411
+
412
+ /** @param {!proto.kycserviceapi.DocumentType} value */
413
+ proto.kycserviceapi.RequestedDocument.prototype.setType = function(value) {
414
+ jspb.Message.setField(this, 2, value);
415
+ };
416
+
417
+
418
+ /**
419
+ * optional int64 paymentMethodId = 3;
420
+ * @return {number}
421
+ */
422
+ proto.kycserviceapi.RequestedDocument.prototype.getPaymentmethodid = function() {
423
+ return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0));
424
+ };
425
+
426
+
427
+ /** @param {number} value */
428
+ proto.kycserviceapi.RequestedDocument.prototype.setPaymentmethodid = function(value) {
429
+ jspb.Message.setField(this, 3, value);
430
+ };
431
+
432
+
433
+ /**
434
+ * optional bool required = 4;
435
+ * Note that Boolean fields may be set to 0/1 when serialized from a Java server.
436
+ * You should avoid comparisons like {@code val === true/false} in those cases.
437
+ * @return {boolean}
438
+ */
439
+ proto.kycserviceapi.RequestedDocument.prototype.getRequired = function() {
440
+ return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 4, false));
441
+ };
442
+
443
+
444
+ /** @param {boolean} value */
445
+ proto.kycserviceapi.RequestedDocument.prototype.setRequired = function(value) {
446
+ jspb.Message.setField(this, 4, value);
447
+ };
448
+
449
+
450
+ /**
451
+ * optional DocumentStatus status = 5;
452
+ * @return {!proto.kycserviceapi.DocumentStatus}
453
+ */
454
+ proto.kycserviceapi.RequestedDocument.prototype.getStatus = function() {
455
+ return /** @type {!proto.kycserviceapi.DocumentStatus} */ (jspb.Message.getFieldProto3(this, 5, 0));
456
+ };
457
+
458
+
459
+ /** @param {!proto.kycserviceapi.DocumentStatus} value */
460
+ proto.kycserviceapi.RequestedDocument.prototype.setStatus = function(value) {
461
+ jspb.Message.setField(this, 5, value);
462
+ };
463
+
464
+
465
+
466
+ /**
467
+ * Generated by JsPbCodeGenerator.
468
+ * @param {Array=} opt_data Optional initial data array, typically from a
469
+ * server response, or constructed directly in Javascript. The array is used
470
+ * in place and becomes part of the constructed object. It is not cloned.
471
+ * If no data is provided, the constructed object will be empty, but still
472
+ * valid.
473
+ * @extends {jspb.Message}
474
+ * @constructor
475
+ */
476
+ proto.kycserviceapi.ResponseCode = function(opt_data) {
477
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
478
+ };
479
+ goog.inherits(proto.kycserviceapi.ResponseCode, jspb.Message);
480
+ if (goog.DEBUG && !COMPILED) {
481
+ proto.kycserviceapi.ResponseCode.displayName = 'proto.kycserviceapi.ResponseCode';
482
+ }
483
+
484
+
485
+ if (jspb.Message.GENERATE_TO_OBJECT) {
486
+ /**
487
+ * Creates an object representation of this proto suitable for use in Soy templates.
488
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
489
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
490
+ * For the list of reserved names please see:
491
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
492
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
493
+ * for transitional soy proto support: http://goto/soy-param-migration
494
+ * @return {!Object}
495
+ */
496
+ proto.kycserviceapi.ResponseCode.prototype.toObject = function(opt_includeInstance) {
497
+ return proto.kycserviceapi.ResponseCode.toObject(opt_includeInstance, this);
498
+ };
499
+
500
+
501
+ /**
502
+ * Static version of the {@see toObject} method.
503
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
504
+ * instance for transitional soy proto support:
505
+ * http://goto/soy-param-migration
506
+ * @param {!proto.kycserviceapi.ResponseCode} msg The msg instance to transform.
507
+ * @return {!Object}
508
+ */
509
+ proto.kycserviceapi.ResponseCode.toObject = function(includeInstance, msg) {
510
+ var f, obj = {
511
+ code: msg.getCode(),
512
+ message: msg.getMessage()
513
+ };
514
+
515
+ if (includeInstance) {
516
+ obj.$jspbMessageInstance = msg;
517
+ }
518
+ return obj;
519
+ };
520
+ }
521
+
522
+
523
+ /**
524
+ * Deserializes binary data (in protobuf wire format).
525
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
526
+ * @return {!proto.kycserviceapi.ResponseCode}
527
+ */
528
+ proto.kycserviceapi.ResponseCode.deserializeBinary = function(bytes) {
529
+ var reader = new jspb.BinaryReader(bytes);
530
+ var msg = new proto.kycserviceapi.ResponseCode;
531
+ return proto.kycserviceapi.ResponseCode.deserializeBinaryFromReader(msg, reader);
532
+ };
533
+
534
+
535
+ /**
536
+ * Deserializes binary data (in protobuf wire format) from the
537
+ * given reader into the given message object.
538
+ * @param {!proto.kycserviceapi.ResponseCode} msg The message object to deserialize into.
539
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
540
+ * @return {!proto.kycserviceapi.ResponseCode}
541
+ */
542
+ proto.kycserviceapi.ResponseCode.deserializeBinaryFromReader = function(msg, reader) {
543
+ while (reader.nextField()) {
544
+ if (reader.isEndGroup()) {
545
+ break;
546
+ }
547
+ var field = reader.getFieldNumber();
548
+ switch (field) {
549
+ case 1:
550
+ var value = /** @type {number} */ (reader.readInt32());
551
+ msg.setCode(value);
552
+ break;
553
+ case 2:
554
+ var value = /** @type {string} */ (reader.readString());
555
+ msg.setMessage(value);
556
+ break;
557
+ default:
558
+ reader.skipField();
559
+ break;
560
+ }
561
+ }
562
+ return msg;
563
+ };
564
+
565
+
566
+ /**
567
+ * Class method variant: serializes the given message to binary data
568
+ * (in protobuf wire format), writing to the given BinaryWriter.
569
+ * @param {!proto.kycserviceapi.ResponseCode} message
570
+ * @param {!jspb.BinaryWriter} writer
571
+ */
572
+ proto.kycserviceapi.ResponseCode.serializeBinaryToWriter = function(message, writer) {
573
+ message.serializeBinaryToWriter(writer);
574
+ };
575
+
576
+
577
+ /**
578
+ * Serializes the message to binary data (in protobuf wire format).
579
+ * @return {!Uint8Array}
580
+ */
581
+ proto.kycserviceapi.ResponseCode.prototype.serializeBinary = function() {
582
+ var writer = new jspb.BinaryWriter();
583
+ this.serializeBinaryToWriter(writer);
584
+ return writer.getResultBuffer();
585
+ };
586
+
587
+
588
+ /**
589
+ * Serializes the message to binary data (in protobuf wire format),
590
+ * writing to the given BinaryWriter.
591
+ * @param {!jspb.BinaryWriter} writer
592
+ */
593
+ proto.kycserviceapi.ResponseCode.prototype.serializeBinaryToWriter = function (writer) {
594
+ var f = undefined;
595
+ f = this.getCode();
596
+ if (f !== 0) {
597
+ writer.writeInt32(
598
+ 1,
599
+ f
600
+ );
601
+ }
602
+ f = this.getMessage();
603
+ if (f.length > 0) {
604
+ writer.writeString(
605
+ 2,
606
+ f
607
+ );
608
+ }
609
+ };
610
+
611
+
612
+ /**
613
+ * Creates a deep clone of this proto. No data is shared with the original.
614
+ * @return {!proto.kycserviceapi.ResponseCode} The clone.
615
+ */
616
+ proto.kycserviceapi.ResponseCode.prototype.cloneMessage = function() {
617
+ return /** @type {!proto.kycserviceapi.ResponseCode} */ (jspb.Message.cloneMessage(this));
618
+ };
619
+
620
+
621
+ /**
622
+ * optional int32 code = 1;
623
+ * @return {number}
624
+ */
625
+ proto.kycserviceapi.ResponseCode.prototype.getCode = function() {
626
+ return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
627
+ };
628
+
629
+
630
+ /** @param {number} value */
631
+ proto.kycserviceapi.ResponseCode.prototype.setCode = function(value) {
632
+ jspb.Message.setField(this, 1, value);
633
+ };
634
+
635
+
636
+ /**
637
+ * optional string message = 2;
638
+ * @return {string}
639
+ */
640
+ proto.kycserviceapi.ResponseCode.prototype.getMessage = function() {
641
+ return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
642
+ };
643
+
644
+
645
+ /** @param {string} value */
646
+ proto.kycserviceapi.ResponseCode.prototype.setMessage = function(value) {
647
+ jspb.Message.setField(this, 2, value);
648
+ };
649
+
650
+
651
+
652
+ /**
653
+ * Generated by JsPbCodeGenerator.
654
+ * @param {Array=} opt_data Optional initial data array, typically from a
655
+ * server response, or constructed directly in Javascript. The array is used
656
+ * in place and becomes part of the constructed object. It is not cloned.
657
+ * If no data is provided, the constructed object will be empty, but still
658
+ * valid.
659
+ * @extends {jspb.Message}
660
+ * @constructor
661
+ */
662
+ proto.kycserviceapi.UserKycRequest = function(opt_data) {
663
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.kycserviceapi.UserKycRequest.repeatedFields_, null);
664
+ };
665
+ goog.inherits(proto.kycserviceapi.UserKycRequest, jspb.Message);
666
+ if (goog.DEBUG && !COMPILED) {
667
+ proto.kycserviceapi.UserKycRequest.displayName = 'proto.kycserviceapi.UserKycRequest';
668
+ }
669
+ /**
670
+ * List of repeated fields within this message type.
671
+ * @private {!Array<number>}
672
+ * @const
673
+ */
674
+ proto.kycserviceapi.UserKycRequest.repeatedFields_ = [3];
675
+
676
+
677
+
678
+ if (jspb.Message.GENERATE_TO_OBJECT) {
679
+ /**
680
+ * Creates an object representation of this proto suitable for use in Soy templates.
681
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
682
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
683
+ * For the list of reserved names please see:
684
+ * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
685
+ * @param {boolean=} opt_includeInstance Whether to include the JSPB instance
686
+ * for transitional soy proto support: http://goto/soy-param-migration
687
+ * @return {!Object}
688
+ */
689
+ proto.kycserviceapi.UserKycRequest.prototype.toObject = function(opt_includeInstance) {
690
+ return proto.kycserviceapi.UserKycRequest.toObject(opt_includeInstance, this);
691
+ };
692
+
693
+
694
+ /**
695
+ * Static version of the {@see toObject} method.
696
+ * @param {boolean|undefined} includeInstance Whether to include the JSPB
697
+ * instance for transitional soy proto support:
698
+ * http://goto/soy-param-migration
699
+ * @param {!proto.kycserviceapi.UserKycRequest} msg The msg instance to transform.
700
+ * @return {!Object}
701
+ */
702
+ proto.kycserviceapi.UserKycRequest.toObject = function(includeInstance, msg) {
703
+ var f, obj = {
704
+ userid: msg.getUserid(),
705
+ password: msg.getPassword(),
706
+ documentsList: jspb.Message.toObjectList(msg.getDocumentsList(),
707
+ proto.kycserviceapi.RequestedDocument.toObject, includeInstance),
708
+ comment: msg.getComment()
709
+ };
710
+
711
+ if (includeInstance) {
712
+ obj.$jspbMessageInstance = msg;
713
+ }
714
+ return obj;
715
+ };
716
+ }
717
+
718
+
719
+ /**
720
+ * Deserializes binary data (in protobuf wire format).
721
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
722
+ * @return {!proto.kycserviceapi.UserKycRequest}
723
+ */
724
+ proto.kycserviceapi.UserKycRequest.deserializeBinary = function(bytes) {
725
+ var reader = new jspb.BinaryReader(bytes);
726
+ var msg = new proto.kycserviceapi.UserKycRequest;
727
+ return proto.kycserviceapi.UserKycRequest.deserializeBinaryFromReader(msg, reader);
728
+ };
729
+
730
+
731
+ /**
732
+ * Deserializes binary data (in protobuf wire format) from the
733
+ * given reader into the given message object.
734
+ * @param {!proto.kycserviceapi.UserKycRequest} msg The message object to deserialize into.
735
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
736
+ * @return {!proto.kycserviceapi.UserKycRequest}
737
+ */
738
+ proto.kycserviceapi.UserKycRequest.deserializeBinaryFromReader = function(msg, reader) {
739
+ while (reader.nextField()) {
740
+ if (reader.isEndGroup()) {
741
+ break;
742
+ }
743
+ var field = reader.getFieldNumber();
744
+ switch (field) {
745
+ case 1:
746
+ var value = /** @type {number} */ (reader.readInt64());
747
+ msg.setUserid(value);
748
+ break;
749
+ case 2:
750
+ var value = /** @type {string} */ (reader.readString());
751
+ msg.setPassword(value);
752
+ break;
753
+ case 3:
754
+ var value = new proto.kycserviceapi.RequestedDocument;
755
+ reader.readMessage(value,proto.kycserviceapi.RequestedDocument.deserializeBinaryFromReader);
756
+ msg.getDocumentsList().push(value);
757
+ msg.setDocumentsList(msg.getDocumentsList());
758
+ break;
759
+ case 4:
760
+ var value = /** @type {string} */ (reader.readString());
761
+ msg.setComment(value);
762
+ break;
763
+ default:
764
+ reader.skipField();
765
+ break;
766
+ }
767
+ }
768
+ return msg;
769
+ };
770
+
771
+
772
+ /**
773
+ * Class method variant: serializes the given message to binary data
774
+ * (in protobuf wire format), writing to the given BinaryWriter.
775
+ * @param {!proto.kycserviceapi.UserKycRequest} message
776
+ * @param {!jspb.BinaryWriter} writer
777
+ */
778
+ proto.kycserviceapi.UserKycRequest.serializeBinaryToWriter = function(message, writer) {
779
+ message.serializeBinaryToWriter(writer);
780
+ };
781
+
782
+
783
+ /**
784
+ * Serializes the message to binary data (in protobuf wire format).
785
+ * @return {!Uint8Array}
786
+ */
787
+ proto.kycserviceapi.UserKycRequest.prototype.serializeBinary = function() {
788
+ var writer = new jspb.BinaryWriter();
789
+ this.serializeBinaryToWriter(writer);
790
+ return writer.getResultBuffer();
791
+ };
792
+
793
+
794
+ /**
795
+ * Serializes the message to binary data (in protobuf wire format),
796
+ * writing to the given BinaryWriter.
797
+ * @param {!jspb.BinaryWriter} writer
798
+ */
799
+ proto.kycserviceapi.UserKycRequest.prototype.serializeBinaryToWriter = function (writer) {
800
+ var f = undefined;
801
+ f = this.getUserid();
802
+ if (f !== 0) {
803
+ writer.writeInt64(
804
+ 1,
805
+ f
806
+ );
807
+ }
808
+ f = this.getPassword();
809
+ if (f.length > 0) {
810
+ writer.writeString(
811
+ 2,
812
+ f
813
+ );
814
+ }
815
+ f = this.getDocumentsList();
816
+ if (f.length > 0) {
817
+ writer.writeRepeatedMessage(
818
+ 3,
819
+ f,
820
+ proto.kycserviceapi.RequestedDocument.serializeBinaryToWriter
821
+ );
822
+ }
823
+ f = this.getComment();
824
+ if (f.length > 0) {
825
+ writer.writeString(
826
+ 4,
827
+ f
828
+ );
829
+ }
830
+ };
831
+
832
+
833
+ /**
834
+ * Creates a deep clone of this proto. No data is shared with the original.
835
+ * @return {!proto.kycserviceapi.UserKycRequest} The clone.
836
+ */
837
+ proto.kycserviceapi.UserKycRequest.prototype.cloneMessage = function() {
838
+ return /** @type {!proto.kycserviceapi.UserKycRequest} */ (jspb.Message.cloneMessage(this));
839
+ };
840
+
841
+
842
+ /**
843
+ * optional int64 userId = 1;
844
+ * @return {number}
845
+ */
846
+ proto.kycserviceapi.UserKycRequest.prototype.getUserid = function() {
847
+ return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0));
848
+ };
849
+
850
+
851
+ /** @param {number} value */
852
+ proto.kycserviceapi.UserKycRequest.prototype.setUserid = function(value) {
853
+ jspb.Message.setField(this, 1, value);
854
+ };
855
+
856
+
857
+ /**
858
+ * optional string password = 2;
859
+ * @return {string}
860
+ */
861
+ proto.kycserviceapi.UserKycRequest.prototype.getPassword = function() {
862
+ return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, ""));
863
+ };
864
+
865
+
866
+ /** @param {string} value */
867
+ proto.kycserviceapi.UserKycRequest.prototype.setPassword = function(value) {
868
+ jspb.Message.setField(this, 2, value);
869
+ };
870
+
871
+
872
+ /**
873
+ * repeated RequestedDocument documents = 3;
874
+ * If you change this array by adding, removing or replacing elements, or if you
875
+ * replace the array itself, then you must call the setter to update it.
876
+ * @return {!Array.<!proto.kycserviceapi.RequestedDocument>}
877
+ */
878
+ proto.kycserviceapi.UserKycRequest.prototype.getDocumentsList = function() {
879
+ return /** @type{!Array.<!proto.kycserviceapi.RequestedDocument>} */ (
880
+ jspb.Message.getRepeatedWrapperField(this, proto.kycserviceapi.RequestedDocument, 3));
881
+ };
882
+
883
+
884
+ /** @param {Array.<!proto.kycserviceapi.RequestedDocument>} value */
885
+ proto.kycserviceapi.UserKycRequest.prototype.setDocumentsList = function(value) {
886
+ jspb.Message.setRepeatedWrapperField(this, 3, value);
887
+ };
888
+
889
+
890
+ proto.kycserviceapi.UserKycRequest.prototype.clearDocumentsList = function() {
891
+ this.setDocumentsList([]);
892
+ };
893
+
894
+
895
+ /**
896
+ * optional string comment = 4;
897
+ * @return {string}
898
+ */
899
+ proto.kycserviceapi.UserKycRequest.prototype.getComment = function() {
900
+ return /** @type {string} */ (jspb.Message.getFieldProto3(this, 4, ""));
901
+ };
902
+
903
+
904
+ /** @param {string} value */
905
+ proto.kycserviceapi.UserKycRequest.prototype.setComment = function(value) {
906
+ jspb.Message.setField(this, 4, value);
907
+ };
908
+
909
+
910
+ /**
911
+ * @enum {number}
912
+ */
913
+ proto.kycserviceapi.DocumentStatus = {
914
+ REQUESTED: 0,
915
+ UPLOADED: 1,
916
+ PENDING_REVIEW: 2,
917
+ REJECTED: 3,
918
+ VERIFIED: 4
919
+ };
920
+
921
+ /**
922
+ * @enum {number}
923
+ */
924
+ proto.kycserviceapi.DocumentType = {
925
+ PHOTO_ID: 0,
926
+ DRIVER_LICENSE: 1,
927
+ PASSPORT: 2,
928
+ PAYMENT_METHOD_ANY: 3,
929
+ PAYMENT_METHOD: 4
930
+ };
931
+
932
+ goog.object.extend(exports, proto.kycserviceapi);