@dfinity/nns-proto 1.0.2 → 2.0.0

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,1397 @@
1
+ // source: nervous_system.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global =
17
+ (typeof globalThis !== 'undefined' && globalThis) ||
18
+ (typeof window !== 'undefined' && window) ||
19
+ (typeof global !== 'undefined' && global) ||
20
+ (typeof self !== 'undefined' && self) ||
21
+ (function () { return this; }).call(null) ||
22
+ Function('return this')();
23
+
24
+ var base_types_pb = require('./base_types_pb.js');
25
+ goog.object.extend(proto, base_types_pb);
26
+ goog.exportSymbol('proto.ic_nervous_system.pb.v1.Canister', null, global);
27
+ goog.exportSymbol('proto.ic_nervous_system.pb.v1.Countries', null, global);
28
+ goog.exportSymbol('proto.ic_nervous_system.pb.v1.Decimal', null, global);
29
+ goog.exportSymbol('proto.ic_nervous_system.pb.v1.Duration', null, global);
30
+ goog.exportSymbol('proto.ic_nervous_system.pb.v1.GlobalTimeOfDay', null, global);
31
+ goog.exportSymbol('proto.ic_nervous_system.pb.v1.Image', null, global);
32
+ goog.exportSymbol('proto.ic_nervous_system.pb.v1.Percentage', null, global);
33
+ goog.exportSymbol('proto.ic_nervous_system.pb.v1.Tokens', null, global);
34
+ /**
35
+ * Generated by JsPbCodeGenerator.
36
+ * @param {Array=} opt_data Optional initial data array, typically from a
37
+ * server response, or constructed directly in Javascript. The array is used
38
+ * in place and becomes part of the constructed object. It is not cloned.
39
+ * If no data is provided, the constructed object will be empty, but still
40
+ * valid.
41
+ * @extends {jspb.Message}
42
+ * @constructor
43
+ */
44
+ proto.ic_nervous_system.pb.v1.Duration = function(opt_data) {
45
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
46
+ };
47
+ goog.inherits(proto.ic_nervous_system.pb.v1.Duration, jspb.Message);
48
+ if (goog.DEBUG && !COMPILED) {
49
+ /**
50
+ * @public
51
+ * @override
52
+ */
53
+ proto.ic_nervous_system.pb.v1.Duration.displayName = 'proto.ic_nervous_system.pb.v1.Duration';
54
+ }
55
+ /**
56
+ * Generated by JsPbCodeGenerator.
57
+ * @param {Array=} opt_data Optional initial data array, typically from a
58
+ * server response, or constructed directly in Javascript. The array is used
59
+ * in place and becomes part of the constructed object. It is not cloned.
60
+ * If no data is provided, the constructed object will be empty, but still
61
+ * valid.
62
+ * @extends {jspb.Message}
63
+ * @constructor
64
+ */
65
+ proto.ic_nervous_system.pb.v1.GlobalTimeOfDay = function(opt_data) {
66
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
67
+ };
68
+ goog.inherits(proto.ic_nervous_system.pb.v1.GlobalTimeOfDay, jspb.Message);
69
+ if (goog.DEBUG && !COMPILED) {
70
+ /**
71
+ * @public
72
+ * @override
73
+ */
74
+ proto.ic_nervous_system.pb.v1.GlobalTimeOfDay.displayName = 'proto.ic_nervous_system.pb.v1.GlobalTimeOfDay';
75
+ }
76
+ /**
77
+ * Generated by JsPbCodeGenerator.
78
+ * @param {Array=} opt_data Optional initial data array, typically from a
79
+ * server response, or constructed directly in Javascript. The array is used
80
+ * in place and becomes part of the constructed object. It is not cloned.
81
+ * If no data is provided, the constructed object will be empty, but still
82
+ * valid.
83
+ * @extends {jspb.Message}
84
+ * @constructor
85
+ */
86
+ proto.ic_nervous_system.pb.v1.Tokens = function(opt_data) {
87
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
88
+ };
89
+ goog.inherits(proto.ic_nervous_system.pb.v1.Tokens, jspb.Message);
90
+ if (goog.DEBUG && !COMPILED) {
91
+ /**
92
+ * @public
93
+ * @override
94
+ */
95
+ proto.ic_nervous_system.pb.v1.Tokens.displayName = 'proto.ic_nervous_system.pb.v1.Tokens';
96
+ }
97
+ /**
98
+ * Generated by JsPbCodeGenerator.
99
+ * @param {Array=} opt_data Optional initial data array, typically from a
100
+ * server response, or constructed directly in Javascript. The array is used
101
+ * in place and becomes part of the constructed object. It is not cloned.
102
+ * If no data is provided, the constructed object will be empty, but still
103
+ * valid.
104
+ * @extends {jspb.Message}
105
+ * @constructor
106
+ */
107
+ proto.ic_nervous_system.pb.v1.Image = function(opt_data) {
108
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
109
+ };
110
+ goog.inherits(proto.ic_nervous_system.pb.v1.Image, jspb.Message);
111
+ if (goog.DEBUG && !COMPILED) {
112
+ /**
113
+ * @public
114
+ * @override
115
+ */
116
+ proto.ic_nervous_system.pb.v1.Image.displayName = 'proto.ic_nervous_system.pb.v1.Image';
117
+ }
118
+ /**
119
+ * Generated by JsPbCodeGenerator.
120
+ * @param {Array=} opt_data Optional initial data array, typically from a
121
+ * server response, or constructed directly in Javascript. The array is used
122
+ * in place and becomes part of the constructed object. It is not cloned.
123
+ * If no data is provided, the constructed object will be empty, but still
124
+ * valid.
125
+ * @extends {jspb.Message}
126
+ * @constructor
127
+ */
128
+ proto.ic_nervous_system.pb.v1.Percentage = function(opt_data) {
129
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
130
+ };
131
+ goog.inherits(proto.ic_nervous_system.pb.v1.Percentage, jspb.Message);
132
+ if (goog.DEBUG && !COMPILED) {
133
+ /**
134
+ * @public
135
+ * @override
136
+ */
137
+ proto.ic_nervous_system.pb.v1.Percentage.displayName = 'proto.ic_nervous_system.pb.v1.Percentage';
138
+ }
139
+ /**
140
+ * Generated by JsPbCodeGenerator.
141
+ * @param {Array=} opt_data Optional initial data array, typically from a
142
+ * server response, or constructed directly in Javascript. The array is used
143
+ * in place and becomes part of the constructed object. It is not cloned.
144
+ * If no data is provided, the constructed object will be empty, but still
145
+ * valid.
146
+ * @extends {jspb.Message}
147
+ * @constructor
148
+ */
149
+ proto.ic_nervous_system.pb.v1.Canister = function(opt_data) {
150
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
151
+ };
152
+ goog.inherits(proto.ic_nervous_system.pb.v1.Canister, jspb.Message);
153
+ if (goog.DEBUG && !COMPILED) {
154
+ /**
155
+ * @public
156
+ * @override
157
+ */
158
+ proto.ic_nervous_system.pb.v1.Canister.displayName = 'proto.ic_nervous_system.pb.v1.Canister';
159
+ }
160
+ /**
161
+ * Generated by JsPbCodeGenerator.
162
+ * @param {Array=} opt_data Optional initial data array, typically from a
163
+ * server response, or constructed directly in Javascript. The array is used
164
+ * in place and becomes part of the constructed object. It is not cloned.
165
+ * If no data is provided, the constructed object will be empty, but still
166
+ * valid.
167
+ * @extends {jspb.Message}
168
+ * @constructor
169
+ */
170
+ proto.ic_nervous_system.pb.v1.Countries = function(opt_data) {
171
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.ic_nervous_system.pb.v1.Countries.repeatedFields_, null);
172
+ };
173
+ goog.inherits(proto.ic_nervous_system.pb.v1.Countries, jspb.Message);
174
+ if (goog.DEBUG && !COMPILED) {
175
+ /**
176
+ * @public
177
+ * @override
178
+ */
179
+ proto.ic_nervous_system.pb.v1.Countries.displayName = 'proto.ic_nervous_system.pb.v1.Countries';
180
+ }
181
+ /**
182
+ * Generated by JsPbCodeGenerator.
183
+ * @param {Array=} opt_data Optional initial data array, typically from a
184
+ * server response, or constructed directly in Javascript. The array is used
185
+ * in place and becomes part of the constructed object. It is not cloned.
186
+ * If no data is provided, the constructed object will be empty, but still
187
+ * valid.
188
+ * @extends {jspb.Message}
189
+ * @constructor
190
+ */
191
+ proto.ic_nervous_system.pb.v1.Decimal = function(opt_data) {
192
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
193
+ };
194
+ goog.inherits(proto.ic_nervous_system.pb.v1.Decimal, jspb.Message);
195
+ if (goog.DEBUG && !COMPILED) {
196
+ /**
197
+ * @public
198
+ * @override
199
+ */
200
+ proto.ic_nervous_system.pb.v1.Decimal.displayName = 'proto.ic_nervous_system.pb.v1.Decimal';
201
+ }
202
+
203
+
204
+
205
+ if (jspb.Message.GENERATE_TO_OBJECT) {
206
+ /**
207
+ * Creates an object representation of this proto.
208
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
209
+ * Optional fields that are not set will be set to undefined.
210
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
211
+ * For the list of reserved names please see:
212
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
213
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
214
+ * JSPB instance for transitional soy proto support:
215
+ * http://goto/soy-param-migration
216
+ * @return {!Object}
217
+ */
218
+ proto.ic_nervous_system.pb.v1.Duration.prototype.toObject = function(opt_includeInstance) {
219
+ return proto.ic_nervous_system.pb.v1.Duration.toObject(opt_includeInstance, this);
220
+ };
221
+
222
+
223
+ /**
224
+ * Static version of the {@see toObject} method.
225
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
226
+ * the JSPB instance for transitional soy proto support:
227
+ * http://goto/soy-param-migration
228
+ * @param {!proto.ic_nervous_system.pb.v1.Duration} msg The msg instance to transform.
229
+ * @return {!Object}
230
+ * @suppress {unusedLocalVariables} f is only used for nested messages
231
+ */
232
+ proto.ic_nervous_system.pb.v1.Duration.toObject = function(includeInstance, msg) {
233
+ var f, obj = {
234
+ seconds: jspb.Message.getFieldWithDefault(msg, 1, 0)
235
+ };
236
+
237
+ if (includeInstance) {
238
+ obj.$jspbMessageInstance = msg;
239
+ }
240
+ return obj;
241
+ };
242
+ }
243
+
244
+
245
+ /**
246
+ * Deserializes binary data (in protobuf wire format).
247
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
248
+ * @return {!proto.ic_nervous_system.pb.v1.Duration}
249
+ */
250
+ proto.ic_nervous_system.pb.v1.Duration.deserializeBinary = function(bytes) {
251
+ var reader = new jspb.BinaryReader(bytes);
252
+ var msg = new proto.ic_nervous_system.pb.v1.Duration;
253
+ return proto.ic_nervous_system.pb.v1.Duration.deserializeBinaryFromReader(msg, reader);
254
+ };
255
+
256
+
257
+ /**
258
+ * Deserializes binary data (in protobuf wire format) from the
259
+ * given reader into the given message object.
260
+ * @param {!proto.ic_nervous_system.pb.v1.Duration} msg The message object to deserialize into.
261
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
262
+ * @return {!proto.ic_nervous_system.pb.v1.Duration}
263
+ */
264
+ proto.ic_nervous_system.pb.v1.Duration.deserializeBinaryFromReader = function(msg, reader) {
265
+ while (reader.nextField()) {
266
+ if (reader.isEndGroup()) {
267
+ break;
268
+ }
269
+ var field = reader.getFieldNumber();
270
+ switch (field) {
271
+ case 1:
272
+ var value = /** @type {number} */ (reader.readUint64());
273
+ msg.setSeconds(value);
274
+ break;
275
+ default:
276
+ reader.skipField();
277
+ break;
278
+ }
279
+ }
280
+ return msg;
281
+ };
282
+
283
+
284
+ /**
285
+ * Serializes the message to binary data (in protobuf wire format).
286
+ * @return {!Uint8Array}
287
+ */
288
+ proto.ic_nervous_system.pb.v1.Duration.prototype.serializeBinary = function() {
289
+ var writer = new jspb.BinaryWriter();
290
+ proto.ic_nervous_system.pb.v1.Duration.serializeBinaryToWriter(this, writer);
291
+ return writer.getResultBuffer();
292
+ };
293
+
294
+
295
+ /**
296
+ * Serializes the given message to binary data (in protobuf wire
297
+ * format), writing to the given BinaryWriter.
298
+ * @param {!proto.ic_nervous_system.pb.v1.Duration} message
299
+ * @param {!jspb.BinaryWriter} writer
300
+ * @suppress {unusedLocalVariables} f is only used for nested messages
301
+ */
302
+ proto.ic_nervous_system.pb.v1.Duration.serializeBinaryToWriter = function(message, writer) {
303
+ var f = undefined;
304
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
305
+ if (f != null) {
306
+ writer.writeUint64(
307
+ 1,
308
+ f
309
+ );
310
+ }
311
+ };
312
+
313
+
314
+ /**
315
+ * optional uint64 seconds = 1;
316
+ * @return {number}
317
+ */
318
+ proto.ic_nervous_system.pb.v1.Duration.prototype.getSeconds = function() {
319
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
320
+ };
321
+
322
+
323
+ /**
324
+ * @param {number} value
325
+ * @return {!proto.ic_nervous_system.pb.v1.Duration} returns this
326
+ */
327
+ proto.ic_nervous_system.pb.v1.Duration.prototype.setSeconds = function(value) {
328
+ return jspb.Message.setField(this, 1, value);
329
+ };
330
+
331
+
332
+ /**
333
+ * Clears the field making it undefined.
334
+ * @return {!proto.ic_nervous_system.pb.v1.Duration} returns this
335
+ */
336
+ proto.ic_nervous_system.pb.v1.Duration.prototype.clearSeconds = function() {
337
+ return jspb.Message.setField(this, 1, undefined);
338
+ };
339
+
340
+
341
+ /**
342
+ * Returns whether this field is set.
343
+ * @return {boolean}
344
+ */
345
+ proto.ic_nervous_system.pb.v1.Duration.prototype.hasSeconds = function() {
346
+ return jspb.Message.getField(this, 1) != null;
347
+ };
348
+
349
+
350
+
351
+
352
+
353
+ if (jspb.Message.GENERATE_TO_OBJECT) {
354
+ /**
355
+ * Creates an object representation of this proto.
356
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
357
+ * Optional fields that are not set will be set to undefined.
358
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
359
+ * For the list of reserved names please see:
360
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
361
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
362
+ * JSPB instance for transitional soy proto support:
363
+ * http://goto/soy-param-migration
364
+ * @return {!Object}
365
+ */
366
+ proto.ic_nervous_system.pb.v1.GlobalTimeOfDay.prototype.toObject = function(opt_includeInstance) {
367
+ return proto.ic_nervous_system.pb.v1.GlobalTimeOfDay.toObject(opt_includeInstance, this);
368
+ };
369
+
370
+
371
+ /**
372
+ * Static version of the {@see toObject} method.
373
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
374
+ * the JSPB instance for transitional soy proto support:
375
+ * http://goto/soy-param-migration
376
+ * @param {!proto.ic_nervous_system.pb.v1.GlobalTimeOfDay} msg The msg instance to transform.
377
+ * @return {!Object}
378
+ * @suppress {unusedLocalVariables} f is only used for nested messages
379
+ */
380
+ proto.ic_nervous_system.pb.v1.GlobalTimeOfDay.toObject = function(includeInstance, msg) {
381
+ var f, obj = {
382
+ secondsAfterUtcMidnight: jspb.Message.getFieldWithDefault(msg, 1, 0)
383
+ };
384
+
385
+ if (includeInstance) {
386
+ obj.$jspbMessageInstance = msg;
387
+ }
388
+ return obj;
389
+ };
390
+ }
391
+
392
+
393
+ /**
394
+ * Deserializes binary data (in protobuf wire format).
395
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
396
+ * @return {!proto.ic_nervous_system.pb.v1.GlobalTimeOfDay}
397
+ */
398
+ proto.ic_nervous_system.pb.v1.GlobalTimeOfDay.deserializeBinary = function(bytes) {
399
+ var reader = new jspb.BinaryReader(bytes);
400
+ var msg = new proto.ic_nervous_system.pb.v1.GlobalTimeOfDay;
401
+ return proto.ic_nervous_system.pb.v1.GlobalTimeOfDay.deserializeBinaryFromReader(msg, reader);
402
+ };
403
+
404
+
405
+ /**
406
+ * Deserializes binary data (in protobuf wire format) from the
407
+ * given reader into the given message object.
408
+ * @param {!proto.ic_nervous_system.pb.v1.GlobalTimeOfDay} msg The message object to deserialize into.
409
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
410
+ * @return {!proto.ic_nervous_system.pb.v1.GlobalTimeOfDay}
411
+ */
412
+ proto.ic_nervous_system.pb.v1.GlobalTimeOfDay.deserializeBinaryFromReader = function(msg, reader) {
413
+ while (reader.nextField()) {
414
+ if (reader.isEndGroup()) {
415
+ break;
416
+ }
417
+ var field = reader.getFieldNumber();
418
+ switch (field) {
419
+ case 1:
420
+ var value = /** @type {number} */ (reader.readUint64());
421
+ msg.setSecondsAfterUtcMidnight(value);
422
+ break;
423
+ default:
424
+ reader.skipField();
425
+ break;
426
+ }
427
+ }
428
+ return msg;
429
+ };
430
+
431
+
432
+ /**
433
+ * Serializes the message to binary data (in protobuf wire format).
434
+ * @return {!Uint8Array}
435
+ */
436
+ proto.ic_nervous_system.pb.v1.GlobalTimeOfDay.prototype.serializeBinary = function() {
437
+ var writer = new jspb.BinaryWriter();
438
+ proto.ic_nervous_system.pb.v1.GlobalTimeOfDay.serializeBinaryToWriter(this, writer);
439
+ return writer.getResultBuffer();
440
+ };
441
+
442
+
443
+ /**
444
+ * Serializes the given message to binary data (in protobuf wire
445
+ * format), writing to the given BinaryWriter.
446
+ * @param {!proto.ic_nervous_system.pb.v1.GlobalTimeOfDay} message
447
+ * @param {!jspb.BinaryWriter} writer
448
+ * @suppress {unusedLocalVariables} f is only used for nested messages
449
+ */
450
+ proto.ic_nervous_system.pb.v1.GlobalTimeOfDay.serializeBinaryToWriter = function(message, writer) {
451
+ var f = undefined;
452
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
453
+ if (f != null) {
454
+ writer.writeUint64(
455
+ 1,
456
+ f
457
+ );
458
+ }
459
+ };
460
+
461
+
462
+ /**
463
+ * optional uint64 seconds_after_utc_midnight = 1;
464
+ * @return {number}
465
+ */
466
+ proto.ic_nervous_system.pb.v1.GlobalTimeOfDay.prototype.getSecondsAfterUtcMidnight = function() {
467
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
468
+ };
469
+
470
+
471
+ /**
472
+ * @param {number} value
473
+ * @return {!proto.ic_nervous_system.pb.v1.GlobalTimeOfDay} returns this
474
+ */
475
+ proto.ic_nervous_system.pb.v1.GlobalTimeOfDay.prototype.setSecondsAfterUtcMidnight = function(value) {
476
+ return jspb.Message.setField(this, 1, value);
477
+ };
478
+
479
+
480
+ /**
481
+ * Clears the field making it undefined.
482
+ * @return {!proto.ic_nervous_system.pb.v1.GlobalTimeOfDay} returns this
483
+ */
484
+ proto.ic_nervous_system.pb.v1.GlobalTimeOfDay.prototype.clearSecondsAfterUtcMidnight = function() {
485
+ return jspb.Message.setField(this, 1, undefined);
486
+ };
487
+
488
+
489
+ /**
490
+ * Returns whether this field is set.
491
+ * @return {boolean}
492
+ */
493
+ proto.ic_nervous_system.pb.v1.GlobalTimeOfDay.prototype.hasSecondsAfterUtcMidnight = function() {
494
+ return jspb.Message.getField(this, 1) != null;
495
+ };
496
+
497
+
498
+
499
+
500
+
501
+ if (jspb.Message.GENERATE_TO_OBJECT) {
502
+ /**
503
+ * Creates an object representation of this proto.
504
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
505
+ * Optional fields that are not set will be set to undefined.
506
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
507
+ * For the list of reserved names please see:
508
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
509
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
510
+ * JSPB instance for transitional soy proto support:
511
+ * http://goto/soy-param-migration
512
+ * @return {!Object}
513
+ */
514
+ proto.ic_nervous_system.pb.v1.Tokens.prototype.toObject = function(opt_includeInstance) {
515
+ return proto.ic_nervous_system.pb.v1.Tokens.toObject(opt_includeInstance, this);
516
+ };
517
+
518
+
519
+ /**
520
+ * Static version of the {@see toObject} method.
521
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
522
+ * the JSPB instance for transitional soy proto support:
523
+ * http://goto/soy-param-migration
524
+ * @param {!proto.ic_nervous_system.pb.v1.Tokens} msg The msg instance to transform.
525
+ * @return {!Object}
526
+ * @suppress {unusedLocalVariables} f is only used for nested messages
527
+ */
528
+ proto.ic_nervous_system.pb.v1.Tokens.toObject = function(includeInstance, msg) {
529
+ var f, obj = {
530
+ e8s: jspb.Message.getFieldWithDefault(msg, 1, 0)
531
+ };
532
+
533
+ if (includeInstance) {
534
+ obj.$jspbMessageInstance = msg;
535
+ }
536
+ return obj;
537
+ };
538
+ }
539
+
540
+
541
+ /**
542
+ * Deserializes binary data (in protobuf wire format).
543
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
544
+ * @return {!proto.ic_nervous_system.pb.v1.Tokens}
545
+ */
546
+ proto.ic_nervous_system.pb.v1.Tokens.deserializeBinary = function(bytes) {
547
+ var reader = new jspb.BinaryReader(bytes);
548
+ var msg = new proto.ic_nervous_system.pb.v1.Tokens;
549
+ return proto.ic_nervous_system.pb.v1.Tokens.deserializeBinaryFromReader(msg, reader);
550
+ };
551
+
552
+
553
+ /**
554
+ * Deserializes binary data (in protobuf wire format) from the
555
+ * given reader into the given message object.
556
+ * @param {!proto.ic_nervous_system.pb.v1.Tokens} msg The message object to deserialize into.
557
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
558
+ * @return {!proto.ic_nervous_system.pb.v1.Tokens}
559
+ */
560
+ proto.ic_nervous_system.pb.v1.Tokens.deserializeBinaryFromReader = function(msg, reader) {
561
+ while (reader.nextField()) {
562
+ if (reader.isEndGroup()) {
563
+ break;
564
+ }
565
+ var field = reader.getFieldNumber();
566
+ switch (field) {
567
+ case 1:
568
+ var value = /** @type {number} */ (reader.readUint64());
569
+ msg.setE8s(value);
570
+ break;
571
+ default:
572
+ reader.skipField();
573
+ break;
574
+ }
575
+ }
576
+ return msg;
577
+ };
578
+
579
+
580
+ /**
581
+ * Serializes the message to binary data (in protobuf wire format).
582
+ * @return {!Uint8Array}
583
+ */
584
+ proto.ic_nervous_system.pb.v1.Tokens.prototype.serializeBinary = function() {
585
+ var writer = new jspb.BinaryWriter();
586
+ proto.ic_nervous_system.pb.v1.Tokens.serializeBinaryToWriter(this, writer);
587
+ return writer.getResultBuffer();
588
+ };
589
+
590
+
591
+ /**
592
+ * Serializes the given message to binary data (in protobuf wire
593
+ * format), writing to the given BinaryWriter.
594
+ * @param {!proto.ic_nervous_system.pb.v1.Tokens} message
595
+ * @param {!jspb.BinaryWriter} writer
596
+ * @suppress {unusedLocalVariables} f is only used for nested messages
597
+ */
598
+ proto.ic_nervous_system.pb.v1.Tokens.serializeBinaryToWriter = function(message, writer) {
599
+ var f = undefined;
600
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
601
+ if (f != null) {
602
+ writer.writeUint64(
603
+ 1,
604
+ f
605
+ );
606
+ }
607
+ };
608
+
609
+
610
+ /**
611
+ * optional uint64 e8s = 1;
612
+ * @return {number}
613
+ */
614
+ proto.ic_nervous_system.pb.v1.Tokens.prototype.getE8s = function() {
615
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
616
+ };
617
+
618
+
619
+ /**
620
+ * @param {number} value
621
+ * @return {!proto.ic_nervous_system.pb.v1.Tokens} returns this
622
+ */
623
+ proto.ic_nervous_system.pb.v1.Tokens.prototype.setE8s = function(value) {
624
+ return jspb.Message.setField(this, 1, value);
625
+ };
626
+
627
+
628
+ /**
629
+ * Clears the field making it undefined.
630
+ * @return {!proto.ic_nervous_system.pb.v1.Tokens} returns this
631
+ */
632
+ proto.ic_nervous_system.pb.v1.Tokens.prototype.clearE8s = function() {
633
+ return jspb.Message.setField(this, 1, undefined);
634
+ };
635
+
636
+
637
+ /**
638
+ * Returns whether this field is set.
639
+ * @return {boolean}
640
+ */
641
+ proto.ic_nervous_system.pb.v1.Tokens.prototype.hasE8s = function() {
642
+ return jspb.Message.getField(this, 1) != null;
643
+ };
644
+
645
+
646
+
647
+
648
+
649
+ if (jspb.Message.GENERATE_TO_OBJECT) {
650
+ /**
651
+ * Creates an object representation of this proto.
652
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
653
+ * Optional fields that are not set will be set to undefined.
654
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
655
+ * For the list of reserved names please see:
656
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
657
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
658
+ * JSPB instance for transitional soy proto support:
659
+ * http://goto/soy-param-migration
660
+ * @return {!Object}
661
+ */
662
+ proto.ic_nervous_system.pb.v1.Image.prototype.toObject = function(opt_includeInstance) {
663
+ return proto.ic_nervous_system.pb.v1.Image.toObject(opt_includeInstance, this);
664
+ };
665
+
666
+
667
+ /**
668
+ * Static version of the {@see toObject} method.
669
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
670
+ * the JSPB instance for transitional soy proto support:
671
+ * http://goto/soy-param-migration
672
+ * @param {!proto.ic_nervous_system.pb.v1.Image} msg The msg instance to transform.
673
+ * @return {!Object}
674
+ * @suppress {unusedLocalVariables} f is only used for nested messages
675
+ */
676
+ proto.ic_nervous_system.pb.v1.Image.toObject = function(includeInstance, msg) {
677
+ var f, obj = {
678
+ base64Encoding: jspb.Message.getFieldWithDefault(msg, 1, "")
679
+ };
680
+
681
+ if (includeInstance) {
682
+ obj.$jspbMessageInstance = msg;
683
+ }
684
+ return obj;
685
+ };
686
+ }
687
+
688
+
689
+ /**
690
+ * Deserializes binary data (in protobuf wire format).
691
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
692
+ * @return {!proto.ic_nervous_system.pb.v1.Image}
693
+ */
694
+ proto.ic_nervous_system.pb.v1.Image.deserializeBinary = function(bytes) {
695
+ var reader = new jspb.BinaryReader(bytes);
696
+ var msg = new proto.ic_nervous_system.pb.v1.Image;
697
+ return proto.ic_nervous_system.pb.v1.Image.deserializeBinaryFromReader(msg, reader);
698
+ };
699
+
700
+
701
+ /**
702
+ * Deserializes binary data (in protobuf wire format) from the
703
+ * given reader into the given message object.
704
+ * @param {!proto.ic_nervous_system.pb.v1.Image} msg The message object to deserialize into.
705
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
706
+ * @return {!proto.ic_nervous_system.pb.v1.Image}
707
+ */
708
+ proto.ic_nervous_system.pb.v1.Image.deserializeBinaryFromReader = function(msg, reader) {
709
+ while (reader.nextField()) {
710
+ if (reader.isEndGroup()) {
711
+ break;
712
+ }
713
+ var field = reader.getFieldNumber();
714
+ switch (field) {
715
+ case 1:
716
+ var value = /** @type {string} */ (reader.readString());
717
+ msg.setBase64Encoding(value);
718
+ break;
719
+ default:
720
+ reader.skipField();
721
+ break;
722
+ }
723
+ }
724
+ return msg;
725
+ };
726
+
727
+
728
+ /**
729
+ * Serializes the message to binary data (in protobuf wire format).
730
+ * @return {!Uint8Array}
731
+ */
732
+ proto.ic_nervous_system.pb.v1.Image.prototype.serializeBinary = function() {
733
+ var writer = new jspb.BinaryWriter();
734
+ proto.ic_nervous_system.pb.v1.Image.serializeBinaryToWriter(this, writer);
735
+ return writer.getResultBuffer();
736
+ };
737
+
738
+
739
+ /**
740
+ * Serializes the given message to binary data (in protobuf wire
741
+ * format), writing to the given BinaryWriter.
742
+ * @param {!proto.ic_nervous_system.pb.v1.Image} message
743
+ * @param {!jspb.BinaryWriter} writer
744
+ * @suppress {unusedLocalVariables} f is only used for nested messages
745
+ */
746
+ proto.ic_nervous_system.pb.v1.Image.serializeBinaryToWriter = function(message, writer) {
747
+ var f = undefined;
748
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
749
+ if (f != null) {
750
+ writer.writeString(
751
+ 1,
752
+ f
753
+ );
754
+ }
755
+ };
756
+
757
+
758
+ /**
759
+ * optional string base64_encoding = 1;
760
+ * @return {string}
761
+ */
762
+ proto.ic_nervous_system.pb.v1.Image.prototype.getBase64Encoding = function() {
763
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
764
+ };
765
+
766
+
767
+ /**
768
+ * @param {string} value
769
+ * @return {!proto.ic_nervous_system.pb.v1.Image} returns this
770
+ */
771
+ proto.ic_nervous_system.pb.v1.Image.prototype.setBase64Encoding = function(value) {
772
+ return jspb.Message.setField(this, 1, value);
773
+ };
774
+
775
+
776
+ /**
777
+ * Clears the field making it undefined.
778
+ * @return {!proto.ic_nervous_system.pb.v1.Image} returns this
779
+ */
780
+ proto.ic_nervous_system.pb.v1.Image.prototype.clearBase64Encoding = function() {
781
+ return jspb.Message.setField(this, 1, undefined);
782
+ };
783
+
784
+
785
+ /**
786
+ * Returns whether this field is set.
787
+ * @return {boolean}
788
+ */
789
+ proto.ic_nervous_system.pb.v1.Image.prototype.hasBase64Encoding = function() {
790
+ return jspb.Message.getField(this, 1) != null;
791
+ };
792
+
793
+
794
+
795
+
796
+
797
+ if (jspb.Message.GENERATE_TO_OBJECT) {
798
+ /**
799
+ * Creates an object representation of this proto.
800
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
801
+ * Optional fields that are not set will be set to undefined.
802
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
803
+ * For the list of reserved names please see:
804
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
805
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
806
+ * JSPB instance for transitional soy proto support:
807
+ * http://goto/soy-param-migration
808
+ * @return {!Object}
809
+ */
810
+ proto.ic_nervous_system.pb.v1.Percentage.prototype.toObject = function(opt_includeInstance) {
811
+ return proto.ic_nervous_system.pb.v1.Percentage.toObject(opt_includeInstance, this);
812
+ };
813
+
814
+
815
+ /**
816
+ * Static version of the {@see toObject} method.
817
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
818
+ * the JSPB instance for transitional soy proto support:
819
+ * http://goto/soy-param-migration
820
+ * @param {!proto.ic_nervous_system.pb.v1.Percentage} msg The msg instance to transform.
821
+ * @return {!Object}
822
+ * @suppress {unusedLocalVariables} f is only used for nested messages
823
+ */
824
+ proto.ic_nervous_system.pb.v1.Percentage.toObject = function(includeInstance, msg) {
825
+ var f, obj = {
826
+ basisPoints: jspb.Message.getFieldWithDefault(msg, 1, 0)
827
+ };
828
+
829
+ if (includeInstance) {
830
+ obj.$jspbMessageInstance = msg;
831
+ }
832
+ return obj;
833
+ };
834
+ }
835
+
836
+
837
+ /**
838
+ * Deserializes binary data (in protobuf wire format).
839
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
840
+ * @return {!proto.ic_nervous_system.pb.v1.Percentage}
841
+ */
842
+ proto.ic_nervous_system.pb.v1.Percentage.deserializeBinary = function(bytes) {
843
+ var reader = new jspb.BinaryReader(bytes);
844
+ var msg = new proto.ic_nervous_system.pb.v1.Percentage;
845
+ return proto.ic_nervous_system.pb.v1.Percentage.deserializeBinaryFromReader(msg, reader);
846
+ };
847
+
848
+
849
+ /**
850
+ * Deserializes binary data (in protobuf wire format) from the
851
+ * given reader into the given message object.
852
+ * @param {!proto.ic_nervous_system.pb.v1.Percentage} msg The message object to deserialize into.
853
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
854
+ * @return {!proto.ic_nervous_system.pb.v1.Percentage}
855
+ */
856
+ proto.ic_nervous_system.pb.v1.Percentage.deserializeBinaryFromReader = function(msg, reader) {
857
+ while (reader.nextField()) {
858
+ if (reader.isEndGroup()) {
859
+ break;
860
+ }
861
+ var field = reader.getFieldNumber();
862
+ switch (field) {
863
+ case 1:
864
+ var value = /** @type {number} */ (reader.readUint64());
865
+ msg.setBasisPoints(value);
866
+ break;
867
+ default:
868
+ reader.skipField();
869
+ break;
870
+ }
871
+ }
872
+ return msg;
873
+ };
874
+
875
+
876
+ /**
877
+ * Serializes the message to binary data (in protobuf wire format).
878
+ * @return {!Uint8Array}
879
+ */
880
+ proto.ic_nervous_system.pb.v1.Percentage.prototype.serializeBinary = function() {
881
+ var writer = new jspb.BinaryWriter();
882
+ proto.ic_nervous_system.pb.v1.Percentage.serializeBinaryToWriter(this, writer);
883
+ return writer.getResultBuffer();
884
+ };
885
+
886
+
887
+ /**
888
+ * Serializes the given message to binary data (in protobuf wire
889
+ * format), writing to the given BinaryWriter.
890
+ * @param {!proto.ic_nervous_system.pb.v1.Percentage} message
891
+ * @param {!jspb.BinaryWriter} writer
892
+ * @suppress {unusedLocalVariables} f is only used for nested messages
893
+ */
894
+ proto.ic_nervous_system.pb.v1.Percentage.serializeBinaryToWriter = function(message, writer) {
895
+ var f = undefined;
896
+ f = /** @type {number} */ (jspb.Message.getField(message, 1));
897
+ if (f != null) {
898
+ writer.writeUint64(
899
+ 1,
900
+ f
901
+ );
902
+ }
903
+ };
904
+
905
+
906
+ /**
907
+ * optional uint64 basis_points = 1;
908
+ * @return {number}
909
+ */
910
+ proto.ic_nervous_system.pb.v1.Percentage.prototype.getBasisPoints = function() {
911
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
912
+ };
913
+
914
+
915
+ /**
916
+ * @param {number} value
917
+ * @return {!proto.ic_nervous_system.pb.v1.Percentage} returns this
918
+ */
919
+ proto.ic_nervous_system.pb.v1.Percentage.prototype.setBasisPoints = function(value) {
920
+ return jspb.Message.setField(this, 1, value);
921
+ };
922
+
923
+
924
+ /**
925
+ * Clears the field making it undefined.
926
+ * @return {!proto.ic_nervous_system.pb.v1.Percentage} returns this
927
+ */
928
+ proto.ic_nervous_system.pb.v1.Percentage.prototype.clearBasisPoints = function() {
929
+ return jspb.Message.setField(this, 1, undefined);
930
+ };
931
+
932
+
933
+ /**
934
+ * Returns whether this field is set.
935
+ * @return {boolean}
936
+ */
937
+ proto.ic_nervous_system.pb.v1.Percentage.prototype.hasBasisPoints = function() {
938
+ return jspb.Message.getField(this, 1) != null;
939
+ };
940
+
941
+
942
+
943
+
944
+
945
+ if (jspb.Message.GENERATE_TO_OBJECT) {
946
+ /**
947
+ * Creates an object representation of this proto.
948
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
949
+ * Optional fields that are not set will be set to undefined.
950
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
951
+ * For the list of reserved names please see:
952
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
953
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
954
+ * JSPB instance for transitional soy proto support:
955
+ * http://goto/soy-param-migration
956
+ * @return {!Object}
957
+ */
958
+ proto.ic_nervous_system.pb.v1.Canister.prototype.toObject = function(opt_includeInstance) {
959
+ return proto.ic_nervous_system.pb.v1.Canister.toObject(opt_includeInstance, this);
960
+ };
961
+
962
+
963
+ /**
964
+ * Static version of the {@see toObject} method.
965
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
966
+ * the JSPB instance for transitional soy proto support:
967
+ * http://goto/soy-param-migration
968
+ * @param {!proto.ic_nervous_system.pb.v1.Canister} msg The msg instance to transform.
969
+ * @return {!Object}
970
+ * @suppress {unusedLocalVariables} f is only used for nested messages
971
+ */
972
+ proto.ic_nervous_system.pb.v1.Canister.toObject = function(includeInstance, msg) {
973
+ var f, obj = {
974
+ id: (f = msg.getId()) && base_types_pb.PrincipalId.toObject(includeInstance, f)
975
+ };
976
+
977
+ if (includeInstance) {
978
+ obj.$jspbMessageInstance = msg;
979
+ }
980
+ return obj;
981
+ };
982
+ }
983
+
984
+
985
+ /**
986
+ * Deserializes binary data (in protobuf wire format).
987
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
988
+ * @return {!proto.ic_nervous_system.pb.v1.Canister}
989
+ */
990
+ proto.ic_nervous_system.pb.v1.Canister.deserializeBinary = function(bytes) {
991
+ var reader = new jspb.BinaryReader(bytes);
992
+ var msg = new proto.ic_nervous_system.pb.v1.Canister;
993
+ return proto.ic_nervous_system.pb.v1.Canister.deserializeBinaryFromReader(msg, reader);
994
+ };
995
+
996
+
997
+ /**
998
+ * Deserializes binary data (in protobuf wire format) from the
999
+ * given reader into the given message object.
1000
+ * @param {!proto.ic_nervous_system.pb.v1.Canister} msg The message object to deserialize into.
1001
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1002
+ * @return {!proto.ic_nervous_system.pb.v1.Canister}
1003
+ */
1004
+ proto.ic_nervous_system.pb.v1.Canister.deserializeBinaryFromReader = function(msg, reader) {
1005
+ while (reader.nextField()) {
1006
+ if (reader.isEndGroup()) {
1007
+ break;
1008
+ }
1009
+ var field = reader.getFieldNumber();
1010
+ switch (field) {
1011
+ case 1:
1012
+ var value = new base_types_pb.PrincipalId;
1013
+ reader.readMessage(value,base_types_pb.PrincipalId.deserializeBinaryFromReader);
1014
+ msg.setId(value);
1015
+ break;
1016
+ default:
1017
+ reader.skipField();
1018
+ break;
1019
+ }
1020
+ }
1021
+ return msg;
1022
+ };
1023
+
1024
+
1025
+ /**
1026
+ * Serializes the message to binary data (in protobuf wire format).
1027
+ * @return {!Uint8Array}
1028
+ */
1029
+ proto.ic_nervous_system.pb.v1.Canister.prototype.serializeBinary = function() {
1030
+ var writer = new jspb.BinaryWriter();
1031
+ proto.ic_nervous_system.pb.v1.Canister.serializeBinaryToWriter(this, writer);
1032
+ return writer.getResultBuffer();
1033
+ };
1034
+
1035
+
1036
+ /**
1037
+ * Serializes the given message to binary data (in protobuf wire
1038
+ * format), writing to the given BinaryWriter.
1039
+ * @param {!proto.ic_nervous_system.pb.v1.Canister} message
1040
+ * @param {!jspb.BinaryWriter} writer
1041
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1042
+ */
1043
+ proto.ic_nervous_system.pb.v1.Canister.serializeBinaryToWriter = function(message, writer) {
1044
+ var f = undefined;
1045
+ f = message.getId();
1046
+ if (f != null) {
1047
+ writer.writeMessage(
1048
+ 1,
1049
+ f,
1050
+ base_types_pb.PrincipalId.serializeBinaryToWriter
1051
+ );
1052
+ }
1053
+ };
1054
+
1055
+
1056
+ /**
1057
+ * optional ic_base_types.pb.v1.PrincipalId id = 1;
1058
+ * @return {?proto.ic_base_types.pb.v1.PrincipalId}
1059
+ */
1060
+ proto.ic_nervous_system.pb.v1.Canister.prototype.getId = function() {
1061
+ return /** @type{?proto.ic_base_types.pb.v1.PrincipalId} */ (
1062
+ jspb.Message.getWrapperField(this, base_types_pb.PrincipalId, 1));
1063
+ };
1064
+
1065
+
1066
+ /**
1067
+ * @param {?proto.ic_base_types.pb.v1.PrincipalId|undefined} value
1068
+ * @return {!proto.ic_nervous_system.pb.v1.Canister} returns this
1069
+ */
1070
+ proto.ic_nervous_system.pb.v1.Canister.prototype.setId = function(value) {
1071
+ return jspb.Message.setWrapperField(this, 1, value);
1072
+ };
1073
+
1074
+
1075
+ /**
1076
+ * Clears the message field making it undefined.
1077
+ * @return {!proto.ic_nervous_system.pb.v1.Canister} returns this
1078
+ */
1079
+ proto.ic_nervous_system.pb.v1.Canister.prototype.clearId = function() {
1080
+ return this.setId(undefined);
1081
+ };
1082
+
1083
+
1084
+ /**
1085
+ * Returns whether this field is set.
1086
+ * @return {boolean}
1087
+ */
1088
+ proto.ic_nervous_system.pb.v1.Canister.prototype.hasId = function() {
1089
+ return jspb.Message.getField(this, 1) != null;
1090
+ };
1091
+
1092
+
1093
+
1094
+ /**
1095
+ * List of repeated fields within this message type.
1096
+ * @private {!Array<number>}
1097
+ * @const
1098
+ */
1099
+ proto.ic_nervous_system.pb.v1.Countries.repeatedFields_ = [1];
1100
+
1101
+
1102
+
1103
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1104
+ /**
1105
+ * Creates an object representation of this proto.
1106
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1107
+ * Optional fields that are not set will be set to undefined.
1108
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1109
+ * For the list of reserved names please see:
1110
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1111
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1112
+ * JSPB instance for transitional soy proto support:
1113
+ * http://goto/soy-param-migration
1114
+ * @return {!Object}
1115
+ */
1116
+ proto.ic_nervous_system.pb.v1.Countries.prototype.toObject = function(opt_includeInstance) {
1117
+ return proto.ic_nervous_system.pb.v1.Countries.toObject(opt_includeInstance, this);
1118
+ };
1119
+
1120
+
1121
+ /**
1122
+ * Static version of the {@see toObject} method.
1123
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1124
+ * the JSPB instance for transitional soy proto support:
1125
+ * http://goto/soy-param-migration
1126
+ * @param {!proto.ic_nervous_system.pb.v1.Countries} msg The msg instance to transform.
1127
+ * @return {!Object}
1128
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1129
+ */
1130
+ proto.ic_nervous_system.pb.v1.Countries.toObject = function(includeInstance, msg) {
1131
+ var f, obj = {
1132
+ isoCodesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f
1133
+ };
1134
+
1135
+ if (includeInstance) {
1136
+ obj.$jspbMessageInstance = msg;
1137
+ }
1138
+ return obj;
1139
+ };
1140
+ }
1141
+
1142
+
1143
+ /**
1144
+ * Deserializes binary data (in protobuf wire format).
1145
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1146
+ * @return {!proto.ic_nervous_system.pb.v1.Countries}
1147
+ */
1148
+ proto.ic_nervous_system.pb.v1.Countries.deserializeBinary = function(bytes) {
1149
+ var reader = new jspb.BinaryReader(bytes);
1150
+ var msg = new proto.ic_nervous_system.pb.v1.Countries;
1151
+ return proto.ic_nervous_system.pb.v1.Countries.deserializeBinaryFromReader(msg, reader);
1152
+ };
1153
+
1154
+
1155
+ /**
1156
+ * Deserializes binary data (in protobuf wire format) from the
1157
+ * given reader into the given message object.
1158
+ * @param {!proto.ic_nervous_system.pb.v1.Countries} msg The message object to deserialize into.
1159
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1160
+ * @return {!proto.ic_nervous_system.pb.v1.Countries}
1161
+ */
1162
+ proto.ic_nervous_system.pb.v1.Countries.deserializeBinaryFromReader = function(msg, reader) {
1163
+ while (reader.nextField()) {
1164
+ if (reader.isEndGroup()) {
1165
+ break;
1166
+ }
1167
+ var field = reader.getFieldNumber();
1168
+ switch (field) {
1169
+ case 1:
1170
+ var value = /** @type {string} */ (reader.readString());
1171
+ msg.addIsoCodes(value);
1172
+ break;
1173
+ default:
1174
+ reader.skipField();
1175
+ break;
1176
+ }
1177
+ }
1178
+ return msg;
1179
+ };
1180
+
1181
+
1182
+ /**
1183
+ * Serializes the message to binary data (in protobuf wire format).
1184
+ * @return {!Uint8Array}
1185
+ */
1186
+ proto.ic_nervous_system.pb.v1.Countries.prototype.serializeBinary = function() {
1187
+ var writer = new jspb.BinaryWriter();
1188
+ proto.ic_nervous_system.pb.v1.Countries.serializeBinaryToWriter(this, writer);
1189
+ return writer.getResultBuffer();
1190
+ };
1191
+
1192
+
1193
+ /**
1194
+ * Serializes the given message to binary data (in protobuf wire
1195
+ * format), writing to the given BinaryWriter.
1196
+ * @param {!proto.ic_nervous_system.pb.v1.Countries} message
1197
+ * @param {!jspb.BinaryWriter} writer
1198
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1199
+ */
1200
+ proto.ic_nervous_system.pb.v1.Countries.serializeBinaryToWriter = function(message, writer) {
1201
+ var f = undefined;
1202
+ f = message.getIsoCodesList();
1203
+ if (f.length > 0) {
1204
+ writer.writeRepeatedString(
1205
+ 1,
1206
+ f
1207
+ );
1208
+ }
1209
+ };
1210
+
1211
+
1212
+ /**
1213
+ * repeated string iso_codes = 1;
1214
+ * @return {!Array<string>}
1215
+ */
1216
+ proto.ic_nervous_system.pb.v1.Countries.prototype.getIsoCodesList = function() {
1217
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
1218
+ };
1219
+
1220
+
1221
+ /**
1222
+ * @param {!Array<string>} value
1223
+ * @return {!proto.ic_nervous_system.pb.v1.Countries} returns this
1224
+ */
1225
+ proto.ic_nervous_system.pb.v1.Countries.prototype.setIsoCodesList = function(value) {
1226
+ return jspb.Message.setField(this, 1, value || []);
1227
+ };
1228
+
1229
+
1230
+ /**
1231
+ * @param {string} value
1232
+ * @param {number=} opt_index
1233
+ * @return {!proto.ic_nervous_system.pb.v1.Countries} returns this
1234
+ */
1235
+ proto.ic_nervous_system.pb.v1.Countries.prototype.addIsoCodes = function(value, opt_index) {
1236
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
1237
+ };
1238
+
1239
+
1240
+ /**
1241
+ * Clears the list making it empty but non-null.
1242
+ * @return {!proto.ic_nervous_system.pb.v1.Countries} returns this
1243
+ */
1244
+ proto.ic_nervous_system.pb.v1.Countries.prototype.clearIsoCodesList = function() {
1245
+ return this.setIsoCodesList([]);
1246
+ };
1247
+
1248
+
1249
+
1250
+
1251
+
1252
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1253
+ /**
1254
+ * Creates an object representation of this proto.
1255
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1256
+ * Optional fields that are not set will be set to undefined.
1257
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1258
+ * For the list of reserved names please see:
1259
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1260
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1261
+ * JSPB instance for transitional soy proto support:
1262
+ * http://goto/soy-param-migration
1263
+ * @return {!Object}
1264
+ */
1265
+ proto.ic_nervous_system.pb.v1.Decimal.prototype.toObject = function(opt_includeInstance) {
1266
+ return proto.ic_nervous_system.pb.v1.Decimal.toObject(opt_includeInstance, this);
1267
+ };
1268
+
1269
+
1270
+ /**
1271
+ * Static version of the {@see toObject} method.
1272
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1273
+ * the JSPB instance for transitional soy proto support:
1274
+ * http://goto/soy-param-migration
1275
+ * @param {!proto.ic_nervous_system.pb.v1.Decimal} msg The msg instance to transform.
1276
+ * @return {!Object}
1277
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1278
+ */
1279
+ proto.ic_nervous_system.pb.v1.Decimal.toObject = function(includeInstance, msg) {
1280
+ var f, obj = {
1281
+ humanReadable: jspb.Message.getFieldWithDefault(msg, 1, "")
1282
+ };
1283
+
1284
+ if (includeInstance) {
1285
+ obj.$jspbMessageInstance = msg;
1286
+ }
1287
+ return obj;
1288
+ };
1289
+ }
1290
+
1291
+
1292
+ /**
1293
+ * Deserializes binary data (in protobuf wire format).
1294
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1295
+ * @return {!proto.ic_nervous_system.pb.v1.Decimal}
1296
+ */
1297
+ proto.ic_nervous_system.pb.v1.Decimal.deserializeBinary = function(bytes) {
1298
+ var reader = new jspb.BinaryReader(bytes);
1299
+ var msg = new proto.ic_nervous_system.pb.v1.Decimal;
1300
+ return proto.ic_nervous_system.pb.v1.Decimal.deserializeBinaryFromReader(msg, reader);
1301
+ };
1302
+
1303
+
1304
+ /**
1305
+ * Deserializes binary data (in protobuf wire format) from the
1306
+ * given reader into the given message object.
1307
+ * @param {!proto.ic_nervous_system.pb.v1.Decimal} msg The message object to deserialize into.
1308
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1309
+ * @return {!proto.ic_nervous_system.pb.v1.Decimal}
1310
+ */
1311
+ proto.ic_nervous_system.pb.v1.Decimal.deserializeBinaryFromReader = function(msg, reader) {
1312
+ while (reader.nextField()) {
1313
+ if (reader.isEndGroup()) {
1314
+ break;
1315
+ }
1316
+ var field = reader.getFieldNumber();
1317
+ switch (field) {
1318
+ case 1:
1319
+ var value = /** @type {string} */ (reader.readString());
1320
+ msg.setHumanReadable(value);
1321
+ break;
1322
+ default:
1323
+ reader.skipField();
1324
+ break;
1325
+ }
1326
+ }
1327
+ return msg;
1328
+ };
1329
+
1330
+
1331
+ /**
1332
+ * Serializes the message to binary data (in protobuf wire format).
1333
+ * @return {!Uint8Array}
1334
+ */
1335
+ proto.ic_nervous_system.pb.v1.Decimal.prototype.serializeBinary = function() {
1336
+ var writer = new jspb.BinaryWriter();
1337
+ proto.ic_nervous_system.pb.v1.Decimal.serializeBinaryToWriter(this, writer);
1338
+ return writer.getResultBuffer();
1339
+ };
1340
+
1341
+
1342
+ /**
1343
+ * Serializes the given message to binary data (in protobuf wire
1344
+ * format), writing to the given BinaryWriter.
1345
+ * @param {!proto.ic_nervous_system.pb.v1.Decimal} message
1346
+ * @param {!jspb.BinaryWriter} writer
1347
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1348
+ */
1349
+ proto.ic_nervous_system.pb.v1.Decimal.serializeBinaryToWriter = function(message, writer) {
1350
+ var f = undefined;
1351
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
1352
+ if (f != null) {
1353
+ writer.writeString(
1354
+ 1,
1355
+ f
1356
+ );
1357
+ }
1358
+ };
1359
+
1360
+
1361
+ /**
1362
+ * optional string human_readable = 1;
1363
+ * @return {string}
1364
+ */
1365
+ proto.ic_nervous_system.pb.v1.Decimal.prototype.getHumanReadable = function() {
1366
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1367
+ };
1368
+
1369
+
1370
+ /**
1371
+ * @param {string} value
1372
+ * @return {!proto.ic_nervous_system.pb.v1.Decimal} returns this
1373
+ */
1374
+ proto.ic_nervous_system.pb.v1.Decimal.prototype.setHumanReadable = function(value) {
1375
+ return jspb.Message.setField(this, 1, value);
1376
+ };
1377
+
1378
+
1379
+ /**
1380
+ * Clears the field making it undefined.
1381
+ * @return {!proto.ic_nervous_system.pb.v1.Decimal} returns this
1382
+ */
1383
+ proto.ic_nervous_system.pb.v1.Decimal.prototype.clearHumanReadable = function() {
1384
+ return jspb.Message.setField(this, 1, undefined);
1385
+ };
1386
+
1387
+
1388
+ /**
1389
+ * Returns whether this field is set.
1390
+ * @return {boolean}
1391
+ */
1392
+ proto.ic_nervous_system.pb.v1.Decimal.prototype.hasHumanReadable = function() {
1393
+ return jspb.Message.getField(this, 1) != null;
1394
+ };
1395
+
1396
+
1397
+ goog.object.extend(exports, proto.ic_nervous_system.pb.v1);