@marleena/trb-proto 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2566 @@
1
+ // source: tinvest/signals.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global =
17
+ (typeof globalThis !== 'undefined' && globalThis) ||
18
+ (typeof window !== 'undefined' && window) ||
19
+ (typeof global !== 'undefined' && global) ||
20
+ (typeof self !== 'undefined' && self) ||
21
+ (function () { return this; }).call(null) ||
22
+ Function('return this')();
23
+
24
+ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
25
+ goog.object.extend(proto, google_protobuf_timestamp_pb);
26
+ var google_api_field_behavior_pb = require('../google/api/field_behavior_pb.js');
27
+ goog.object.extend(proto, google_api_field_behavior_pb);
28
+ var tinvest_common_pb = require('../tinvest/common_pb.js');
29
+ goog.object.extend(proto, tinvest_common_pb);
30
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest', null, global);
31
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse', null, global);
32
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest', null, global);
33
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse', null, global);
34
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.Signal', null, global);
35
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.SignalDirection', null, global);
36
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.SignalState', null, global);
37
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.Strategy', null, global);
38
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.StrategyType', null, global);
39
+ /**
40
+ * Generated by JsPbCodeGenerator.
41
+ * @param {Array=} opt_data Optional initial data array, typically from a
42
+ * server response, or constructed directly in Javascript. The array is used
43
+ * in place and becomes part of the constructed object. It is not cloned.
44
+ * If no data is provided, the constructed object will be empty, but still
45
+ * valid.
46
+ * @extends {jspb.Message}
47
+ * @constructor
48
+ */
49
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest = function(opt_data) {
50
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
51
+ };
52
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest, jspb.Message);
53
+ if (goog.DEBUG && !COMPILED) {
54
+ /**
55
+ * @public
56
+ * @override
57
+ */
58
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest.displayName = 'proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest';
59
+ }
60
+ /**
61
+ * Generated by JsPbCodeGenerator.
62
+ * @param {Array=} opt_data Optional initial data array, typically from a
63
+ * server response, or constructed directly in Javascript. The array is used
64
+ * in place and becomes part of the constructed object. It is not cloned.
65
+ * If no data is provided, the constructed object will be empty, but still
66
+ * valid.
67
+ * @extends {jspb.Message}
68
+ * @constructor
69
+ */
70
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse = function(opt_data) {
71
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse.repeatedFields_, null);
72
+ };
73
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse, jspb.Message);
74
+ if (goog.DEBUG && !COMPILED) {
75
+ /**
76
+ * @public
77
+ * @override
78
+ */
79
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse.displayName = 'proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse';
80
+ }
81
+ /**
82
+ * Generated by JsPbCodeGenerator.
83
+ * @param {Array=} opt_data Optional initial data array, typically from a
84
+ * server response, or constructed directly in Javascript. The array is used
85
+ * in place and becomes part of the constructed object. It is not cloned.
86
+ * If no data is provided, the constructed object will be empty, but still
87
+ * valid.
88
+ * @extends {jspb.Message}
89
+ * @constructor
90
+ */
91
+ proto.tinkoff.public.invest.api.contract.v1.Strategy = function(opt_data) {
92
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
93
+ };
94
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.Strategy, jspb.Message);
95
+ if (goog.DEBUG && !COMPILED) {
96
+ /**
97
+ * @public
98
+ * @override
99
+ */
100
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.displayName = 'proto.tinkoff.public.invest.api.contract.v1.Strategy';
101
+ }
102
+ /**
103
+ * Generated by JsPbCodeGenerator.
104
+ * @param {Array=} opt_data Optional initial data array, typically from a
105
+ * server response, or constructed directly in Javascript. The array is used
106
+ * in place and becomes part of the constructed object. It is not cloned.
107
+ * If no data is provided, the constructed object will be empty, but still
108
+ * valid.
109
+ * @extends {jspb.Message}
110
+ * @constructor
111
+ */
112
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest = function(opt_data) {
113
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
114
+ };
115
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest, jspb.Message);
116
+ if (goog.DEBUG && !COMPILED) {
117
+ /**
118
+ * @public
119
+ * @override
120
+ */
121
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.displayName = 'proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest';
122
+ }
123
+ /**
124
+ * Generated by JsPbCodeGenerator.
125
+ * @param {Array=} opt_data Optional initial data array, typically from a
126
+ * server response, or constructed directly in Javascript. The array is used
127
+ * in place and becomes part of the constructed object. It is not cloned.
128
+ * If no data is provided, the constructed object will be empty, but still
129
+ * valid.
130
+ * @extends {jspb.Message}
131
+ * @constructor
132
+ */
133
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse = function(opt_data) {
134
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.repeatedFields_, null);
135
+ };
136
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse, jspb.Message);
137
+ if (goog.DEBUG && !COMPILED) {
138
+ /**
139
+ * @public
140
+ * @override
141
+ */
142
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.displayName = 'proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse';
143
+ }
144
+ /**
145
+ * Generated by JsPbCodeGenerator.
146
+ * @param {Array=} opt_data Optional initial data array, typically from a
147
+ * server response, or constructed directly in Javascript. The array is used
148
+ * in place and becomes part of the constructed object. It is not cloned.
149
+ * If no data is provided, the constructed object will be empty, but still
150
+ * valid.
151
+ * @extends {jspb.Message}
152
+ * @constructor
153
+ */
154
+ proto.tinkoff.public.invest.api.contract.v1.Signal = function(opt_data) {
155
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
156
+ };
157
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.Signal, jspb.Message);
158
+ if (goog.DEBUG && !COMPILED) {
159
+ /**
160
+ * @public
161
+ * @override
162
+ */
163
+ proto.tinkoff.public.invest.api.contract.v1.Signal.displayName = 'proto.tinkoff.public.invest.api.contract.v1.Signal';
164
+ }
165
+
166
+
167
+
168
+ if (jspb.Message.GENERATE_TO_OBJECT) {
169
+ /**
170
+ * Creates an object representation of this proto.
171
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
172
+ * Optional fields that are not set will be set to undefined.
173
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
174
+ * For the list of reserved names please see:
175
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
176
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
177
+ * JSPB instance for transitional soy proto support:
178
+ * http://goto/soy-param-migration
179
+ * @return {!Object}
180
+ */
181
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest.prototype.toObject = function(opt_includeInstance) {
182
+ return proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest.toObject(opt_includeInstance, this);
183
+ };
184
+
185
+
186
+ /**
187
+ * Static version of the {@see toObject} method.
188
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
189
+ * the JSPB instance for transitional soy proto support:
190
+ * http://goto/soy-param-migration
191
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest} msg The msg instance to transform.
192
+ * @return {!Object}
193
+ * @suppress {unusedLocalVariables} f is only used for nested messages
194
+ */
195
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest.toObject = function(includeInstance, msg) {
196
+ var f, obj = {
197
+ strategyId: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f
198
+ };
199
+
200
+ if (includeInstance) {
201
+ obj.$jspbMessageInstance = msg;
202
+ }
203
+ return obj;
204
+ };
205
+ }
206
+
207
+
208
+ /**
209
+ * Deserializes binary data (in protobuf wire format).
210
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
211
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest}
212
+ */
213
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest.deserializeBinary = function(bytes) {
214
+ var reader = new jspb.BinaryReader(bytes);
215
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest;
216
+ return proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest.deserializeBinaryFromReader(msg, reader);
217
+ };
218
+
219
+
220
+ /**
221
+ * Deserializes binary data (in protobuf wire format) from the
222
+ * given reader into the given message object.
223
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest} msg The message object to deserialize into.
224
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
225
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest}
226
+ */
227
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest.deserializeBinaryFromReader = function(msg, reader) {
228
+ while (reader.nextField()) {
229
+ if (reader.isEndGroup()) {
230
+ break;
231
+ }
232
+ var field = reader.getFieldNumber();
233
+ switch (field) {
234
+ case 1:
235
+ var value = /** @type {string} */ (reader.readString());
236
+ msg.setStrategyId(value);
237
+ break;
238
+ default:
239
+ reader.skipField();
240
+ break;
241
+ }
242
+ }
243
+ return msg;
244
+ };
245
+
246
+
247
+ /**
248
+ * Serializes the message to binary data (in protobuf wire format).
249
+ * @return {!Uint8Array}
250
+ */
251
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest.prototype.serializeBinary = function() {
252
+ var writer = new jspb.BinaryWriter();
253
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest.serializeBinaryToWriter(this, writer);
254
+ return writer.getResultBuffer();
255
+ };
256
+
257
+
258
+ /**
259
+ * Serializes the given message to binary data (in protobuf wire
260
+ * format), writing to the given BinaryWriter.
261
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest} message
262
+ * @param {!jspb.BinaryWriter} writer
263
+ * @suppress {unusedLocalVariables} f is only used for nested messages
264
+ */
265
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest.serializeBinaryToWriter = function(message, writer) {
266
+ var f = undefined;
267
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
268
+ if (f != null) {
269
+ writer.writeString(
270
+ 1,
271
+ f
272
+ );
273
+ }
274
+ };
275
+
276
+
277
+ /**
278
+ * optional string strategy_id = 1;
279
+ * @return {string}
280
+ */
281
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest.prototype.getStrategyId = function() {
282
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
283
+ };
284
+
285
+
286
+ /**
287
+ * @param {string} value
288
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest} returns this
289
+ */
290
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest.prototype.setStrategyId = function(value) {
291
+ return jspb.Message.setField(this, 1, value);
292
+ };
293
+
294
+
295
+ /**
296
+ * Clears the field making it undefined.
297
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest} returns this
298
+ */
299
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest.prototype.clearStrategyId = function() {
300
+ return jspb.Message.setField(this, 1, undefined);
301
+ };
302
+
303
+
304
+ /**
305
+ * Returns whether this field is set.
306
+ * @return {boolean}
307
+ */
308
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesRequest.prototype.hasStrategyId = function() {
309
+ return jspb.Message.getField(this, 1) != null;
310
+ };
311
+
312
+
313
+
314
+ /**
315
+ * List of repeated fields within this message type.
316
+ * @private {!Array<number>}
317
+ * @const
318
+ */
319
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse.repeatedFields_ = [1];
320
+
321
+
322
+
323
+ if (jspb.Message.GENERATE_TO_OBJECT) {
324
+ /**
325
+ * Creates an object representation of this proto.
326
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
327
+ * Optional fields that are not set will be set to undefined.
328
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
329
+ * For the list of reserved names please see:
330
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
331
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
332
+ * JSPB instance for transitional soy proto support:
333
+ * http://goto/soy-param-migration
334
+ * @return {!Object}
335
+ */
336
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse.prototype.toObject = function(opt_includeInstance) {
337
+ return proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse.toObject(opt_includeInstance, this);
338
+ };
339
+
340
+
341
+ /**
342
+ * Static version of the {@see toObject} method.
343
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
344
+ * the JSPB instance for transitional soy proto support:
345
+ * http://goto/soy-param-migration
346
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse} msg The msg instance to transform.
347
+ * @return {!Object}
348
+ * @suppress {unusedLocalVariables} f is only used for nested messages
349
+ */
350
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse.toObject = function(includeInstance, msg) {
351
+ var f, obj = {
352
+ strategiesList: jspb.Message.toObjectList(msg.getStrategiesList(),
353
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.toObject, includeInstance)
354
+ };
355
+
356
+ if (includeInstance) {
357
+ obj.$jspbMessageInstance = msg;
358
+ }
359
+ return obj;
360
+ };
361
+ }
362
+
363
+
364
+ /**
365
+ * Deserializes binary data (in protobuf wire format).
366
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
367
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse}
368
+ */
369
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse.deserializeBinary = function(bytes) {
370
+ var reader = new jspb.BinaryReader(bytes);
371
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse;
372
+ return proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse.deserializeBinaryFromReader(msg, reader);
373
+ };
374
+
375
+
376
+ /**
377
+ * Deserializes binary data (in protobuf wire format) from the
378
+ * given reader into the given message object.
379
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse} msg The message object to deserialize into.
380
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
381
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse}
382
+ */
383
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse.deserializeBinaryFromReader = function(msg, reader) {
384
+ while (reader.nextField()) {
385
+ if (reader.isEndGroup()) {
386
+ break;
387
+ }
388
+ var field = reader.getFieldNumber();
389
+ switch (field) {
390
+ case 1:
391
+ var value = new proto.tinkoff.public.invest.api.contract.v1.Strategy;
392
+ reader.readMessage(value,proto.tinkoff.public.invest.api.contract.v1.Strategy.deserializeBinaryFromReader);
393
+ msg.addStrategies(value);
394
+ break;
395
+ default:
396
+ reader.skipField();
397
+ break;
398
+ }
399
+ }
400
+ return msg;
401
+ };
402
+
403
+
404
+ /**
405
+ * Serializes the message to binary data (in protobuf wire format).
406
+ * @return {!Uint8Array}
407
+ */
408
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse.prototype.serializeBinary = function() {
409
+ var writer = new jspb.BinaryWriter();
410
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse.serializeBinaryToWriter(this, writer);
411
+ return writer.getResultBuffer();
412
+ };
413
+
414
+
415
+ /**
416
+ * Serializes the given message to binary data (in protobuf wire
417
+ * format), writing to the given BinaryWriter.
418
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse} message
419
+ * @param {!jspb.BinaryWriter} writer
420
+ * @suppress {unusedLocalVariables} f is only used for nested messages
421
+ */
422
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse.serializeBinaryToWriter = function(message, writer) {
423
+ var f = undefined;
424
+ f = message.getStrategiesList();
425
+ if (f.length > 0) {
426
+ writer.writeRepeatedMessage(
427
+ 1,
428
+ f,
429
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.serializeBinaryToWriter
430
+ );
431
+ }
432
+ };
433
+
434
+
435
+ /**
436
+ * repeated Strategy strategies = 1;
437
+ * @return {!Array<!proto.tinkoff.public.invest.api.contract.v1.Strategy>}
438
+ */
439
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse.prototype.getStrategiesList = function() {
440
+ return /** @type{!Array<!proto.tinkoff.public.invest.api.contract.v1.Strategy>} */ (
441
+ jspb.Message.getRepeatedWrapperField(this, proto.tinkoff.public.invest.api.contract.v1.Strategy, 1));
442
+ };
443
+
444
+
445
+ /**
446
+ * @param {!Array<!proto.tinkoff.public.invest.api.contract.v1.Strategy>} value
447
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse} returns this
448
+ */
449
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse.prototype.setStrategiesList = function(value) {
450
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
451
+ };
452
+
453
+
454
+ /**
455
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.Strategy=} opt_value
456
+ * @param {number=} opt_index
457
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy}
458
+ */
459
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse.prototype.addStrategies = function(opt_value, opt_index) {
460
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tinkoff.public.invest.api.contract.v1.Strategy, opt_index);
461
+ };
462
+
463
+
464
+ /**
465
+ * Clears the list making it empty but non-null.
466
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse} returns this
467
+ */
468
+ proto.tinkoff.public.invest.api.contract.v1.GetStrategiesResponse.prototype.clearStrategiesList = function() {
469
+ return this.setStrategiesList([]);
470
+ };
471
+
472
+
473
+
474
+
475
+
476
+ if (jspb.Message.GENERATE_TO_OBJECT) {
477
+ /**
478
+ * Creates an object representation of this proto.
479
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
480
+ * Optional fields that are not set will be set to undefined.
481
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
482
+ * For the list of reserved names please see:
483
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
484
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
485
+ * JSPB instance for transitional soy proto support:
486
+ * http://goto/soy-param-migration
487
+ * @return {!Object}
488
+ */
489
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.toObject = function(opt_includeInstance) {
490
+ return proto.tinkoff.public.invest.api.contract.v1.Strategy.toObject(opt_includeInstance, this);
491
+ };
492
+
493
+
494
+ /**
495
+ * Static version of the {@see toObject} method.
496
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
497
+ * the JSPB instance for transitional soy proto support:
498
+ * http://goto/soy-param-migration
499
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.Strategy} msg The msg instance to transform.
500
+ * @return {!Object}
501
+ * @suppress {unusedLocalVariables} f is only used for nested messages
502
+ */
503
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.toObject = function(includeInstance, msg) {
504
+ var f, obj = {
505
+ strategyId: jspb.Message.getFieldWithDefault(msg, 1, ""),
506
+ strategyName: jspb.Message.getFieldWithDefault(msg, 2, ""),
507
+ strategyDescription: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
508
+ strategyUrl: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f,
509
+ strategyType: jspb.Message.getFieldWithDefault(msg, 5, 0),
510
+ activeSignals: jspb.Message.getFieldWithDefault(msg, 6, 0),
511
+ totalSignals: jspb.Message.getFieldWithDefault(msg, 7, 0),
512
+ timeInPosition: jspb.Message.getFieldWithDefault(msg, 8, 0),
513
+ averageSignalYield: (f = msg.getAverageSignalYield()) && tinvest_common_pb.Quotation.toObject(includeInstance, f),
514
+ averageSignalYieldYear: (f = msg.getAverageSignalYieldYear()) && tinvest_common_pb.Quotation.toObject(includeInstance, f),
515
+ yield: (f = msg.getYield()) && tinvest_common_pb.Quotation.toObject(includeInstance, f),
516
+ yieldYear: (f = msg.getYieldYear()) && tinvest_common_pb.Quotation.toObject(includeInstance, f)
517
+ };
518
+
519
+ if (includeInstance) {
520
+ obj.$jspbMessageInstance = msg;
521
+ }
522
+ return obj;
523
+ };
524
+ }
525
+
526
+
527
+ /**
528
+ * Deserializes binary data (in protobuf wire format).
529
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
530
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy}
531
+ */
532
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.deserializeBinary = function(bytes) {
533
+ var reader = new jspb.BinaryReader(bytes);
534
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.Strategy;
535
+ return proto.tinkoff.public.invest.api.contract.v1.Strategy.deserializeBinaryFromReader(msg, reader);
536
+ };
537
+
538
+
539
+ /**
540
+ * Deserializes binary data (in protobuf wire format) from the
541
+ * given reader into the given message object.
542
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.Strategy} msg The message object to deserialize into.
543
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
544
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy}
545
+ */
546
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.deserializeBinaryFromReader = function(msg, reader) {
547
+ while (reader.nextField()) {
548
+ if (reader.isEndGroup()) {
549
+ break;
550
+ }
551
+ var field = reader.getFieldNumber();
552
+ switch (field) {
553
+ case 1:
554
+ var value = /** @type {string} */ (reader.readString());
555
+ msg.setStrategyId(value);
556
+ break;
557
+ case 2:
558
+ var value = /** @type {string} */ (reader.readString());
559
+ msg.setStrategyName(value);
560
+ break;
561
+ case 3:
562
+ var value = /** @type {string} */ (reader.readString());
563
+ msg.setStrategyDescription(value);
564
+ break;
565
+ case 4:
566
+ var value = /** @type {string} */ (reader.readString());
567
+ msg.setStrategyUrl(value);
568
+ break;
569
+ case 5:
570
+ var value = /** @type {!proto.tinkoff.public.invest.api.contract.v1.StrategyType} */ (reader.readEnum());
571
+ msg.setStrategyType(value);
572
+ break;
573
+ case 6:
574
+ var value = /** @type {number} */ (reader.readInt32());
575
+ msg.setActiveSignals(value);
576
+ break;
577
+ case 7:
578
+ var value = /** @type {number} */ (reader.readInt32());
579
+ msg.setTotalSignals(value);
580
+ break;
581
+ case 8:
582
+ var value = /** @type {number} */ (reader.readInt64());
583
+ msg.setTimeInPosition(value);
584
+ break;
585
+ case 9:
586
+ var value = new tinvest_common_pb.Quotation;
587
+ reader.readMessage(value,tinvest_common_pb.Quotation.deserializeBinaryFromReader);
588
+ msg.setAverageSignalYield(value);
589
+ break;
590
+ case 10:
591
+ var value = new tinvest_common_pb.Quotation;
592
+ reader.readMessage(value,tinvest_common_pb.Quotation.deserializeBinaryFromReader);
593
+ msg.setAverageSignalYieldYear(value);
594
+ break;
595
+ case 11:
596
+ var value = new tinvest_common_pb.Quotation;
597
+ reader.readMessage(value,tinvest_common_pb.Quotation.deserializeBinaryFromReader);
598
+ msg.setYield(value);
599
+ break;
600
+ case 12:
601
+ var value = new tinvest_common_pb.Quotation;
602
+ reader.readMessage(value,tinvest_common_pb.Quotation.deserializeBinaryFromReader);
603
+ msg.setYieldYear(value);
604
+ break;
605
+ default:
606
+ reader.skipField();
607
+ break;
608
+ }
609
+ }
610
+ return msg;
611
+ };
612
+
613
+
614
+ /**
615
+ * Serializes the message to binary data (in protobuf wire format).
616
+ * @return {!Uint8Array}
617
+ */
618
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.serializeBinary = function() {
619
+ var writer = new jspb.BinaryWriter();
620
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.serializeBinaryToWriter(this, writer);
621
+ return writer.getResultBuffer();
622
+ };
623
+
624
+
625
+ /**
626
+ * Serializes the given message to binary data (in protobuf wire
627
+ * format), writing to the given BinaryWriter.
628
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.Strategy} message
629
+ * @param {!jspb.BinaryWriter} writer
630
+ * @suppress {unusedLocalVariables} f is only used for nested messages
631
+ */
632
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.serializeBinaryToWriter = function(message, writer) {
633
+ var f = undefined;
634
+ f = message.getStrategyId();
635
+ if (f.length > 0) {
636
+ writer.writeString(
637
+ 1,
638
+ f
639
+ );
640
+ }
641
+ f = message.getStrategyName();
642
+ if (f.length > 0) {
643
+ writer.writeString(
644
+ 2,
645
+ f
646
+ );
647
+ }
648
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
649
+ if (f != null) {
650
+ writer.writeString(
651
+ 3,
652
+ f
653
+ );
654
+ }
655
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
656
+ if (f != null) {
657
+ writer.writeString(
658
+ 4,
659
+ f
660
+ );
661
+ }
662
+ f = message.getStrategyType();
663
+ if (f !== 0.0) {
664
+ writer.writeEnum(
665
+ 5,
666
+ f
667
+ );
668
+ }
669
+ f = message.getActiveSignals();
670
+ if (f !== 0) {
671
+ writer.writeInt32(
672
+ 6,
673
+ f
674
+ );
675
+ }
676
+ f = message.getTotalSignals();
677
+ if (f !== 0) {
678
+ writer.writeInt32(
679
+ 7,
680
+ f
681
+ );
682
+ }
683
+ f = message.getTimeInPosition();
684
+ if (f !== 0) {
685
+ writer.writeInt64(
686
+ 8,
687
+ f
688
+ );
689
+ }
690
+ f = message.getAverageSignalYield();
691
+ if (f != null) {
692
+ writer.writeMessage(
693
+ 9,
694
+ f,
695
+ tinvest_common_pb.Quotation.serializeBinaryToWriter
696
+ );
697
+ }
698
+ f = message.getAverageSignalYieldYear();
699
+ if (f != null) {
700
+ writer.writeMessage(
701
+ 10,
702
+ f,
703
+ tinvest_common_pb.Quotation.serializeBinaryToWriter
704
+ );
705
+ }
706
+ f = message.getYield();
707
+ if (f != null) {
708
+ writer.writeMessage(
709
+ 11,
710
+ f,
711
+ tinvest_common_pb.Quotation.serializeBinaryToWriter
712
+ );
713
+ }
714
+ f = message.getYieldYear();
715
+ if (f != null) {
716
+ writer.writeMessage(
717
+ 12,
718
+ f,
719
+ tinvest_common_pb.Quotation.serializeBinaryToWriter
720
+ );
721
+ }
722
+ };
723
+
724
+
725
+ /**
726
+ * optional string strategy_id = 1;
727
+ * @return {string}
728
+ */
729
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.getStrategyId = function() {
730
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
731
+ };
732
+
733
+
734
+ /**
735
+ * @param {string} value
736
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
737
+ */
738
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.setStrategyId = function(value) {
739
+ return jspb.Message.setProto3StringField(this, 1, value);
740
+ };
741
+
742
+
743
+ /**
744
+ * optional string strategy_name = 2;
745
+ * @return {string}
746
+ */
747
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.getStrategyName = function() {
748
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
749
+ };
750
+
751
+
752
+ /**
753
+ * @param {string} value
754
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
755
+ */
756
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.setStrategyName = function(value) {
757
+ return jspb.Message.setProto3StringField(this, 2, value);
758
+ };
759
+
760
+
761
+ /**
762
+ * optional string strategy_description = 3;
763
+ * @return {string}
764
+ */
765
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.getStrategyDescription = function() {
766
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
767
+ };
768
+
769
+
770
+ /**
771
+ * @param {string} value
772
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
773
+ */
774
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.setStrategyDescription = function(value) {
775
+ return jspb.Message.setField(this, 3, value);
776
+ };
777
+
778
+
779
+ /**
780
+ * Clears the field making it undefined.
781
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
782
+ */
783
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.clearStrategyDescription = function() {
784
+ return jspb.Message.setField(this, 3, undefined);
785
+ };
786
+
787
+
788
+ /**
789
+ * Returns whether this field is set.
790
+ * @return {boolean}
791
+ */
792
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.hasStrategyDescription = function() {
793
+ return jspb.Message.getField(this, 3) != null;
794
+ };
795
+
796
+
797
+ /**
798
+ * optional string strategy_url = 4;
799
+ * @return {string}
800
+ */
801
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.getStrategyUrl = function() {
802
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
803
+ };
804
+
805
+
806
+ /**
807
+ * @param {string} value
808
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
809
+ */
810
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.setStrategyUrl = function(value) {
811
+ return jspb.Message.setField(this, 4, value);
812
+ };
813
+
814
+
815
+ /**
816
+ * Clears the field making it undefined.
817
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
818
+ */
819
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.clearStrategyUrl = function() {
820
+ return jspb.Message.setField(this, 4, undefined);
821
+ };
822
+
823
+
824
+ /**
825
+ * Returns whether this field is set.
826
+ * @return {boolean}
827
+ */
828
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.hasStrategyUrl = function() {
829
+ return jspb.Message.getField(this, 4) != null;
830
+ };
831
+
832
+
833
+ /**
834
+ * optional StrategyType strategy_type = 5;
835
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.StrategyType}
836
+ */
837
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.getStrategyType = function() {
838
+ return /** @type {!proto.tinkoff.public.invest.api.contract.v1.StrategyType} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
839
+ };
840
+
841
+
842
+ /**
843
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.StrategyType} value
844
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
845
+ */
846
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.setStrategyType = function(value) {
847
+ return jspb.Message.setProto3EnumField(this, 5, value);
848
+ };
849
+
850
+
851
+ /**
852
+ * optional int32 active_signals = 6;
853
+ * @return {number}
854
+ */
855
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.getActiveSignals = function() {
856
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
857
+ };
858
+
859
+
860
+ /**
861
+ * @param {number} value
862
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
863
+ */
864
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.setActiveSignals = function(value) {
865
+ return jspb.Message.setProto3IntField(this, 6, value);
866
+ };
867
+
868
+
869
+ /**
870
+ * optional int32 total_signals = 7;
871
+ * @return {number}
872
+ */
873
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.getTotalSignals = function() {
874
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
875
+ };
876
+
877
+
878
+ /**
879
+ * @param {number} value
880
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
881
+ */
882
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.setTotalSignals = function(value) {
883
+ return jspb.Message.setProto3IntField(this, 7, value);
884
+ };
885
+
886
+
887
+ /**
888
+ * optional int64 time_in_position = 8;
889
+ * @return {number}
890
+ */
891
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.getTimeInPosition = function() {
892
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
893
+ };
894
+
895
+
896
+ /**
897
+ * @param {number} value
898
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
899
+ */
900
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.setTimeInPosition = function(value) {
901
+ return jspb.Message.setProto3IntField(this, 8, value);
902
+ };
903
+
904
+
905
+ /**
906
+ * optional Quotation average_signal_yield = 9;
907
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.Quotation}
908
+ */
909
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.getAverageSignalYield = function() {
910
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.Quotation} */ (
911
+ jspb.Message.getWrapperField(this, tinvest_common_pb.Quotation, 9));
912
+ };
913
+
914
+
915
+ /**
916
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.Quotation|undefined} value
917
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
918
+ */
919
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.setAverageSignalYield = function(value) {
920
+ return jspb.Message.setWrapperField(this, 9, value);
921
+ };
922
+
923
+
924
+ /**
925
+ * Clears the message field making it undefined.
926
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
927
+ */
928
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.clearAverageSignalYield = function() {
929
+ return this.setAverageSignalYield(undefined);
930
+ };
931
+
932
+
933
+ /**
934
+ * Returns whether this field is set.
935
+ * @return {boolean}
936
+ */
937
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.hasAverageSignalYield = function() {
938
+ return jspb.Message.getField(this, 9) != null;
939
+ };
940
+
941
+
942
+ /**
943
+ * optional Quotation average_signal_yield_year = 10;
944
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.Quotation}
945
+ */
946
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.getAverageSignalYieldYear = function() {
947
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.Quotation} */ (
948
+ jspb.Message.getWrapperField(this, tinvest_common_pb.Quotation, 10));
949
+ };
950
+
951
+
952
+ /**
953
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.Quotation|undefined} value
954
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
955
+ */
956
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.setAverageSignalYieldYear = function(value) {
957
+ return jspb.Message.setWrapperField(this, 10, value);
958
+ };
959
+
960
+
961
+ /**
962
+ * Clears the message field making it undefined.
963
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
964
+ */
965
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.clearAverageSignalYieldYear = function() {
966
+ return this.setAverageSignalYieldYear(undefined);
967
+ };
968
+
969
+
970
+ /**
971
+ * Returns whether this field is set.
972
+ * @return {boolean}
973
+ */
974
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.hasAverageSignalYieldYear = function() {
975
+ return jspb.Message.getField(this, 10) != null;
976
+ };
977
+
978
+
979
+ /**
980
+ * optional Quotation yield = 11;
981
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.Quotation}
982
+ */
983
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.getYield = function() {
984
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.Quotation} */ (
985
+ jspb.Message.getWrapperField(this, tinvest_common_pb.Quotation, 11));
986
+ };
987
+
988
+
989
+ /**
990
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.Quotation|undefined} value
991
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
992
+ */
993
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.setYield = function(value) {
994
+ return jspb.Message.setWrapperField(this, 11, value);
995
+ };
996
+
997
+
998
+ /**
999
+ * Clears the message field making it undefined.
1000
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
1001
+ */
1002
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.clearYield = function() {
1003
+ return this.setYield(undefined);
1004
+ };
1005
+
1006
+
1007
+ /**
1008
+ * Returns whether this field is set.
1009
+ * @return {boolean}
1010
+ */
1011
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.hasYield = function() {
1012
+ return jspb.Message.getField(this, 11) != null;
1013
+ };
1014
+
1015
+
1016
+ /**
1017
+ * optional Quotation yield_year = 12;
1018
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.Quotation}
1019
+ */
1020
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.getYieldYear = function() {
1021
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.Quotation} */ (
1022
+ jspb.Message.getWrapperField(this, tinvest_common_pb.Quotation, 12));
1023
+ };
1024
+
1025
+
1026
+ /**
1027
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.Quotation|undefined} value
1028
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
1029
+ */
1030
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.setYieldYear = function(value) {
1031
+ return jspb.Message.setWrapperField(this, 12, value);
1032
+ };
1033
+
1034
+
1035
+ /**
1036
+ * Clears the message field making it undefined.
1037
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Strategy} returns this
1038
+ */
1039
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.clearYieldYear = function() {
1040
+ return this.setYieldYear(undefined);
1041
+ };
1042
+
1043
+
1044
+ /**
1045
+ * Returns whether this field is set.
1046
+ * @return {boolean}
1047
+ */
1048
+ proto.tinkoff.public.invest.api.contract.v1.Strategy.prototype.hasYieldYear = function() {
1049
+ return jspb.Message.getField(this, 12) != null;
1050
+ };
1051
+
1052
+
1053
+
1054
+
1055
+
1056
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1057
+ /**
1058
+ * Creates an object representation of this proto.
1059
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1060
+ * Optional fields that are not set will be set to undefined.
1061
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1062
+ * For the list of reserved names please see:
1063
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1064
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1065
+ * JSPB instance for transitional soy proto support:
1066
+ * http://goto/soy-param-migration
1067
+ * @return {!Object}
1068
+ */
1069
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.toObject = function(opt_includeInstance) {
1070
+ return proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.toObject(opt_includeInstance, this);
1071
+ };
1072
+
1073
+
1074
+ /**
1075
+ * Static version of the {@see toObject} method.
1076
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1077
+ * the JSPB instance for transitional soy proto support:
1078
+ * http://goto/soy-param-migration
1079
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} msg The msg instance to transform.
1080
+ * @return {!Object}
1081
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1082
+ */
1083
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.toObject = function(includeInstance, msg) {
1084
+ var f, obj = {
1085
+ signalId: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f,
1086
+ strategyId: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
1087
+ strategyType: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
1088
+ instrumentUid: (f = jspb.Message.getField(msg, 4)) == null ? undefined : f,
1089
+ from: (f = msg.getFrom()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
1090
+ to: (f = msg.getTo()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
1091
+ direction: (f = jspb.Message.getField(msg, 7)) == null ? undefined : f,
1092
+ active: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f,
1093
+ paging: (f = msg.getPaging()) && tinvest_common_pb.Page.toObject(includeInstance, f)
1094
+ };
1095
+
1096
+ if (includeInstance) {
1097
+ obj.$jspbMessageInstance = msg;
1098
+ }
1099
+ return obj;
1100
+ };
1101
+ }
1102
+
1103
+
1104
+ /**
1105
+ * Deserializes binary data (in protobuf wire format).
1106
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1107
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest}
1108
+ */
1109
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.deserializeBinary = function(bytes) {
1110
+ var reader = new jspb.BinaryReader(bytes);
1111
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest;
1112
+ return proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.deserializeBinaryFromReader(msg, reader);
1113
+ };
1114
+
1115
+
1116
+ /**
1117
+ * Deserializes binary data (in protobuf wire format) from the
1118
+ * given reader into the given message object.
1119
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} msg The message object to deserialize into.
1120
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1121
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest}
1122
+ */
1123
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.deserializeBinaryFromReader = function(msg, reader) {
1124
+ while (reader.nextField()) {
1125
+ if (reader.isEndGroup()) {
1126
+ break;
1127
+ }
1128
+ var field = reader.getFieldNumber();
1129
+ switch (field) {
1130
+ case 1:
1131
+ var value = /** @type {string} */ (reader.readString());
1132
+ msg.setSignalId(value);
1133
+ break;
1134
+ case 2:
1135
+ var value = /** @type {string} */ (reader.readString());
1136
+ msg.setStrategyId(value);
1137
+ break;
1138
+ case 3:
1139
+ var value = /** @type {!proto.tinkoff.public.invest.api.contract.v1.StrategyType} */ (reader.readEnum());
1140
+ msg.setStrategyType(value);
1141
+ break;
1142
+ case 4:
1143
+ var value = /** @type {string} */ (reader.readString());
1144
+ msg.setInstrumentUid(value);
1145
+ break;
1146
+ case 5:
1147
+ var value = new google_protobuf_timestamp_pb.Timestamp;
1148
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1149
+ msg.setFrom(value);
1150
+ break;
1151
+ case 6:
1152
+ var value = new google_protobuf_timestamp_pb.Timestamp;
1153
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1154
+ msg.setTo(value);
1155
+ break;
1156
+ case 7:
1157
+ var value = /** @type {!proto.tinkoff.public.invest.api.contract.v1.SignalDirection} */ (reader.readEnum());
1158
+ msg.setDirection(value);
1159
+ break;
1160
+ case 8:
1161
+ var value = /** @type {!proto.tinkoff.public.invest.api.contract.v1.SignalState} */ (reader.readEnum());
1162
+ msg.setActive(value);
1163
+ break;
1164
+ case 9:
1165
+ var value = new tinvest_common_pb.Page;
1166
+ reader.readMessage(value,tinvest_common_pb.Page.deserializeBinaryFromReader);
1167
+ msg.setPaging(value);
1168
+ break;
1169
+ default:
1170
+ reader.skipField();
1171
+ break;
1172
+ }
1173
+ }
1174
+ return msg;
1175
+ };
1176
+
1177
+
1178
+ /**
1179
+ * Serializes the message to binary data (in protobuf wire format).
1180
+ * @return {!Uint8Array}
1181
+ */
1182
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.serializeBinary = function() {
1183
+ var writer = new jspb.BinaryWriter();
1184
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.serializeBinaryToWriter(this, writer);
1185
+ return writer.getResultBuffer();
1186
+ };
1187
+
1188
+
1189
+ /**
1190
+ * Serializes the given message to binary data (in protobuf wire
1191
+ * format), writing to the given BinaryWriter.
1192
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} message
1193
+ * @param {!jspb.BinaryWriter} writer
1194
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1195
+ */
1196
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.serializeBinaryToWriter = function(message, writer) {
1197
+ var f = undefined;
1198
+ f = /** @type {string} */ (jspb.Message.getField(message, 1));
1199
+ if (f != null) {
1200
+ writer.writeString(
1201
+ 1,
1202
+ f
1203
+ );
1204
+ }
1205
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1206
+ if (f != null) {
1207
+ writer.writeString(
1208
+ 2,
1209
+ f
1210
+ );
1211
+ }
1212
+ f = /** @type {!proto.tinkoff.public.invest.api.contract.v1.StrategyType} */ (jspb.Message.getField(message, 3));
1213
+ if (f != null) {
1214
+ writer.writeEnum(
1215
+ 3,
1216
+ f
1217
+ );
1218
+ }
1219
+ f = /** @type {string} */ (jspb.Message.getField(message, 4));
1220
+ if (f != null) {
1221
+ writer.writeString(
1222
+ 4,
1223
+ f
1224
+ );
1225
+ }
1226
+ f = message.getFrom();
1227
+ if (f != null) {
1228
+ writer.writeMessage(
1229
+ 5,
1230
+ f,
1231
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1232
+ );
1233
+ }
1234
+ f = message.getTo();
1235
+ if (f != null) {
1236
+ writer.writeMessage(
1237
+ 6,
1238
+ f,
1239
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1240
+ );
1241
+ }
1242
+ f = /** @type {!proto.tinkoff.public.invest.api.contract.v1.SignalDirection} */ (jspb.Message.getField(message, 7));
1243
+ if (f != null) {
1244
+ writer.writeEnum(
1245
+ 7,
1246
+ f
1247
+ );
1248
+ }
1249
+ f = /** @type {!proto.tinkoff.public.invest.api.contract.v1.SignalState} */ (jspb.Message.getField(message, 8));
1250
+ if (f != null) {
1251
+ writer.writeEnum(
1252
+ 8,
1253
+ f
1254
+ );
1255
+ }
1256
+ f = message.getPaging();
1257
+ if (f != null) {
1258
+ writer.writeMessage(
1259
+ 9,
1260
+ f,
1261
+ tinvest_common_pb.Page.serializeBinaryToWriter
1262
+ );
1263
+ }
1264
+ };
1265
+
1266
+
1267
+ /**
1268
+ * optional string signal_id = 1;
1269
+ * @return {string}
1270
+ */
1271
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.getSignalId = function() {
1272
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1273
+ };
1274
+
1275
+
1276
+ /**
1277
+ * @param {string} value
1278
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1279
+ */
1280
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.setSignalId = function(value) {
1281
+ return jspb.Message.setField(this, 1, value);
1282
+ };
1283
+
1284
+
1285
+ /**
1286
+ * Clears the field making it undefined.
1287
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1288
+ */
1289
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.clearSignalId = function() {
1290
+ return jspb.Message.setField(this, 1, undefined);
1291
+ };
1292
+
1293
+
1294
+ /**
1295
+ * Returns whether this field is set.
1296
+ * @return {boolean}
1297
+ */
1298
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.hasSignalId = function() {
1299
+ return jspb.Message.getField(this, 1) != null;
1300
+ };
1301
+
1302
+
1303
+ /**
1304
+ * optional string strategy_id = 2;
1305
+ * @return {string}
1306
+ */
1307
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.getStrategyId = function() {
1308
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1309
+ };
1310
+
1311
+
1312
+ /**
1313
+ * @param {string} value
1314
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1315
+ */
1316
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.setStrategyId = function(value) {
1317
+ return jspb.Message.setField(this, 2, value);
1318
+ };
1319
+
1320
+
1321
+ /**
1322
+ * Clears the field making it undefined.
1323
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1324
+ */
1325
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.clearStrategyId = function() {
1326
+ return jspb.Message.setField(this, 2, undefined);
1327
+ };
1328
+
1329
+
1330
+ /**
1331
+ * Returns whether this field is set.
1332
+ * @return {boolean}
1333
+ */
1334
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.hasStrategyId = function() {
1335
+ return jspb.Message.getField(this, 2) != null;
1336
+ };
1337
+
1338
+
1339
+ /**
1340
+ * optional StrategyType strategy_type = 3;
1341
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.StrategyType}
1342
+ */
1343
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.getStrategyType = function() {
1344
+ return /** @type {!proto.tinkoff.public.invest.api.contract.v1.StrategyType} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1345
+ };
1346
+
1347
+
1348
+ /**
1349
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.StrategyType} value
1350
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1351
+ */
1352
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.setStrategyType = function(value) {
1353
+ return jspb.Message.setField(this, 3, value);
1354
+ };
1355
+
1356
+
1357
+ /**
1358
+ * Clears the field making it undefined.
1359
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1360
+ */
1361
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.clearStrategyType = function() {
1362
+ return jspb.Message.setField(this, 3, undefined);
1363
+ };
1364
+
1365
+
1366
+ /**
1367
+ * Returns whether this field is set.
1368
+ * @return {boolean}
1369
+ */
1370
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.hasStrategyType = function() {
1371
+ return jspb.Message.getField(this, 3) != null;
1372
+ };
1373
+
1374
+
1375
+ /**
1376
+ * optional string instrument_uid = 4;
1377
+ * @return {string}
1378
+ */
1379
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.getInstrumentUid = function() {
1380
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
1381
+ };
1382
+
1383
+
1384
+ /**
1385
+ * @param {string} value
1386
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1387
+ */
1388
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.setInstrumentUid = function(value) {
1389
+ return jspb.Message.setField(this, 4, value);
1390
+ };
1391
+
1392
+
1393
+ /**
1394
+ * Clears the field making it undefined.
1395
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1396
+ */
1397
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.clearInstrumentUid = function() {
1398
+ return jspb.Message.setField(this, 4, undefined);
1399
+ };
1400
+
1401
+
1402
+ /**
1403
+ * Returns whether this field is set.
1404
+ * @return {boolean}
1405
+ */
1406
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.hasInstrumentUid = function() {
1407
+ return jspb.Message.getField(this, 4) != null;
1408
+ };
1409
+
1410
+
1411
+ /**
1412
+ * optional google.protobuf.Timestamp from = 5;
1413
+ * @return {?proto.google.protobuf.Timestamp}
1414
+ */
1415
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.getFrom = function() {
1416
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1417
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
1418
+ };
1419
+
1420
+
1421
+ /**
1422
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1423
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1424
+ */
1425
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.setFrom = function(value) {
1426
+ return jspb.Message.setWrapperField(this, 5, value);
1427
+ };
1428
+
1429
+
1430
+ /**
1431
+ * Clears the message field making it undefined.
1432
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1433
+ */
1434
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.clearFrom = function() {
1435
+ return this.setFrom(undefined);
1436
+ };
1437
+
1438
+
1439
+ /**
1440
+ * Returns whether this field is set.
1441
+ * @return {boolean}
1442
+ */
1443
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.hasFrom = function() {
1444
+ return jspb.Message.getField(this, 5) != null;
1445
+ };
1446
+
1447
+
1448
+ /**
1449
+ * optional google.protobuf.Timestamp to = 6;
1450
+ * @return {?proto.google.protobuf.Timestamp}
1451
+ */
1452
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.getTo = function() {
1453
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1454
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6));
1455
+ };
1456
+
1457
+
1458
+ /**
1459
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1460
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1461
+ */
1462
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.setTo = function(value) {
1463
+ return jspb.Message.setWrapperField(this, 6, value);
1464
+ };
1465
+
1466
+
1467
+ /**
1468
+ * Clears the message field making it undefined.
1469
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1470
+ */
1471
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.clearTo = function() {
1472
+ return this.setTo(undefined);
1473
+ };
1474
+
1475
+
1476
+ /**
1477
+ * Returns whether this field is set.
1478
+ * @return {boolean}
1479
+ */
1480
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.hasTo = function() {
1481
+ return jspb.Message.getField(this, 6) != null;
1482
+ };
1483
+
1484
+
1485
+ /**
1486
+ * optional SignalDirection direction = 7;
1487
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.SignalDirection}
1488
+ */
1489
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.getDirection = function() {
1490
+ return /** @type {!proto.tinkoff.public.invest.api.contract.v1.SignalDirection} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
1491
+ };
1492
+
1493
+
1494
+ /**
1495
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.SignalDirection} value
1496
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1497
+ */
1498
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.setDirection = function(value) {
1499
+ return jspb.Message.setField(this, 7, value);
1500
+ };
1501
+
1502
+
1503
+ /**
1504
+ * Clears the field making it undefined.
1505
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1506
+ */
1507
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.clearDirection = function() {
1508
+ return jspb.Message.setField(this, 7, undefined);
1509
+ };
1510
+
1511
+
1512
+ /**
1513
+ * Returns whether this field is set.
1514
+ * @return {boolean}
1515
+ */
1516
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.hasDirection = function() {
1517
+ return jspb.Message.getField(this, 7) != null;
1518
+ };
1519
+
1520
+
1521
+ /**
1522
+ * optional SignalState active = 8;
1523
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.SignalState}
1524
+ */
1525
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.getActive = function() {
1526
+ return /** @type {!proto.tinkoff.public.invest.api.contract.v1.SignalState} */ (jspb.Message.getFieldWithDefault(this, 8, 0));
1527
+ };
1528
+
1529
+
1530
+ /**
1531
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.SignalState} value
1532
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1533
+ */
1534
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.setActive = function(value) {
1535
+ return jspb.Message.setField(this, 8, value);
1536
+ };
1537
+
1538
+
1539
+ /**
1540
+ * Clears the field making it undefined.
1541
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1542
+ */
1543
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.clearActive = function() {
1544
+ return jspb.Message.setField(this, 8, undefined);
1545
+ };
1546
+
1547
+
1548
+ /**
1549
+ * Returns whether this field is set.
1550
+ * @return {boolean}
1551
+ */
1552
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.hasActive = function() {
1553
+ return jspb.Message.getField(this, 8) != null;
1554
+ };
1555
+
1556
+
1557
+ /**
1558
+ * optional Page paging = 9;
1559
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.Page}
1560
+ */
1561
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.getPaging = function() {
1562
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.Page} */ (
1563
+ jspb.Message.getWrapperField(this, tinvest_common_pb.Page, 9));
1564
+ };
1565
+
1566
+
1567
+ /**
1568
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.Page|undefined} value
1569
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1570
+ */
1571
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.setPaging = function(value) {
1572
+ return jspb.Message.setWrapperField(this, 9, value);
1573
+ };
1574
+
1575
+
1576
+ /**
1577
+ * Clears the message field making it undefined.
1578
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest} returns this
1579
+ */
1580
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.clearPaging = function() {
1581
+ return this.setPaging(undefined);
1582
+ };
1583
+
1584
+
1585
+ /**
1586
+ * Returns whether this field is set.
1587
+ * @return {boolean}
1588
+ */
1589
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsRequest.prototype.hasPaging = function() {
1590
+ return jspb.Message.getField(this, 9) != null;
1591
+ };
1592
+
1593
+
1594
+
1595
+ /**
1596
+ * List of repeated fields within this message type.
1597
+ * @private {!Array<number>}
1598
+ * @const
1599
+ */
1600
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.repeatedFields_ = [1];
1601
+
1602
+
1603
+
1604
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1605
+ /**
1606
+ * Creates an object representation of this proto.
1607
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1608
+ * Optional fields that are not set will be set to undefined.
1609
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1610
+ * For the list of reserved names please see:
1611
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1612
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1613
+ * JSPB instance for transitional soy proto support:
1614
+ * http://goto/soy-param-migration
1615
+ * @return {!Object}
1616
+ */
1617
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.prototype.toObject = function(opt_includeInstance) {
1618
+ return proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.toObject(opt_includeInstance, this);
1619
+ };
1620
+
1621
+
1622
+ /**
1623
+ * Static version of the {@see toObject} method.
1624
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1625
+ * the JSPB instance for transitional soy proto support:
1626
+ * http://goto/soy-param-migration
1627
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse} msg The msg instance to transform.
1628
+ * @return {!Object}
1629
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1630
+ */
1631
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.toObject = function(includeInstance, msg) {
1632
+ var f, obj = {
1633
+ signalsList: jspb.Message.toObjectList(msg.getSignalsList(),
1634
+ proto.tinkoff.public.invest.api.contract.v1.Signal.toObject, includeInstance),
1635
+ paging: (f = msg.getPaging()) && tinvest_common_pb.PageResponse.toObject(includeInstance, f)
1636
+ };
1637
+
1638
+ if (includeInstance) {
1639
+ obj.$jspbMessageInstance = msg;
1640
+ }
1641
+ return obj;
1642
+ };
1643
+ }
1644
+
1645
+
1646
+ /**
1647
+ * Deserializes binary data (in protobuf wire format).
1648
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1649
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse}
1650
+ */
1651
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.deserializeBinary = function(bytes) {
1652
+ var reader = new jspb.BinaryReader(bytes);
1653
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse;
1654
+ return proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.deserializeBinaryFromReader(msg, reader);
1655
+ };
1656
+
1657
+
1658
+ /**
1659
+ * Deserializes binary data (in protobuf wire format) from the
1660
+ * given reader into the given message object.
1661
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse} msg The message object to deserialize into.
1662
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1663
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse}
1664
+ */
1665
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.deserializeBinaryFromReader = function(msg, reader) {
1666
+ while (reader.nextField()) {
1667
+ if (reader.isEndGroup()) {
1668
+ break;
1669
+ }
1670
+ var field = reader.getFieldNumber();
1671
+ switch (field) {
1672
+ case 1:
1673
+ var value = new proto.tinkoff.public.invest.api.contract.v1.Signal;
1674
+ reader.readMessage(value,proto.tinkoff.public.invest.api.contract.v1.Signal.deserializeBinaryFromReader);
1675
+ msg.addSignals(value);
1676
+ break;
1677
+ case 2:
1678
+ var value = new tinvest_common_pb.PageResponse;
1679
+ reader.readMessage(value,tinvest_common_pb.PageResponse.deserializeBinaryFromReader);
1680
+ msg.setPaging(value);
1681
+ break;
1682
+ default:
1683
+ reader.skipField();
1684
+ break;
1685
+ }
1686
+ }
1687
+ return msg;
1688
+ };
1689
+
1690
+
1691
+ /**
1692
+ * Serializes the message to binary data (in protobuf wire format).
1693
+ * @return {!Uint8Array}
1694
+ */
1695
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.prototype.serializeBinary = function() {
1696
+ var writer = new jspb.BinaryWriter();
1697
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.serializeBinaryToWriter(this, writer);
1698
+ return writer.getResultBuffer();
1699
+ };
1700
+
1701
+
1702
+ /**
1703
+ * Serializes the given message to binary data (in protobuf wire
1704
+ * format), writing to the given BinaryWriter.
1705
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse} message
1706
+ * @param {!jspb.BinaryWriter} writer
1707
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1708
+ */
1709
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.serializeBinaryToWriter = function(message, writer) {
1710
+ var f = undefined;
1711
+ f = message.getSignalsList();
1712
+ if (f.length > 0) {
1713
+ writer.writeRepeatedMessage(
1714
+ 1,
1715
+ f,
1716
+ proto.tinkoff.public.invest.api.contract.v1.Signal.serializeBinaryToWriter
1717
+ );
1718
+ }
1719
+ f = message.getPaging();
1720
+ if (f != null) {
1721
+ writer.writeMessage(
1722
+ 2,
1723
+ f,
1724
+ tinvest_common_pb.PageResponse.serializeBinaryToWriter
1725
+ );
1726
+ }
1727
+ };
1728
+
1729
+
1730
+ /**
1731
+ * repeated Signal signals = 1;
1732
+ * @return {!Array<!proto.tinkoff.public.invest.api.contract.v1.Signal>}
1733
+ */
1734
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.prototype.getSignalsList = function() {
1735
+ return /** @type{!Array<!proto.tinkoff.public.invest.api.contract.v1.Signal>} */ (
1736
+ jspb.Message.getRepeatedWrapperField(this, proto.tinkoff.public.invest.api.contract.v1.Signal, 1));
1737
+ };
1738
+
1739
+
1740
+ /**
1741
+ * @param {!Array<!proto.tinkoff.public.invest.api.contract.v1.Signal>} value
1742
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse} returns this
1743
+ */
1744
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.prototype.setSignalsList = function(value) {
1745
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1746
+ };
1747
+
1748
+
1749
+ /**
1750
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.Signal=} opt_value
1751
+ * @param {number=} opt_index
1752
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal}
1753
+ */
1754
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.prototype.addSignals = function(opt_value, opt_index) {
1755
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tinkoff.public.invest.api.contract.v1.Signal, opt_index);
1756
+ };
1757
+
1758
+
1759
+ /**
1760
+ * Clears the list making it empty but non-null.
1761
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse} returns this
1762
+ */
1763
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.prototype.clearSignalsList = function() {
1764
+ return this.setSignalsList([]);
1765
+ };
1766
+
1767
+
1768
+ /**
1769
+ * optional PageResponse paging = 2;
1770
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.PageResponse}
1771
+ */
1772
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.prototype.getPaging = function() {
1773
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.PageResponse} */ (
1774
+ jspb.Message.getWrapperField(this, tinvest_common_pb.PageResponse, 2));
1775
+ };
1776
+
1777
+
1778
+ /**
1779
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.PageResponse|undefined} value
1780
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse} returns this
1781
+ */
1782
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.prototype.setPaging = function(value) {
1783
+ return jspb.Message.setWrapperField(this, 2, value);
1784
+ };
1785
+
1786
+
1787
+ /**
1788
+ * Clears the message field making it undefined.
1789
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse} returns this
1790
+ */
1791
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.prototype.clearPaging = function() {
1792
+ return this.setPaging(undefined);
1793
+ };
1794
+
1795
+
1796
+ /**
1797
+ * Returns whether this field is set.
1798
+ * @return {boolean}
1799
+ */
1800
+ proto.tinkoff.public.invest.api.contract.v1.GetSignalsResponse.prototype.hasPaging = function() {
1801
+ return jspb.Message.getField(this, 2) != null;
1802
+ };
1803
+
1804
+
1805
+
1806
+
1807
+
1808
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1809
+ /**
1810
+ * Creates an object representation of this proto.
1811
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1812
+ * Optional fields that are not set will be set to undefined.
1813
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1814
+ * For the list of reserved names please see:
1815
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1816
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1817
+ * JSPB instance for transitional soy proto support:
1818
+ * http://goto/soy-param-migration
1819
+ * @return {!Object}
1820
+ */
1821
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.toObject = function(opt_includeInstance) {
1822
+ return proto.tinkoff.public.invest.api.contract.v1.Signal.toObject(opt_includeInstance, this);
1823
+ };
1824
+
1825
+
1826
+ /**
1827
+ * Static version of the {@see toObject} method.
1828
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1829
+ * the JSPB instance for transitional soy proto support:
1830
+ * http://goto/soy-param-migration
1831
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.Signal} msg The msg instance to transform.
1832
+ * @return {!Object}
1833
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1834
+ */
1835
+ proto.tinkoff.public.invest.api.contract.v1.Signal.toObject = function(includeInstance, msg) {
1836
+ var f, obj = {
1837
+ signalId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1838
+ strategyId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1839
+ strategyName: jspb.Message.getFieldWithDefault(msg, 3, ""),
1840
+ instrumentUid: jspb.Message.getFieldWithDefault(msg, 4, ""),
1841
+ createDt: (f = msg.getCreateDt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
1842
+ direction: jspb.Message.getFieldWithDefault(msg, 6, 0),
1843
+ initialPrice: (f = msg.getInitialPrice()) && tinvest_common_pb.Quotation.toObject(includeInstance, f),
1844
+ info: (f = jspb.Message.getField(msg, 8)) == null ? undefined : f,
1845
+ name: jspb.Message.getFieldWithDefault(msg, 9, ""),
1846
+ targetPrice: (f = msg.getTargetPrice()) && tinvest_common_pb.Quotation.toObject(includeInstance, f),
1847
+ endDt: (f = msg.getEndDt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
1848
+ probability: (f = jspb.Message.getField(msg, 12)) == null ? undefined : f,
1849
+ stoploss: (f = msg.getStoploss()) && tinvest_common_pb.Quotation.toObject(includeInstance, f),
1850
+ closePrice: (f = msg.getClosePrice()) && tinvest_common_pb.Quotation.toObject(includeInstance, f),
1851
+ closeDt: (f = msg.getCloseDt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
1852
+ };
1853
+
1854
+ if (includeInstance) {
1855
+ obj.$jspbMessageInstance = msg;
1856
+ }
1857
+ return obj;
1858
+ };
1859
+ }
1860
+
1861
+
1862
+ /**
1863
+ * Deserializes binary data (in protobuf wire format).
1864
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1865
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal}
1866
+ */
1867
+ proto.tinkoff.public.invest.api.contract.v1.Signal.deserializeBinary = function(bytes) {
1868
+ var reader = new jspb.BinaryReader(bytes);
1869
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.Signal;
1870
+ return proto.tinkoff.public.invest.api.contract.v1.Signal.deserializeBinaryFromReader(msg, reader);
1871
+ };
1872
+
1873
+
1874
+ /**
1875
+ * Deserializes binary data (in protobuf wire format) from the
1876
+ * given reader into the given message object.
1877
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.Signal} msg The message object to deserialize into.
1878
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1879
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal}
1880
+ */
1881
+ proto.tinkoff.public.invest.api.contract.v1.Signal.deserializeBinaryFromReader = function(msg, reader) {
1882
+ while (reader.nextField()) {
1883
+ if (reader.isEndGroup()) {
1884
+ break;
1885
+ }
1886
+ var field = reader.getFieldNumber();
1887
+ switch (field) {
1888
+ case 1:
1889
+ var value = /** @type {string} */ (reader.readString());
1890
+ msg.setSignalId(value);
1891
+ break;
1892
+ case 2:
1893
+ var value = /** @type {string} */ (reader.readString());
1894
+ msg.setStrategyId(value);
1895
+ break;
1896
+ case 3:
1897
+ var value = /** @type {string} */ (reader.readString());
1898
+ msg.setStrategyName(value);
1899
+ break;
1900
+ case 4:
1901
+ var value = /** @type {string} */ (reader.readString());
1902
+ msg.setInstrumentUid(value);
1903
+ break;
1904
+ case 5:
1905
+ var value = new google_protobuf_timestamp_pb.Timestamp;
1906
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1907
+ msg.setCreateDt(value);
1908
+ break;
1909
+ case 6:
1910
+ var value = /** @type {!proto.tinkoff.public.invest.api.contract.v1.SignalDirection} */ (reader.readEnum());
1911
+ msg.setDirection(value);
1912
+ break;
1913
+ case 7:
1914
+ var value = new tinvest_common_pb.Quotation;
1915
+ reader.readMessage(value,tinvest_common_pb.Quotation.deserializeBinaryFromReader);
1916
+ msg.setInitialPrice(value);
1917
+ break;
1918
+ case 8:
1919
+ var value = /** @type {string} */ (reader.readString());
1920
+ msg.setInfo(value);
1921
+ break;
1922
+ case 9:
1923
+ var value = /** @type {string} */ (reader.readString());
1924
+ msg.setName(value);
1925
+ break;
1926
+ case 10:
1927
+ var value = new tinvest_common_pb.Quotation;
1928
+ reader.readMessage(value,tinvest_common_pb.Quotation.deserializeBinaryFromReader);
1929
+ msg.setTargetPrice(value);
1930
+ break;
1931
+ case 11:
1932
+ var value = new google_protobuf_timestamp_pb.Timestamp;
1933
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1934
+ msg.setEndDt(value);
1935
+ break;
1936
+ case 12:
1937
+ var value = /** @type {number} */ (reader.readInt32());
1938
+ msg.setProbability(value);
1939
+ break;
1940
+ case 13:
1941
+ var value = new tinvest_common_pb.Quotation;
1942
+ reader.readMessage(value,tinvest_common_pb.Quotation.deserializeBinaryFromReader);
1943
+ msg.setStoploss(value);
1944
+ break;
1945
+ case 14:
1946
+ var value = new tinvest_common_pb.Quotation;
1947
+ reader.readMessage(value,tinvest_common_pb.Quotation.deserializeBinaryFromReader);
1948
+ msg.setClosePrice(value);
1949
+ break;
1950
+ case 15:
1951
+ var value = new google_protobuf_timestamp_pb.Timestamp;
1952
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1953
+ msg.setCloseDt(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.tinkoff.public.invest.api.contract.v1.Signal.prototype.serializeBinary = function() {
1969
+ var writer = new jspb.BinaryWriter();
1970
+ proto.tinkoff.public.invest.api.contract.v1.Signal.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.tinkoff.public.invest.api.contract.v1.Signal} message
1979
+ * @param {!jspb.BinaryWriter} writer
1980
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1981
+ */
1982
+ proto.tinkoff.public.invest.api.contract.v1.Signal.serializeBinaryToWriter = function(message, writer) {
1983
+ var f = undefined;
1984
+ f = message.getSignalId();
1985
+ if (f.length > 0) {
1986
+ writer.writeString(
1987
+ 1,
1988
+ f
1989
+ );
1990
+ }
1991
+ f = message.getStrategyId();
1992
+ if (f.length > 0) {
1993
+ writer.writeString(
1994
+ 2,
1995
+ f
1996
+ );
1997
+ }
1998
+ f = message.getStrategyName();
1999
+ if (f.length > 0) {
2000
+ writer.writeString(
2001
+ 3,
2002
+ f
2003
+ );
2004
+ }
2005
+ f = message.getInstrumentUid();
2006
+ if (f.length > 0) {
2007
+ writer.writeString(
2008
+ 4,
2009
+ f
2010
+ );
2011
+ }
2012
+ f = message.getCreateDt();
2013
+ if (f != null) {
2014
+ writer.writeMessage(
2015
+ 5,
2016
+ f,
2017
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2018
+ );
2019
+ }
2020
+ f = message.getDirection();
2021
+ if (f !== 0.0) {
2022
+ writer.writeEnum(
2023
+ 6,
2024
+ f
2025
+ );
2026
+ }
2027
+ f = message.getInitialPrice();
2028
+ if (f != null) {
2029
+ writer.writeMessage(
2030
+ 7,
2031
+ f,
2032
+ tinvest_common_pb.Quotation.serializeBinaryToWriter
2033
+ );
2034
+ }
2035
+ f = /** @type {string} */ (jspb.Message.getField(message, 8));
2036
+ if (f != null) {
2037
+ writer.writeString(
2038
+ 8,
2039
+ f
2040
+ );
2041
+ }
2042
+ f = message.getName();
2043
+ if (f.length > 0) {
2044
+ writer.writeString(
2045
+ 9,
2046
+ f
2047
+ );
2048
+ }
2049
+ f = message.getTargetPrice();
2050
+ if (f != null) {
2051
+ writer.writeMessage(
2052
+ 10,
2053
+ f,
2054
+ tinvest_common_pb.Quotation.serializeBinaryToWriter
2055
+ );
2056
+ }
2057
+ f = message.getEndDt();
2058
+ if (f != null) {
2059
+ writer.writeMessage(
2060
+ 11,
2061
+ f,
2062
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2063
+ );
2064
+ }
2065
+ f = /** @type {number} */ (jspb.Message.getField(message, 12));
2066
+ if (f != null) {
2067
+ writer.writeInt32(
2068
+ 12,
2069
+ f
2070
+ );
2071
+ }
2072
+ f = message.getStoploss();
2073
+ if (f != null) {
2074
+ writer.writeMessage(
2075
+ 13,
2076
+ f,
2077
+ tinvest_common_pb.Quotation.serializeBinaryToWriter
2078
+ );
2079
+ }
2080
+ f = message.getClosePrice();
2081
+ if (f != null) {
2082
+ writer.writeMessage(
2083
+ 14,
2084
+ f,
2085
+ tinvest_common_pb.Quotation.serializeBinaryToWriter
2086
+ );
2087
+ }
2088
+ f = message.getCloseDt();
2089
+ if (f != null) {
2090
+ writer.writeMessage(
2091
+ 15,
2092
+ f,
2093
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2094
+ );
2095
+ }
2096
+ };
2097
+
2098
+
2099
+ /**
2100
+ * optional string signal_id = 1;
2101
+ * @return {string}
2102
+ */
2103
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.getSignalId = function() {
2104
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2105
+ };
2106
+
2107
+
2108
+ /**
2109
+ * @param {string} value
2110
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2111
+ */
2112
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.setSignalId = function(value) {
2113
+ return jspb.Message.setProto3StringField(this, 1, value);
2114
+ };
2115
+
2116
+
2117
+ /**
2118
+ * optional string strategy_id = 2;
2119
+ * @return {string}
2120
+ */
2121
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.getStrategyId = function() {
2122
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2123
+ };
2124
+
2125
+
2126
+ /**
2127
+ * @param {string} value
2128
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2129
+ */
2130
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.setStrategyId = function(value) {
2131
+ return jspb.Message.setProto3StringField(this, 2, value);
2132
+ };
2133
+
2134
+
2135
+ /**
2136
+ * optional string strategy_name = 3;
2137
+ * @return {string}
2138
+ */
2139
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.getStrategyName = function() {
2140
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2141
+ };
2142
+
2143
+
2144
+ /**
2145
+ * @param {string} value
2146
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2147
+ */
2148
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.setStrategyName = function(value) {
2149
+ return jspb.Message.setProto3StringField(this, 3, value);
2150
+ };
2151
+
2152
+
2153
+ /**
2154
+ * optional string instrument_uid = 4;
2155
+ * @return {string}
2156
+ */
2157
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.getInstrumentUid = function() {
2158
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2159
+ };
2160
+
2161
+
2162
+ /**
2163
+ * @param {string} value
2164
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2165
+ */
2166
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.setInstrumentUid = function(value) {
2167
+ return jspb.Message.setProto3StringField(this, 4, value);
2168
+ };
2169
+
2170
+
2171
+ /**
2172
+ * optional google.protobuf.Timestamp create_dt = 5;
2173
+ * @return {?proto.google.protobuf.Timestamp}
2174
+ */
2175
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.getCreateDt = function() {
2176
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
2177
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
2178
+ };
2179
+
2180
+
2181
+ /**
2182
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
2183
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2184
+ */
2185
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.setCreateDt = function(value) {
2186
+ return jspb.Message.setWrapperField(this, 5, value);
2187
+ };
2188
+
2189
+
2190
+ /**
2191
+ * Clears the message field making it undefined.
2192
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2193
+ */
2194
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.clearCreateDt = function() {
2195
+ return this.setCreateDt(undefined);
2196
+ };
2197
+
2198
+
2199
+ /**
2200
+ * Returns whether this field is set.
2201
+ * @return {boolean}
2202
+ */
2203
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.hasCreateDt = function() {
2204
+ return jspb.Message.getField(this, 5) != null;
2205
+ };
2206
+
2207
+
2208
+ /**
2209
+ * optional SignalDirection direction = 6;
2210
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.SignalDirection}
2211
+ */
2212
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.getDirection = function() {
2213
+ return /** @type {!proto.tinkoff.public.invest.api.contract.v1.SignalDirection} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
2214
+ };
2215
+
2216
+
2217
+ /**
2218
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.SignalDirection} value
2219
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2220
+ */
2221
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.setDirection = function(value) {
2222
+ return jspb.Message.setProto3EnumField(this, 6, value);
2223
+ };
2224
+
2225
+
2226
+ /**
2227
+ * optional Quotation initial_price = 7;
2228
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.Quotation}
2229
+ */
2230
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.getInitialPrice = function() {
2231
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.Quotation} */ (
2232
+ jspb.Message.getWrapperField(this, tinvest_common_pb.Quotation, 7));
2233
+ };
2234
+
2235
+
2236
+ /**
2237
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.Quotation|undefined} value
2238
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2239
+ */
2240
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.setInitialPrice = function(value) {
2241
+ return jspb.Message.setWrapperField(this, 7, value);
2242
+ };
2243
+
2244
+
2245
+ /**
2246
+ * Clears the message field making it undefined.
2247
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2248
+ */
2249
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.clearInitialPrice = function() {
2250
+ return this.setInitialPrice(undefined);
2251
+ };
2252
+
2253
+
2254
+ /**
2255
+ * Returns whether this field is set.
2256
+ * @return {boolean}
2257
+ */
2258
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.hasInitialPrice = function() {
2259
+ return jspb.Message.getField(this, 7) != null;
2260
+ };
2261
+
2262
+
2263
+ /**
2264
+ * optional string info = 8;
2265
+ * @return {string}
2266
+ */
2267
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.getInfo = function() {
2268
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, ""));
2269
+ };
2270
+
2271
+
2272
+ /**
2273
+ * @param {string} value
2274
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2275
+ */
2276
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.setInfo = function(value) {
2277
+ return jspb.Message.setField(this, 8, value);
2278
+ };
2279
+
2280
+
2281
+ /**
2282
+ * Clears the field making it undefined.
2283
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2284
+ */
2285
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.clearInfo = function() {
2286
+ return jspb.Message.setField(this, 8, undefined);
2287
+ };
2288
+
2289
+
2290
+ /**
2291
+ * Returns whether this field is set.
2292
+ * @return {boolean}
2293
+ */
2294
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.hasInfo = function() {
2295
+ return jspb.Message.getField(this, 8) != null;
2296
+ };
2297
+
2298
+
2299
+ /**
2300
+ * optional string name = 9;
2301
+ * @return {string}
2302
+ */
2303
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.getName = function() {
2304
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
2305
+ };
2306
+
2307
+
2308
+ /**
2309
+ * @param {string} value
2310
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2311
+ */
2312
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.setName = function(value) {
2313
+ return jspb.Message.setProto3StringField(this, 9, value);
2314
+ };
2315
+
2316
+
2317
+ /**
2318
+ * optional Quotation target_price = 10;
2319
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.Quotation}
2320
+ */
2321
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.getTargetPrice = function() {
2322
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.Quotation} */ (
2323
+ jspb.Message.getWrapperField(this, tinvest_common_pb.Quotation, 10));
2324
+ };
2325
+
2326
+
2327
+ /**
2328
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.Quotation|undefined} value
2329
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2330
+ */
2331
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.setTargetPrice = function(value) {
2332
+ return jspb.Message.setWrapperField(this, 10, value);
2333
+ };
2334
+
2335
+
2336
+ /**
2337
+ * Clears the message field making it undefined.
2338
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2339
+ */
2340
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.clearTargetPrice = function() {
2341
+ return this.setTargetPrice(undefined);
2342
+ };
2343
+
2344
+
2345
+ /**
2346
+ * Returns whether this field is set.
2347
+ * @return {boolean}
2348
+ */
2349
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.hasTargetPrice = function() {
2350
+ return jspb.Message.getField(this, 10) != null;
2351
+ };
2352
+
2353
+
2354
+ /**
2355
+ * optional google.protobuf.Timestamp end_dt = 11;
2356
+ * @return {?proto.google.protobuf.Timestamp}
2357
+ */
2358
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.getEndDt = function() {
2359
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
2360
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 11));
2361
+ };
2362
+
2363
+
2364
+ /**
2365
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
2366
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2367
+ */
2368
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.setEndDt = function(value) {
2369
+ return jspb.Message.setWrapperField(this, 11, value);
2370
+ };
2371
+
2372
+
2373
+ /**
2374
+ * Clears the message field making it undefined.
2375
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2376
+ */
2377
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.clearEndDt = function() {
2378
+ return this.setEndDt(undefined);
2379
+ };
2380
+
2381
+
2382
+ /**
2383
+ * Returns whether this field is set.
2384
+ * @return {boolean}
2385
+ */
2386
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.hasEndDt = function() {
2387
+ return jspb.Message.getField(this, 11) != null;
2388
+ };
2389
+
2390
+
2391
+ /**
2392
+ * optional int32 probability = 12;
2393
+ * @return {number}
2394
+ */
2395
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.getProbability = function() {
2396
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0));
2397
+ };
2398
+
2399
+
2400
+ /**
2401
+ * @param {number} value
2402
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2403
+ */
2404
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.setProbability = function(value) {
2405
+ return jspb.Message.setField(this, 12, value);
2406
+ };
2407
+
2408
+
2409
+ /**
2410
+ * Clears the field making it undefined.
2411
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2412
+ */
2413
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.clearProbability = function() {
2414
+ return jspb.Message.setField(this, 12, undefined);
2415
+ };
2416
+
2417
+
2418
+ /**
2419
+ * Returns whether this field is set.
2420
+ * @return {boolean}
2421
+ */
2422
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.hasProbability = function() {
2423
+ return jspb.Message.getField(this, 12) != null;
2424
+ };
2425
+
2426
+
2427
+ /**
2428
+ * optional Quotation stoploss = 13;
2429
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.Quotation}
2430
+ */
2431
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.getStoploss = function() {
2432
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.Quotation} */ (
2433
+ jspb.Message.getWrapperField(this, tinvest_common_pb.Quotation, 13));
2434
+ };
2435
+
2436
+
2437
+ /**
2438
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.Quotation|undefined} value
2439
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2440
+ */
2441
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.setStoploss = function(value) {
2442
+ return jspb.Message.setWrapperField(this, 13, value);
2443
+ };
2444
+
2445
+
2446
+ /**
2447
+ * Clears the message field making it undefined.
2448
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2449
+ */
2450
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.clearStoploss = function() {
2451
+ return this.setStoploss(undefined);
2452
+ };
2453
+
2454
+
2455
+ /**
2456
+ * Returns whether this field is set.
2457
+ * @return {boolean}
2458
+ */
2459
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.hasStoploss = function() {
2460
+ return jspb.Message.getField(this, 13) != null;
2461
+ };
2462
+
2463
+
2464
+ /**
2465
+ * optional Quotation close_price = 14;
2466
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.Quotation}
2467
+ */
2468
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.getClosePrice = function() {
2469
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.Quotation} */ (
2470
+ jspb.Message.getWrapperField(this, tinvest_common_pb.Quotation, 14));
2471
+ };
2472
+
2473
+
2474
+ /**
2475
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.Quotation|undefined} value
2476
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2477
+ */
2478
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.setClosePrice = function(value) {
2479
+ return jspb.Message.setWrapperField(this, 14, value);
2480
+ };
2481
+
2482
+
2483
+ /**
2484
+ * Clears the message field making it undefined.
2485
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2486
+ */
2487
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.clearClosePrice = function() {
2488
+ return this.setClosePrice(undefined);
2489
+ };
2490
+
2491
+
2492
+ /**
2493
+ * Returns whether this field is set.
2494
+ * @return {boolean}
2495
+ */
2496
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.hasClosePrice = function() {
2497
+ return jspb.Message.getField(this, 14) != null;
2498
+ };
2499
+
2500
+
2501
+ /**
2502
+ * optional google.protobuf.Timestamp close_dt = 15;
2503
+ * @return {?proto.google.protobuf.Timestamp}
2504
+ */
2505
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.getCloseDt = function() {
2506
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
2507
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 15));
2508
+ };
2509
+
2510
+
2511
+ /**
2512
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
2513
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2514
+ */
2515
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.setCloseDt = function(value) {
2516
+ return jspb.Message.setWrapperField(this, 15, value);
2517
+ };
2518
+
2519
+
2520
+ /**
2521
+ * Clears the message field making it undefined.
2522
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Signal} returns this
2523
+ */
2524
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.clearCloseDt = function() {
2525
+ return this.setCloseDt(undefined);
2526
+ };
2527
+
2528
+
2529
+ /**
2530
+ * Returns whether this field is set.
2531
+ * @return {boolean}
2532
+ */
2533
+ proto.tinkoff.public.invest.api.contract.v1.Signal.prototype.hasCloseDt = function() {
2534
+ return jspb.Message.getField(this, 15) != null;
2535
+ };
2536
+
2537
+
2538
+ /**
2539
+ * @enum {number}
2540
+ */
2541
+ proto.tinkoff.public.invest.api.contract.v1.StrategyType = {
2542
+ STRATEGY_TYPE_UNSPECIFIED: 0,
2543
+ STRATEGY_TYPE_TECHNICAL: 1,
2544
+ STRATEGY_TYPE_FUNDAMENTAL: 2
2545
+ };
2546
+
2547
+ /**
2548
+ * @enum {number}
2549
+ */
2550
+ proto.tinkoff.public.invest.api.contract.v1.SignalDirection = {
2551
+ SIGNAL_DIRECTION_UNSPECIFIED: 0,
2552
+ SIGNAL_DIRECTION_BUY: 1,
2553
+ SIGNAL_DIRECTION_SELL: 2
2554
+ };
2555
+
2556
+ /**
2557
+ * @enum {number}
2558
+ */
2559
+ proto.tinkoff.public.invest.api.contract.v1.SignalState = {
2560
+ SIGNAL_STATE_UNSPECIFIED: 0,
2561
+ SIGNAL_STATE_ACTIVE: 1,
2562
+ SIGNAL_STATE_CLOSED: 2,
2563
+ SIGNAL_STATE_ALL: 3
2564
+ };
2565
+
2566
+ goog.object.extend(exports, proto.tinkoff.public.invest.api.contract.v1);