@marleena/trb-proto 1.0.46 → 1.0.51

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,3467 @@
1
+ // source: strategy/search.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 google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
25
+ goog.object.extend(proto, google_protobuf_timestamp_pb);
26
+ var strategy_spec_pb = require('../strategy/spec_pb.js');
27
+ goog.object.extend(proto, strategy_spec_pb);
28
+ var strategy_backtest_pb = require('../strategy/backtest_pb.js');
29
+ goog.object.extend(proto, strategy_backtest_pb);
30
+ goog.exportSymbol('proto.trb.strategy.v1.Choice', null, global);
31
+ goog.exportSymbol('proto.trb.strategy.v1.FloatRange', null, global);
32
+ goog.exportSymbol('proto.trb.strategy.v1.IntRange', null, global);
33
+ goog.exportSymbol('proto.trb.strategy.v1.Objective', null, global);
34
+ goog.exportSymbol('proto.trb.strategy.v1.ParamRange', null, global);
35
+ goog.exportSymbol('proto.trb.strategy.v1.ParamRange.RangeCase', null, global);
36
+ goog.exportSymbol('proto.trb.strategy.v1.SearchBudget', null, global);
37
+ goog.exportSymbol('proto.trb.strategy.v1.SearchCandidate', null, global);
38
+ goog.exportSymbol('proto.trb.strategy.v1.SearchMethod', null, global);
39
+ goog.exportSymbol('proto.trb.strategy.v1.SearchProgress', null, global);
40
+ goog.exportSymbol('proto.trb.strategy.v1.SearchRun', null, global);
41
+ goog.exportSymbol('proto.trb.strategy.v1.SearchTask', null, global);
42
+ goog.exportSymbol('proto.trb.strategy.v1.StructureSpace', null, global);
43
+ /**
44
+ * Generated by JsPbCodeGenerator.
45
+ * @param {Array=} opt_data Optional initial data array, typically from a
46
+ * server response, or constructed directly in Javascript. The array is used
47
+ * in place and becomes part of the constructed object. It is not cloned.
48
+ * If no data is provided, the constructed object will be empty, but still
49
+ * valid.
50
+ * @extends {jspb.Message}
51
+ * @constructor
52
+ */
53
+ proto.trb.strategy.v1.IntRange = function(opt_data) {
54
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
55
+ };
56
+ goog.inherits(proto.trb.strategy.v1.IntRange, jspb.Message);
57
+ if (goog.DEBUG && !COMPILED) {
58
+ /**
59
+ * @public
60
+ * @override
61
+ */
62
+ proto.trb.strategy.v1.IntRange.displayName = 'proto.trb.strategy.v1.IntRange';
63
+ }
64
+ /**
65
+ * Generated by JsPbCodeGenerator.
66
+ * @param {Array=} opt_data Optional initial data array, typically from a
67
+ * server response, or constructed directly in Javascript. The array is used
68
+ * in place and becomes part of the constructed object. It is not cloned.
69
+ * If no data is provided, the constructed object will be empty, but still
70
+ * valid.
71
+ * @extends {jspb.Message}
72
+ * @constructor
73
+ */
74
+ proto.trb.strategy.v1.FloatRange = function(opt_data) {
75
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
76
+ };
77
+ goog.inherits(proto.trb.strategy.v1.FloatRange, jspb.Message);
78
+ if (goog.DEBUG && !COMPILED) {
79
+ /**
80
+ * @public
81
+ * @override
82
+ */
83
+ proto.trb.strategy.v1.FloatRange.displayName = 'proto.trb.strategy.v1.FloatRange';
84
+ }
85
+ /**
86
+ * Generated by JsPbCodeGenerator.
87
+ * @param {Array=} opt_data Optional initial data array, typically from a
88
+ * server response, or constructed directly in Javascript. The array is used
89
+ * in place and becomes part of the constructed object. It is not cloned.
90
+ * If no data is provided, the constructed object will be empty, but still
91
+ * valid.
92
+ * @extends {jspb.Message}
93
+ * @constructor
94
+ */
95
+ proto.trb.strategy.v1.Choice = function(opt_data) {
96
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.trb.strategy.v1.Choice.repeatedFields_, null);
97
+ };
98
+ goog.inherits(proto.trb.strategy.v1.Choice, jspb.Message);
99
+ if (goog.DEBUG && !COMPILED) {
100
+ /**
101
+ * @public
102
+ * @override
103
+ */
104
+ proto.trb.strategy.v1.Choice.displayName = 'proto.trb.strategy.v1.Choice';
105
+ }
106
+ /**
107
+ * Generated by JsPbCodeGenerator.
108
+ * @param {Array=} opt_data Optional initial data array, typically from a
109
+ * server response, or constructed directly in Javascript. The array is used
110
+ * in place and becomes part of the constructed object. It is not cloned.
111
+ * If no data is provided, the constructed object will be empty, but still
112
+ * valid.
113
+ * @extends {jspb.Message}
114
+ * @constructor
115
+ */
116
+ proto.trb.strategy.v1.ParamRange = function(opt_data) {
117
+ jspb.Message.initialize(this, opt_data, 0, -1, null, proto.trb.strategy.v1.ParamRange.oneofGroups_);
118
+ };
119
+ goog.inherits(proto.trb.strategy.v1.ParamRange, jspb.Message);
120
+ if (goog.DEBUG && !COMPILED) {
121
+ /**
122
+ * @public
123
+ * @override
124
+ */
125
+ proto.trb.strategy.v1.ParamRange.displayName = 'proto.trb.strategy.v1.ParamRange';
126
+ }
127
+ /**
128
+ * Generated by JsPbCodeGenerator.
129
+ * @param {Array=} opt_data Optional initial data array, typically from a
130
+ * server response, or constructed directly in Javascript. The array is used
131
+ * in place and becomes part of the constructed object. It is not cloned.
132
+ * If no data is provided, the constructed object will be empty, but still
133
+ * valid.
134
+ * @extends {jspb.Message}
135
+ * @constructor
136
+ */
137
+ proto.trb.strategy.v1.StructureSpace = function(opt_data) {
138
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.trb.strategy.v1.StructureSpace.repeatedFields_, null);
139
+ };
140
+ goog.inherits(proto.trb.strategy.v1.StructureSpace, jspb.Message);
141
+ if (goog.DEBUG && !COMPILED) {
142
+ /**
143
+ * @public
144
+ * @override
145
+ */
146
+ proto.trb.strategy.v1.StructureSpace.displayName = 'proto.trb.strategy.v1.StructureSpace';
147
+ }
148
+ /**
149
+ * Generated by JsPbCodeGenerator.
150
+ * @param {Array=} opt_data Optional initial data array, typically from a
151
+ * server response, or constructed directly in Javascript. The array is used
152
+ * in place and becomes part of the constructed object. It is not cloned.
153
+ * If no data is provided, the constructed object will be empty, but still
154
+ * valid.
155
+ * @extends {jspb.Message}
156
+ * @constructor
157
+ */
158
+ proto.trb.strategy.v1.Objective = function(opt_data) {
159
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
160
+ };
161
+ goog.inherits(proto.trb.strategy.v1.Objective, jspb.Message);
162
+ if (goog.DEBUG && !COMPILED) {
163
+ /**
164
+ * @public
165
+ * @override
166
+ */
167
+ proto.trb.strategy.v1.Objective.displayName = 'proto.trb.strategy.v1.Objective';
168
+ }
169
+ /**
170
+ * Generated by JsPbCodeGenerator.
171
+ * @param {Array=} opt_data Optional initial data array, typically from a
172
+ * server response, or constructed directly in Javascript. The array is used
173
+ * in place and becomes part of the constructed object. It is not cloned.
174
+ * If no data is provided, the constructed object will be empty, but still
175
+ * valid.
176
+ * @extends {jspb.Message}
177
+ * @constructor
178
+ */
179
+ proto.trb.strategy.v1.SearchBudget = function(opt_data) {
180
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
181
+ };
182
+ goog.inherits(proto.trb.strategy.v1.SearchBudget, jspb.Message);
183
+ if (goog.DEBUG && !COMPILED) {
184
+ /**
185
+ * @public
186
+ * @override
187
+ */
188
+ proto.trb.strategy.v1.SearchBudget.displayName = 'proto.trb.strategy.v1.SearchBudget';
189
+ }
190
+ /**
191
+ * Generated by JsPbCodeGenerator.
192
+ * @param {Array=} opt_data Optional initial data array, typically from a
193
+ * server response, or constructed directly in Javascript. The array is used
194
+ * in place and becomes part of the constructed object. It is not cloned.
195
+ * If no data is provided, the constructed object will be empty, but still
196
+ * valid.
197
+ * @extends {jspb.Message}
198
+ * @constructor
199
+ */
200
+ proto.trb.strategy.v1.SearchCandidate = function(opt_data) {
201
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
202
+ };
203
+ goog.inherits(proto.trb.strategy.v1.SearchCandidate, jspb.Message);
204
+ if (goog.DEBUG && !COMPILED) {
205
+ /**
206
+ * @public
207
+ * @override
208
+ */
209
+ proto.trb.strategy.v1.SearchCandidate.displayName = 'proto.trb.strategy.v1.SearchCandidate';
210
+ }
211
+ /**
212
+ * Generated by JsPbCodeGenerator.
213
+ * @param {Array=} opt_data Optional initial data array, typically from a
214
+ * server response, or constructed directly in Javascript. The array is used
215
+ * in place and becomes part of the constructed object. It is not cloned.
216
+ * If no data is provided, the constructed object will be empty, but still
217
+ * valid.
218
+ * @extends {jspb.Message}
219
+ * @constructor
220
+ */
221
+ proto.trb.strategy.v1.SearchProgress = function(opt_data) {
222
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
223
+ };
224
+ goog.inherits(proto.trb.strategy.v1.SearchProgress, jspb.Message);
225
+ if (goog.DEBUG && !COMPILED) {
226
+ /**
227
+ * @public
228
+ * @override
229
+ */
230
+ proto.trb.strategy.v1.SearchProgress.displayName = 'proto.trb.strategy.v1.SearchProgress';
231
+ }
232
+ /**
233
+ * Generated by JsPbCodeGenerator.
234
+ * @param {Array=} opt_data Optional initial data array, typically from a
235
+ * server response, or constructed directly in Javascript. The array is used
236
+ * in place and becomes part of the constructed object. It is not cloned.
237
+ * If no data is provided, the constructed object will be empty, but still
238
+ * valid.
239
+ * @extends {jspb.Message}
240
+ * @constructor
241
+ */
242
+ proto.trb.strategy.v1.SearchRun = function(opt_data) {
243
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.trb.strategy.v1.SearchRun.repeatedFields_, null);
244
+ };
245
+ goog.inherits(proto.trb.strategy.v1.SearchRun, jspb.Message);
246
+ if (goog.DEBUG && !COMPILED) {
247
+ /**
248
+ * @public
249
+ * @override
250
+ */
251
+ proto.trb.strategy.v1.SearchRun.displayName = 'proto.trb.strategy.v1.SearchRun';
252
+ }
253
+ /**
254
+ * Generated by JsPbCodeGenerator.
255
+ * @param {Array=} opt_data Optional initial data array, typically from a
256
+ * server response, or constructed directly in Javascript. The array is used
257
+ * in place and becomes part of the constructed object. It is not cloned.
258
+ * If no data is provided, the constructed object will be empty, but still
259
+ * valid.
260
+ * @extends {jspb.Message}
261
+ * @constructor
262
+ */
263
+ proto.trb.strategy.v1.SearchTask = function(opt_data) {
264
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
265
+ };
266
+ goog.inherits(proto.trb.strategy.v1.SearchTask, jspb.Message);
267
+ if (goog.DEBUG && !COMPILED) {
268
+ /**
269
+ * @public
270
+ * @override
271
+ */
272
+ proto.trb.strategy.v1.SearchTask.displayName = 'proto.trb.strategy.v1.SearchTask';
273
+ }
274
+
275
+
276
+
277
+ if (jspb.Message.GENERATE_TO_OBJECT) {
278
+ /**
279
+ * Creates an object representation of this proto.
280
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
281
+ * Optional fields that are not set will be set to undefined.
282
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
283
+ * For the list of reserved names please see:
284
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
285
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
286
+ * JSPB instance for transitional soy proto support:
287
+ * http://goto/soy-param-migration
288
+ * @return {!Object}
289
+ */
290
+ proto.trb.strategy.v1.IntRange.prototype.toObject = function(opt_includeInstance) {
291
+ return proto.trb.strategy.v1.IntRange.toObject(opt_includeInstance, this);
292
+ };
293
+
294
+
295
+ /**
296
+ * Static version of the {@see toObject} method.
297
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
298
+ * the JSPB instance for transitional soy proto support:
299
+ * http://goto/soy-param-migration
300
+ * @param {!proto.trb.strategy.v1.IntRange} msg The msg instance to transform.
301
+ * @return {!Object}
302
+ * @suppress {unusedLocalVariables} f is only used for nested messages
303
+ */
304
+ proto.trb.strategy.v1.IntRange.toObject = function(includeInstance, msg) {
305
+ var f, obj = {
306
+ min: jspb.Message.getFieldWithDefault(msg, 1, 0),
307
+ max: jspb.Message.getFieldWithDefault(msg, 2, 0),
308
+ step: jspb.Message.getFieldWithDefault(msg, 3, 0)
309
+ };
310
+
311
+ if (includeInstance) {
312
+ obj.$jspbMessageInstance = msg;
313
+ }
314
+ return obj;
315
+ };
316
+ }
317
+
318
+
319
+ /**
320
+ * Deserializes binary data (in protobuf wire format).
321
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
322
+ * @return {!proto.trb.strategy.v1.IntRange}
323
+ */
324
+ proto.trb.strategy.v1.IntRange.deserializeBinary = function(bytes) {
325
+ var reader = new jspb.BinaryReader(bytes);
326
+ var msg = new proto.trb.strategy.v1.IntRange;
327
+ return proto.trb.strategy.v1.IntRange.deserializeBinaryFromReader(msg, reader);
328
+ };
329
+
330
+
331
+ /**
332
+ * Deserializes binary data (in protobuf wire format) from the
333
+ * given reader into the given message object.
334
+ * @param {!proto.trb.strategy.v1.IntRange} msg The message object to deserialize into.
335
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
336
+ * @return {!proto.trb.strategy.v1.IntRange}
337
+ */
338
+ proto.trb.strategy.v1.IntRange.deserializeBinaryFromReader = function(msg, reader) {
339
+ while (reader.nextField()) {
340
+ if (reader.isEndGroup()) {
341
+ break;
342
+ }
343
+ var field = reader.getFieldNumber();
344
+ switch (field) {
345
+ case 1:
346
+ var value = /** @type {number} */ (reader.readInt64());
347
+ msg.setMin(value);
348
+ break;
349
+ case 2:
350
+ var value = /** @type {number} */ (reader.readInt64());
351
+ msg.setMax(value);
352
+ break;
353
+ case 3:
354
+ var value = /** @type {number} */ (reader.readInt64());
355
+ msg.setStep(value);
356
+ break;
357
+ default:
358
+ reader.skipField();
359
+ break;
360
+ }
361
+ }
362
+ return msg;
363
+ };
364
+
365
+
366
+ /**
367
+ * Serializes the message to binary data (in protobuf wire format).
368
+ * @return {!Uint8Array}
369
+ */
370
+ proto.trb.strategy.v1.IntRange.prototype.serializeBinary = function() {
371
+ var writer = new jspb.BinaryWriter();
372
+ proto.trb.strategy.v1.IntRange.serializeBinaryToWriter(this, writer);
373
+ return writer.getResultBuffer();
374
+ };
375
+
376
+
377
+ /**
378
+ * Serializes the given message to binary data (in protobuf wire
379
+ * format), writing to the given BinaryWriter.
380
+ * @param {!proto.trb.strategy.v1.IntRange} message
381
+ * @param {!jspb.BinaryWriter} writer
382
+ * @suppress {unusedLocalVariables} f is only used for nested messages
383
+ */
384
+ proto.trb.strategy.v1.IntRange.serializeBinaryToWriter = function(message, writer) {
385
+ var f = undefined;
386
+ f = message.getMin();
387
+ if (f !== 0) {
388
+ writer.writeInt64(
389
+ 1,
390
+ f
391
+ );
392
+ }
393
+ f = message.getMax();
394
+ if (f !== 0) {
395
+ writer.writeInt64(
396
+ 2,
397
+ f
398
+ );
399
+ }
400
+ f = message.getStep();
401
+ if (f !== 0) {
402
+ writer.writeInt64(
403
+ 3,
404
+ f
405
+ );
406
+ }
407
+ };
408
+
409
+
410
+ /**
411
+ * optional int64 min = 1;
412
+ * @return {number}
413
+ */
414
+ proto.trb.strategy.v1.IntRange.prototype.getMin = function() {
415
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
416
+ };
417
+
418
+
419
+ /**
420
+ * @param {number} value
421
+ * @return {!proto.trb.strategy.v1.IntRange} returns this
422
+ */
423
+ proto.trb.strategy.v1.IntRange.prototype.setMin = function(value) {
424
+ return jspb.Message.setProto3IntField(this, 1, value);
425
+ };
426
+
427
+
428
+ /**
429
+ * optional int64 max = 2;
430
+ * @return {number}
431
+ */
432
+ proto.trb.strategy.v1.IntRange.prototype.getMax = function() {
433
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
434
+ };
435
+
436
+
437
+ /**
438
+ * @param {number} value
439
+ * @return {!proto.trb.strategy.v1.IntRange} returns this
440
+ */
441
+ proto.trb.strategy.v1.IntRange.prototype.setMax = function(value) {
442
+ return jspb.Message.setProto3IntField(this, 2, value);
443
+ };
444
+
445
+
446
+ /**
447
+ * optional int64 step = 3;
448
+ * @return {number}
449
+ */
450
+ proto.trb.strategy.v1.IntRange.prototype.getStep = function() {
451
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
452
+ };
453
+
454
+
455
+ /**
456
+ * @param {number} value
457
+ * @return {!proto.trb.strategy.v1.IntRange} returns this
458
+ */
459
+ proto.trb.strategy.v1.IntRange.prototype.setStep = function(value) {
460
+ return jspb.Message.setProto3IntField(this, 3, value);
461
+ };
462
+
463
+
464
+
465
+
466
+
467
+ if (jspb.Message.GENERATE_TO_OBJECT) {
468
+ /**
469
+ * Creates an object representation of this proto.
470
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
471
+ * Optional fields that are not set will be set to undefined.
472
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
473
+ * For the list of reserved names please see:
474
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
475
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
476
+ * JSPB instance for transitional soy proto support:
477
+ * http://goto/soy-param-migration
478
+ * @return {!Object}
479
+ */
480
+ proto.trb.strategy.v1.FloatRange.prototype.toObject = function(opt_includeInstance) {
481
+ return proto.trb.strategy.v1.FloatRange.toObject(opt_includeInstance, this);
482
+ };
483
+
484
+
485
+ /**
486
+ * Static version of the {@see toObject} method.
487
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
488
+ * the JSPB instance for transitional soy proto support:
489
+ * http://goto/soy-param-migration
490
+ * @param {!proto.trb.strategy.v1.FloatRange} msg The msg instance to transform.
491
+ * @return {!Object}
492
+ * @suppress {unusedLocalVariables} f is only used for nested messages
493
+ */
494
+ proto.trb.strategy.v1.FloatRange.toObject = function(includeInstance, msg) {
495
+ var f, obj = {
496
+ min: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0),
497
+ max: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
498
+ step: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0)
499
+ };
500
+
501
+ if (includeInstance) {
502
+ obj.$jspbMessageInstance = msg;
503
+ }
504
+ return obj;
505
+ };
506
+ }
507
+
508
+
509
+ /**
510
+ * Deserializes binary data (in protobuf wire format).
511
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
512
+ * @return {!proto.trb.strategy.v1.FloatRange}
513
+ */
514
+ proto.trb.strategy.v1.FloatRange.deserializeBinary = function(bytes) {
515
+ var reader = new jspb.BinaryReader(bytes);
516
+ var msg = new proto.trb.strategy.v1.FloatRange;
517
+ return proto.trb.strategy.v1.FloatRange.deserializeBinaryFromReader(msg, reader);
518
+ };
519
+
520
+
521
+ /**
522
+ * Deserializes binary data (in protobuf wire format) from the
523
+ * given reader into the given message object.
524
+ * @param {!proto.trb.strategy.v1.FloatRange} msg The message object to deserialize into.
525
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
526
+ * @return {!proto.trb.strategy.v1.FloatRange}
527
+ */
528
+ proto.trb.strategy.v1.FloatRange.deserializeBinaryFromReader = function(msg, reader) {
529
+ while (reader.nextField()) {
530
+ if (reader.isEndGroup()) {
531
+ break;
532
+ }
533
+ var field = reader.getFieldNumber();
534
+ switch (field) {
535
+ case 1:
536
+ var value = /** @type {number} */ (reader.readDouble());
537
+ msg.setMin(value);
538
+ break;
539
+ case 2:
540
+ var value = /** @type {number} */ (reader.readDouble());
541
+ msg.setMax(value);
542
+ break;
543
+ case 3:
544
+ var value = /** @type {number} */ (reader.readDouble());
545
+ msg.setStep(value);
546
+ break;
547
+ default:
548
+ reader.skipField();
549
+ break;
550
+ }
551
+ }
552
+ return msg;
553
+ };
554
+
555
+
556
+ /**
557
+ * Serializes the message to binary data (in protobuf wire format).
558
+ * @return {!Uint8Array}
559
+ */
560
+ proto.trb.strategy.v1.FloatRange.prototype.serializeBinary = function() {
561
+ var writer = new jspb.BinaryWriter();
562
+ proto.trb.strategy.v1.FloatRange.serializeBinaryToWriter(this, writer);
563
+ return writer.getResultBuffer();
564
+ };
565
+
566
+
567
+ /**
568
+ * Serializes the given message to binary data (in protobuf wire
569
+ * format), writing to the given BinaryWriter.
570
+ * @param {!proto.trb.strategy.v1.FloatRange} message
571
+ * @param {!jspb.BinaryWriter} writer
572
+ * @suppress {unusedLocalVariables} f is only used for nested messages
573
+ */
574
+ proto.trb.strategy.v1.FloatRange.serializeBinaryToWriter = function(message, writer) {
575
+ var f = undefined;
576
+ f = message.getMin();
577
+ if (f !== 0.0) {
578
+ writer.writeDouble(
579
+ 1,
580
+ f
581
+ );
582
+ }
583
+ f = message.getMax();
584
+ if (f !== 0.0) {
585
+ writer.writeDouble(
586
+ 2,
587
+ f
588
+ );
589
+ }
590
+ f = message.getStep();
591
+ if (f !== 0.0) {
592
+ writer.writeDouble(
593
+ 3,
594
+ f
595
+ );
596
+ }
597
+ };
598
+
599
+
600
+ /**
601
+ * optional double min = 1;
602
+ * @return {number}
603
+ */
604
+ proto.trb.strategy.v1.FloatRange.prototype.getMin = function() {
605
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0));
606
+ };
607
+
608
+
609
+ /**
610
+ * @param {number} value
611
+ * @return {!proto.trb.strategy.v1.FloatRange} returns this
612
+ */
613
+ proto.trb.strategy.v1.FloatRange.prototype.setMin = function(value) {
614
+ return jspb.Message.setProto3FloatField(this, 1, value);
615
+ };
616
+
617
+
618
+ /**
619
+ * optional double max = 2;
620
+ * @return {number}
621
+ */
622
+ proto.trb.strategy.v1.FloatRange.prototype.getMax = function() {
623
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
624
+ };
625
+
626
+
627
+ /**
628
+ * @param {number} value
629
+ * @return {!proto.trb.strategy.v1.FloatRange} returns this
630
+ */
631
+ proto.trb.strategy.v1.FloatRange.prototype.setMax = function(value) {
632
+ return jspb.Message.setProto3FloatField(this, 2, value);
633
+ };
634
+
635
+
636
+ /**
637
+ * optional double step = 3;
638
+ * @return {number}
639
+ */
640
+ proto.trb.strategy.v1.FloatRange.prototype.getStep = function() {
641
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
642
+ };
643
+
644
+
645
+ /**
646
+ * @param {number} value
647
+ * @return {!proto.trb.strategy.v1.FloatRange} returns this
648
+ */
649
+ proto.trb.strategy.v1.FloatRange.prototype.setStep = function(value) {
650
+ return jspb.Message.setProto3FloatField(this, 3, value);
651
+ };
652
+
653
+
654
+
655
+ /**
656
+ * List of repeated fields within this message type.
657
+ * @private {!Array<number>}
658
+ * @const
659
+ */
660
+ proto.trb.strategy.v1.Choice.repeatedFields_ = [1];
661
+
662
+
663
+
664
+ if (jspb.Message.GENERATE_TO_OBJECT) {
665
+ /**
666
+ * Creates an object representation of this proto.
667
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
668
+ * Optional fields that are not set will be set to undefined.
669
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
670
+ * For the list of reserved names please see:
671
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
672
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
673
+ * JSPB instance for transitional soy proto support:
674
+ * http://goto/soy-param-migration
675
+ * @return {!Object}
676
+ */
677
+ proto.trb.strategy.v1.Choice.prototype.toObject = function(opt_includeInstance) {
678
+ return proto.trb.strategy.v1.Choice.toObject(opt_includeInstance, this);
679
+ };
680
+
681
+
682
+ /**
683
+ * Static version of the {@see toObject} method.
684
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
685
+ * the JSPB instance for transitional soy proto support:
686
+ * http://goto/soy-param-migration
687
+ * @param {!proto.trb.strategy.v1.Choice} msg The msg instance to transform.
688
+ * @return {!Object}
689
+ * @suppress {unusedLocalVariables} f is only used for nested messages
690
+ */
691
+ proto.trb.strategy.v1.Choice.toObject = function(includeInstance, msg) {
692
+ var f, obj = {
693
+ valuesList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 1)) == null ? undefined : f
694
+ };
695
+
696
+ if (includeInstance) {
697
+ obj.$jspbMessageInstance = msg;
698
+ }
699
+ return obj;
700
+ };
701
+ }
702
+
703
+
704
+ /**
705
+ * Deserializes binary data (in protobuf wire format).
706
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
707
+ * @return {!proto.trb.strategy.v1.Choice}
708
+ */
709
+ proto.trb.strategy.v1.Choice.deserializeBinary = function(bytes) {
710
+ var reader = new jspb.BinaryReader(bytes);
711
+ var msg = new proto.trb.strategy.v1.Choice;
712
+ return proto.trb.strategy.v1.Choice.deserializeBinaryFromReader(msg, reader);
713
+ };
714
+
715
+
716
+ /**
717
+ * Deserializes binary data (in protobuf wire format) from the
718
+ * given reader into the given message object.
719
+ * @param {!proto.trb.strategy.v1.Choice} msg The message object to deserialize into.
720
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
721
+ * @return {!proto.trb.strategy.v1.Choice}
722
+ */
723
+ proto.trb.strategy.v1.Choice.deserializeBinaryFromReader = function(msg, reader) {
724
+ while (reader.nextField()) {
725
+ if (reader.isEndGroup()) {
726
+ break;
727
+ }
728
+ var field = reader.getFieldNumber();
729
+ switch (field) {
730
+ case 1:
731
+ var values = /** @type {!Array<number>} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]);
732
+ for (var i = 0; i < values.length; i++) {
733
+ msg.addValues(values[i]);
734
+ }
735
+ break;
736
+ default:
737
+ reader.skipField();
738
+ break;
739
+ }
740
+ }
741
+ return msg;
742
+ };
743
+
744
+
745
+ /**
746
+ * Serializes the message to binary data (in protobuf wire format).
747
+ * @return {!Uint8Array}
748
+ */
749
+ proto.trb.strategy.v1.Choice.prototype.serializeBinary = function() {
750
+ var writer = new jspb.BinaryWriter();
751
+ proto.trb.strategy.v1.Choice.serializeBinaryToWriter(this, writer);
752
+ return writer.getResultBuffer();
753
+ };
754
+
755
+
756
+ /**
757
+ * Serializes the given message to binary data (in protobuf wire
758
+ * format), writing to the given BinaryWriter.
759
+ * @param {!proto.trb.strategy.v1.Choice} message
760
+ * @param {!jspb.BinaryWriter} writer
761
+ * @suppress {unusedLocalVariables} f is only used for nested messages
762
+ */
763
+ proto.trb.strategy.v1.Choice.serializeBinaryToWriter = function(message, writer) {
764
+ var f = undefined;
765
+ f = message.getValuesList();
766
+ if (f.length > 0) {
767
+ writer.writePackedDouble(
768
+ 1,
769
+ f
770
+ );
771
+ }
772
+ };
773
+
774
+
775
+ /**
776
+ * repeated double values = 1;
777
+ * @return {!Array<number>}
778
+ */
779
+ proto.trb.strategy.v1.Choice.prototype.getValuesList = function() {
780
+ return /** @type {!Array<number>} */ (jspb.Message.getRepeatedFloatingPointField(this, 1));
781
+ };
782
+
783
+
784
+ /**
785
+ * @param {!Array<number>} value
786
+ * @return {!proto.trb.strategy.v1.Choice} returns this
787
+ */
788
+ proto.trb.strategy.v1.Choice.prototype.setValuesList = function(value) {
789
+ return jspb.Message.setField(this, 1, value || []);
790
+ };
791
+
792
+
793
+ /**
794
+ * @param {number} value
795
+ * @param {number=} opt_index
796
+ * @return {!proto.trb.strategy.v1.Choice} returns this
797
+ */
798
+ proto.trb.strategy.v1.Choice.prototype.addValues = function(value, opt_index) {
799
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
800
+ };
801
+
802
+
803
+ /**
804
+ * Clears the list making it empty but non-null.
805
+ * @return {!proto.trb.strategy.v1.Choice} returns this
806
+ */
807
+ proto.trb.strategy.v1.Choice.prototype.clearValuesList = function() {
808
+ return this.setValuesList([]);
809
+ };
810
+
811
+
812
+
813
+ /**
814
+ * Oneof group definitions for this message. Each group defines the field
815
+ * numbers belonging to that group. When of these fields' value is set, all
816
+ * other fields in the group are cleared. During deserialization, if multiple
817
+ * fields are encountered for a group, only the last value seen will be kept.
818
+ * @private {!Array<!Array<number>>}
819
+ * @const
820
+ */
821
+ proto.trb.strategy.v1.ParamRange.oneofGroups_ = [[2,3,4]];
822
+
823
+ /**
824
+ * @enum {number}
825
+ */
826
+ proto.trb.strategy.v1.ParamRange.RangeCase = {
827
+ RANGE_NOT_SET: 0,
828
+ INTS: 2,
829
+ FLOATS: 3,
830
+ CHOICE: 4
831
+ };
832
+
833
+ /**
834
+ * @return {proto.trb.strategy.v1.ParamRange.RangeCase}
835
+ */
836
+ proto.trb.strategy.v1.ParamRange.prototype.getRangeCase = function() {
837
+ return /** @type {proto.trb.strategy.v1.ParamRange.RangeCase} */(jspb.Message.computeOneofCase(this, proto.trb.strategy.v1.ParamRange.oneofGroups_[0]));
838
+ };
839
+
840
+
841
+
842
+ if (jspb.Message.GENERATE_TO_OBJECT) {
843
+ /**
844
+ * Creates an object representation of this proto.
845
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
846
+ * Optional fields that are not set will be set to undefined.
847
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
848
+ * For the list of reserved names please see:
849
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
850
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
851
+ * JSPB instance for transitional soy proto support:
852
+ * http://goto/soy-param-migration
853
+ * @return {!Object}
854
+ */
855
+ proto.trb.strategy.v1.ParamRange.prototype.toObject = function(opt_includeInstance) {
856
+ return proto.trb.strategy.v1.ParamRange.toObject(opt_includeInstance, this);
857
+ };
858
+
859
+
860
+ /**
861
+ * Static version of the {@see toObject} method.
862
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
863
+ * the JSPB instance for transitional soy proto support:
864
+ * http://goto/soy-param-migration
865
+ * @param {!proto.trb.strategy.v1.ParamRange} msg The msg instance to transform.
866
+ * @return {!Object}
867
+ * @suppress {unusedLocalVariables} f is only used for nested messages
868
+ */
869
+ proto.trb.strategy.v1.ParamRange.toObject = function(includeInstance, msg) {
870
+ var f, obj = {
871
+ path: jspb.Message.getFieldWithDefault(msg, 1, ""),
872
+ ints: (f = msg.getInts()) && proto.trb.strategy.v1.IntRange.toObject(includeInstance, f),
873
+ floats: (f = msg.getFloats()) && proto.trb.strategy.v1.FloatRange.toObject(includeInstance, f),
874
+ choice: (f = msg.getChoice()) && proto.trb.strategy.v1.Choice.toObject(includeInstance, f)
875
+ };
876
+
877
+ if (includeInstance) {
878
+ obj.$jspbMessageInstance = msg;
879
+ }
880
+ return obj;
881
+ };
882
+ }
883
+
884
+
885
+ /**
886
+ * Deserializes binary data (in protobuf wire format).
887
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
888
+ * @return {!proto.trb.strategy.v1.ParamRange}
889
+ */
890
+ proto.trb.strategy.v1.ParamRange.deserializeBinary = function(bytes) {
891
+ var reader = new jspb.BinaryReader(bytes);
892
+ var msg = new proto.trb.strategy.v1.ParamRange;
893
+ return proto.trb.strategy.v1.ParamRange.deserializeBinaryFromReader(msg, reader);
894
+ };
895
+
896
+
897
+ /**
898
+ * Deserializes binary data (in protobuf wire format) from the
899
+ * given reader into the given message object.
900
+ * @param {!proto.trb.strategy.v1.ParamRange} msg The message object to deserialize into.
901
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
902
+ * @return {!proto.trb.strategy.v1.ParamRange}
903
+ */
904
+ proto.trb.strategy.v1.ParamRange.deserializeBinaryFromReader = function(msg, reader) {
905
+ while (reader.nextField()) {
906
+ if (reader.isEndGroup()) {
907
+ break;
908
+ }
909
+ var field = reader.getFieldNumber();
910
+ switch (field) {
911
+ case 1:
912
+ var value = /** @type {string} */ (reader.readString());
913
+ msg.setPath(value);
914
+ break;
915
+ case 2:
916
+ var value = new proto.trb.strategy.v1.IntRange;
917
+ reader.readMessage(value,proto.trb.strategy.v1.IntRange.deserializeBinaryFromReader);
918
+ msg.setInts(value);
919
+ break;
920
+ case 3:
921
+ var value = new proto.trb.strategy.v1.FloatRange;
922
+ reader.readMessage(value,proto.trb.strategy.v1.FloatRange.deserializeBinaryFromReader);
923
+ msg.setFloats(value);
924
+ break;
925
+ case 4:
926
+ var value = new proto.trb.strategy.v1.Choice;
927
+ reader.readMessage(value,proto.trb.strategy.v1.Choice.deserializeBinaryFromReader);
928
+ msg.setChoice(value);
929
+ break;
930
+ default:
931
+ reader.skipField();
932
+ break;
933
+ }
934
+ }
935
+ return msg;
936
+ };
937
+
938
+
939
+ /**
940
+ * Serializes the message to binary data (in protobuf wire format).
941
+ * @return {!Uint8Array}
942
+ */
943
+ proto.trb.strategy.v1.ParamRange.prototype.serializeBinary = function() {
944
+ var writer = new jspb.BinaryWriter();
945
+ proto.trb.strategy.v1.ParamRange.serializeBinaryToWriter(this, writer);
946
+ return writer.getResultBuffer();
947
+ };
948
+
949
+
950
+ /**
951
+ * Serializes the given message to binary data (in protobuf wire
952
+ * format), writing to the given BinaryWriter.
953
+ * @param {!proto.trb.strategy.v1.ParamRange} message
954
+ * @param {!jspb.BinaryWriter} writer
955
+ * @suppress {unusedLocalVariables} f is only used for nested messages
956
+ */
957
+ proto.trb.strategy.v1.ParamRange.serializeBinaryToWriter = function(message, writer) {
958
+ var f = undefined;
959
+ f = message.getPath();
960
+ if (f.length > 0) {
961
+ writer.writeString(
962
+ 1,
963
+ f
964
+ );
965
+ }
966
+ f = message.getInts();
967
+ if (f != null) {
968
+ writer.writeMessage(
969
+ 2,
970
+ f,
971
+ proto.trb.strategy.v1.IntRange.serializeBinaryToWriter
972
+ );
973
+ }
974
+ f = message.getFloats();
975
+ if (f != null) {
976
+ writer.writeMessage(
977
+ 3,
978
+ f,
979
+ proto.trb.strategy.v1.FloatRange.serializeBinaryToWriter
980
+ );
981
+ }
982
+ f = message.getChoice();
983
+ if (f != null) {
984
+ writer.writeMessage(
985
+ 4,
986
+ f,
987
+ proto.trb.strategy.v1.Choice.serializeBinaryToWriter
988
+ );
989
+ }
990
+ };
991
+
992
+
993
+ /**
994
+ * optional string path = 1;
995
+ * @return {string}
996
+ */
997
+ proto.trb.strategy.v1.ParamRange.prototype.getPath = function() {
998
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
999
+ };
1000
+
1001
+
1002
+ /**
1003
+ * @param {string} value
1004
+ * @return {!proto.trb.strategy.v1.ParamRange} returns this
1005
+ */
1006
+ proto.trb.strategy.v1.ParamRange.prototype.setPath = function(value) {
1007
+ return jspb.Message.setProto3StringField(this, 1, value);
1008
+ };
1009
+
1010
+
1011
+ /**
1012
+ * optional IntRange ints = 2;
1013
+ * @return {?proto.trb.strategy.v1.IntRange}
1014
+ */
1015
+ proto.trb.strategy.v1.ParamRange.prototype.getInts = function() {
1016
+ return /** @type{?proto.trb.strategy.v1.IntRange} */ (
1017
+ jspb.Message.getWrapperField(this, proto.trb.strategy.v1.IntRange, 2));
1018
+ };
1019
+
1020
+
1021
+ /**
1022
+ * @param {?proto.trb.strategy.v1.IntRange|undefined} value
1023
+ * @return {!proto.trb.strategy.v1.ParamRange} returns this
1024
+ */
1025
+ proto.trb.strategy.v1.ParamRange.prototype.setInts = function(value) {
1026
+ return jspb.Message.setOneofWrapperField(this, 2, proto.trb.strategy.v1.ParamRange.oneofGroups_[0], value);
1027
+ };
1028
+
1029
+
1030
+ /**
1031
+ * Clears the message field making it undefined.
1032
+ * @return {!proto.trb.strategy.v1.ParamRange} returns this
1033
+ */
1034
+ proto.trb.strategy.v1.ParamRange.prototype.clearInts = function() {
1035
+ return this.setInts(undefined);
1036
+ };
1037
+
1038
+
1039
+ /**
1040
+ * Returns whether this field is set.
1041
+ * @return {boolean}
1042
+ */
1043
+ proto.trb.strategy.v1.ParamRange.prototype.hasInts = function() {
1044
+ return jspb.Message.getField(this, 2) != null;
1045
+ };
1046
+
1047
+
1048
+ /**
1049
+ * optional FloatRange floats = 3;
1050
+ * @return {?proto.trb.strategy.v1.FloatRange}
1051
+ */
1052
+ proto.trb.strategy.v1.ParamRange.prototype.getFloats = function() {
1053
+ return /** @type{?proto.trb.strategy.v1.FloatRange} */ (
1054
+ jspb.Message.getWrapperField(this, proto.trb.strategy.v1.FloatRange, 3));
1055
+ };
1056
+
1057
+
1058
+ /**
1059
+ * @param {?proto.trb.strategy.v1.FloatRange|undefined} value
1060
+ * @return {!proto.trb.strategy.v1.ParamRange} returns this
1061
+ */
1062
+ proto.trb.strategy.v1.ParamRange.prototype.setFloats = function(value) {
1063
+ return jspb.Message.setOneofWrapperField(this, 3, proto.trb.strategy.v1.ParamRange.oneofGroups_[0], value);
1064
+ };
1065
+
1066
+
1067
+ /**
1068
+ * Clears the message field making it undefined.
1069
+ * @return {!proto.trb.strategy.v1.ParamRange} returns this
1070
+ */
1071
+ proto.trb.strategy.v1.ParamRange.prototype.clearFloats = function() {
1072
+ return this.setFloats(undefined);
1073
+ };
1074
+
1075
+
1076
+ /**
1077
+ * Returns whether this field is set.
1078
+ * @return {boolean}
1079
+ */
1080
+ proto.trb.strategy.v1.ParamRange.prototype.hasFloats = function() {
1081
+ return jspb.Message.getField(this, 3) != null;
1082
+ };
1083
+
1084
+
1085
+ /**
1086
+ * optional Choice choice = 4;
1087
+ * @return {?proto.trb.strategy.v1.Choice}
1088
+ */
1089
+ proto.trb.strategy.v1.ParamRange.prototype.getChoice = function() {
1090
+ return /** @type{?proto.trb.strategy.v1.Choice} */ (
1091
+ jspb.Message.getWrapperField(this, proto.trb.strategy.v1.Choice, 4));
1092
+ };
1093
+
1094
+
1095
+ /**
1096
+ * @param {?proto.trb.strategy.v1.Choice|undefined} value
1097
+ * @return {!proto.trb.strategy.v1.ParamRange} returns this
1098
+ */
1099
+ proto.trb.strategy.v1.ParamRange.prototype.setChoice = function(value) {
1100
+ return jspb.Message.setOneofWrapperField(this, 4, proto.trb.strategy.v1.ParamRange.oneofGroups_[0], value);
1101
+ };
1102
+
1103
+
1104
+ /**
1105
+ * Clears the message field making it undefined.
1106
+ * @return {!proto.trb.strategy.v1.ParamRange} returns this
1107
+ */
1108
+ proto.trb.strategy.v1.ParamRange.prototype.clearChoice = function() {
1109
+ return this.setChoice(undefined);
1110
+ };
1111
+
1112
+
1113
+ /**
1114
+ * Returns whether this field is set.
1115
+ * @return {boolean}
1116
+ */
1117
+ proto.trb.strategy.v1.ParamRange.prototype.hasChoice = function() {
1118
+ return jspb.Message.getField(this, 4) != null;
1119
+ };
1120
+
1121
+
1122
+
1123
+ /**
1124
+ * List of repeated fields within this message type.
1125
+ * @private {!Array<number>}
1126
+ * @const
1127
+ */
1128
+ proto.trb.strategy.v1.StructureSpace.repeatedFields_ = [1,4];
1129
+
1130
+
1131
+
1132
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1133
+ /**
1134
+ * Creates an object representation of this proto.
1135
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1136
+ * Optional fields that are not set will be set to undefined.
1137
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1138
+ * For the list of reserved names please see:
1139
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1140
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1141
+ * JSPB instance for transitional soy proto support:
1142
+ * http://goto/soy-param-migration
1143
+ * @return {!Object}
1144
+ */
1145
+ proto.trb.strategy.v1.StructureSpace.prototype.toObject = function(opt_includeInstance) {
1146
+ return proto.trb.strategy.v1.StructureSpace.toObject(opt_includeInstance, this);
1147
+ };
1148
+
1149
+
1150
+ /**
1151
+ * Static version of the {@see toObject} method.
1152
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1153
+ * the JSPB instance for transitional soy proto support:
1154
+ * http://goto/soy-param-migration
1155
+ * @param {!proto.trb.strategy.v1.StructureSpace} msg The msg instance to transform.
1156
+ * @return {!Object}
1157
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1158
+ */
1159
+ proto.trb.strategy.v1.StructureSpace.toObject = function(includeInstance, msg) {
1160
+ var f, obj = {
1161
+ indicatorPaletteList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
1162
+ maxConditions: jspb.Message.getFieldWithDefault(msg, 2, 0),
1163
+ maxDepth: jspb.Message.getFieldWithDefault(msg, 3, 0),
1164
+ allowedOpsList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f,
1165
+ mutateStructure: jspb.Message.getBooleanFieldWithDefault(msg, 5, false)
1166
+ };
1167
+
1168
+ if (includeInstance) {
1169
+ obj.$jspbMessageInstance = msg;
1170
+ }
1171
+ return obj;
1172
+ };
1173
+ }
1174
+
1175
+
1176
+ /**
1177
+ * Deserializes binary data (in protobuf wire format).
1178
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1179
+ * @return {!proto.trb.strategy.v1.StructureSpace}
1180
+ */
1181
+ proto.trb.strategy.v1.StructureSpace.deserializeBinary = function(bytes) {
1182
+ var reader = new jspb.BinaryReader(bytes);
1183
+ var msg = new proto.trb.strategy.v1.StructureSpace;
1184
+ return proto.trb.strategy.v1.StructureSpace.deserializeBinaryFromReader(msg, reader);
1185
+ };
1186
+
1187
+
1188
+ /**
1189
+ * Deserializes binary data (in protobuf wire format) from the
1190
+ * given reader into the given message object.
1191
+ * @param {!proto.trb.strategy.v1.StructureSpace} msg The message object to deserialize into.
1192
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1193
+ * @return {!proto.trb.strategy.v1.StructureSpace}
1194
+ */
1195
+ proto.trb.strategy.v1.StructureSpace.deserializeBinaryFromReader = function(msg, reader) {
1196
+ while (reader.nextField()) {
1197
+ if (reader.isEndGroup()) {
1198
+ break;
1199
+ }
1200
+ var field = reader.getFieldNumber();
1201
+ switch (field) {
1202
+ case 1:
1203
+ var value = /** @type {string} */ (reader.readString());
1204
+ msg.addIndicatorPalette(value);
1205
+ break;
1206
+ case 2:
1207
+ var value = /** @type {number} */ (reader.readUint32());
1208
+ msg.setMaxConditions(value);
1209
+ break;
1210
+ case 3:
1211
+ var value = /** @type {number} */ (reader.readUint32());
1212
+ msg.setMaxDepth(value);
1213
+ break;
1214
+ case 4:
1215
+ var values = /** @type {!Array<!proto.trb.strategy.v1.CompareOp>} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]);
1216
+ for (var i = 0; i < values.length; i++) {
1217
+ msg.addAllowedOps(values[i]);
1218
+ }
1219
+ break;
1220
+ case 5:
1221
+ var value = /** @type {boolean} */ (reader.readBool());
1222
+ msg.setMutateStructure(value);
1223
+ break;
1224
+ default:
1225
+ reader.skipField();
1226
+ break;
1227
+ }
1228
+ }
1229
+ return msg;
1230
+ };
1231
+
1232
+
1233
+ /**
1234
+ * Serializes the message to binary data (in protobuf wire format).
1235
+ * @return {!Uint8Array}
1236
+ */
1237
+ proto.trb.strategy.v1.StructureSpace.prototype.serializeBinary = function() {
1238
+ var writer = new jspb.BinaryWriter();
1239
+ proto.trb.strategy.v1.StructureSpace.serializeBinaryToWriter(this, writer);
1240
+ return writer.getResultBuffer();
1241
+ };
1242
+
1243
+
1244
+ /**
1245
+ * Serializes the given message to binary data (in protobuf wire
1246
+ * format), writing to the given BinaryWriter.
1247
+ * @param {!proto.trb.strategy.v1.StructureSpace} message
1248
+ * @param {!jspb.BinaryWriter} writer
1249
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1250
+ */
1251
+ proto.trb.strategy.v1.StructureSpace.serializeBinaryToWriter = function(message, writer) {
1252
+ var f = undefined;
1253
+ f = message.getIndicatorPaletteList();
1254
+ if (f.length > 0) {
1255
+ writer.writeRepeatedString(
1256
+ 1,
1257
+ f
1258
+ );
1259
+ }
1260
+ f = message.getMaxConditions();
1261
+ if (f !== 0) {
1262
+ writer.writeUint32(
1263
+ 2,
1264
+ f
1265
+ );
1266
+ }
1267
+ f = message.getMaxDepth();
1268
+ if (f !== 0) {
1269
+ writer.writeUint32(
1270
+ 3,
1271
+ f
1272
+ );
1273
+ }
1274
+ f = message.getAllowedOpsList();
1275
+ if (f.length > 0) {
1276
+ writer.writePackedEnum(
1277
+ 4,
1278
+ f
1279
+ );
1280
+ }
1281
+ f = message.getMutateStructure();
1282
+ if (f) {
1283
+ writer.writeBool(
1284
+ 5,
1285
+ f
1286
+ );
1287
+ }
1288
+ };
1289
+
1290
+
1291
+ /**
1292
+ * repeated string indicator_palette = 1;
1293
+ * @return {!Array<string>}
1294
+ */
1295
+ proto.trb.strategy.v1.StructureSpace.prototype.getIndicatorPaletteList = function() {
1296
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
1297
+ };
1298
+
1299
+
1300
+ /**
1301
+ * @param {!Array<string>} value
1302
+ * @return {!proto.trb.strategy.v1.StructureSpace} returns this
1303
+ */
1304
+ proto.trb.strategy.v1.StructureSpace.prototype.setIndicatorPaletteList = function(value) {
1305
+ return jspb.Message.setField(this, 1, value || []);
1306
+ };
1307
+
1308
+
1309
+ /**
1310
+ * @param {string} value
1311
+ * @param {number=} opt_index
1312
+ * @return {!proto.trb.strategy.v1.StructureSpace} returns this
1313
+ */
1314
+ proto.trb.strategy.v1.StructureSpace.prototype.addIndicatorPalette = function(value, opt_index) {
1315
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
1316
+ };
1317
+
1318
+
1319
+ /**
1320
+ * Clears the list making it empty but non-null.
1321
+ * @return {!proto.trb.strategy.v1.StructureSpace} returns this
1322
+ */
1323
+ proto.trb.strategy.v1.StructureSpace.prototype.clearIndicatorPaletteList = function() {
1324
+ return this.setIndicatorPaletteList([]);
1325
+ };
1326
+
1327
+
1328
+ /**
1329
+ * optional uint32 max_conditions = 2;
1330
+ * @return {number}
1331
+ */
1332
+ proto.trb.strategy.v1.StructureSpace.prototype.getMaxConditions = function() {
1333
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1334
+ };
1335
+
1336
+
1337
+ /**
1338
+ * @param {number} value
1339
+ * @return {!proto.trb.strategy.v1.StructureSpace} returns this
1340
+ */
1341
+ proto.trb.strategy.v1.StructureSpace.prototype.setMaxConditions = function(value) {
1342
+ return jspb.Message.setProto3IntField(this, 2, value);
1343
+ };
1344
+
1345
+
1346
+ /**
1347
+ * optional uint32 max_depth = 3;
1348
+ * @return {number}
1349
+ */
1350
+ proto.trb.strategy.v1.StructureSpace.prototype.getMaxDepth = function() {
1351
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1352
+ };
1353
+
1354
+
1355
+ /**
1356
+ * @param {number} value
1357
+ * @return {!proto.trb.strategy.v1.StructureSpace} returns this
1358
+ */
1359
+ proto.trb.strategy.v1.StructureSpace.prototype.setMaxDepth = function(value) {
1360
+ return jspb.Message.setProto3IntField(this, 3, value);
1361
+ };
1362
+
1363
+
1364
+ /**
1365
+ * repeated CompareOp allowed_ops = 4;
1366
+ * @return {!Array<!proto.trb.strategy.v1.CompareOp>}
1367
+ */
1368
+ proto.trb.strategy.v1.StructureSpace.prototype.getAllowedOpsList = function() {
1369
+ return /** @type {!Array<!proto.trb.strategy.v1.CompareOp>} */ (jspb.Message.getRepeatedField(this, 4));
1370
+ };
1371
+
1372
+
1373
+ /**
1374
+ * @param {!Array<!proto.trb.strategy.v1.CompareOp>} value
1375
+ * @return {!proto.trb.strategy.v1.StructureSpace} returns this
1376
+ */
1377
+ proto.trb.strategy.v1.StructureSpace.prototype.setAllowedOpsList = function(value) {
1378
+ return jspb.Message.setField(this, 4, value || []);
1379
+ };
1380
+
1381
+
1382
+ /**
1383
+ * @param {!proto.trb.strategy.v1.CompareOp} value
1384
+ * @param {number=} opt_index
1385
+ * @return {!proto.trb.strategy.v1.StructureSpace} returns this
1386
+ */
1387
+ proto.trb.strategy.v1.StructureSpace.prototype.addAllowedOps = function(value, opt_index) {
1388
+ return jspb.Message.addToRepeatedField(this, 4, value, opt_index);
1389
+ };
1390
+
1391
+
1392
+ /**
1393
+ * Clears the list making it empty but non-null.
1394
+ * @return {!proto.trb.strategy.v1.StructureSpace} returns this
1395
+ */
1396
+ proto.trb.strategy.v1.StructureSpace.prototype.clearAllowedOpsList = function() {
1397
+ return this.setAllowedOpsList([]);
1398
+ };
1399
+
1400
+
1401
+ /**
1402
+ * optional bool mutate_structure = 5;
1403
+ * @return {boolean}
1404
+ */
1405
+ proto.trb.strategy.v1.StructureSpace.prototype.getMutateStructure = function() {
1406
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
1407
+ };
1408
+
1409
+
1410
+ /**
1411
+ * @param {boolean} value
1412
+ * @return {!proto.trb.strategy.v1.StructureSpace} returns this
1413
+ */
1414
+ proto.trb.strategy.v1.StructureSpace.prototype.setMutateStructure = function(value) {
1415
+ return jspb.Message.setProto3BooleanField(this, 5, value);
1416
+ };
1417
+
1418
+
1419
+
1420
+
1421
+
1422
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1423
+ /**
1424
+ * Creates an object representation of this proto.
1425
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1426
+ * Optional fields that are not set will be set to undefined.
1427
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1428
+ * For the list of reserved names please see:
1429
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1430
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1431
+ * JSPB instance for transitional soy proto support:
1432
+ * http://goto/soy-param-migration
1433
+ * @return {!Object}
1434
+ */
1435
+ proto.trb.strategy.v1.Objective.prototype.toObject = function(opt_includeInstance) {
1436
+ return proto.trb.strategy.v1.Objective.toObject(opt_includeInstance, this);
1437
+ };
1438
+
1439
+
1440
+ /**
1441
+ * Static version of the {@see toObject} method.
1442
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1443
+ * the JSPB instance for transitional soy proto support:
1444
+ * http://goto/soy-param-migration
1445
+ * @param {!proto.trb.strategy.v1.Objective} msg The msg instance to transform.
1446
+ * @return {!Object}
1447
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1448
+ */
1449
+ proto.trb.strategy.v1.Objective.toObject = function(includeInstance, msg) {
1450
+ var f, obj = {
1451
+ metric: jspb.Message.getFieldWithDefault(msg, 1, ""),
1452
+ maximize: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
1453
+ minTrades: jspb.Message.getFieldWithDefault(msg, 3, 0),
1454
+ maxDrawdownLimit: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0)
1455
+ };
1456
+
1457
+ if (includeInstance) {
1458
+ obj.$jspbMessageInstance = msg;
1459
+ }
1460
+ return obj;
1461
+ };
1462
+ }
1463
+
1464
+
1465
+ /**
1466
+ * Deserializes binary data (in protobuf wire format).
1467
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1468
+ * @return {!proto.trb.strategy.v1.Objective}
1469
+ */
1470
+ proto.trb.strategy.v1.Objective.deserializeBinary = function(bytes) {
1471
+ var reader = new jspb.BinaryReader(bytes);
1472
+ var msg = new proto.trb.strategy.v1.Objective;
1473
+ return proto.trb.strategy.v1.Objective.deserializeBinaryFromReader(msg, reader);
1474
+ };
1475
+
1476
+
1477
+ /**
1478
+ * Deserializes binary data (in protobuf wire format) from the
1479
+ * given reader into the given message object.
1480
+ * @param {!proto.trb.strategy.v1.Objective} msg The message object to deserialize into.
1481
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1482
+ * @return {!proto.trb.strategy.v1.Objective}
1483
+ */
1484
+ proto.trb.strategy.v1.Objective.deserializeBinaryFromReader = function(msg, reader) {
1485
+ while (reader.nextField()) {
1486
+ if (reader.isEndGroup()) {
1487
+ break;
1488
+ }
1489
+ var field = reader.getFieldNumber();
1490
+ switch (field) {
1491
+ case 1:
1492
+ var value = /** @type {string} */ (reader.readString());
1493
+ msg.setMetric(value);
1494
+ break;
1495
+ case 2:
1496
+ var value = /** @type {boolean} */ (reader.readBool());
1497
+ msg.setMaximize(value);
1498
+ break;
1499
+ case 3:
1500
+ var value = /** @type {number} */ (reader.readUint32());
1501
+ msg.setMinTrades(value);
1502
+ break;
1503
+ case 4:
1504
+ var value = /** @type {number} */ (reader.readDouble());
1505
+ msg.setMaxDrawdownLimit(value);
1506
+ break;
1507
+ default:
1508
+ reader.skipField();
1509
+ break;
1510
+ }
1511
+ }
1512
+ return msg;
1513
+ };
1514
+
1515
+
1516
+ /**
1517
+ * Serializes the message to binary data (in protobuf wire format).
1518
+ * @return {!Uint8Array}
1519
+ */
1520
+ proto.trb.strategy.v1.Objective.prototype.serializeBinary = function() {
1521
+ var writer = new jspb.BinaryWriter();
1522
+ proto.trb.strategy.v1.Objective.serializeBinaryToWriter(this, writer);
1523
+ return writer.getResultBuffer();
1524
+ };
1525
+
1526
+
1527
+ /**
1528
+ * Serializes the given message to binary data (in protobuf wire
1529
+ * format), writing to the given BinaryWriter.
1530
+ * @param {!proto.trb.strategy.v1.Objective} message
1531
+ * @param {!jspb.BinaryWriter} writer
1532
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1533
+ */
1534
+ proto.trb.strategy.v1.Objective.serializeBinaryToWriter = function(message, writer) {
1535
+ var f = undefined;
1536
+ f = message.getMetric();
1537
+ if (f.length > 0) {
1538
+ writer.writeString(
1539
+ 1,
1540
+ f
1541
+ );
1542
+ }
1543
+ f = message.getMaximize();
1544
+ if (f) {
1545
+ writer.writeBool(
1546
+ 2,
1547
+ f
1548
+ );
1549
+ }
1550
+ f = message.getMinTrades();
1551
+ if (f !== 0) {
1552
+ writer.writeUint32(
1553
+ 3,
1554
+ f
1555
+ );
1556
+ }
1557
+ f = message.getMaxDrawdownLimit();
1558
+ if (f !== 0.0) {
1559
+ writer.writeDouble(
1560
+ 4,
1561
+ f
1562
+ );
1563
+ }
1564
+ };
1565
+
1566
+
1567
+ /**
1568
+ * optional string metric = 1;
1569
+ * @return {string}
1570
+ */
1571
+ proto.trb.strategy.v1.Objective.prototype.getMetric = function() {
1572
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1573
+ };
1574
+
1575
+
1576
+ /**
1577
+ * @param {string} value
1578
+ * @return {!proto.trb.strategy.v1.Objective} returns this
1579
+ */
1580
+ proto.trb.strategy.v1.Objective.prototype.setMetric = function(value) {
1581
+ return jspb.Message.setProto3StringField(this, 1, value);
1582
+ };
1583
+
1584
+
1585
+ /**
1586
+ * optional bool maximize = 2;
1587
+ * @return {boolean}
1588
+ */
1589
+ proto.trb.strategy.v1.Objective.prototype.getMaximize = function() {
1590
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
1591
+ };
1592
+
1593
+
1594
+ /**
1595
+ * @param {boolean} value
1596
+ * @return {!proto.trb.strategy.v1.Objective} returns this
1597
+ */
1598
+ proto.trb.strategy.v1.Objective.prototype.setMaximize = function(value) {
1599
+ return jspb.Message.setProto3BooleanField(this, 2, value);
1600
+ };
1601
+
1602
+
1603
+ /**
1604
+ * optional uint32 min_trades = 3;
1605
+ * @return {number}
1606
+ */
1607
+ proto.trb.strategy.v1.Objective.prototype.getMinTrades = function() {
1608
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1609
+ };
1610
+
1611
+
1612
+ /**
1613
+ * @param {number} value
1614
+ * @return {!proto.trb.strategy.v1.Objective} returns this
1615
+ */
1616
+ proto.trb.strategy.v1.Objective.prototype.setMinTrades = function(value) {
1617
+ return jspb.Message.setProto3IntField(this, 3, value);
1618
+ };
1619
+
1620
+
1621
+ /**
1622
+ * optional double max_drawdown_limit = 4;
1623
+ * @return {number}
1624
+ */
1625
+ proto.trb.strategy.v1.Objective.prototype.getMaxDrawdownLimit = function() {
1626
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
1627
+ };
1628
+
1629
+
1630
+ /**
1631
+ * @param {number} value
1632
+ * @return {!proto.trb.strategy.v1.Objective} returns this
1633
+ */
1634
+ proto.trb.strategy.v1.Objective.prototype.setMaxDrawdownLimit = function(value) {
1635
+ return jspb.Message.setProto3FloatField(this, 4, value);
1636
+ };
1637
+
1638
+
1639
+
1640
+
1641
+
1642
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1643
+ /**
1644
+ * Creates an object representation of this proto.
1645
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1646
+ * Optional fields that are not set will be set to undefined.
1647
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1648
+ * For the list of reserved names please see:
1649
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1650
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1651
+ * JSPB instance for transitional soy proto support:
1652
+ * http://goto/soy-param-migration
1653
+ * @return {!Object}
1654
+ */
1655
+ proto.trb.strategy.v1.SearchBudget.prototype.toObject = function(opt_includeInstance) {
1656
+ return proto.trb.strategy.v1.SearchBudget.toObject(opt_includeInstance, this);
1657
+ };
1658
+
1659
+
1660
+ /**
1661
+ * Static version of the {@see toObject} method.
1662
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1663
+ * the JSPB instance for transitional soy proto support:
1664
+ * http://goto/soy-param-migration
1665
+ * @param {!proto.trb.strategy.v1.SearchBudget} msg The msg instance to transform.
1666
+ * @return {!Object}
1667
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1668
+ */
1669
+ proto.trb.strategy.v1.SearchBudget.toObject = function(includeInstance, msg) {
1670
+ var f, obj = {
1671
+ maxEvaluations: jspb.Message.getFieldWithDefault(msg, 1, 0),
1672
+ maxSeconds: jspb.Message.getFieldWithDefault(msg, 2, 0),
1673
+ concurrency: jspb.Message.getFieldWithDefault(msg, 3, 0),
1674
+ population: jspb.Message.getFieldWithDefault(msg, 4, 0),
1675
+ generations: jspb.Message.getFieldWithDefault(msg, 5, 0),
1676
+ seed: jspb.Message.getFieldWithDefault(msg, 6, 0)
1677
+ };
1678
+
1679
+ if (includeInstance) {
1680
+ obj.$jspbMessageInstance = msg;
1681
+ }
1682
+ return obj;
1683
+ };
1684
+ }
1685
+
1686
+
1687
+ /**
1688
+ * Deserializes binary data (in protobuf wire format).
1689
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1690
+ * @return {!proto.trb.strategy.v1.SearchBudget}
1691
+ */
1692
+ proto.trb.strategy.v1.SearchBudget.deserializeBinary = function(bytes) {
1693
+ var reader = new jspb.BinaryReader(bytes);
1694
+ var msg = new proto.trb.strategy.v1.SearchBudget;
1695
+ return proto.trb.strategy.v1.SearchBudget.deserializeBinaryFromReader(msg, reader);
1696
+ };
1697
+
1698
+
1699
+ /**
1700
+ * Deserializes binary data (in protobuf wire format) from the
1701
+ * given reader into the given message object.
1702
+ * @param {!proto.trb.strategy.v1.SearchBudget} msg The message object to deserialize into.
1703
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1704
+ * @return {!proto.trb.strategy.v1.SearchBudget}
1705
+ */
1706
+ proto.trb.strategy.v1.SearchBudget.deserializeBinaryFromReader = function(msg, reader) {
1707
+ while (reader.nextField()) {
1708
+ if (reader.isEndGroup()) {
1709
+ break;
1710
+ }
1711
+ var field = reader.getFieldNumber();
1712
+ switch (field) {
1713
+ case 1:
1714
+ var value = /** @type {number} */ (reader.readUint32());
1715
+ msg.setMaxEvaluations(value);
1716
+ break;
1717
+ case 2:
1718
+ var value = /** @type {number} */ (reader.readUint32());
1719
+ msg.setMaxSeconds(value);
1720
+ break;
1721
+ case 3:
1722
+ var value = /** @type {number} */ (reader.readUint32());
1723
+ msg.setConcurrency(value);
1724
+ break;
1725
+ case 4:
1726
+ var value = /** @type {number} */ (reader.readUint32());
1727
+ msg.setPopulation(value);
1728
+ break;
1729
+ case 5:
1730
+ var value = /** @type {number} */ (reader.readUint32());
1731
+ msg.setGenerations(value);
1732
+ break;
1733
+ case 6:
1734
+ var value = /** @type {number} */ (reader.readUint64());
1735
+ msg.setSeed(value);
1736
+ break;
1737
+ default:
1738
+ reader.skipField();
1739
+ break;
1740
+ }
1741
+ }
1742
+ return msg;
1743
+ };
1744
+
1745
+
1746
+ /**
1747
+ * Serializes the message to binary data (in protobuf wire format).
1748
+ * @return {!Uint8Array}
1749
+ */
1750
+ proto.trb.strategy.v1.SearchBudget.prototype.serializeBinary = function() {
1751
+ var writer = new jspb.BinaryWriter();
1752
+ proto.trb.strategy.v1.SearchBudget.serializeBinaryToWriter(this, writer);
1753
+ return writer.getResultBuffer();
1754
+ };
1755
+
1756
+
1757
+ /**
1758
+ * Serializes the given message to binary data (in protobuf wire
1759
+ * format), writing to the given BinaryWriter.
1760
+ * @param {!proto.trb.strategy.v1.SearchBudget} message
1761
+ * @param {!jspb.BinaryWriter} writer
1762
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1763
+ */
1764
+ proto.trb.strategy.v1.SearchBudget.serializeBinaryToWriter = function(message, writer) {
1765
+ var f = undefined;
1766
+ f = message.getMaxEvaluations();
1767
+ if (f !== 0) {
1768
+ writer.writeUint32(
1769
+ 1,
1770
+ f
1771
+ );
1772
+ }
1773
+ f = message.getMaxSeconds();
1774
+ if (f !== 0) {
1775
+ writer.writeUint32(
1776
+ 2,
1777
+ f
1778
+ );
1779
+ }
1780
+ f = message.getConcurrency();
1781
+ if (f !== 0) {
1782
+ writer.writeUint32(
1783
+ 3,
1784
+ f
1785
+ );
1786
+ }
1787
+ f = message.getPopulation();
1788
+ if (f !== 0) {
1789
+ writer.writeUint32(
1790
+ 4,
1791
+ f
1792
+ );
1793
+ }
1794
+ f = message.getGenerations();
1795
+ if (f !== 0) {
1796
+ writer.writeUint32(
1797
+ 5,
1798
+ f
1799
+ );
1800
+ }
1801
+ f = message.getSeed();
1802
+ if (f !== 0) {
1803
+ writer.writeUint64(
1804
+ 6,
1805
+ f
1806
+ );
1807
+ }
1808
+ };
1809
+
1810
+
1811
+ /**
1812
+ * optional uint32 max_evaluations = 1;
1813
+ * @return {number}
1814
+ */
1815
+ proto.trb.strategy.v1.SearchBudget.prototype.getMaxEvaluations = function() {
1816
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1817
+ };
1818
+
1819
+
1820
+ /**
1821
+ * @param {number} value
1822
+ * @return {!proto.trb.strategy.v1.SearchBudget} returns this
1823
+ */
1824
+ proto.trb.strategy.v1.SearchBudget.prototype.setMaxEvaluations = function(value) {
1825
+ return jspb.Message.setProto3IntField(this, 1, value);
1826
+ };
1827
+
1828
+
1829
+ /**
1830
+ * optional uint32 max_seconds = 2;
1831
+ * @return {number}
1832
+ */
1833
+ proto.trb.strategy.v1.SearchBudget.prototype.getMaxSeconds = function() {
1834
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1835
+ };
1836
+
1837
+
1838
+ /**
1839
+ * @param {number} value
1840
+ * @return {!proto.trb.strategy.v1.SearchBudget} returns this
1841
+ */
1842
+ proto.trb.strategy.v1.SearchBudget.prototype.setMaxSeconds = function(value) {
1843
+ return jspb.Message.setProto3IntField(this, 2, value);
1844
+ };
1845
+
1846
+
1847
+ /**
1848
+ * optional uint32 concurrency = 3;
1849
+ * @return {number}
1850
+ */
1851
+ proto.trb.strategy.v1.SearchBudget.prototype.getConcurrency = function() {
1852
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1853
+ };
1854
+
1855
+
1856
+ /**
1857
+ * @param {number} value
1858
+ * @return {!proto.trb.strategy.v1.SearchBudget} returns this
1859
+ */
1860
+ proto.trb.strategy.v1.SearchBudget.prototype.setConcurrency = function(value) {
1861
+ return jspb.Message.setProto3IntField(this, 3, value);
1862
+ };
1863
+
1864
+
1865
+ /**
1866
+ * optional uint32 population = 4;
1867
+ * @return {number}
1868
+ */
1869
+ proto.trb.strategy.v1.SearchBudget.prototype.getPopulation = function() {
1870
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
1871
+ };
1872
+
1873
+
1874
+ /**
1875
+ * @param {number} value
1876
+ * @return {!proto.trb.strategy.v1.SearchBudget} returns this
1877
+ */
1878
+ proto.trb.strategy.v1.SearchBudget.prototype.setPopulation = function(value) {
1879
+ return jspb.Message.setProto3IntField(this, 4, value);
1880
+ };
1881
+
1882
+
1883
+ /**
1884
+ * optional uint32 generations = 5;
1885
+ * @return {number}
1886
+ */
1887
+ proto.trb.strategy.v1.SearchBudget.prototype.getGenerations = function() {
1888
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
1889
+ };
1890
+
1891
+
1892
+ /**
1893
+ * @param {number} value
1894
+ * @return {!proto.trb.strategy.v1.SearchBudget} returns this
1895
+ */
1896
+ proto.trb.strategy.v1.SearchBudget.prototype.setGenerations = function(value) {
1897
+ return jspb.Message.setProto3IntField(this, 5, value);
1898
+ };
1899
+
1900
+
1901
+ /**
1902
+ * optional uint64 seed = 6;
1903
+ * @return {number}
1904
+ */
1905
+ proto.trb.strategy.v1.SearchBudget.prototype.getSeed = function() {
1906
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
1907
+ };
1908
+
1909
+
1910
+ /**
1911
+ * @param {number} value
1912
+ * @return {!proto.trb.strategy.v1.SearchBudget} returns this
1913
+ */
1914
+ proto.trb.strategy.v1.SearchBudget.prototype.setSeed = function(value) {
1915
+ return jspb.Message.setProto3IntField(this, 6, value);
1916
+ };
1917
+
1918
+
1919
+
1920
+
1921
+
1922
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1923
+ /**
1924
+ * Creates an object representation of this proto.
1925
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1926
+ * Optional fields that are not set will be set to undefined.
1927
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1928
+ * For the list of reserved names please see:
1929
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1930
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1931
+ * JSPB instance for transitional soy proto support:
1932
+ * http://goto/soy-param-migration
1933
+ * @return {!Object}
1934
+ */
1935
+ proto.trb.strategy.v1.SearchCandidate.prototype.toObject = function(opt_includeInstance) {
1936
+ return proto.trb.strategy.v1.SearchCandidate.toObject(opt_includeInstance, this);
1937
+ };
1938
+
1939
+
1940
+ /**
1941
+ * Static version of the {@see toObject} method.
1942
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1943
+ * the JSPB instance for transitional soy proto support:
1944
+ * http://goto/soy-param-migration
1945
+ * @param {!proto.trb.strategy.v1.SearchCandidate} msg The msg instance to transform.
1946
+ * @return {!Object}
1947
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1948
+ */
1949
+ proto.trb.strategy.v1.SearchCandidate.toObject = function(includeInstance, msg) {
1950
+ var f, obj = {
1951
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
1952
+ spec: (f = msg.getSpec()) && strategy_spec_pb.StrategySpec.toObject(includeInstance, f),
1953
+ specHash: jspb.Message.getFieldWithDefault(msg, 3, 0),
1954
+ score: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
1955
+ metrics: (f = msg.getMetrics()) && strategy_backtest_pb.BacktestMetrics.toObject(includeInstance, f),
1956
+ rank: jspb.Message.getFieldWithDefault(msg, 6, 0),
1957
+ generation: jspb.Message.getFieldWithDefault(msg, 7, 0),
1958
+ backtestRunId: jspb.Message.getFieldWithDefault(msg, 8, "")
1959
+ };
1960
+
1961
+ if (includeInstance) {
1962
+ obj.$jspbMessageInstance = msg;
1963
+ }
1964
+ return obj;
1965
+ };
1966
+ }
1967
+
1968
+
1969
+ /**
1970
+ * Deserializes binary data (in protobuf wire format).
1971
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1972
+ * @return {!proto.trb.strategy.v1.SearchCandidate}
1973
+ */
1974
+ proto.trb.strategy.v1.SearchCandidate.deserializeBinary = function(bytes) {
1975
+ var reader = new jspb.BinaryReader(bytes);
1976
+ var msg = new proto.trb.strategy.v1.SearchCandidate;
1977
+ return proto.trb.strategy.v1.SearchCandidate.deserializeBinaryFromReader(msg, reader);
1978
+ };
1979
+
1980
+
1981
+ /**
1982
+ * Deserializes binary data (in protobuf wire format) from the
1983
+ * given reader into the given message object.
1984
+ * @param {!proto.trb.strategy.v1.SearchCandidate} msg The message object to deserialize into.
1985
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1986
+ * @return {!proto.trb.strategy.v1.SearchCandidate}
1987
+ */
1988
+ proto.trb.strategy.v1.SearchCandidate.deserializeBinaryFromReader = function(msg, reader) {
1989
+ while (reader.nextField()) {
1990
+ if (reader.isEndGroup()) {
1991
+ break;
1992
+ }
1993
+ var field = reader.getFieldNumber();
1994
+ switch (field) {
1995
+ case 1:
1996
+ var value = /** @type {string} */ (reader.readString());
1997
+ msg.setId(value);
1998
+ break;
1999
+ case 2:
2000
+ var value = new strategy_spec_pb.StrategySpec;
2001
+ reader.readMessage(value,strategy_spec_pb.StrategySpec.deserializeBinaryFromReader);
2002
+ msg.setSpec(value);
2003
+ break;
2004
+ case 3:
2005
+ var value = /** @type {number} */ (reader.readUint64());
2006
+ msg.setSpecHash(value);
2007
+ break;
2008
+ case 4:
2009
+ var value = /** @type {number} */ (reader.readDouble());
2010
+ msg.setScore(value);
2011
+ break;
2012
+ case 5:
2013
+ var value = new strategy_backtest_pb.BacktestMetrics;
2014
+ reader.readMessage(value,strategy_backtest_pb.BacktestMetrics.deserializeBinaryFromReader);
2015
+ msg.setMetrics(value);
2016
+ break;
2017
+ case 6:
2018
+ var value = /** @type {number} */ (reader.readUint32());
2019
+ msg.setRank(value);
2020
+ break;
2021
+ case 7:
2022
+ var value = /** @type {number} */ (reader.readUint32());
2023
+ msg.setGeneration(value);
2024
+ break;
2025
+ case 8:
2026
+ var value = /** @type {string} */ (reader.readString());
2027
+ msg.setBacktestRunId(value);
2028
+ break;
2029
+ default:
2030
+ reader.skipField();
2031
+ break;
2032
+ }
2033
+ }
2034
+ return msg;
2035
+ };
2036
+
2037
+
2038
+ /**
2039
+ * Serializes the message to binary data (in protobuf wire format).
2040
+ * @return {!Uint8Array}
2041
+ */
2042
+ proto.trb.strategy.v1.SearchCandidate.prototype.serializeBinary = function() {
2043
+ var writer = new jspb.BinaryWriter();
2044
+ proto.trb.strategy.v1.SearchCandidate.serializeBinaryToWriter(this, writer);
2045
+ return writer.getResultBuffer();
2046
+ };
2047
+
2048
+
2049
+ /**
2050
+ * Serializes the given message to binary data (in protobuf wire
2051
+ * format), writing to the given BinaryWriter.
2052
+ * @param {!proto.trb.strategy.v1.SearchCandidate} message
2053
+ * @param {!jspb.BinaryWriter} writer
2054
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2055
+ */
2056
+ proto.trb.strategy.v1.SearchCandidate.serializeBinaryToWriter = function(message, writer) {
2057
+ var f = undefined;
2058
+ f = message.getId();
2059
+ if (f.length > 0) {
2060
+ writer.writeString(
2061
+ 1,
2062
+ f
2063
+ );
2064
+ }
2065
+ f = message.getSpec();
2066
+ if (f != null) {
2067
+ writer.writeMessage(
2068
+ 2,
2069
+ f,
2070
+ strategy_spec_pb.StrategySpec.serializeBinaryToWriter
2071
+ );
2072
+ }
2073
+ f = message.getSpecHash();
2074
+ if (f !== 0) {
2075
+ writer.writeUint64(
2076
+ 3,
2077
+ f
2078
+ );
2079
+ }
2080
+ f = message.getScore();
2081
+ if (f !== 0.0) {
2082
+ writer.writeDouble(
2083
+ 4,
2084
+ f
2085
+ );
2086
+ }
2087
+ f = message.getMetrics();
2088
+ if (f != null) {
2089
+ writer.writeMessage(
2090
+ 5,
2091
+ f,
2092
+ strategy_backtest_pb.BacktestMetrics.serializeBinaryToWriter
2093
+ );
2094
+ }
2095
+ f = message.getRank();
2096
+ if (f !== 0) {
2097
+ writer.writeUint32(
2098
+ 6,
2099
+ f
2100
+ );
2101
+ }
2102
+ f = message.getGeneration();
2103
+ if (f !== 0) {
2104
+ writer.writeUint32(
2105
+ 7,
2106
+ f
2107
+ );
2108
+ }
2109
+ f = message.getBacktestRunId();
2110
+ if (f.length > 0) {
2111
+ writer.writeString(
2112
+ 8,
2113
+ f
2114
+ );
2115
+ }
2116
+ };
2117
+
2118
+
2119
+ /**
2120
+ * optional string id = 1;
2121
+ * @return {string}
2122
+ */
2123
+ proto.trb.strategy.v1.SearchCandidate.prototype.getId = function() {
2124
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2125
+ };
2126
+
2127
+
2128
+ /**
2129
+ * @param {string} value
2130
+ * @return {!proto.trb.strategy.v1.SearchCandidate} returns this
2131
+ */
2132
+ proto.trb.strategy.v1.SearchCandidate.prototype.setId = function(value) {
2133
+ return jspb.Message.setProto3StringField(this, 1, value);
2134
+ };
2135
+
2136
+
2137
+ /**
2138
+ * optional StrategySpec spec = 2;
2139
+ * @return {?proto.trb.strategy.v1.StrategySpec}
2140
+ */
2141
+ proto.trb.strategy.v1.SearchCandidate.prototype.getSpec = function() {
2142
+ return /** @type{?proto.trb.strategy.v1.StrategySpec} */ (
2143
+ jspb.Message.getWrapperField(this, strategy_spec_pb.StrategySpec, 2));
2144
+ };
2145
+
2146
+
2147
+ /**
2148
+ * @param {?proto.trb.strategy.v1.StrategySpec|undefined} value
2149
+ * @return {!proto.trb.strategy.v1.SearchCandidate} returns this
2150
+ */
2151
+ proto.trb.strategy.v1.SearchCandidate.prototype.setSpec = function(value) {
2152
+ return jspb.Message.setWrapperField(this, 2, value);
2153
+ };
2154
+
2155
+
2156
+ /**
2157
+ * Clears the message field making it undefined.
2158
+ * @return {!proto.trb.strategy.v1.SearchCandidate} returns this
2159
+ */
2160
+ proto.trb.strategy.v1.SearchCandidate.prototype.clearSpec = function() {
2161
+ return this.setSpec(undefined);
2162
+ };
2163
+
2164
+
2165
+ /**
2166
+ * Returns whether this field is set.
2167
+ * @return {boolean}
2168
+ */
2169
+ proto.trb.strategy.v1.SearchCandidate.prototype.hasSpec = function() {
2170
+ return jspb.Message.getField(this, 2) != null;
2171
+ };
2172
+
2173
+
2174
+ /**
2175
+ * optional uint64 spec_hash = 3;
2176
+ * @return {number}
2177
+ */
2178
+ proto.trb.strategy.v1.SearchCandidate.prototype.getSpecHash = function() {
2179
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
2180
+ };
2181
+
2182
+
2183
+ /**
2184
+ * @param {number} value
2185
+ * @return {!proto.trb.strategy.v1.SearchCandidate} returns this
2186
+ */
2187
+ proto.trb.strategy.v1.SearchCandidate.prototype.setSpecHash = function(value) {
2188
+ return jspb.Message.setProto3IntField(this, 3, value);
2189
+ };
2190
+
2191
+
2192
+ /**
2193
+ * optional double score = 4;
2194
+ * @return {number}
2195
+ */
2196
+ proto.trb.strategy.v1.SearchCandidate.prototype.getScore = function() {
2197
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
2198
+ };
2199
+
2200
+
2201
+ /**
2202
+ * @param {number} value
2203
+ * @return {!proto.trb.strategy.v1.SearchCandidate} returns this
2204
+ */
2205
+ proto.trb.strategy.v1.SearchCandidate.prototype.setScore = function(value) {
2206
+ return jspb.Message.setProto3FloatField(this, 4, value);
2207
+ };
2208
+
2209
+
2210
+ /**
2211
+ * optional BacktestMetrics metrics = 5;
2212
+ * @return {?proto.trb.strategy.v1.BacktestMetrics}
2213
+ */
2214
+ proto.trb.strategy.v1.SearchCandidate.prototype.getMetrics = function() {
2215
+ return /** @type{?proto.trb.strategy.v1.BacktestMetrics} */ (
2216
+ jspb.Message.getWrapperField(this, strategy_backtest_pb.BacktestMetrics, 5));
2217
+ };
2218
+
2219
+
2220
+ /**
2221
+ * @param {?proto.trb.strategy.v1.BacktestMetrics|undefined} value
2222
+ * @return {!proto.trb.strategy.v1.SearchCandidate} returns this
2223
+ */
2224
+ proto.trb.strategy.v1.SearchCandidate.prototype.setMetrics = function(value) {
2225
+ return jspb.Message.setWrapperField(this, 5, value);
2226
+ };
2227
+
2228
+
2229
+ /**
2230
+ * Clears the message field making it undefined.
2231
+ * @return {!proto.trb.strategy.v1.SearchCandidate} returns this
2232
+ */
2233
+ proto.trb.strategy.v1.SearchCandidate.prototype.clearMetrics = function() {
2234
+ return this.setMetrics(undefined);
2235
+ };
2236
+
2237
+
2238
+ /**
2239
+ * Returns whether this field is set.
2240
+ * @return {boolean}
2241
+ */
2242
+ proto.trb.strategy.v1.SearchCandidate.prototype.hasMetrics = function() {
2243
+ return jspb.Message.getField(this, 5) != null;
2244
+ };
2245
+
2246
+
2247
+ /**
2248
+ * optional uint32 rank = 6;
2249
+ * @return {number}
2250
+ */
2251
+ proto.trb.strategy.v1.SearchCandidate.prototype.getRank = function() {
2252
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
2253
+ };
2254
+
2255
+
2256
+ /**
2257
+ * @param {number} value
2258
+ * @return {!proto.trb.strategy.v1.SearchCandidate} returns this
2259
+ */
2260
+ proto.trb.strategy.v1.SearchCandidate.prototype.setRank = function(value) {
2261
+ return jspb.Message.setProto3IntField(this, 6, value);
2262
+ };
2263
+
2264
+
2265
+ /**
2266
+ * optional uint32 generation = 7;
2267
+ * @return {number}
2268
+ */
2269
+ proto.trb.strategy.v1.SearchCandidate.prototype.getGeneration = function() {
2270
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
2271
+ };
2272
+
2273
+
2274
+ /**
2275
+ * @param {number} value
2276
+ * @return {!proto.trb.strategy.v1.SearchCandidate} returns this
2277
+ */
2278
+ proto.trb.strategy.v1.SearchCandidate.prototype.setGeneration = function(value) {
2279
+ return jspb.Message.setProto3IntField(this, 7, value);
2280
+ };
2281
+
2282
+
2283
+ /**
2284
+ * optional string backtest_run_id = 8;
2285
+ * @return {string}
2286
+ */
2287
+ proto.trb.strategy.v1.SearchCandidate.prototype.getBacktestRunId = function() {
2288
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
2289
+ };
2290
+
2291
+
2292
+ /**
2293
+ * @param {string} value
2294
+ * @return {!proto.trb.strategy.v1.SearchCandidate} returns this
2295
+ */
2296
+ proto.trb.strategy.v1.SearchCandidate.prototype.setBacktestRunId = function(value) {
2297
+ return jspb.Message.setProto3StringField(this, 8, value);
2298
+ };
2299
+
2300
+
2301
+
2302
+
2303
+
2304
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2305
+ /**
2306
+ * Creates an object representation of this proto.
2307
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2308
+ * Optional fields that are not set will be set to undefined.
2309
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2310
+ * For the list of reserved names please see:
2311
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2312
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2313
+ * JSPB instance for transitional soy proto support:
2314
+ * http://goto/soy-param-migration
2315
+ * @return {!Object}
2316
+ */
2317
+ proto.trb.strategy.v1.SearchProgress.prototype.toObject = function(opt_includeInstance) {
2318
+ return proto.trb.strategy.v1.SearchProgress.toObject(opt_includeInstance, this);
2319
+ };
2320
+
2321
+
2322
+ /**
2323
+ * Static version of the {@see toObject} method.
2324
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2325
+ * the JSPB instance for transitional soy proto support:
2326
+ * http://goto/soy-param-migration
2327
+ * @param {!proto.trb.strategy.v1.SearchProgress} msg The msg instance to transform.
2328
+ * @return {!Object}
2329
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2330
+ */
2331
+ proto.trb.strategy.v1.SearchProgress.toObject = function(includeInstance, msg) {
2332
+ var f, obj = {
2333
+ status: jspb.Message.getFieldWithDefault(msg, 1, 0),
2334
+ evaluated: jspb.Message.getFieldWithDefault(msg, 2, 0),
2335
+ total: jspb.Message.getFieldWithDefault(msg, 3, 0),
2336
+ bestScore: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
2337
+ bestCandidateId: jspb.Message.getFieldWithDefault(msg, 5, ""),
2338
+ currentGeneration: jspb.Message.getFieldWithDefault(msg, 6, 0),
2339
+ error: jspb.Message.getFieldWithDefault(msg, 7, "")
2340
+ };
2341
+
2342
+ if (includeInstance) {
2343
+ obj.$jspbMessageInstance = msg;
2344
+ }
2345
+ return obj;
2346
+ };
2347
+ }
2348
+
2349
+
2350
+ /**
2351
+ * Deserializes binary data (in protobuf wire format).
2352
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2353
+ * @return {!proto.trb.strategy.v1.SearchProgress}
2354
+ */
2355
+ proto.trb.strategy.v1.SearchProgress.deserializeBinary = function(bytes) {
2356
+ var reader = new jspb.BinaryReader(bytes);
2357
+ var msg = new proto.trb.strategy.v1.SearchProgress;
2358
+ return proto.trb.strategy.v1.SearchProgress.deserializeBinaryFromReader(msg, reader);
2359
+ };
2360
+
2361
+
2362
+ /**
2363
+ * Deserializes binary data (in protobuf wire format) from the
2364
+ * given reader into the given message object.
2365
+ * @param {!proto.trb.strategy.v1.SearchProgress} msg The message object to deserialize into.
2366
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2367
+ * @return {!proto.trb.strategy.v1.SearchProgress}
2368
+ */
2369
+ proto.trb.strategy.v1.SearchProgress.deserializeBinaryFromReader = function(msg, reader) {
2370
+ while (reader.nextField()) {
2371
+ if (reader.isEndGroup()) {
2372
+ break;
2373
+ }
2374
+ var field = reader.getFieldNumber();
2375
+ switch (field) {
2376
+ case 1:
2377
+ var value = /** @type {!proto.trb.strategy.v1.RunStatus} */ (reader.readEnum());
2378
+ msg.setStatus(value);
2379
+ break;
2380
+ case 2:
2381
+ var value = /** @type {number} */ (reader.readUint32());
2382
+ msg.setEvaluated(value);
2383
+ break;
2384
+ case 3:
2385
+ var value = /** @type {number} */ (reader.readUint32());
2386
+ msg.setTotal(value);
2387
+ break;
2388
+ case 4:
2389
+ var value = /** @type {number} */ (reader.readDouble());
2390
+ msg.setBestScore(value);
2391
+ break;
2392
+ case 5:
2393
+ var value = /** @type {string} */ (reader.readString());
2394
+ msg.setBestCandidateId(value);
2395
+ break;
2396
+ case 6:
2397
+ var value = /** @type {number} */ (reader.readUint32());
2398
+ msg.setCurrentGeneration(value);
2399
+ break;
2400
+ case 7:
2401
+ var value = /** @type {string} */ (reader.readString());
2402
+ msg.setError(value);
2403
+ break;
2404
+ default:
2405
+ reader.skipField();
2406
+ break;
2407
+ }
2408
+ }
2409
+ return msg;
2410
+ };
2411
+
2412
+
2413
+ /**
2414
+ * Serializes the message to binary data (in protobuf wire format).
2415
+ * @return {!Uint8Array}
2416
+ */
2417
+ proto.trb.strategy.v1.SearchProgress.prototype.serializeBinary = function() {
2418
+ var writer = new jspb.BinaryWriter();
2419
+ proto.trb.strategy.v1.SearchProgress.serializeBinaryToWriter(this, writer);
2420
+ return writer.getResultBuffer();
2421
+ };
2422
+
2423
+
2424
+ /**
2425
+ * Serializes the given message to binary data (in protobuf wire
2426
+ * format), writing to the given BinaryWriter.
2427
+ * @param {!proto.trb.strategy.v1.SearchProgress} message
2428
+ * @param {!jspb.BinaryWriter} writer
2429
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2430
+ */
2431
+ proto.trb.strategy.v1.SearchProgress.serializeBinaryToWriter = function(message, writer) {
2432
+ var f = undefined;
2433
+ f = message.getStatus();
2434
+ if (f !== 0.0) {
2435
+ writer.writeEnum(
2436
+ 1,
2437
+ f
2438
+ );
2439
+ }
2440
+ f = message.getEvaluated();
2441
+ if (f !== 0) {
2442
+ writer.writeUint32(
2443
+ 2,
2444
+ f
2445
+ );
2446
+ }
2447
+ f = message.getTotal();
2448
+ if (f !== 0) {
2449
+ writer.writeUint32(
2450
+ 3,
2451
+ f
2452
+ );
2453
+ }
2454
+ f = message.getBestScore();
2455
+ if (f !== 0.0) {
2456
+ writer.writeDouble(
2457
+ 4,
2458
+ f
2459
+ );
2460
+ }
2461
+ f = message.getBestCandidateId();
2462
+ if (f.length > 0) {
2463
+ writer.writeString(
2464
+ 5,
2465
+ f
2466
+ );
2467
+ }
2468
+ f = message.getCurrentGeneration();
2469
+ if (f !== 0) {
2470
+ writer.writeUint32(
2471
+ 6,
2472
+ f
2473
+ );
2474
+ }
2475
+ f = message.getError();
2476
+ if (f.length > 0) {
2477
+ writer.writeString(
2478
+ 7,
2479
+ f
2480
+ );
2481
+ }
2482
+ };
2483
+
2484
+
2485
+ /**
2486
+ * optional RunStatus status = 1;
2487
+ * @return {!proto.trb.strategy.v1.RunStatus}
2488
+ */
2489
+ proto.trb.strategy.v1.SearchProgress.prototype.getStatus = function() {
2490
+ return /** @type {!proto.trb.strategy.v1.RunStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2491
+ };
2492
+
2493
+
2494
+ /**
2495
+ * @param {!proto.trb.strategy.v1.RunStatus} value
2496
+ * @return {!proto.trb.strategy.v1.SearchProgress} returns this
2497
+ */
2498
+ proto.trb.strategy.v1.SearchProgress.prototype.setStatus = function(value) {
2499
+ return jspb.Message.setProto3EnumField(this, 1, value);
2500
+ };
2501
+
2502
+
2503
+ /**
2504
+ * optional uint32 evaluated = 2;
2505
+ * @return {number}
2506
+ */
2507
+ proto.trb.strategy.v1.SearchProgress.prototype.getEvaluated = function() {
2508
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
2509
+ };
2510
+
2511
+
2512
+ /**
2513
+ * @param {number} value
2514
+ * @return {!proto.trb.strategy.v1.SearchProgress} returns this
2515
+ */
2516
+ proto.trb.strategy.v1.SearchProgress.prototype.setEvaluated = function(value) {
2517
+ return jspb.Message.setProto3IntField(this, 2, value);
2518
+ };
2519
+
2520
+
2521
+ /**
2522
+ * optional uint32 total = 3;
2523
+ * @return {number}
2524
+ */
2525
+ proto.trb.strategy.v1.SearchProgress.prototype.getTotal = function() {
2526
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
2527
+ };
2528
+
2529
+
2530
+ /**
2531
+ * @param {number} value
2532
+ * @return {!proto.trb.strategy.v1.SearchProgress} returns this
2533
+ */
2534
+ proto.trb.strategy.v1.SearchProgress.prototype.setTotal = function(value) {
2535
+ return jspb.Message.setProto3IntField(this, 3, value);
2536
+ };
2537
+
2538
+
2539
+ /**
2540
+ * optional double best_score = 4;
2541
+ * @return {number}
2542
+ */
2543
+ proto.trb.strategy.v1.SearchProgress.prototype.getBestScore = function() {
2544
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
2545
+ };
2546
+
2547
+
2548
+ /**
2549
+ * @param {number} value
2550
+ * @return {!proto.trb.strategy.v1.SearchProgress} returns this
2551
+ */
2552
+ proto.trb.strategy.v1.SearchProgress.prototype.setBestScore = function(value) {
2553
+ return jspb.Message.setProto3FloatField(this, 4, value);
2554
+ };
2555
+
2556
+
2557
+ /**
2558
+ * optional string best_candidate_id = 5;
2559
+ * @return {string}
2560
+ */
2561
+ proto.trb.strategy.v1.SearchProgress.prototype.getBestCandidateId = function() {
2562
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
2563
+ };
2564
+
2565
+
2566
+ /**
2567
+ * @param {string} value
2568
+ * @return {!proto.trb.strategy.v1.SearchProgress} returns this
2569
+ */
2570
+ proto.trb.strategy.v1.SearchProgress.prototype.setBestCandidateId = function(value) {
2571
+ return jspb.Message.setProto3StringField(this, 5, value);
2572
+ };
2573
+
2574
+
2575
+ /**
2576
+ * optional uint32 current_generation = 6;
2577
+ * @return {number}
2578
+ */
2579
+ proto.trb.strategy.v1.SearchProgress.prototype.getCurrentGeneration = function() {
2580
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
2581
+ };
2582
+
2583
+
2584
+ /**
2585
+ * @param {number} value
2586
+ * @return {!proto.trb.strategy.v1.SearchProgress} returns this
2587
+ */
2588
+ proto.trb.strategy.v1.SearchProgress.prototype.setCurrentGeneration = function(value) {
2589
+ return jspb.Message.setProto3IntField(this, 6, value);
2590
+ };
2591
+
2592
+
2593
+ /**
2594
+ * optional string error = 7;
2595
+ * @return {string}
2596
+ */
2597
+ proto.trb.strategy.v1.SearchProgress.prototype.getError = function() {
2598
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
2599
+ };
2600
+
2601
+
2602
+ /**
2603
+ * @param {string} value
2604
+ * @return {!proto.trb.strategy.v1.SearchProgress} returns this
2605
+ */
2606
+ proto.trb.strategy.v1.SearchProgress.prototype.setError = function(value) {
2607
+ return jspb.Message.setProto3StringField(this, 7, value);
2608
+ };
2609
+
2610
+
2611
+
2612
+ /**
2613
+ * List of repeated fields within this message type.
2614
+ * @private {!Array<number>}
2615
+ * @const
2616
+ */
2617
+ proto.trb.strategy.v1.SearchRun.repeatedFields_ = [5];
2618
+
2619
+
2620
+
2621
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2622
+ /**
2623
+ * Creates an object representation of this proto.
2624
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2625
+ * Optional fields that are not set will be set to undefined.
2626
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2627
+ * For the list of reserved names please see:
2628
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2629
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2630
+ * JSPB instance for transitional soy proto support:
2631
+ * http://goto/soy-param-migration
2632
+ * @return {!Object}
2633
+ */
2634
+ proto.trb.strategy.v1.SearchRun.prototype.toObject = function(opt_includeInstance) {
2635
+ return proto.trb.strategy.v1.SearchRun.toObject(opt_includeInstance, this);
2636
+ };
2637
+
2638
+
2639
+ /**
2640
+ * Static version of the {@see toObject} method.
2641
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2642
+ * the JSPB instance for transitional soy proto support:
2643
+ * http://goto/soy-param-migration
2644
+ * @param {!proto.trb.strategy.v1.SearchRun} msg The msg instance to transform.
2645
+ * @return {!Object}
2646
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2647
+ */
2648
+ proto.trb.strategy.v1.SearchRun.toObject = function(includeInstance, msg) {
2649
+ var f, obj = {
2650
+ searchId: jspb.Message.getFieldWithDefault(msg, 1, ""),
2651
+ baseStrategyId: jspb.Message.getFieldWithDefault(msg, 2, ""),
2652
+ name: jspb.Message.getFieldWithDefault(msg, 3, ""),
2653
+ method: jspb.Message.getFieldWithDefault(msg, 4, 0),
2654
+ searchSpaceList: jspb.Message.toObjectList(msg.getSearchSpaceList(),
2655
+ proto.trb.strategy.v1.ParamRange.toObject, includeInstance),
2656
+ structure: (f = msg.getStructure()) && proto.trb.strategy.v1.StructureSpace.toObject(includeInstance, f),
2657
+ objective: (f = msg.getObjective()) && proto.trb.strategy.v1.Objective.toObject(includeInstance, f),
2658
+ budget: (f = msg.getBudget()) && proto.trb.strategy.v1.SearchBudget.toObject(includeInstance, f),
2659
+ config: (f = msg.getConfig()) && strategy_backtest_pb.BacktestConfig.toObject(includeInstance, f),
2660
+ progress: (f = msg.getProgress()) && proto.trb.strategy.v1.SearchProgress.toObject(includeInstance, f),
2661
+ engineVersion: jspb.Message.getFieldWithDefault(msg, 11, ""),
2662
+ createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
2663
+ startedAt: (f = msg.getStartedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
2664
+ finishedAt: (f = msg.getFinishedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
2665
+ };
2666
+
2667
+ if (includeInstance) {
2668
+ obj.$jspbMessageInstance = msg;
2669
+ }
2670
+ return obj;
2671
+ };
2672
+ }
2673
+
2674
+
2675
+ /**
2676
+ * Deserializes binary data (in protobuf wire format).
2677
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2678
+ * @return {!proto.trb.strategy.v1.SearchRun}
2679
+ */
2680
+ proto.trb.strategy.v1.SearchRun.deserializeBinary = function(bytes) {
2681
+ var reader = new jspb.BinaryReader(bytes);
2682
+ var msg = new proto.trb.strategy.v1.SearchRun;
2683
+ return proto.trb.strategy.v1.SearchRun.deserializeBinaryFromReader(msg, reader);
2684
+ };
2685
+
2686
+
2687
+ /**
2688
+ * Deserializes binary data (in protobuf wire format) from the
2689
+ * given reader into the given message object.
2690
+ * @param {!proto.trb.strategy.v1.SearchRun} msg The message object to deserialize into.
2691
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2692
+ * @return {!proto.trb.strategy.v1.SearchRun}
2693
+ */
2694
+ proto.trb.strategy.v1.SearchRun.deserializeBinaryFromReader = function(msg, reader) {
2695
+ while (reader.nextField()) {
2696
+ if (reader.isEndGroup()) {
2697
+ break;
2698
+ }
2699
+ var field = reader.getFieldNumber();
2700
+ switch (field) {
2701
+ case 1:
2702
+ var value = /** @type {string} */ (reader.readString());
2703
+ msg.setSearchId(value);
2704
+ break;
2705
+ case 2:
2706
+ var value = /** @type {string} */ (reader.readString());
2707
+ msg.setBaseStrategyId(value);
2708
+ break;
2709
+ case 3:
2710
+ var value = /** @type {string} */ (reader.readString());
2711
+ msg.setName(value);
2712
+ break;
2713
+ case 4:
2714
+ var value = /** @type {!proto.trb.strategy.v1.SearchMethod} */ (reader.readEnum());
2715
+ msg.setMethod(value);
2716
+ break;
2717
+ case 5:
2718
+ var value = new proto.trb.strategy.v1.ParamRange;
2719
+ reader.readMessage(value,proto.trb.strategy.v1.ParamRange.deserializeBinaryFromReader);
2720
+ msg.addSearchSpace(value);
2721
+ break;
2722
+ case 6:
2723
+ var value = new proto.trb.strategy.v1.StructureSpace;
2724
+ reader.readMessage(value,proto.trb.strategy.v1.StructureSpace.deserializeBinaryFromReader);
2725
+ msg.setStructure(value);
2726
+ break;
2727
+ case 7:
2728
+ var value = new proto.trb.strategy.v1.Objective;
2729
+ reader.readMessage(value,proto.trb.strategy.v1.Objective.deserializeBinaryFromReader);
2730
+ msg.setObjective(value);
2731
+ break;
2732
+ case 8:
2733
+ var value = new proto.trb.strategy.v1.SearchBudget;
2734
+ reader.readMessage(value,proto.trb.strategy.v1.SearchBudget.deserializeBinaryFromReader);
2735
+ msg.setBudget(value);
2736
+ break;
2737
+ case 9:
2738
+ var value = new strategy_backtest_pb.BacktestConfig;
2739
+ reader.readMessage(value,strategy_backtest_pb.BacktestConfig.deserializeBinaryFromReader);
2740
+ msg.setConfig(value);
2741
+ break;
2742
+ case 10:
2743
+ var value = new proto.trb.strategy.v1.SearchProgress;
2744
+ reader.readMessage(value,proto.trb.strategy.v1.SearchProgress.deserializeBinaryFromReader);
2745
+ msg.setProgress(value);
2746
+ break;
2747
+ case 11:
2748
+ var value = /** @type {string} */ (reader.readString());
2749
+ msg.setEngineVersion(value);
2750
+ break;
2751
+ case 12:
2752
+ var value = new google_protobuf_timestamp_pb.Timestamp;
2753
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
2754
+ msg.setCreatedAt(value);
2755
+ break;
2756
+ case 13:
2757
+ var value = new google_protobuf_timestamp_pb.Timestamp;
2758
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
2759
+ msg.setStartedAt(value);
2760
+ break;
2761
+ case 14:
2762
+ var value = new google_protobuf_timestamp_pb.Timestamp;
2763
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
2764
+ msg.setFinishedAt(value);
2765
+ break;
2766
+ default:
2767
+ reader.skipField();
2768
+ break;
2769
+ }
2770
+ }
2771
+ return msg;
2772
+ };
2773
+
2774
+
2775
+ /**
2776
+ * Serializes the message to binary data (in protobuf wire format).
2777
+ * @return {!Uint8Array}
2778
+ */
2779
+ proto.trb.strategy.v1.SearchRun.prototype.serializeBinary = function() {
2780
+ var writer = new jspb.BinaryWriter();
2781
+ proto.trb.strategy.v1.SearchRun.serializeBinaryToWriter(this, writer);
2782
+ return writer.getResultBuffer();
2783
+ };
2784
+
2785
+
2786
+ /**
2787
+ * Serializes the given message to binary data (in protobuf wire
2788
+ * format), writing to the given BinaryWriter.
2789
+ * @param {!proto.trb.strategy.v1.SearchRun} message
2790
+ * @param {!jspb.BinaryWriter} writer
2791
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2792
+ */
2793
+ proto.trb.strategy.v1.SearchRun.serializeBinaryToWriter = function(message, writer) {
2794
+ var f = undefined;
2795
+ f = message.getSearchId();
2796
+ if (f.length > 0) {
2797
+ writer.writeString(
2798
+ 1,
2799
+ f
2800
+ );
2801
+ }
2802
+ f = message.getBaseStrategyId();
2803
+ if (f.length > 0) {
2804
+ writer.writeString(
2805
+ 2,
2806
+ f
2807
+ );
2808
+ }
2809
+ f = message.getName();
2810
+ if (f.length > 0) {
2811
+ writer.writeString(
2812
+ 3,
2813
+ f
2814
+ );
2815
+ }
2816
+ f = message.getMethod();
2817
+ if (f !== 0.0) {
2818
+ writer.writeEnum(
2819
+ 4,
2820
+ f
2821
+ );
2822
+ }
2823
+ f = message.getSearchSpaceList();
2824
+ if (f.length > 0) {
2825
+ writer.writeRepeatedMessage(
2826
+ 5,
2827
+ f,
2828
+ proto.trb.strategy.v1.ParamRange.serializeBinaryToWriter
2829
+ );
2830
+ }
2831
+ f = message.getStructure();
2832
+ if (f != null) {
2833
+ writer.writeMessage(
2834
+ 6,
2835
+ f,
2836
+ proto.trb.strategy.v1.StructureSpace.serializeBinaryToWriter
2837
+ );
2838
+ }
2839
+ f = message.getObjective();
2840
+ if (f != null) {
2841
+ writer.writeMessage(
2842
+ 7,
2843
+ f,
2844
+ proto.trb.strategy.v1.Objective.serializeBinaryToWriter
2845
+ );
2846
+ }
2847
+ f = message.getBudget();
2848
+ if (f != null) {
2849
+ writer.writeMessage(
2850
+ 8,
2851
+ f,
2852
+ proto.trb.strategy.v1.SearchBudget.serializeBinaryToWriter
2853
+ );
2854
+ }
2855
+ f = message.getConfig();
2856
+ if (f != null) {
2857
+ writer.writeMessage(
2858
+ 9,
2859
+ f,
2860
+ strategy_backtest_pb.BacktestConfig.serializeBinaryToWriter
2861
+ );
2862
+ }
2863
+ f = message.getProgress();
2864
+ if (f != null) {
2865
+ writer.writeMessage(
2866
+ 10,
2867
+ f,
2868
+ proto.trb.strategy.v1.SearchProgress.serializeBinaryToWriter
2869
+ );
2870
+ }
2871
+ f = message.getEngineVersion();
2872
+ if (f.length > 0) {
2873
+ writer.writeString(
2874
+ 11,
2875
+ f
2876
+ );
2877
+ }
2878
+ f = message.getCreatedAt();
2879
+ if (f != null) {
2880
+ writer.writeMessage(
2881
+ 12,
2882
+ f,
2883
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2884
+ );
2885
+ }
2886
+ f = message.getStartedAt();
2887
+ if (f != null) {
2888
+ writer.writeMessage(
2889
+ 13,
2890
+ f,
2891
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2892
+ );
2893
+ }
2894
+ f = message.getFinishedAt();
2895
+ if (f != null) {
2896
+ writer.writeMessage(
2897
+ 14,
2898
+ f,
2899
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2900
+ );
2901
+ }
2902
+ };
2903
+
2904
+
2905
+ /**
2906
+ * optional string search_id = 1;
2907
+ * @return {string}
2908
+ */
2909
+ proto.trb.strategy.v1.SearchRun.prototype.getSearchId = function() {
2910
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2911
+ };
2912
+
2913
+
2914
+ /**
2915
+ * @param {string} value
2916
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
2917
+ */
2918
+ proto.trb.strategy.v1.SearchRun.prototype.setSearchId = function(value) {
2919
+ return jspb.Message.setProto3StringField(this, 1, value);
2920
+ };
2921
+
2922
+
2923
+ /**
2924
+ * optional string base_strategy_id = 2;
2925
+ * @return {string}
2926
+ */
2927
+ proto.trb.strategy.v1.SearchRun.prototype.getBaseStrategyId = function() {
2928
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2929
+ };
2930
+
2931
+
2932
+ /**
2933
+ * @param {string} value
2934
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
2935
+ */
2936
+ proto.trb.strategy.v1.SearchRun.prototype.setBaseStrategyId = function(value) {
2937
+ return jspb.Message.setProto3StringField(this, 2, value);
2938
+ };
2939
+
2940
+
2941
+ /**
2942
+ * optional string name = 3;
2943
+ * @return {string}
2944
+ */
2945
+ proto.trb.strategy.v1.SearchRun.prototype.getName = function() {
2946
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2947
+ };
2948
+
2949
+
2950
+ /**
2951
+ * @param {string} value
2952
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
2953
+ */
2954
+ proto.trb.strategy.v1.SearchRun.prototype.setName = function(value) {
2955
+ return jspb.Message.setProto3StringField(this, 3, value);
2956
+ };
2957
+
2958
+
2959
+ /**
2960
+ * optional SearchMethod method = 4;
2961
+ * @return {!proto.trb.strategy.v1.SearchMethod}
2962
+ */
2963
+ proto.trb.strategy.v1.SearchRun.prototype.getMethod = function() {
2964
+ return /** @type {!proto.trb.strategy.v1.SearchMethod} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
2965
+ };
2966
+
2967
+
2968
+ /**
2969
+ * @param {!proto.trb.strategy.v1.SearchMethod} value
2970
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
2971
+ */
2972
+ proto.trb.strategy.v1.SearchRun.prototype.setMethod = function(value) {
2973
+ return jspb.Message.setProto3EnumField(this, 4, value);
2974
+ };
2975
+
2976
+
2977
+ /**
2978
+ * repeated ParamRange search_space = 5;
2979
+ * @return {!Array<!proto.trb.strategy.v1.ParamRange>}
2980
+ */
2981
+ proto.trb.strategy.v1.SearchRun.prototype.getSearchSpaceList = function() {
2982
+ return /** @type{!Array<!proto.trb.strategy.v1.ParamRange>} */ (
2983
+ jspb.Message.getRepeatedWrapperField(this, proto.trb.strategy.v1.ParamRange, 5));
2984
+ };
2985
+
2986
+
2987
+ /**
2988
+ * @param {!Array<!proto.trb.strategy.v1.ParamRange>} value
2989
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
2990
+ */
2991
+ proto.trb.strategy.v1.SearchRun.prototype.setSearchSpaceList = function(value) {
2992
+ return jspb.Message.setRepeatedWrapperField(this, 5, value);
2993
+ };
2994
+
2995
+
2996
+ /**
2997
+ * @param {!proto.trb.strategy.v1.ParamRange=} opt_value
2998
+ * @param {number=} opt_index
2999
+ * @return {!proto.trb.strategy.v1.ParamRange}
3000
+ */
3001
+ proto.trb.strategy.v1.SearchRun.prototype.addSearchSpace = function(opt_value, opt_index) {
3002
+ return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.trb.strategy.v1.ParamRange, opt_index);
3003
+ };
3004
+
3005
+
3006
+ /**
3007
+ * Clears the list making it empty but non-null.
3008
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3009
+ */
3010
+ proto.trb.strategy.v1.SearchRun.prototype.clearSearchSpaceList = function() {
3011
+ return this.setSearchSpaceList([]);
3012
+ };
3013
+
3014
+
3015
+ /**
3016
+ * optional StructureSpace structure = 6;
3017
+ * @return {?proto.trb.strategy.v1.StructureSpace}
3018
+ */
3019
+ proto.trb.strategy.v1.SearchRun.prototype.getStructure = function() {
3020
+ return /** @type{?proto.trb.strategy.v1.StructureSpace} */ (
3021
+ jspb.Message.getWrapperField(this, proto.trb.strategy.v1.StructureSpace, 6));
3022
+ };
3023
+
3024
+
3025
+ /**
3026
+ * @param {?proto.trb.strategy.v1.StructureSpace|undefined} value
3027
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3028
+ */
3029
+ proto.trb.strategy.v1.SearchRun.prototype.setStructure = function(value) {
3030
+ return jspb.Message.setWrapperField(this, 6, value);
3031
+ };
3032
+
3033
+
3034
+ /**
3035
+ * Clears the message field making it undefined.
3036
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3037
+ */
3038
+ proto.trb.strategy.v1.SearchRun.prototype.clearStructure = function() {
3039
+ return this.setStructure(undefined);
3040
+ };
3041
+
3042
+
3043
+ /**
3044
+ * Returns whether this field is set.
3045
+ * @return {boolean}
3046
+ */
3047
+ proto.trb.strategy.v1.SearchRun.prototype.hasStructure = function() {
3048
+ return jspb.Message.getField(this, 6) != null;
3049
+ };
3050
+
3051
+
3052
+ /**
3053
+ * optional Objective objective = 7;
3054
+ * @return {?proto.trb.strategy.v1.Objective}
3055
+ */
3056
+ proto.trb.strategy.v1.SearchRun.prototype.getObjective = function() {
3057
+ return /** @type{?proto.trb.strategy.v1.Objective} */ (
3058
+ jspb.Message.getWrapperField(this, proto.trb.strategy.v1.Objective, 7));
3059
+ };
3060
+
3061
+
3062
+ /**
3063
+ * @param {?proto.trb.strategy.v1.Objective|undefined} value
3064
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3065
+ */
3066
+ proto.trb.strategy.v1.SearchRun.prototype.setObjective = function(value) {
3067
+ return jspb.Message.setWrapperField(this, 7, value);
3068
+ };
3069
+
3070
+
3071
+ /**
3072
+ * Clears the message field making it undefined.
3073
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3074
+ */
3075
+ proto.trb.strategy.v1.SearchRun.prototype.clearObjective = function() {
3076
+ return this.setObjective(undefined);
3077
+ };
3078
+
3079
+
3080
+ /**
3081
+ * Returns whether this field is set.
3082
+ * @return {boolean}
3083
+ */
3084
+ proto.trb.strategy.v1.SearchRun.prototype.hasObjective = function() {
3085
+ return jspb.Message.getField(this, 7) != null;
3086
+ };
3087
+
3088
+
3089
+ /**
3090
+ * optional SearchBudget budget = 8;
3091
+ * @return {?proto.trb.strategy.v1.SearchBudget}
3092
+ */
3093
+ proto.trb.strategy.v1.SearchRun.prototype.getBudget = function() {
3094
+ return /** @type{?proto.trb.strategy.v1.SearchBudget} */ (
3095
+ jspb.Message.getWrapperField(this, proto.trb.strategy.v1.SearchBudget, 8));
3096
+ };
3097
+
3098
+
3099
+ /**
3100
+ * @param {?proto.trb.strategy.v1.SearchBudget|undefined} value
3101
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3102
+ */
3103
+ proto.trb.strategy.v1.SearchRun.prototype.setBudget = function(value) {
3104
+ return jspb.Message.setWrapperField(this, 8, value);
3105
+ };
3106
+
3107
+
3108
+ /**
3109
+ * Clears the message field making it undefined.
3110
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3111
+ */
3112
+ proto.trb.strategy.v1.SearchRun.prototype.clearBudget = function() {
3113
+ return this.setBudget(undefined);
3114
+ };
3115
+
3116
+
3117
+ /**
3118
+ * Returns whether this field is set.
3119
+ * @return {boolean}
3120
+ */
3121
+ proto.trb.strategy.v1.SearchRun.prototype.hasBudget = function() {
3122
+ return jspb.Message.getField(this, 8) != null;
3123
+ };
3124
+
3125
+
3126
+ /**
3127
+ * optional BacktestConfig config = 9;
3128
+ * @return {?proto.trb.strategy.v1.BacktestConfig}
3129
+ */
3130
+ proto.trb.strategy.v1.SearchRun.prototype.getConfig = function() {
3131
+ return /** @type{?proto.trb.strategy.v1.BacktestConfig} */ (
3132
+ jspb.Message.getWrapperField(this, strategy_backtest_pb.BacktestConfig, 9));
3133
+ };
3134
+
3135
+
3136
+ /**
3137
+ * @param {?proto.trb.strategy.v1.BacktestConfig|undefined} value
3138
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3139
+ */
3140
+ proto.trb.strategy.v1.SearchRun.prototype.setConfig = function(value) {
3141
+ return jspb.Message.setWrapperField(this, 9, value);
3142
+ };
3143
+
3144
+
3145
+ /**
3146
+ * Clears the message field making it undefined.
3147
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3148
+ */
3149
+ proto.trb.strategy.v1.SearchRun.prototype.clearConfig = function() {
3150
+ return this.setConfig(undefined);
3151
+ };
3152
+
3153
+
3154
+ /**
3155
+ * Returns whether this field is set.
3156
+ * @return {boolean}
3157
+ */
3158
+ proto.trb.strategy.v1.SearchRun.prototype.hasConfig = function() {
3159
+ return jspb.Message.getField(this, 9) != null;
3160
+ };
3161
+
3162
+
3163
+ /**
3164
+ * optional SearchProgress progress = 10;
3165
+ * @return {?proto.trb.strategy.v1.SearchProgress}
3166
+ */
3167
+ proto.trb.strategy.v1.SearchRun.prototype.getProgress = function() {
3168
+ return /** @type{?proto.trb.strategy.v1.SearchProgress} */ (
3169
+ jspb.Message.getWrapperField(this, proto.trb.strategy.v1.SearchProgress, 10));
3170
+ };
3171
+
3172
+
3173
+ /**
3174
+ * @param {?proto.trb.strategy.v1.SearchProgress|undefined} value
3175
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3176
+ */
3177
+ proto.trb.strategy.v1.SearchRun.prototype.setProgress = function(value) {
3178
+ return jspb.Message.setWrapperField(this, 10, value);
3179
+ };
3180
+
3181
+
3182
+ /**
3183
+ * Clears the message field making it undefined.
3184
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3185
+ */
3186
+ proto.trb.strategy.v1.SearchRun.prototype.clearProgress = function() {
3187
+ return this.setProgress(undefined);
3188
+ };
3189
+
3190
+
3191
+ /**
3192
+ * Returns whether this field is set.
3193
+ * @return {boolean}
3194
+ */
3195
+ proto.trb.strategy.v1.SearchRun.prototype.hasProgress = function() {
3196
+ return jspb.Message.getField(this, 10) != null;
3197
+ };
3198
+
3199
+
3200
+ /**
3201
+ * optional string engine_version = 11;
3202
+ * @return {string}
3203
+ */
3204
+ proto.trb.strategy.v1.SearchRun.prototype.getEngineVersion = function() {
3205
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, ""));
3206
+ };
3207
+
3208
+
3209
+ /**
3210
+ * @param {string} value
3211
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3212
+ */
3213
+ proto.trb.strategy.v1.SearchRun.prototype.setEngineVersion = function(value) {
3214
+ return jspb.Message.setProto3StringField(this, 11, value);
3215
+ };
3216
+
3217
+
3218
+ /**
3219
+ * optional google.protobuf.Timestamp created_at = 12;
3220
+ * @return {?proto.google.protobuf.Timestamp}
3221
+ */
3222
+ proto.trb.strategy.v1.SearchRun.prototype.getCreatedAt = function() {
3223
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
3224
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 12));
3225
+ };
3226
+
3227
+
3228
+ /**
3229
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
3230
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3231
+ */
3232
+ proto.trb.strategy.v1.SearchRun.prototype.setCreatedAt = function(value) {
3233
+ return jspb.Message.setWrapperField(this, 12, value);
3234
+ };
3235
+
3236
+
3237
+ /**
3238
+ * Clears the message field making it undefined.
3239
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3240
+ */
3241
+ proto.trb.strategy.v1.SearchRun.prototype.clearCreatedAt = function() {
3242
+ return this.setCreatedAt(undefined);
3243
+ };
3244
+
3245
+
3246
+ /**
3247
+ * Returns whether this field is set.
3248
+ * @return {boolean}
3249
+ */
3250
+ proto.trb.strategy.v1.SearchRun.prototype.hasCreatedAt = function() {
3251
+ return jspb.Message.getField(this, 12) != null;
3252
+ };
3253
+
3254
+
3255
+ /**
3256
+ * optional google.protobuf.Timestamp started_at = 13;
3257
+ * @return {?proto.google.protobuf.Timestamp}
3258
+ */
3259
+ proto.trb.strategy.v1.SearchRun.prototype.getStartedAt = function() {
3260
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
3261
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 13));
3262
+ };
3263
+
3264
+
3265
+ /**
3266
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
3267
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3268
+ */
3269
+ proto.trb.strategy.v1.SearchRun.prototype.setStartedAt = function(value) {
3270
+ return jspb.Message.setWrapperField(this, 13, value);
3271
+ };
3272
+
3273
+
3274
+ /**
3275
+ * Clears the message field making it undefined.
3276
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3277
+ */
3278
+ proto.trb.strategy.v1.SearchRun.prototype.clearStartedAt = function() {
3279
+ return this.setStartedAt(undefined);
3280
+ };
3281
+
3282
+
3283
+ /**
3284
+ * Returns whether this field is set.
3285
+ * @return {boolean}
3286
+ */
3287
+ proto.trb.strategy.v1.SearchRun.prototype.hasStartedAt = function() {
3288
+ return jspb.Message.getField(this, 13) != null;
3289
+ };
3290
+
3291
+
3292
+ /**
3293
+ * optional google.protobuf.Timestamp finished_at = 14;
3294
+ * @return {?proto.google.protobuf.Timestamp}
3295
+ */
3296
+ proto.trb.strategy.v1.SearchRun.prototype.getFinishedAt = function() {
3297
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
3298
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 14));
3299
+ };
3300
+
3301
+
3302
+ /**
3303
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
3304
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3305
+ */
3306
+ proto.trb.strategy.v1.SearchRun.prototype.setFinishedAt = function(value) {
3307
+ return jspb.Message.setWrapperField(this, 14, value);
3308
+ };
3309
+
3310
+
3311
+ /**
3312
+ * Clears the message field making it undefined.
3313
+ * @return {!proto.trb.strategy.v1.SearchRun} returns this
3314
+ */
3315
+ proto.trb.strategy.v1.SearchRun.prototype.clearFinishedAt = function() {
3316
+ return this.setFinishedAt(undefined);
3317
+ };
3318
+
3319
+
3320
+ /**
3321
+ * Returns whether this field is set.
3322
+ * @return {boolean}
3323
+ */
3324
+ proto.trb.strategy.v1.SearchRun.prototype.hasFinishedAt = function() {
3325
+ return jspb.Message.getField(this, 14) != null;
3326
+ };
3327
+
3328
+
3329
+
3330
+
3331
+
3332
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3333
+ /**
3334
+ * Creates an object representation of this proto.
3335
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3336
+ * Optional fields that are not set will be set to undefined.
3337
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3338
+ * For the list of reserved names please see:
3339
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3340
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3341
+ * JSPB instance for transitional soy proto support:
3342
+ * http://goto/soy-param-migration
3343
+ * @return {!Object}
3344
+ */
3345
+ proto.trb.strategy.v1.SearchTask.prototype.toObject = function(opt_includeInstance) {
3346
+ return proto.trb.strategy.v1.SearchTask.toObject(opt_includeInstance, this);
3347
+ };
3348
+
3349
+
3350
+ /**
3351
+ * Static version of the {@see toObject} method.
3352
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3353
+ * the JSPB instance for transitional soy proto support:
3354
+ * http://goto/soy-param-migration
3355
+ * @param {!proto.trb.strategy.v1.SearchTask} msg The msg instance to transform.
3356
+ * @return {!Object}
3357
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3358
+ */
3359
+ proto.trb.strategy.v1.SearchTask.toObject = function(includeInstance, msg) {
3360
+ var f, obj = {
3361
+ searchId: jspb.Message.getFieldWithDefault(msg, 1, "")
3362
+ };
3363
+
3364
+ if (includeInstance) {
3365
+ obj.$jspbMessageInstance = msg;
3366
+ }
3367
+ return obj;
3368
+ };
3369
+ }
3370
+
3371
+
3372
+ /**
3373
+ * Deserializes binary data (in protobuf wire format).
3374
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3375
+ * @return {!proto.trb.strategy.v1.SearchTask}
3376
+ */
3377
+ proto.trb.strategy.v1.SearchTask.deserializeBinary = function(bytes) {
3378
+ var reader = new jspb.BinaryReader(bytes);
3379
+ var msg = new proto.trb.strategy.v1.SearchTask;
3380
+ return proto.trb.strategy.v1.SearchTask.deserializeBinaryFromReader(msg, reader);
3381
+ };
3382
+
3383
+
3384
+ /**
3385
+ * Deserializes binary data (in protobuf wire format) from the
3386
+ * given reader into the given message object.
3387
+ * @param {!proto.trb.strategy.v1.SearchTask} msg The message object to deserialize into.
3388
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3389
+ * @return {!proto.trb.strategy.v1.SearchTask}
3390
+ */
3391
+ proto.trb.strategy.v1.SearchTask.deserializeBinaryFromReader = function(msg, reader) {
3392
+ while (reader.nextField()) {
3393
+ if (reader.isEndGroup()) {
3394
+ break;
3395
+ }
3396
+ var field = reader.getFieldNumber();
3397
+ switch (field) {
3398
+ case 1:
3399
+ var value = /** @type {string} */ (reader.readString());
3400
+ msg.setSearchId(value);
3401
+ break;
3402
+ default:
3403
+ reader.skipField();
3404
+ break;
3405
+ }
3406
+ }
3407
+ return msg;
3408
+ };
3409
+
3410
+
3411
+ /**
3412
+ * Serializes the message to binary data (in protobuf wire format).
3413
+ * @return {!Uint8Array}
3414
+ */
3415
+ proto.trb.strategy.v1.SearchTask.prototype.serializeBinary = function() {
3416
+ var writer = new jspb.BinaryWriter();
3417
+ proto.trb.strategy.v1.SearchTask.serializeBinaryToWriter(this, writer);
3418
+ return writer.getResultBuffer();
3419
+ };
3420
+
3421
+
3422
+ /**
3423
+ * Serializes the given message to binary data (in protobuf wire
3424
+ * format), writing to the given BinaryWriter.
3425
+ * @param {!proto.trb.strategy.v1.SearchTask} message
3426
+ * @param {!jspb.BinaryWriter} writer
3427
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3428
+ */
3429
+ proto.trb.strategy.v1.SearchTask.serializeBinaryToWriter = function(message, writer) {
3430
+ var f = undefined;
3431
+ f = message.getSearchId();
3432
+ if (f.length > 0) {
3433
+ writer.writeString(
3434
+ 1,
3435
+ f
3436
+ );
3437
+ }
3438
+ };
3439
+
3440
+
3441
+ /**
3442
+ * optional string search_id = 1;
3443
+ * @return {string}
3444
+ */
3445
+ proto.trb.strategy.v1.SearchTask.prototype.getSearchId = function() {
3446
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3447
+ };
3448
+
3449
+
3450
+ /**
3451
+ * @param {string} value
3452
+ * @return {!proto.trb.strategy.v1.SearchTask} returns this
3453
+ */
3454
+ proto.trb.strategy.v1.SearchTask.prototype.setSearchId = function(value) {
3455
+ return jspb.Message.setProto3StringField(this, 1, value);
3456
+ };
3457
+
3458
+
3459
+ /**
3460
+ * @enum {number}
3461
+ */
3462
+ proto.trb.strategy.v1.SearchMethod = {
3463
+ SEARCH_METHOD_UNSPECIFIED: 0,
3464
+ SEARCH_METHOD_GENETIC: 1
3465
+ };
3466
+
3467
+ goog.object.extend(exports, proto.trb.strategy.v1);