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