@marleena/trb-proto 1.0.55 → 1.0.57

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