@marleena/trb-proto 1.0.32 → 1.0.34

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,1614 @@
1
+ // source: indicators/indicators.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
+ goog.exportSymbol('proto.trb.indicators.v1.Candle', null, global);
29
+ goog.exportSymbol('proto.trb.indicators.v1.ComputeRequest', null, global);
30
+ goog.exportSymbol('proto.trb.indicators.v1.ComputeResponse', null, global);
31
+ goog.exportSymbol('proto.trb.indicators.v1.IndicatorInfo', null, global);
32
+ goog.exportSymbol('proto.trb.indicators.v1.IndicatorPoint', null, global);
33
+ goog.exportSymbol('proto.trb.indicators.v1.IndicatorType', null, global);
34
+ goog.exportSymbol('proto.trb.indicators.v1.ListSupportedRequest', null, global);
35
+ goog.exportSymbol('proto.trb.indicators.v1.ListSupportedResponse', null, global);
36
+ /**
37
+ * Generated by JsPbCodeGenerator.
38
+ * @param {Array=} opt_data Optional initial data array, typically from a
39
+ * server response, or constructed directly in Javascript. The array is used
40
+ * in place and becomes part of the constructed object. It is not cloned.
41
+ * If no data is provided, the constructed object will be empty, but still
42
+ * valid.
43
+ * @extends {jspb.Message}
44
+ * @constructor
45
+ */
46
+ proto.trb.indicators.v1.Candle = function(opt_data) {
47
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
48
+ };
49
+ goog.inherits(proto.trb.indicators.v1.Candle, jspb.Message);
50
+ if (goog.DEBUG && !COMPILED) {
51
+ /**
52
+ * @public
53
+ * @override
54
+ */
55
+ proto.trb.indicators.v1.Candle.displayName = 'proto.trb.indicators.v1.Candle';
56
+ }
57
+ /**
58
+ * Generated by JsPbCodeGenerator.
59
+ * @param {Array=} opt_data Optional initial data array, typically from a
60
+ * server response, or constructed directly in Javascript. The array is used
61
+ * in place and becomes part of the constructed object. It is not cloned.
62
+ * If no data is provided, the constructed object will be empty, but still
63
+ * valid.
64
+ * @extends {jspb.Message}
65
+ * @constructor
66
+ */
67
+ proto.trb.indicators.v1.ComputeRequest = function(opt_data) {
68
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.trb.indicators.v1.ComputeRequest.repeatedFields_, null);
69
+ };
70
+ goog.inherits(proto.trb.indicators.v1.ComputeRequest, jspb.Message);
71
+ if (goog.DEBUG && !COMPILED) {
72
+ /**
73
+ * @public
74
+ * @override
75
+ */
76
+ proto.trb.indicators.v1.ComputeRequest.displayName = 'proto.trb.indicators.v1.ComputeRequest';
77
+ }
78
+ /**
79
+ * Generated by JsPbCodeGenerator.
80
+ * @param {Array=} opt_data Optional initial data array, typically from a
81
+ * server response, or constructed directly in Javascript. The array is used
82
+ * in place and becomes part of the constructed object. It is not cloned.
83
+ * If no data is provided, the constructed object will be empty, but still
84
+ * valid.
85
+ * @extends {jspb.Message}
86
+ * @constructor
87
+ */
88
+ proto.trb.indicators.v1.IndicatorPoint = function(opt_data) {
89
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
90
+ };
91
+ goog.inherits(proto.trb.indicators.v1.IndicatorPoint, jspb.Message);
92
+ if (goog.DEBUG && !COMPILED) {
93
+ /**
94
+ * @public
95
+ * @override
96
+ */
97
+ proto.trb.indicators.v1.IndicatorPoint.displayName = 'proto.trb.indicators.v1.IndicatorPoint';
98
+ }
99
+ /**
100
+ * Generated by JsPbCodeGenerator.
101
+ * @param {Array=} opt_data Optional initial data array, typically from a
102
+ * server response, or constructed directly in Javascript. The array is used
103
+ * in place and becomes part of the constructed object. It is not cloned.
104
+ * If no data is provided, the constructed object will be empty, but still
105
+ * valid.
106
+ * @extends {jspb.Message}
107
+ * @constructor
108
+ */
109
+ proto.trb.indicators.v1.ComputeResponse = function(opt_data) {
110
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.trb.indicators.v1.ComputeResponse.repeatedFields_, null);
111
+ };
112
+ goog.inherits(proto.trb.indicators.v1.ComputeResponse, jspb.Message);
113
+ if (goog.DEBUG && !COMPILED) {
114
+ /**
115
+ * @public
116
+ * @override
117
+ */
118
+ proto.trb.indicators.v1.ComputeResponse.displayName = 'proto.trb.indicators.v1.ComputeResponse';
119
+ }
120
+ /**
121
+ * Generated by JsPbCodeGenerator.
122
+ * @param {Array=} opt_data Optional initial data array, typically from a
123
+ * server response, or constructed directly in Javascript. The array is used
124
+ * in place and becomes part of the constructed object. It is not cloned.
125
+ * If no data is provided, the constructed object will be empty, but still
126
+ * valid.
127
+ * @extends {jspb.Message}
128
+ * @constructor
129
+ */
130
+ proto.trb.indicators.v1.IndicatorInfo = function(opt_data) {
131
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
132
+ };
133
+ goog.inherits(proto.trb.indicators.v1.IndicatorInfo, jspb.Message);
134
+ if (goog.DEBUG && !COMPILED) {
135
+ /**
136
+ * @public
137
+ * @override
138
+ */
139
+ proto.trb.indicators.v1.IndicatorInfo.displayName = 'proto.trb.indicators.v1.IndicatorInfo';
140
+ }
141
+ /**
142
+ * Generated by JsPbCodeGenerator.
143
+ * @param {Array=} opt_data Optional initial data array, typically from a
144
+ * server response, or constructed directly in Javascript. The array is used
145
+ * in place and becomes part of the constructed object. It is not cloned.
146
+ * If no data is provided, the constructed object will be empty, but still
147
+ * valid.
148
+ * @extends {jspb.Message}
149
+ * @constructor
150
+ */
151
+ proto.trb.indicators.v1.ListSupportedRequest = function(opt_data) {
152
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
153
+ };
154
+ goog.inherits(proto.trb.indicators.v1.ListSupportedRequest, jspb.Message);
155
+ if (goog.DEBUG && !COMPILED) {
156
+ /**
157
+ * @public
158
+ * @override
159
+ */
160
+ proto.trb.indicators.v1.ListSupportedRequest.displayName = 'proto.trb.indicators.v1.ListSupportedRequest';
161
+ }
162
+ /**
163
+ * Generated by JsPbCodeGenerator.
164
+ * @param {Array=} opt_data Optional initial data array, typically from a
165
+ * server response, or constructed directly in Javascript. The array is used
166
+ * in place and becomes part of the constructed object. It is not cloned.
167
+ * If no data is provided, the constructed object will be empty, but still
168
+ * valid.
169
+ * @extends {jspb.Message}
170
+ * @constructor
171
+ */
172
+ proto.trb.indicators.v1.ListSupportedResponse = function(opt_data) {
173
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.trb.indicators.v1.ListSupportedResponse.repeatedFields_, null);
174
+ };
175
+ goog.inherits(proto.trb.indicators.v1.ListSupportedResponse, jspb.Message);
176
+ if (goog.DEBUG && !COMPILED) {
177
+ /**
178
+ * @public
179
+ * @override
180
+ */
181
+ proto.trb.indicators.v1.ListSupportedResponse.displayName = 'proto.trb.indicators.v1.ListSupportedResponse';
182
+ }
183
+
184
+
185
+
186
+ if (jspb.Message.GENERATE_TO_OBJECT) {
187
+ /**
188
+ * Creates an object representation of this proto.
189
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
190
+ * Optional fields that are not set will be set to undefined.
191
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
192
+ * For the list of reserved names please see:
193
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
194
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
195
+ * JSPB instance for transitional soy proto support:
196
+ * http://goto/soy-param-migration
197
+ * @return {!Object}
198
+ */
199
+ proto.trb.indicators.v1.Candle.prototype.toObject = function(opt_includeInstance) {
200
+ return proto.trb.indicators.v1.Candle.toObject(opt_includeInstance, this);
201
+ };
202
+
203
+
204
+ /**
205
+ * Static version of the {@see toObject} method.
206
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
207
+ * the JSPB instance for transitional soy proto support:
208
+ * http://goto/soy-param-migration
209
+ * @param {!proto.trb.indicators.v1.Candle} msg The msg instance to transform.
210
+ * @return {!Object}
211
+ * @suppress {unusedLocalVariables} f is only used for nested messages
212
+ */
213
+ proto.trb.indicators.v1.Candle.toObject = function(includeInstance, msg) {
214
+ var f, obj = {
215
+ time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
216
+ open: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
217
+ high: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0),
218
+ low: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
219
+ close: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0),
220
+ volume: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.0)
221
+ };
222
+
223
+ if (includeInstance) {
224
+ obj.$jspbMessageInstance = msg;
225
+ }
226
+ return obj;
227
+ };
228
+ }
229
+
230
+
231
+ /**
232
+ * Deserializes binary data (in protobuf wire format).
233
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
234
+ * @return {!proto.trb.indicators.v1.Candle}
235
+ */
236
+ proto.trb.indicators.v1.Candle.deserializeBinary = function(bytes) {
237
+ var reader = new jspb.BinaryReader(bytes);
238
+ var msg = new proto.trb.indicators.v1.Candle;
239
+ return proto.trb.indicators.v1.Candle.deserializeBinaryFromReader(msg, reader);
240
+ };
241
+
242
+
243
+ /**
244
+ * Deserializes binary data (in protobuf wire format) from the
245
+ * given reader into the given message object.
246
+ * @param {!proto.trb.indicators.v1.Candle} msg The message object to deserialize into.
247
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
248
+ * @return {!proto.trb.indicators.v1.Candle}
249
+ */
250
+ proto.trb.indicators.v1.Candle.deserializeBinaryFromReader = function(msg, reader) {
251
+ while (reader.nextField()) {
252
+ if (reader.isEndGroup()) {
253
+ break;
254
+ }
255
+ var field = reader.getFieldNumber();
256
+ switch (field) {
257
+ case 1:
258
+ var value = new google_protobuf_timestamp_pb.Timestamp;
259
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
260
+ msg.setTime(value);
261
+ break;
262
+ case 2:
263
+ var value = /** @type {number} */ (reader.readDouble());
264
+ msg.setOpen(value);
265
+ break;
266
+ case 3:
267
+ var value = /** @type {number} */ (reader.readDouble());
268
+ msg.setHigh(value);
269
+ break;
270
+ case 4:
271
+ var value = /** @type {number} */ (reader.readDouble());
272
+ msg.setLow(value);
273
+ break;
274
+ case 5:
275
+ var value = /** @type {number} */ (reader.readDouble());
276
+ msg.setClose(value);
277
+ break;
278
+ case 6:
279
+ var value = /** @type {number} */ (reader.readDouble());
280
+ msg.setVolume(value);
281
+ break;
282
+ default:
283
+ reader.skipField();
284
+ break;
285
+ }
286
+ }
287
+ return msg;
288
+ };
289
+
290
+
291
+ /**
292
+ * Serializes the message to binary data (in protobuf wire format).
293
+ * @return {!Uint8Array}
294
+ */
295
+ proto.trb.indicators.v1.Candle.prototype.serializeBinary = function() {
296
+ var writer = new jspb.BinaryWriter();
297
+ proto.trb.indicators.v1.Candle.serializeBinaryToWriter(this, writer);
298
+ return writer.getResultBuffer();
299
+ };
300
+
301
+
302
+ /**
303
+ * Serializes the given message to binary data (in protobuf wire
304
+ * format), writing to the given BinaryWriter.
305
+ * @param {!proto.trb.indicators.v1.Candle} message
306
+ * @param {!jspb.BinaryWriter} writer
307
+ * @suppress {unusedLocalVariables} f is only used for nested messages
308
+ */
309
+ proto.trb.indicators.v1.Candle.serializeBinaryToWriter = function(message, writer) {
310
+ var f = undefined;
311
+ f = message.getTime();
312
+ if (f != null) {
313
+ writer.writeMessage(
314
+ 1,
315
+ f,
316
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
317
+ );
318
+ }
319
+ f = message.getOpen();
320
+ if (f !== 0.0) {
321
+ writer.writeDouble(
322
+ 2,
323
+ f
324
+ );
325
+ }
326
+ f = message.getHigh();
327
+ if (f !== 0.0) {
328
+ writer.writeDouble(
329
+ 3,
330
+ f
331
+ );
332
+ }
333
+ f = message.getLow();
334
+ if (f !== 0.0) {
335
+ writer.writeDouble(
336
+ 4,
337
+ f
338
+ );
339
+ }
340
+ f = message.getClose();
341
+ if (f !== 0.0) {
342
+ writer.writeDouble(
343
+ 5,
344
+ f
345
+ );
346
+ }
347
+ f = message.getVolume();
348
+ if (f !== 0.0) {
349
+ writer.writeDouble(
350
+ 6,
351
+ f
352
+ );
353
+ }
354
+ };
355
+
356
+
357
+ /**
358
+ * optional google.protobuf.Timestamp time = 1;
359
+ * @return {?proto.google.protobuf.Timestamp}
360
+ */
361
+ proto.trb.indicators.v1.Candle.prototype.getTime = function() {
362
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
363
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1));
364
+ };
365
+
366
+
367
+ /**
368
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
369
+ * @return {!proto.trb.indicators.v1.Candle} returns this
370
+ */
371
+ proto.trb.indicators.v1.Candle.prototype.setTime = function(value) {
372
+ return jspb.Message.setWrapperField(this, 1, value);
373
+ };
374
+
375
+
376
+ /**
377
+ * Clears the message field making it undefined.
378
+ * @return {!proto.trb.indicators.v1.Candle} returns this
379
+ */
380
+ proto.trb.indicators.v1.Candle.prototype.clearTime = function() {
381
+ return this.setTime(undefined);
382
+ };
383
+
384
+
385
+ /**
386
+ * Returns whether this field is set.
387
+ * @return {boolean}
388
+ */
389
+ proto.trb.indicators.v1.Candle.prototype.hasTime = function() {
390
+ return jspb.Message.getField(this, 1) != null;
391
+ };
392
+
393
+
394
+ /**
395
+ * optional double open = 2;
396
+ * @return {number}
397
+ */
398
+ proto.trb.indicators.v1.Candle.prototype.getOpen = function() {
399
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
400
+ };
401
+
402
+
403
+ /**
404
+ * @param {number} value
405
+ * @return {!proto.trb.indicators.v1.Candle} returns this
406
+ */
407
+ proto.trb.indicators.v1.Candle.prototype.setOpen = function(value) {
408
+ return jspb.Message.setProto3FloatField(this, 2, value);
409
+ };
410
+
411
+
412
+ /**
413
+ * optional double high = 3;
414
+ * @return {number}
415
+ */
416
+ proto.trb.indicators.v1.Candle.prototype.getHigh = function() {
417
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
418
+ };
419
+
420
+
421
+ /**
422
+ * @param {number} value
423
+ * @return {!proto.trb.indicators.v1.Candle} returns this
424
+ */
425
+ proto.trb.indicators.v1.Candle.prototype.setHigh = function(value) {
426
+ return jspb.Message.setProto3FloatField(this, 3, value);
427
+ };
428
+
429
+
430
+ /**
431
+ * optional double low = 4;
432
+ * @return {number}
433
+ */
434
+ proto.trb.indicators.v1.Candle.prototype.getLow = function() {
435
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
436
+ };
437
+
438
+
439
+ /**
440
+ * @param {number} value
441
+ * @return {!proto.trb.indicators.v1.Candle} returns this
442
+ */
443
+ proto.trb.indicators.v1.Candle.prototype.setLow = function(value) {
444
+ return jspb.Message.setProto3FloatField(this, 4, value);
445
+ };
446
+
447
+
448
+ /**
449
+ * optional double close = 5;
450
+ * @return {number}
451
+ */
452
+ proto.trb.indicators.v1.Candle.prototype.getClose = function() {
453
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0));
454
+ };
455
+
456
+
457
+ /**
458
+ * @param {number} value
459
+ * @return {!proto.trb.indicators.v1.Candle} returns this
460
+ */
461
+ proto.trb.indicators.v1.Candle.prototype.setClose = function(value) {
462
+ return jspb.Message.setProto3FloatField(this, 5, value);
463
+ };
464
+
465
+
466
+ /**
467
+ * optional double volume = 6;
468
+ * @return {number}
469
+ */
470
+ proto.trb.indicators.v1.Candle.prototype.getVolume = function() {
471
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0));
472
+ };
473
+
474
+
475
+ /**
476
+ * @param {number} value
477
+ * @return {!proto.trb.indicators.v1.Candle} returns this
478
+ */
479
+ proto.trb.indicators.v1.Candle.prototype.setVolume = function(value) {
480
+ return jspb.Message.setProto3FloatField(this, 6, value);
481
+ };
482
+
483
+
484
+
485
+ /**
486
+ * List of repeated fields within this message type.
487
+ * @private {!Array<number>}
488
+ * @const
489
+ */
490
+ proto.trb.indicators.v1.ComputeRequest.repeatedFields_ = [2];
491
+
492
+
493
+
494
+ if (jspb.Message.GENERATE_TO_OBJECT) {
495
+ /**
496
+ * Creates an object representation of this proto.
497
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
498
+ * Optional fields that are not set will be set to undefined.
499
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
500
+ * For the list of reserved names please see:
501
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
502
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
503
+ * JSPB instance for transitional soy proto support:
504
+ * http://goto/soy-param-migration
505
+ * @return {!Object}
506
+ */
507
+ proto.trb.indicators.v1.ComputeRequest.prototype.toObject = function(opt_includeInstance) {
508
+ return proto.trb.indicators.v1.ComputeRequest.toObject(opt_includeInstance, this);
509
+ };
510
+
511
+
512
+ /**
513
+ * Static version of the {@see toObject} method.
514
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
515
+ * the JSPB instance for transitional soy proto support:
516
+ * http://goto/soy-param-migration
517
+ * @param {!proto.trb.indicators.v1.ComputeRequest} msg The msg instance to transform.
518
+ * @return {!Object}
519
+ * @suppress {unusedLocalVariables} f is only used for nested messages
520
+ */
521
+ proto.trb.indicators.v1.ComputeRequest.toObject = function(includeInstance, msg) {
522
+ var f, obj = {
523
+ type: jspb.Message.getFieldWithDefault(msg, 1, 0),
524
+ candlesList: jspb.Message.toObjectList(msg.getCandlesList(),
525
+ proto.trb.indicators.v1.Candle.toObject, includeInstance),
526
+ paramsMap: (f = msg.getParamsMap()) ? f.toObject(includeInstance, undefined) : []
527
+ };
528
+
529
+ if (includeInstance) {
530
+ obj.$jspbMessageInstance = msg;
531
+ }
532
+ return obj;
533
+ };
534
+ }
535
+
536
+
537
+ /**
538
+ * Deserializes binary data (in protobuf wire format).
539
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
540
+ * @return {!proto.trb.indicators.v1.ComputeRequest}
541
+ */
542
+ proto.trb.indicators.v1.ComputeRequest.deserializeBinary = function(bytes) {
543
+ var reader = new jspb.BinaryReader(bytes);
544
+ var msg = new proto.trb.indicators.v1.ComputeRequest;
545
+ return proto.trb.indicators.v1.ComputeRequest.deserializeBinaryFromReader(msg, reader);
546
+ };
547
+
548
+
549
+ /**
550
+ * Deserializes binary data (in protobuf wire format) from the
551
+ * given reader into the given message object.
552
+ * @param {!proto.trb.indicators.v1.ComputeRequest} msg The message object to deserialize into.
553
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
554
+ * @return {!proto.trb.indicators.v1.ComputeRequest}
555
+ */
556
+ proto.trb.indicators.v1.ComputeRequest.deserializeBinaryFromReader = function(msg, reader) {
557
+ while (reader.nextField()) {
558
+ if (reader.isEndGroup()) {
559
+ break;
560
+ }
561
+ var field = reader.getFieldNumber();
562
+ switch (field) {
563
+ case 1:
564
+ var value = /** @type {!proto.trb.indicators.v1.IndicatorType} */ (reader.readEnum());
565
+ msg.setType(value);
566
+ break;
567
+ case 2:
568
+ var value = new proto.trb.indicators.v1.Candle;
569
+ reader.readMessage(value,proto.trb.indicators.v1.Candle.deserializeBinaryFromReader);
570
+ msg.addCandles(value);
571
+ break;
572
+ case 3:
573
+ var value = msg.getParamsMap();
574
+ reader.readMessage(value, function(message, reader) {
575
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readDouble, null, "", 0.0);
576
+ });
577
+ break;
578
+ default:
579
+ reader.skipField();
580
+ break;
581
+ }
582
+ }
583
+ return msg;
584
+ };
585
+
586
+
587
+ /**
588
+ * Serializes the message to binary data (in protobuf wire format).
589
+ * @return {!Uint8Array}
590
+ */
591
+ proto.trb.indicators.v1.ComputeRequest.prototype.serializeBinary = function() {
592
+ var writer = new jspb.BinaryWriter();
593
+ proto.trb.indicators.v1.ComputeRequest.serializeBinaryToWriter(this, writer);
594
+ return writer.getResultBuffer();
595
+ };
596
+
597
+
598
+ /**
599
+ * Serializes the given message to binary data (in protobuf wire
600
+ * format), writing to the given BinaryWriter.
601
+ * @param {!proto.trb.indicators.v1.ComputeRequest} message
602
+ * @param {!jspb.BinaryWriter} writer
603
+ * @suppress {unusedLocalVariables} f is only used for nested messages
604
+ */
605
+ proto.trb.indicators.v1.ComputeRequest.serializeBinaryToWriter = function(message, writer) {
606
+ var f = undefined;
607
+ f = message.getType();
608
+ if (f !== 0.0) {
609
+ writer.writeEnum(
610
+ 1,
611
+ f
612
+ );
613
+ }
614
+ f = message.getCandlesList();
615
+ if (f.length > 0) {
616
+ writer.writeRepeatedMessage(
617
+ 2,
618
+ f,
619
+ proto.trb.indicators.v1.Candle.serializeBinaryToWriter
620
+ );
621
+ }
622
+ f = message.getParamsMap(true);
623
+ if (f && f.getLength() > 0) {
624
+ f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeDouble);
625
+ }
626
+ };
627
+
628
+
629
+ /**
630
+ * optional IndicatorType type = 1;
631
+ * @return {!proto.trb.indicators.v1.IndicatorType}
632
+ */
633
+ proto.trb.indicators.v1.ComputeRequest.prototype.getType = function() {
634
+ return /** @type {!proto.trb.indicators.v1.IndicatorType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
635
+ };
636
+
637
+
638
+ /**
639
+ * @param {!proto.trb.indicators.v1.IndicatorType} value
640
+ * @return {!proto.trb.indicators.v1.ComputeRequest} returns this
641
+ */
642
+ proto.trb.indicators.v1.ComputeRequest.prototype.setType = function(value) {
643
+ return jspb.Message.setProto3EnumField(this, 1, value);
644
+ };
645
+
646
+
647
+ /**
648
+ * repeated Candle candles = 2;
649
+ * @return {!Array<!proto.trb.indicators.v1.Candle>}
650
+ */
651
+ proto.trb.indicators.v1.ComputeRequest.prototype.getCandlesList = function() {
652
+ return /** @type{!Array<!proto.trb.indicators.v1.Candle>} */ (
653
+ jspb.Message.getRepeatedWrapperField(this, proto.trb.indicators.v1.Candle, 2));
654
+ };
655
+
656
+
657
+ /**
658
+ * @param {!Array<!proto.trb.indicators.v1.Candle>} value
659
+ * @return {!proto.trb.indicators.v1.ComputeRequest} returns this
660
+ */
661
+ proto.trb.indicators.v1.ComputeRequest.prototype.setCandlesList = function(value) {
662
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
663
+ };
664
+
665
+
666
+ /**
667
+ * @param {!proto.trb.indicators.v1.Candle=} opt_value
668
+ * @param {number=} opt_index
669
+ * @return {!proto.trb.indicators.v1.Candle}
670
+ */
671
+ proto.trb.indicators.v1.ComputeRequest.prototype.addCandles = function(opt_value, opt_index) {
672
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.trb.indicators.v1.Candle, opt_index);
673
+ };
674
+
675
+
676
+ /**
677
+ * Clears the list making it empty but non-null.
678
+ * @return {!proto.trb.indicators.v1.ComputeRequest} returns this
679
+ */
680
+ proto.trb.indicators.v1.ComputeRequest.prototype.clearCandlesList = function() {
681
+ return this.setCandlesList([]);
682
+ };
683
+
684
+
685
+ /**
686
+ * map<string, double> params = 3;
687
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
688
+ * empty, instead returning `undefined`
689
+ * @return {!jspb.Map<string,number>}
690
+ */
691
+ proto.trb.indicators.v1.ComputeRequest.prototype.getParamsMap = function(opt_noLazyCreate) {
692
+ return /** @type {!jspb.Map<string,number>} */ (
693
+ jspb.Message.getMapField(this, 3, opt_noLazyCreate,
694
+ null));
695
+ };
696
+
697
+
698
+ /**
699
+ * Clears values from the map. The map will be non-null.
700
+ * @return {!proto.trb.indicators.v1.ComputeRequest} returns this
701
+ */
702
+ proto.trb.indicators.v1.ComputeRequest.prototype.clearParamsMap = function() {
703
+ this.getParamsMap().clear();
704
+ return this;
705
+ };
706
+
707
+
708
+
709
+
710
+
711
+ if (jspb.Message.GENERATE_TO_OBJECT) {
712
+ /**
713
+ * Creates an object representation of this proto.
714
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
715
+ * Optional fields that are not set will be set to undefined.
716
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
717
+ * For the list of reserved names please see:
718
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
719
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
720
+ * JSPB instance for transitional soy proto support:
721
+ * http://goto/soy-param-migration
722
+ * @return {!Object}
723
+ */
724
+ proto.trb.indicators.v1.IndicatorPoint.prototype.toObject = function(opt_includeInstance) {
725
+ return proto.trb.indicators.v1.IndicatorPoint.toObject(opt_includeInstance, this);
726
+ };
727
+
728
+
729
+ /**
730
+ * Static version of the {@see toObject} method.
731
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
732
+ * the JSPB instance for transitional soy proto support:
733
+ * http://goto/soy-param-migration
734
+ * @param {!proto.trb.indicators.v1.IndicatorPoint} msg The msg instance to transform.
735
+ * @return {!Object}
736
+ * @suppress {unusedLocalVariables} f is only used for nested messages
737
+ */
738
+ proto.trb.indicators.v1.IndicatorPoint.toObject = function(includeInstance, msg) {
739
+ var f, obj = {
740
+ time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
741
+ valuesMap: (f = msg.getValuesMap()) ? f.toObject(includeInstance, undefined) : []
742
+ };
743
+
744
+ if (includeInstance) {
745
+ obj.$jspbMessageInstance = msg;
746
+ }
747
+ return obj;
748
+ };
749
+ }
750
+
751
+
752
+ /**
753
+ * Deserializes binary data (in protobuf wire format).
754
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
755
+ * @return {!proto.trb.indicators.v1.IndicatorPoint}
756
+ */
757
+ proto.trb.indicators.v1.IndicatorPoint.deserializeBinary = function(bytes) {
758
+ var reader = new jspb.BinaryReader(bytes);
759
+ var msg = new proto.trb.indicators.v1.IndicatorPoint;
760
+ return proto.trb.indicators.v1.IndicatorPoint.deserializeBinaryFromReader(msg, reader);
761
+ };
762
+
763
+
764
+ /**
765
+ * Deserializes binary data (in protobuf wire format) from the
766
+ * given reader into the given message object.
767
+ * @param {!proto.trb.indicators.v1.IndicatorPoint} msg The message object to deserialize into.
768
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
769
+ * @return {!proto.trb.indicators.v1.IndicatorPoint}
770
+ */
771
+ proto.trb.indicators.v1.IndicatorPoint.deserializeBinaryFromReader = function(msg, reader) {
772
+ while (reader.nextField()) {
773
+ if (reader.isEndGroup()) {
774
+ break;
775
+ }
776
+ var field = reader.getFieldNumber();
777
+ switch (field) {
778
+ case 1:
779
+ var value = new google_protobuf_timestamp_pb.Timestamp;
780
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
781
+ msg.setTime(value);
782
+ break;
783
+ case 2:
784
+ var value = msg.getValuesMap();
785
+ reader.readMessage(value, function(message, reader) {
786
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readDouble, null, "", 0.0);
787
+ });
788
+ break;
789
+ default:
790
+ reader.skipField();
791
+ break;
792
+ }
793
+ }
794
+ return msg;
795
+ };
796
+
797
+
798
+ /**
799
+ * Serializes the message to binary data (in protobuf wire format).
800
+ * @return {!Uint8Array}
801
+ */
802
+ proto.trb.indicators.v1.IndicatorPoint.prototype.serializeBinary = function() {
803
+ var writer = new jspb.BinaryWriter();
804
+ proto.trb.indicators.v1.IndicatorPoint.serializeBinaryToWriter(this, writer);
805
+ return writer.getResultBuffer();
806
+ };
807
+
808
+
809
+ /**
810
+ * Serializes the given message to binary data (in protobuf wire
811
+ * format), writing to the given BinaryWriter.
812
+ * @param {!proto.trb.indicators.v1.IndicatorPoint} message
813
+ * @param {!jspb.BinaryWriter} writer
814
+ * @suppress {unusedLocalVariables} f is only used for nested messages
815
+ */
816
+ proto.trb.indicators.v1.IndicatorPoint.serializeBinaryToWriter = function(message, writer) {
817
+ var f = undefined;
818
+ f = message.getTime();
819
+ if (f != null) {
820
+ writer.writeMessage(
821
+ 1,
822
+ f,
823
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
824
+ );
825
+ }
826
+ f = message.getValuesMap(true);
827
+ if (f && f.getLength() > 0) {
828
+ f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeDouble);
829
+ }
830
+ };
831
+
832
+
833
+ /**
834
+ * optional google.protobuf.Timestamp time = 1;
835
+ * @return {?proto.google.protobuf.Timestamp}
836
+ */
837
+ proto.trb.indicators.v1.IndicatorPoint.prototype.getTime = function() {
838
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
839
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1));
840
+ };
841
+
842
+
843
+ /**
844
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
845
+ * @return {!proto.trb.indicators.v1.IndicatorPoint} returns this
846
+ */
847
+ proto.trb.indicators.v1.IndicatorPoint.prototype.setTime = function(value) {
848
+ return jspb.Message.setWrapperField(this, 1, value);
849
+ };
850
+
851
+
852
+ /**
853
+ * Clears the message field making it undefined.
854
+ * @return {!proto.trb.indicators.v1.IndicatorPoint} returns this
855
+ */
856
+ proto.trb.indicators.v1.IndicatorPoint.prototype.clearTime = function() {
857
+ return this.setTime(undefined);
858
+ };
859
+
860
+
861
+ /**
862
+ * Returns whether this field is set.
863
+ * @return {boolean}
864
+ */
865
+ proto.trb.indicators.v1.IndicatorPoint.prototype.hasTime = function() {
866
+ return jspb.Message.getField(this, 1) != null;
867
+ };
868
+
869
+
870
+ /**
871
+ * map<string, double> values = 2;
872
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
873
+ * empty, instead returning `undefined`
874
+ * @return {!jspb.Map<string,number>}
875
+ */
876
+ proto.trb.indicators.v1.IndicatorPoint.prototype.getValuesMap = function(opt_noLazyCreate) {
877
+ return /** @type {!jspb.Map<string,number>} */ (
878
+ jspb.Message.getMapField(this, 2, opt_noLazyCreate,
879
+ null));
880
+ };
881
+
882
+
883
+ /**
884
+ * Clears values from the map. The map will be non-null.
885
+ * @return {!proto.trb.indicators.v1.IndicatorPoint} returns this
886
+ */
887
+ proto.trb.indicators.v1.IndicatorPoint.prototype.clearValuesMap = function() {
888
+ this.getValuesMap().clear();
889
+ return this;
890
+ };
891
+
892
+
893
+
894
+ /**
895
+ * List of repeated fields within this message type.
896
+ * @private {!Array<number>}
897
+ * @const
898
+ */
899
+ proto.trb.indicators.v1.ComputeResponse.repeatedFields_ = [3];
900
+
901
+
902
+
903
+ if (jspb.Message.GENERATE_TO_OBJECT) {
904
+ /**
905
+ * Creates an object representation of this proto.
906
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
907
+ * Optional fields that are not set will be set to undefined.
908
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
909
+ * For the list of reserved names please see:
910
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
911
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
912
+ * JSPB instance for transitional soy proto support:
913
+ * http://goto/soy-param-migration
914
+ * @return {!Object}
915
+ */
916
+ proto.trb.indicators.v1.ComputeResponse.prototype.toObject = function(opt_includeInstance) {
917
+ return proto.trb.indicators.v1.ComputeResponse.toObject(opt_includeInstance, this);
918
+ };
919
+
920
+
921
+ /**
922
+ * Static version of the {@see toObject} method.
923
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
924
+ * the JSPB instance for transitional soy proto support:
925
+ * http://goto/soy-param-migration
926
+ * @param {!proto.trb.indicators.v1.ComputeResponse} msg The msg instance to transform.
927
+ * @return {!Object}
928
+ * @suppress {unusedLocalVariables} f is only used for nested messages
929
+ */
930
+ proto.trb.indicators.v1.ComputeResponse.toObject = function(includeInstance, msg) {
931
+ var f, obj = {
932
+ type: jspb.Message.getFieldWithDefault(msg, 1, 0),
933
+ paramsMap: (f = msg.getParamsMap()) ? f.toObject(includeInstance, undefined) : [],
934
+ pointsList: jspb.Message.toObjectList(msg.getPointsList(),
935
+ proto.trb.indicators.v1.IndicatorPoint.toObject, includeInstance)
936
+ };
937
+
938
+ if (includeInstance) {
939
+ obj.$jspbMessageInstance = msg;
940
+ }
941
+ return obj;
942
+ };
943
+ }
944
+
945
+
946
+ /**
947
+ * Deserializes binary data (in protobuf wire format).
948
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
949
+ * @return {!proto.trb.indicators.v1.ComputeResponse}
950
+ */
951
+ proto.trb.indicators.v1.ComputeResponse.deserializeBinary = function(bytes) {
952
+ var reader = new jspb.BinaryReader(bytes);
953
+ var msg = new proto.trb.indicators.v1.ComputeResponse;
954
+ return proto.trb.indicators.v1.ComputeResponse.deserializeBinaryFromReader(msg, reader);
955
+ };
956
+
957
+
958
+ /**
959
+ * Deserializes binary data (in protobuf wire format) from the
960
+ * given reader into the given message object.
961
+ * @param {!proto.trb.indicators.v1.ComputeResponse} msg The message object to deserialize into.
962
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
963
+ * @return {!proto.trb.indicators.v1.ComputeResponse}
964
+ */
965
+ proto.trb.indicators.v1.ComputeResponse.deserializeBinaryFromReader = function(msg, reader) {
966
+ while (reader.nextField()) {
967
+ if (reader.isEndGroup()) {
968
+ break;
969
+ }
970
+ var field = reader.getFieldNumber();
971
+ switch (field) {
972
+ case 1:
973
+ var value = /** @type {!proto.trb.indicators.v1.IndicatorType} */ (reader.readEnum());
974
+ msg.setType(value);
975
+ break;
976
+ case 2:
977
+ var value = msg.getParamsMap();
978
+ reader.readMessage(value, function(message, reader) {
979
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readDouble, null, "", 0.0);
980
+ });
981
+ break;
982
+ case 3:
983
+ var value = new proto.trb.indicators.v1.IndicatorPoint;
984
+ reader.readMessage(value,proto.trb.indicators.v1.IndicatorPoint.deserializeBinaryFromReader);
985
+ msg.addPoints(value);
986
+ break;
987
+ default:
988
+ reader.skipField();
989
+ break;
990
+ }
991
+ }
992
+ return msg;
993
+ };
994
+
995
+
996
+ /**
997
+ * Serializes the message to binary data (in protobuf wire format).
998
+ * @return {!Uint8Array}
999
+ */
1000
+ proto.trb.indicators.v1.ComputeResponse.prototype.serializeBinary = function() {
1001
+ var writer = new jspb.BinaryWriter();
1002
+ proto.trb.indicators.v1.ComputeResponse.serializeBinaryToWriter(this, writer);
1003
+ return writer.getResultBuffer();
1004
+ };
1005
+
1006
+
1007
+ /**
1008
+ * Serializes the given message to binary data (in protobuf wire
1009
+ * format), writing to the given BinaryWriter.
1010
+ * @param {!proto.trb.indicators.v1.ComputeResponse} message
1011
+ * @param {!jspb.BinaryWriter} writer
1012
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1013
+ */
1014
+ proto.trb.indicators.v1.ComputeResponse.serializeBinaryToWriter = function(message, writer) {
1015
+ var f = undefined;
1016
+ f = message.getType();
1017
+ if (f !== 0.0) {
1018
+ writer.writeEnum(
1019
+ 1,
1020
+ f
1021
+ );
1022
+ }
1023
+ f = message.getParamsMap(true);
1024
+ if (f && f.getLength() > 0) {
1025
+ f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeDouble);
1026
+ }
1027
+ f = message.getPointsList();
1028
+ if (f.length > 0) {
1029
+ writer.writeRepeatedMessage(
1030
+ 3,
1031
+ f,
1032
+ proto.trb.indicators.v1.IndicatorPoint.serializeBinaryToWriter
1033
+ );
1034
+ }
1035
+ };
1036
+
1037
+
1038
+ /**
1039
+ * optional IndicatorType type = 1;
1040
+ * @return {!proto.trb.indicators.v1.IndicatorType}
1041
+ */
1042
+ proto.trb.indicators.v1.ComputeResponse.prototype.getType = function() {
1043
+ return /** @type {!proto.trb.indicators.v1.IndicatorType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1044
+ };
1045
+
1046
+
1047
+ /**
1048
+ * @param {!proto.trb.indicators.v1.IndicatorType} value
1049
+ * @return {!proto.trb.indicators.v1.ComputeResponse} returns this
1050
+ */
1051
+ proto.trb.indicators.v1.ComputeResponse.prototype.setType = function(value) {
1052
+ return jspb.Message.setProto3EnumField(this, 1, value);
1053
+ };
1054
+
1055
+
1056
+ /**
1057
+ * map<string, double> params = 2;
1058
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
1059
+ * empty, instead returning `undefined`
1060
+ * @return {!jspb.Map<string,number>}
1061
+ */
1062
+ proto.trb.indicators.v1.ComputeResponse.prototype.getParamsMap = function(opt_noLazyCreate) {
1063
+ return /** @type {!jspb.Map<string,number>} */ (
1064
+ jspb.Message.getMapField(this, 2, opt_noLazyCreate,
1065
+ null));
1066
+ };
1067
+
1068
+
1069
+ /**
1070
+ * Clears values from the map. The map will be non-null.
1071
+ * @return {!proto.trb.indicators.v1.ComputeResponse} returns this
1072
+ */
1073
+ proto.trb.indicators.v1.ComputeResponse.prototype.clearParamsMap = function() {
1074
+ this.getParamsMap().clear();
1075
+ return this;
1076
+ };
1077
+
1078
+
1079
+ /**
1080
+ * repeated IndicatorPoint points = 3;
1081
+ * @return {!Array<!proto.trb.indicators.v1.IndicatorPoint>}
1082
+ */
1083
+ proto.trb.indicators.v1.ComputeResponse.prototype.getPointsList = function() {
1084
+ return /** @type{!Array<!proto.trb.indicators.v1.IndicatorPoint>} */ (
1085
+ jspb.Message.getRepeatedWrapperField(this, proto.trb.indicators.v1.IndicatorPoint, 3));
1086
+ };
1087
+
1088
+
1089
+ /**
1090
+ * @param {!Array<!proto.trb.indicators.v1.IndicatorPoint>} value
1091
+ * @return {!proto.trb.indicators.v1.ComputeResponse} returns this
1092
+ */
1093
+ proto.trb.indicators.v1.ComputeResponse.prototype.setPointsList = function(value) {
1094
+ return jspb.Message.setRepeatedWrapperField(this, 3, value);
1095
+ };
1096
+
1097
+
1098
+ /**
1099
+ * @param {!proto.trb.indicators.v1.IndicatorPoint=} opt_value
1100
+ * @param {number=} opt_index
1101
+ * @return {!proto.trb.indicators.v1.IndicatorPoint}
1102
+ */
1103
+ proto.trb.indicators.v1.ComputeResponse.prototype.addPoints = function(opt_value, opt_index) {
1104
+ return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.trb.indicators.v1.IndicatorPoint, opt_index);
1105
+ };
1106
+
1107
+
1108
+ /**
1109
+ * Clears the list making it empty but non-null.
1110
+ * @return {!proto.trb.indicators.v1.ComputeResponse} returns this
1111
+ */
1112
+ proto.trb.indicators.v1.ComputeResponse.prototype.clearPointsList = function() {
1113
+ return this.setPointsList([]);
1114
+ };
1115
+
1116
+
1117
+
1118
+
1119
+
1120
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1121
+ /**
1122
+ * Creates an object representation of this proto.
1123
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1124
+ * Optional fields that are not set will be set to undefined.
1125
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1126
+ * For the list of reserved names please see:
1127
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1128
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1129
+ * JSPB instance for transitional soy proto support:
1130
+ * http://goto/soy-param-migration
1131
+ * @return {!Object}
1132
+ */
1133
+ proto.trb.indicators.v1.IndicatorInfo.prototype.toObject = function(opt_includeInstance) {
1134
+ return proto.trb.indicators.v1.IndicatorInfo.toObject(opt_includeInstance, this);
1135
+ };
1136
+
1137
+
1138
+ /**
1139
+ * Static version of the {@see toObject} method.
1140
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1141
+ * the JSPB instance for transitional soy proto support:
1142
+ * http://goto/soy-param-migration
1143
+ * @param {!proto.trb.indicators.v1.IndicatorInfo} msg The msg instance to transform.
1144
+ * @return {!Object}
1145
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1146
+ */
1147
+ proto.trb.indicators.v1.IndicatorInfo.toObject = function(includeInstance, msg) {
1148
+ var f, obj = {
1149
+ type: jspb.Message.getFieldWithDefault(msg, 1, 0),
1150
+ name: jspb.Message.getFieldWithDefault(msg, 2, ""),
1151
+ minBars: jspb.Message.getFieldWithDefault(msg, 3, 0),
1152
+ defaultParamsMap: (f = msg.getDefaultParamsMap()) ? f.toObject(includeInstance, undefined) : []
1153
+ };
1154
+
1155
+ if (includeInstance) {
1156
+ obj.$jspbMessageInstance = msg;
1157
+ }
1158
+ return obj;
1159
+ };
1160
+ }
1161
+
1162
+
1163
+ /**
1164
+ * Deserializes binary data (in protobuf wire format).
1165
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1166
+ * @return {!proto.trb.indicators.v1.IndicatorInfo}
1167
+ */
1168
+ proto.trb.indicators.v1.IndicatorInfo.deserializeBinary = function(bytes) {
1169
+ var reader = new jspb.BinaryReader(bytes);
1170
+ var msg = new proto.trb.indicators.v1.IndicatorInfo;
1171
+ return proto.trb.indicators.v1.IndicatorInfo.deserializeBinaryFromReader(msg, reader);
1172
+ };
1173
+
1174
+
1175
+ /**
1176
+ * Deserializes binary data (in protobuf wire format) from the
1177
+ * given reader into the given message object.
1178
+ * @param {!proto.trb.indicators.v1.IndicatorInfo} msg The message object to deserialize into.
1179
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1180
+ * @return {!proto.trb.indicators.v1.IndicatorInfo}
1181
+ */
1182
+ proto.trb.indicators.v1.IndicatorInfo.deserializeBinaryFromReader = function(msg, reader) {
1183
+ while (reader.nextField()) {
1184
+ if (reader.isEndGroup()) {
1185
+ break;
1186
+ }
1187
+ var field = reader.getFieldNumber();
1188
+ switch (field) {
1189
+ case 1:
1190
+ var value = /** @type {!proto.trb.indicators.v1.IndicatorType} */ (reader.readEnum());
1191
+ msg.setType(value);
1192
+ break;
1193
+ case 2:
1194
+ var value = /** @type {string} */ (reader.readString());
1195
+ msg.setName(value);
1196
+ break;
1197
+ case 3:
1198
+ var value = /** @type {number} */ (reader.readInt32());
1199
+ msg.setMinBars(value);
1200
+ break;
1201
+ case 4:
1202
+ var value = msg.getDefaultParamsMap();
1203
+ reader.readMessage(value, function(message, reader) {
1204
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readDouble, null, "", 0.0);
1205
+ });
1206
+ break;
1207
+ default:
1208
+ reader.skipField();
1209
+ break;
1210
+ }
1211
+ }
1212
+ return msg;
1213
+ };
1214
+
1215
+
1216
+ /**
1217
+ * Serializes the message to binary data (in protobuf wire format).
1218
+ * @return {!Uint8Array}
1219
+ */
1220
+ proto.trb.indicators.v1.IndicatorInfo.prototype.serializeBinary = function() {
1221
+ var writer = new jspb.BinaryWriter();
1222
+ proto.trb.indicators.v1.IndicatorInfo.serializeBinaryToWriter(this, writer);
1223
+ return writer.getResultBuffer();
1224
+ };
1225
+
1226
+
1227
+ /**
1228
+ * Serializes the given message to binary data (in protobuf wire
1229
+ * format), writing to the given BinaryWriter.
1230
+ * @param {!proto.trb.indicators.v1.IndicatorInfo} message
1231
+ * @param {!jspb.BinaryWriter} writer
1232
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1233
+ */
1234
+ proto.trb.indicators.v1.IndicatorInfo.serializeBinaryToWriter = function(message, writer) {
1235
+ var f = undefined;
1236
+ f = message.getType();
1237
+ if (f !== 0.0) {
1238
+ writer.writeEnum(
1239
+ 1,
1240
+ f
1241
+ );
1242
+ }
1243
+ f = message.getName();
1244
+ if (f.length > 0) {
1245
+ writer.writeString(
1246
+ 2,
1247
+ f
1248
+ );
1249
+ }
1250
+ f = message.getMinBars();
1251
+ if (f !== 0) {
1252
+ writer.writeInt32(
1253
+ 3,
1254
+ f
1255
+ );
1256
+ }
1257
+ f = message.getDefaultParamsMap(true);
1258
+ if (f && f.getLength() > 0) {
1259
+ f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeDouble);
1260
+ }
1261
+ };
1262
+
1263
+
1264
+ /**
1265
+ * optional IndicatorType type = 1;
1266
+ * @return {!proto.trb.indicators.v1.IndicatorType}
1267
+ */
1268
+ proto.trb.indicators.v1.IndicatorInfo.prototype.getType = function() {
1269
+ return /** @type {!proto.trb.indicators.v1.IndicatorType} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1270
+ };
1271
+
1272
+
1273
+ /**
1274
+ * @param {!proto.trb.indicators.v1.IndicatorType} value
1275
+ * @return {!proto.trb.indicators.v1.IndicatorInfo} returns this
1276
+ */
1277
+ proto.trb.indicators.v1.IndicatorInfo.prototype.setType = function(value) {
1278
+ return jspb.Message.setProto3EnumField(this, 1, value);
1279
+ };
1280
+
1281
+
1282
+ /**
1283
+ * optional string name = 2;
1284
+ * @return {string}
1285
+ */
1286
+ proto.trb.indicators.v1.IndicatorInfo.prototype.getName = function() {
1287
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1288
+ };
1289
+
1290
+
1291
+ /**
1292
+ * @param {string} value
1293
+ * @return {!proto.trb.indicators.v1.IndicatorInfo} returns this
1294
+ */
1295
+ proto.trb.indicators.v1.IndicatorInfo.prototype.setName = function(value) {
1296
+ return jspb.Message.setProto3StringField(this, 2, value);
1297
+ };
1298
+
1299
+
1300
+ /**
1301
+ * optional int32 min_bars = 3;
1302
+ * @return {number}
1303
+ */
1304
+ proto.trb.indicators.v1.IndicatorInfo.prototype.getMinBars = function() {
1305
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1306
+ };
1307
+
1308
+
1309
+ /**
1310
+ * @param {number} value
1311
+ * @return {!proto.trb.indicators.v1.IndicatorInfo} returns this
1312
+ */
1313
+ proto.trb.indicators.v1.IndicatorInfo.prototype.setMinBars = function(value) {
1314
+ return jspb.Message.setProto3IntField(this, 3, value);
1315
+ };
1316
+
1317
+
1318
+ /**
1319
+ * map<string, double> default_params = 4;
1320
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
1321
+ * empty, instead returning `undefined`
1322
+ * @return {!jspb.Map<string,number>}
1323
+ */
1324
+ proto.trb.indicators.v1.IndicatorInfo.prototype.getDefaultParamsMap = function(opt_noLazyCreate) {
1325
+ return /** @type {!jspb.Map<string,number>} */ (
1326
+ jspb.Message.getMapField(this, 4, opt_noLazyCreate,
1327
+ null));
1328
+ };
1329
+
1330
+
1331
+ /**
1332
+ * Clears values from the map. The map will be non-null.
1333
+ * @return {!proto.trb.indicators.v1.IndicatorInfo} returns this
1334
+ */
1335
+ proto.trb.indicators.v1.IndicatorInfo.prototype.clearDefaultParamsMap = function() {
1336
+ this.getDefaultParamsMap().clear();
1337
+ return this;
1338
+ };
1339
+
1340
+
1341
+
1342
+
1343
+
1344
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1345
+ /**
1346
+ * Creates an object representation of this proto.
1347
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1348
+ * Optional fields that are not set will be set to undefined.
1349
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1350
+ * For the list of reserved names please see:
1351
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1352
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1353
+ * JSPB instance for transitional soy proto support:
1354
+ * http://goto/soy-param-migration
1355
+ * @return {!Object}
1356
+ */
1357
+ proto.trb.indicators.v1.ListSupportedRequest.prototype.toObject = function(opt_includeInstance) {
1358
+ return proto.trb.indicators.v1.ListSupportedRequest.toObject(opt_includeInstance, this);
1359
+ };
1360
+
1361
+
1362
+ /**
1363
+ * Static version of the {@see toObject} method.
1364
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1365
+ * the JSPB instance for transitional soy proto support:
1366
+ * http://goto/soy-param-migration
1367
+ * @param {!proto.trb.indicators.v1.ListSupportedRequest} msg The msg instance to transform.
1368
+ * @return {!Object}
1369
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1370
+ */
1371
+ proto.trb.indicators.v1.ListSupportedRequest.toObject = function(includeInstance, msg) {
1372
+ var f, obj = {
1373
+
1374
+ };
1375
+
1376
+ if (includeInstance) {
1377
+ obj.$jspbMessageInstance = msg;
1378
+ }
1379
+ return obj;
1380
+ };
1381
+ }
1382
+
1383
+
1384
+ /**
1385
+ * Deserializes binary data (in protobuf wire format).
1386
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1387
+ * @return {!proto.trb.indicators.v1.ListSupportedRequest}
1388
+ */
1389
+ proto.trb.indicators.v1.ListSupportedRequest.deserializeBinary = function(bytes) {
1390
+ var reader = new jspb.BinaryReader(bytes);
1391
+ var msg = new proto.trb.indicators.v1.ListSupportedRequest;
1392
+ return proto.trb.indicators.v1.ListSupportedRequest.deserializeBinaryFromReader(msg, reader);
1393
+ };
1394
+
1395
+
1396
+ /**
1397
+ * Deserializes binary data (in protobuf wire format) from the
1398
+ * given reader into the given message object.
1399
+ * @param {!proto.trb.indicators.v1.ListSupportedRequest} msg The message object to deserialize into.
1400
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1401
+ * @return {!proto.trb.indicators.v1.ListSupportedRequest}
1402
+ */
1403
+ proto.trb.indicators.v1.ListSupportedRequest.deserializeBinaryFromReader = function(msg, reader) {
1404
+ while (reader.nextField()) {
1405
+ if (reader.isEndGroup()) {
1406
+ break;
1407
+ }
1408
+ var field = reader.getFieldNumber();
1409
+ switch (field) {
1410
+ default:
1411
+ reader.skipField();
1412
+ break;
1413
+ }
1414
+ }
1415
+ return msg;
1416
+ };
1417
+
1418
+
1419
+ /**
1420
+ * Serializes the message to binary data (in protobuf wire format).
1421
+ * @return {!Uint8Array}
1422
+ */
1423
+ proto.trb.indicators.v1.ListSupportedRequest.prototype.serializeBinary = function() {
1424
+ var writer = new jspb.BinaryWriter();
1425
+ proto.trb.indicators.v1.ListSupportedRequest.serializeBinaryToWriter(this, writer);
1426
+ return writer.getResultBuffer();
1427
+ };
1428
+
1429
+
1430
+ /**
1431
+ * Serializes the given message to binary data (in protobuf wire
1432
+ * format), writing to the given BinaryWriter.
1433
+ * @param {!proto.trb.indicators.v1.ListSupportedRequest} message
1434
+ * @param {!jspb.BinaryWriter} writer
1435
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1436
+ */
1437
+ proto.trb.indicators.v1.ListSupportedRequest.serializeBinaryToWriter = function(message, writer) {
1438
+ var f = undefined;
1439
+ };
1440
+
1441
+
1442
+
1443
+ /**
1444
+ * List of repeated fields within this message type.
1445
+ * @private {!Array<number>}
1446
+ * @const
1447
+ */
1448
+ proto.trb.indicators.v1.ListSupportedResponse.repeatedFields_ = [1];
1449
+
1450
+
1451
+
1452
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1453
+ /**
1454
+ * Creates an object representation of this proto.
1455
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1456
+ * Optional fields that are not set will be set to undefined.
1457
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1458
+ * For the list of reserved names please see:
1459
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1460
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1461
+ * JSPB instance for transitional soy proto support:
1462
+ * http://goto/soy-param-migration
1463
+ * @return {!Object}
1464
+ */
1465
+ proto.trb.indicators.v1.ListSupportedResponse.prototype.toObject = function(opt_includeInstance) {
1466
+ return proto.trb.indicators.v1.ListSupportedResponse.toObject(opt_includeInstance, this);
1467
+ };
1468
+
1469
+
1470
+ /**
1471
+ * Static version of the {@see toObject} method.
1472
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1473
+ * the JSPB instance for transitional soy proto support:
1474
+ * http://goto/soy-param-migration
1475
+ * @param {!proto.trb.indicators.v1.ListSupportedResponse} msg The msg instance to transform.
1476
+ * @return {!Object}
1477
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1478
+ */
1479
+ proto.trb.indicators.v1.ListSupportedResponse.toObject = function(includeInstance, msg) {
1480
+ var f, obj = {
1481
+ indicatorsList: jspb.Message.toObjectList(msg.getIndicatorsList(),
1482
+ proto.trb.indicators.v1.IndicatorInfo.toObject, includeInstance)
1483
+ };
1484
+
1485
+ if (includeInstance) {
1486
+ obj.$jspbMessageInstance = msg;
1487
+ }
1488
+ return obj;
1489
+ };
1490
+ }
1491
+
1492
+
1493
+ /**
1494
+ * Deserializes binary data (in protobuf wire format).
1495
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1496
+ * @return {!proto.trb.indicators.v1.ListSupportedResponse}
1497
+ */
1498
+ proto.trb.indicators.v1.ListSupportedResponse.deserializeBinary = function(bytes) {
1499
+ var reader = new jspb.BinaryReader(bytes);
1500
+ var msg = new proto.trb.indicators.v1.ListSupportedResponse;
1501
+ return proto.trb.indicators.v1.ListSupportedResponse.deserializeBinaryFromReader(msg, reader);
1502
+ };
1503
+
1504
+
1505
+ /**
1506
+ * Deserializes binary data (in protobuf wire format) from the
1507
+ * given reader into the given message object.
1508
+ * @param {!proto.trb.indicators.v1.ListSupportedResponse} msg The message object to deserialize into.
1509
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1510
+ * @return {!proto.trb.indicators.v1.ListSupportedResponse}
1511
+ */
1512
+ proto.trb.indicators.v1.ListSupportedResponse.deserializeBinaryFromReader = function(msg, reader) {
1513
+ while (reader.nextField()) {
1514
+ if (reader.isEndGroup()) {
1515
+ break;
1516
+ }
1517
+ var field = reader.getFieldNumber();
1518
+ switch (field) {
1519
+ case 1:
1520
+ var value = new proto.trb.indicators.v1.IndicatorInfo;
1521
+ reader.readMessage(value,proto.trb.indicators.v1.IndicatorInfo.deserializeBinaryFromReader);
1522
+ msg.addIndicators(value);
1523
+ break;
1524
+ default:
1525
+ reader.skipField();
1526
+ break;
1527
+ }
1528
+ }
1529
+ return msg;
1530
+ };
1531
+
1532
+
1533
+ /**
1534
+ * Serializes the message to binary data (in protobuf wire format).
1535
+ * @return {!Uint8Array}
1536
+ */
1537
+ proto.trb.indicators.v1.ListSupportedResponse.prototype.serializeBinary = function() {
1538
+ var writer = new jspb.BinaryWriter();
1539
+ proto.trb.indicators.v1.ListSupportedResponse.serializeBinaryToWriter(this, writer);
1540
+ return writer.getResultBuffer();
1541
+ };
1542
+
1543
+
1544
+ /**
1545
+ * Serializes the given message to binary data (in protobuf wire
1546
+ * format), writing to the given BinaryWriter.
1547
+ * @param {!proto.trb.indicators.v1.ListSupportedResponse} message
1548
+ * @param {!jspb.BinaryWriter} writer
1549
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1550
+ */
1551
+ proto.trb.indicators.v1.ListSupportedResponse.serializeBinaryToWriter = function(message, writer) {
1552
+ var f = undefined;
1553
+ f = message.getIndicatorsList();
1554
+ if (f.length > 0) {
1555
+ writer.writeRepeatedMessage(
1556
+ 1,
1557
+ f,
1558
+ proto.trb.indicators.v1.IndicatorInfo.serializeBinaryToWriter
1559
+ );
1560
+ }
1561
+ };
1562
+
1563
+
1564
+ /**
1565
+ * repeated IndicatorInfo indicators = 1;
1566
+ * @return {!Array<!proto.trb.indicators.v1.IndicatorInfo>}
1567
+ */
1568
+ proto.trb.indicators.v1.ListSupportedResponse.prototype.getIndicatorsList = function() {
1569
+ return /** @type{!Array<!proto.trb.indicators.v1.IndicatorInfo>} */ (
1570
+ jspb.Message.getRepeatedWrapperField(this, proto.trb.indicators.v1.IndicatorInfo, 1));
1571
+ };
1572
+
1573
+
1574
+ /**
1575
+ * @param {!Array<!proto.trb.indicators.v1.IndicatorInfo>} value
1576
+ * @return {!proto.trb.indicators.v1.ListSupportedResponse} returns this
1577
+ */
1578
+ proto.trb.indicators.v1.ListSupportedResponse.prototype.setIndicatorsList = function(value) {
1579
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1580
+ };
1581
+
1582
+
1583
+ /**
1584
+ * @param {!proto.trb.indicators.v1.IndicatorInfo=} opt_value
1585
+ * @param {number=} opt_index
1586
+ * @return {!proto.trb.indicators.v1.IndicatorInfo}
1587
+ */
1588
+ proto.trb.indicators.v1.ListSupportedResponse.prototype.addIndicators = function(opt_value, opt_index) {
1589
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.trb.indicators.v1.IndicatorInfo, opt_index);
1590
+ };
1591
+
1592
+
1593
+ /**
1594
+ * Clears the list making it empty but non-null.
1595
+ * @return {!proto.trb.indicators.v1.ListSupportedResponse} returns this
1596
+ */
1597
+ proto.trb.indicators.v1.ListSupportedResponse.prototype.clearIndicatorsList = function() {
1598
+ return this.setIndicatorsList([]);
1599
+ };
1600
+
1601
+
1602
+ /**
1603
+ * @enum {number}
1604
+ */
1605
+ proto.trb.indicators.v1.IndicatorType = {
1606
+ INDICATOR_TYPE_UNSPECIFIED: 0,
1607
+ INDICATOR_TYPE_RSI: 1,
1608
+ INDICATOR_TYPE_SMA: 2,
1609
+ INDICATOR_TYPE_EMA: 3,
1610
+ INDICATOR_TYPE_MACD: 4,
1611
+ INDICATOR_TYPE_BB: 5
1612
+ };
1613
+
1614
+ goog.object.extend(exports, proto.trb.indicators.v1);