ord-schema 0.3.40

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