@marleena/trb-proto 1.0.52 → 1.0.53

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