@marleena/trb-proto 1.0.51 → 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.
@@ -0,0 +1,1977 @@
1
+ // source: instruments/instruments.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.instruments.v1.InstrumentListItem', null, global);
31
+ goog.exportSymbol('proto.trb.instruments.v1.InstrumentVersion', null, global);
32
+ goog.exportSymbol('proto.trb.instruments.v1.ListFilter', null, global);
33
+ goog.exportSymbol('proto.trb.instruments.v1.ListInstrumentVersionsRequest', null, global);
34
+ goog.exportSymbol('proto.trb.instruments.v1.ListInstrumentVersionsResponse', null, global);
35
+ goog.exportSymbol('proto.trb.instruments.v1.ListInstrumentsRequest', null, global);
36
+ goog.exportSymbol('proto.trb.instruments.v1.ListInstrumentsResponse', null, global);
37
+ goog.exportSymbol('proto.trb.instruments.v1.SyncInstrumentsRequest', null, global);
38
+ goog.exportSymbol('proto.trb.instruments.v1.SyncInstrumentsResponse', null, global);
39
+ goog.exportSymbol('proto.trb.instruments.v1.UpsertInstrumentsResponse', null, global);
40
+ /**
41
+ * Generated by JsPbCodeGenerator.
42
+ * @param {Array=} opt_data Optional initial data array, typically from a
43
+ * server response, or constructed directly in Javascript. The array is used
44
+ * in place and becomes part of the constructed object. It is not cloned.
45
+ * If no data is provided, the constructed object will be empty, but still
46
+ * valid.
47
+ * @extends {jspb.Message}
48
+ * @constructor
49
+ */
50
+ proto.trb.instruments.v1.ListFilter = function(opt_data) {
51
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
52
+ };
53
+ goog.inherits(proto.trb.instruments.v1.ListFilter, jspb.Message);
54
+ if (goog.DEBUG && !COMPILED) {
55
+ /**
56
+ * @public
57
+ * @override
58
+ */
59
+ proto.trb.instruments.v1.ListFilter.displayName = 'proto.trb.instruments.v1.ListFilter';
60
+ }
61
+ /**
62
+ * Generated by JsPbCodeGenerator.
63
+ * @param {Array=} opt_data Optional initial data array, typically from a
64
+ * server response, or constructed directly in Javascript. The array is used
65
+ * in place and becomes part of the constructed object. It is not cloned.
66
+ * If no data is provided, the constructed object will be empty, but still
67
+ * valid.
68
+ * @extends {jspb.Message}
69
+ * @constructor
70
+ */
71
+ proto.trb.instruments.v1.ListInstrumentsRequest = function(opt_data) {
72
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
73
+ };
74
+ goog.inherits(proto.trb.instruments.v1.ListInstrumentsRequest, jspb.Message);
75
+ if (goog.DEBUG && !COMPILED) {
76
+ /**
77
+ * @public
78
+ * @override
79
+ */
80
+ proto.trb.instruments.v1.ListInstrumentsRequest.displayName = 'proto.trb.instruments.v1.ListInstrumentsRequest';
81
+ }
82
+ /**
83
+ * Generated by JsPbCodeGenerator.
84
+ * @param {Array=} opt_data Optional initial data array, typically from a
85
+ * server response, or constructed directly in Javascript. The array is used
86
+ * in place and becomes part of the constructed object. It is not cloned.
87
+ * If no data is provided, the constructed object will be empty, but still
88
+ * valid.
89
+ * @extends {jspb.Message}
90
+ * @constructor
91
+ */
92
+ proto.trb.instruments.v1.InstrumentListItem = function(opt_data) {
93
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
94
+ };
95
+ goog.inherits(proto.trb.instruments.v1.InstrumentListItem, jspb.Message);
96
+ if (goog.DEBUG && !COMPILED) {
97
+ /**
98
+ * @public
99
+ * @override
100
+ */
101
+ proto.trb.instruments.v1.InstrumentListItem.displayName = 'proto.trb.instruments.v1.InstrumentListItem';
102
+ }
103
+ /**
104
+ * Generated by JsPbCodeGenerator.
105
+ * @param {Array=} opt_data Optional initial data array, typically from a
106
+ * server response, or constructed directly in Javascript. The array is used
107
+ * in place and becomes part of the constructed object. It is not cloned.
108
+ * If no data is provided, the constructed object will be empty, but still
109
+ * valid.
110
+ * @extends {jspb.Message}
111
+ * @constructor
112
+ */
113
+ proto.trb.instruments.v1.ListInstrumentsResponse = function(opt_data) {
114
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.trb.instruments.v1.ListInstrumentsResponse.repeatedFields_, null);
115
+ };
116
+ goog.inherits(proto.trb.instruments.v1.ListInstrumentsResponse, jspb.Message);
117
+ if (goog.DEBUG && !COMPILED) {
118
+ /**
119
+ * @public
120
+ * @override
121
+ */
122
+ proto.trb.instruments.v1.ListInstrumentsResponse.displayName = 'proto.trb.instruments.v1.ListInstrumentsResponse';
123
+ }
124
+ /**
125
+ * Generated by JsPbCodeGenerator.
126
+ * @param {Array=} opt_data Optional initial data array, typically from a
127
+ * server response, or constructed directly in Javascript. The array is used
128
+ * in place and becomes part of the constructed object. It is not cloned.
129
+ * If no data is provided, the constructed object will be empty, but still
130
+ * valid.
131
+ * @extends {jspb.Message}
132
+ * @constructor
133
+ */
134
+ proto.trb.instruments.v1.ListInstrumentVersionsRequest = function(opt_data) {
135
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
136
+ };
137
+ goog.inherits(proto.trb.instruments.v1.ListInstrumentVersionsRequest, jspb.Message);
138
+ if (goog.DEBUG && !COMPILED) {
139
+ /**
140
+ * @public
141
+ * @override
142
+ */
143
+ proto.trb.instruments.v1.ListInstrumentVersionsRequest.displayName = 'proto.trb.instruments.v1.ListInstrumentVersionsRequest';
144
+ }
145
+ /**
146
+ * Generated by JsPbCodeGenerator.
147
+ * @param {Array=} opt_data Optional initial data array, typically from a
148
+ * server response, or constructed directly in Javascript. The array is used
149
+ * in place and becomes part of the constructed object. It is not cloned.
150
+ * If no data is provided, the constructed object will be empty, but still
151
+ * valid.
152
+ * @extends {jspb.Message}
153
+ * @constructor
154
+ */
155
+ proto.trb.instruments.v1.InstrumentVersion = function(opt_data) {
156
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
157
+ };
158
+ goog.inherits(proto.trb.instruments.v1.InstrumentVersion, jspb.Message);
159
+ if (goog.DEBUG && !COMPILED) {
160
+ /**
161
+ * @public
162
+ * @override
163
+ */
164
+ proto.trb.instruments.v1.InstrumentVersion.displayName = 'proto.trb.instruments.v1.InstrumentVersion';
165
+ }
166
+ /**
167
+ * Generated by JsPbCodeGenerator.
168
+ * @param {Array=} opt_data Optional initial data array, typically from a
169
+ * server response, or constructed directly in Javascript. The array is used
170
+ * in place and becomes part of the constructed object. It is not cloned.
171
+ * If no data is provided, the constructed object will be empty, but still
172
+ * valid.
173
+ * @extends {jspb.Message}
174
+ * @constructor
175
+ */
176
+ proto.trb.instruments.v1.ListInstrumentVersionsResponse = function(opt_data) {
177
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.trb.instruments.v1.ListInstrumentVersionsResponse.repeatedFields_, null);
178
+ };
179
+ goog.inherits(proto.trb.instruments.v1.ListInstrumentVersionsResponse, jspb.Message);
180
+ if (goog.DEBUG && !COMPILED) {
181
+ /**
182
+ * @public
183
+ * @override
184
+ */
185
+ proto.trb.instruments.v1.ListInstrumentVersionsResponse.displayName = 'proto.trb.instruments.v1.ListInstrumentVersionsResponse';
186
+ }
187
+ /**
188
+ * Generated by JsPbCodeGenerator.
189
+ * @param {Array=} opt_data Optional initial data array, typically from a
190
+ * server response, or constructed directly in Javascript. The array is used
191
+ * in place and becomes part of the constructed object. It is not cloned.
192
+ * If no data is provided, the constructed object will be empty, but still
193
+ * valid.
194
+ * @extends {jspb.Message}
195
+ * @constructor
196
+ */
197
+ proto.trb.instruments.v1.UpsertInstrumentsResponse = function(opt_data) {
198
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
199
+ };
200
+ goog.inherits(proto.trb.instruments.v1.UpsertInstrumentsResponse, jspb.Message);
201
+ if (goog.DEBUG && !COMPILED) {
202
+ /**
203
+ * @public
204
+ * @override
205
+ */
206
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.displayName = 'proto.trb.instruments.v1.UpsertInstrumentsResponse';
207
+ }
208
+ /**
209
+ * Generated by JsPbCodeGenerator.
210
+ * @param {Array=} opt_data Optional initial data array, typically from a
211
+ * server response, or constructed directly in Javascript. The array is used
212
+ * in place and becomes part of the constructed object. It is not cloned.
213
+ * If no data is provided, the constructed object will be empty, but still
214
+ * valid.
215
+ * @extends {jspb.Message}
216
+ * @constructor
217
+ */
218
+ proto.trb.instruments.v1.SyncInstrumentsRequest = function(opt_data) {
219
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
220
+ };
221
+ goog.inherits(proto.trb.instruments.v1.SyncInstrumentsRequest, jspb.Message);
222
+ if (goog.DEBUG && !COMPILED) {
223
+ /**
224
+ * @public
225
+ * @override
226
+ */
227
+ proto.trb.instruments.v1.SyncInstrumentsRequest.displayName = 'proto.trb.instruments.v1.SyncInstrumentsRequest';
228
+ }
229
+ /**
230
+ * Generated by JsPbCodeGenerator.
231
+ * @param {Array=} opt_data Optional initial data array, typically from a
232
+ * server response, or constructed directly in Javascript. The array is used
233
+ * in place and becomes part of the constructed object. It is not cloned.
234
+ * If no data is provided, the constructed object will be empty, but still
235
+ * valid.
236
+ * @extends {jspb.Message}
237
+ * @constructor
238
+ */
239
+ proto.trb.instruments.v1.SyncInstrumentsResponse = function(opt_data) {
240
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
241
+ };
242
+ goog.inherits(proto.trb.instruments.v1.SyncInstrumentsResponse, jspb.Message);
243
+ if (goog.DEBUG && !COMPILED) {
244
+ /**
245
+ * @public
246
+ * @override
247
+ */
248
+ proto.trb.instruments.v1.SyncInstrumentsResponse.displayName = 'proto.trb.instruments.v1.SyncInstrumentsResponse';
249
+ }
250
+
251
+
252
+
253
+ if (jspb.Message.GENERATE_TO_OBJECT) {
254
+ /**
255
+ * Creates an object representation of this proto.
256
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
257
+ * Optional fields that are not set will be set to undefined.
258
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
259
+ * For the list of reserved names please see:
260
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
261
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
262
+ * JSPB instance for transitional soy proto support:
263
+ * http://goto/soy-param-migration
264
+ * @return {!Object}
265
+ */
266
+ proto.trb.instruments.v1.ListFilter.prototype.toObject = function(opt_includeInstance) {
267
+ return proto.trb.instruments.v1.ListFilter.toObject(opt_includeInstance, this);
268
+ };
269
+
270
+
271
+ /**
272
+ * Static version of the {@see toObject} method.
273
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
274
+ * the JSPB instance for transitional soy proto support:
275
+ * http://goto/soy-param-migration
276
+ * @param {!proto.trb.instruments.v1.ListFilter} msg The msg instance to transform.
277
+ * @return {!Object}
278
+ * @suppress {unusedLocalVariables} f is only used for nested messages
279
+ */
280
+ proto.trb.instruments.v1.ListFilter.toObject = function(includeInstance, msg) {
281
+ var f, obj = {
282
+ q: jspb.Message.getFieldWithDefault(msg, 1, ""),
283
+ limit: jspb.Message.getFieldWithDefault(msg, 2, 0),
284
+ offset: jspb.Message.getFieldWithDefault(msg, 3, 0)
285
+ };
286
+
287
+ if (includeInstance) {
288
+ obj.$jspbMessageInstance = msg;
289
+ }
290
+ return obj;
291
+ };
292
+ }
293
+
294
+
295
+ /**
296
+ * Deserializes binary data (in protobuf wire format).
297
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
298
+ * @return {!proto.trb.instruments.v1.ListFilter}
299
+ */
300
+ proto.trb.instruments.v1.ListFilter.deserializeBinary = function(bytes) {
301
+ var reader = new jspb.BinaryReader(bytes);
302
+ var msg = new proto.trb.instruments.v1.ListFilter;
303
+ return proto.trb.instruments.v1.ListFilter.deserializeBinaryFromReader(msg, reader);
304
+ };
305
+
306
+
307
+ /**
308
+ * Deserializes binary data (in protobuf wire format) from the
309
+ * given reader into the given message object.
310
+ * @param {!proto.trb.instruments.v1.ListFilter} msg The message object to deserialize into.
311
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
312
+ * @return {!proto.trb.instruments.v1.ListFilter}
313
+ */
314
+ proto.trb.instruments.v1.ListFilter.deserializeBinaryFromReader = function(msg, reader) {
315
+ while (reader.nextField()) {
316
+ if (reader.isEndGroup()) {
317
+ break;
318
+ }
319
+ var field = reader.getFieldNumber();
320
+ switch (field) {
321
+ case 1:
322
+ var value = /** @type {string} */ (reader.readString());
323
+ msg.setQ(value);
324
+ break;
325
+ case 2:
326
+ var value = /** @type {number} */ (reader.readInt32());
327
+ msg.setLimit(value);
328
+ break;
329
+ case 3:
330
+ var value = /** @type {number} */ (reader.readInt32());
331
+ msg.setOffset(value);
332
+ break;
333
+ default:
334
+ reader.skipField();
335
+ break;
336
+ }
337
+ }
338
+ return msg;
339
+ };
340
+
341
+
342
+ /**
343
+ * Serializes the message to binary data (in protobuf wire format).
344
+ * @return {!Uint8Array}
345
+ */
346
+ proto.trb.instruments.v1.ListFilter.prototype.serializeBinary = function() {
347
+ var writer = new jspb.BinaryWriter();
348
+ proto.trb.instruments.v1.ListFilter.serializeBinaryToWriter(this, writer);
349
+ return writer.getResultBuffer();
350
+ };
351
+
352
+
353
+ /**
354
+ * Serializes the given message to binary data (in protobuf wire
355
+ * format), writing to the given BinaryWriter.
356
+ * @param {!proto.trb.instruments.v1.ListFilter} message
357
+ * @param {!jspb.BinaryWriter} writer
358
+ * @suppress {unusedLocalVariables} f is only used for nested messages
359
+ */
360
+ proto.trb.instruments.v1.ListFilter.serializeBinaryToWriter = function(message, writer) {
361
+ var f = undefined;
362
+ f = message.getQ();
363
+ if (f.length > 0) {
364
+ writer.writeString(
365
+ 1,
366
+ f
367
+ );
368
+ }
369
+ f = message.getLimit();
370
+ if (f !== 0) {
371
+ writer.writeInt32(
372
+ 2,
373
+ f
374
+ );
375
+ }
376
+ f = message.getOffset();
377
+ if (f !== 0) {
378
+ writer.writeInt32(
379
+ 3,
380
+ f
381
+ );
382
+ }
383
+ };
384
+
385
+
386
+ /**
387
+ * optional string q = 1;
388
+ * @return {string}
389
+ */
390
+ proto.trb.instruments.v1.ListFilter.prototype.getQ = function() {
391
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
392
+ };
393
+
394
+
395
+ /**
396
+ * @param {string} value
397
+ * @return {!proto.trb.instruments.v1.ListFilter} returns this
398
+ */
399
+ proto.trb.instruments.v1.ListFilter.prototype.setQ = function(value) {
400
+ return jspb.Message.setProto3StringField(this, 1, value);
401
+ };
402
+
403
+
404
+ /**
405
+ * optional int32 limit = 2;
406
+ * @return {number}
407
+ */
408
+ proto.trb.instruments.v1.ListFilter.prototype.getLimit = function() {
409
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
410
+ };
411
+
412
+
413
+ /**
414
+ * @param {number} value
415
+ * @return {!proto.trb.instruments.v1.ListFilter} returns this
416
+ */
417
+ proto.trb.instruments.v1.ListFilter.prototype.setLimit = function(value) {
418
+ return jspb.Message.setProto3IntField(this, 2, value);
419
+ };
420
+
421
+
422
+ /**
423
+ * optional int32 offset = 3;
424
+ * @return {number}
425
+ */
426
+ proto.trb.instruments.v1.ListFilter.prototype.getOffset = function() {
427
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
428
+ };
429
+
430
+
431
+ /**
432
+ * @param {number} value
433
+ * @return {!proto.trb.instruments.v1.ListFilter} returns this
434
+ */
435
+ proto.trb.instruments.v1.ListFilter.prototype.setOffset = function(value) {
436
+ return jspb.Message.setProto3IntField(this, 3, value);
437
+ };
438
+
439
+
440
+
441
+
442
+
443
+ if (jspb.Message.GENERATE_TO_OBJECT) {
444
+ /**
445
+ * Creates an object representation of this proto.
446
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
447
+ * Optional fields that are not set will be set to undefined.
448
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
449
+ * For the list of reserved names please see:
450
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
451
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
452
+ * JSPB instance for transitional soy proto support:
453
+ * http://goto/soy-param-migration
454
+ * @return {!Object}
455
+ */
456
+ proto.trb.instruments.v1.ListInstrumentsRequest.prototype.toObject = function(opt_includeInstance) {
457
+ return proto.trb.instruments.v1.ListInstrumentsRequest.toObject(opt_includeInstance, this);
458
+ };
459
+
460
+
461
+ /**
462
+ * Static version of the {@see toObject} method.
463
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
464
+ * the JSPB instance for transitional soy proto support:
465
+ * http://goto/soy-param-migration
466
+ * @param {!proto.trb.instruments.v1.ListInstrumentsRequest} msg The msg instance to transform.
467
+ * @return {!Object}
468
+ * @suppress {unusedLocalVariables} f is only used for nested messages
469
+ */
470
+ proto.trb.instruments.v1.ListInstrumentsRequest.toObject = function(includeInstance, msg) {
471
+ var f, obj = {
472
+ filter: (f = msg.getFilter()) && proto.trb.instruments.v1.ListFilter.toObject(includeInstance, f),
473
+ lite: jspb.Message.getBooleanFieldWithDefault(msg, 2, false)
474
+ };
475
+
476
+ if (includeInstance) {
477
+ obj.$jspbMessageInstance = msg;
478
+ }
479
+ return obj;
480
+ };
481
+ }
482
+
483
+
484
+ /**
485
+ * Deserializes binary data (in protobuf wire format).
486
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
487
+ * @return {!proto.trb.instruments.v1.ListInstrumentsRequest}
488
+ */
489
+ proto.trb.instruments.v1.ListInstrumentsRequest.deserializeBinary = function(bytes) {
490
+ var reader = new jspb.BinaryReader(bytes);
491
+ var msg = new proto.trb.instruments.v1.ListInstrumentsRequest;
492
+ return proto.trb.instruments.v1.ListInstrumentsRequest.deserializeBinaryFromReader(msg, reader);
493
+ };
494
+
495
+
496
+ /**
497
+ * Deserializes binary data (in protobuf wire format) from the
498
+ * given reader into the given message object.
499
+ * @param {!proto.trb.instruments.v1.ListInstrumentsRequest} msg The message object to deserialize into.
500
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
501
+ * @return {!proto.trb.instruments.v1.ListInstrumentsRequest}
502
+ */
503
+ proto.trb.instruments.v1.ListInstrumentsRequest.deserializeBinaryFromReader = function(msg, reader) {
504
+ while (reader.nextField()) {
505
+ if (reader.isEndGroup()) {
506
+ break;
507
+ }
508
+ var field = reader.getFieldNumber();
509
+ switch (field) {
510
+ case 1:
511
+ var value = new proto.trb.instruments.v1.ListFilter;
512
+ reader.readMessage(value,proto.trb.instruments.v1.ListFilter.deserializeBinaryFromReader);
513
+ msg.setFilter(value);
514
+ break;
515
+ case 2:
516
+ var value = /** @type {boolean} */ (reader.readBool());
517
+ msg.setLite(value);
518
+ break;
519
+ default:
520
+ reader.skipField();
521
+ break;
522
+ }
523
+ }
524
+ return msg;
525
+ };
526
+
527
+
528
+ /**
529
+ * Serializes the message to binary data (in protobuf wire format).
530
+ * @return {!Uint8Array}
531
+ */
532
+ proto.trb.instruments.v1.ListInstrumentsRequest.prototype.serializeBinary = function() {
533
+ var writer = new jspb.BinaryWriter();
534
+ proto.trb.instruments.v1.ListInstrumentsRequest.serializeBinaryToWriter(this, writer);
535
+ return writer.getResultBuffer();
536
+ };
537
+
538
+
539
+ /**
540
+ * Serializes the given message to binary data (in protobuf wire
541
+ * format), writing to the given BinaryWriter.
542
+ * @param {!proto.trb.instruments.v1.ListInstrumentsRequest} message
543
+ * @param {!jspb.BinaryWriter} writer
544
+ * @suppress {unusedLocalVariables} f is only used for nested messages
545
+ */
546
+ proto.trb.instruments.v1.ListInstrumentsRequest.serializeBinaryToWriter = function(message, writer) {
547
+ var f = undefined;
548
+ f = message.getFilter();
549
+ if (f != null) {
550
+ writer.writeMessage(
551
+ 1,
552
+ f,
553
+ proto.trb.instruments.v1.ListFilter.serializeBinaryToWriter
554
+ );
555
+ }
556
+ f = message.getLite();
557
+ if (f) {
558
+ writer.writeBool(
559
+ 2,
560
+ f
561
+ );
562
+ }
563
+ };
564
+
565
+
566
+ /**
567
+ * optional ListFilter filter = 1;
568
+ * @return {?proto.trb.instruments.v1.ListFilter}
569
+ */
570
+ proto.trb.instruments.v1.ListInstrumentsRequest.prototype.getFilter = function() {
571
+ return /** @type{?proto.trb.instruments.v1.ListFilter} */ (
572
+ jspb.Message.getWrapperField(this, proto.trb.instruments.v1.ListFilter, 1));
573
+ };
574
+
575
+
576
+ /**
577
+ * @param {?proto.trb.instruments.v1.ListFilter|undefined} value
578
+ * @return {!proto.trb.instruments.v1.ListInstrumentsRequest} returns this
579
+ */
580
+ proto.trb.instruments.v1.ListInstrumentsRequest.prototype.setFilter = function(value) {
581
+ return jspb.Message.setWrapperField(this, 1, value);
582
+ };
583
+
584
+
585
+ /**
586
+ * Clears the message field making it undefined.
587
+ * @return {!proto.trb.instruments.v1.ListInstrumentsRequest} returns this
588
+ */
589
+ proto.trb.instruments.v1.ListInstrumentsRequest.prototype.clearFilter = function() {
590
+ return this.setFilter(undefined);
591
+ };
592
+
593
+
594
+ /**
595
+ * Returns whether this field is set.
596
+ * @return {boolean}
597
+ */
598
+ proto.trb.instruments.v1.ListInstrumentsRequest.prototype.hasFilter = function() {
599
+ return jspb.Message.getField(this, 1) != null;
600
+ };
601
+
602
+
603
+ /**
604
+ * optional bool lite = 2;
605
+ * @return {boolean}
606
+ */
607
+ proto.trb.instruments.v1.ListInstrumentsRequest.prototype.getLite = function() {
608
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
609
+ };
610
+
611
+
612
+ /**
613
+ * @param {boolean} value
614
+ * @return {!proto.trb.instruments.v1.ListInstrumentsRequest} returns this
615
+ */
616
+ proto.trb.instruments.v1.ListInstrumentsRequest.prototype.setLite = function(value) {
617
+ return jspb.Message.setProto3BooleanField(this, 2, value);
618
+ };
619
+
620
+
621
+
622
+
623
+
624
+ if (jspb.Message.GENERATE_TO_OBJECT) {
625
+ /**
626
+ * Creates an object representation of this proto.
627
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
628
+ * Optional fields that are not set will be set to undefined.
629
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
630
+ * For the list of reserved names please see:
631
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
632
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
633
+ * JSPB instance for transitional soy proto support:
634
+ * http://goto/soy-param-migration
635
+ * @return {!Object}
636
+ */
637
+ proto.trb.instruments.v1.InstrumentListItem.prototype.toObject = function(opt_includeInstance) {
638
+ return proto.trb.instruments.v1.InstrumentListItem.toObject(opt_includeInstance, this);
639
+ };
640
+
641
+
642
+ /**
643
+ * Static version of the {@see toObject} method.
644
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
645
+ * the JSPB instance for transitional soy proto support:
646
+ * http://goto/soy-param-migration
647
+ * @param {!proto.trb.instruments.v1.InstrumentListItem} msg The msg instance to transform.
648
+ * @return {!Object}
649
+ * @suppress {unusedLocalVariables} f is only used for nested messages
650
+ */
651
+ proto.trb.instruments.v1.InstrumentListItem.toObject = function(includeInstance, msg) {
652
+ var f, obj = {
653
+ share: (f = msg.getShare()) && api_tinvest_instruments_pb.Share.toObject(includeInstance, f),
654
+ version: (f = msg.getVersion()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
655
+ versionCount: jspb.Message.getFieldWithDefault(msg, 3, 0)
656
+ };
657
+
658
+ if (includeInstance) {
659
+ obj.$jspbMessageInstance = msg;
660
+ }
661
+ return obj;
662
+ };
663
+ }
664
+
665
+
666
+ /**
667
+ * Deserializes binary data (in protobuf wire format).
668
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
669
+ * @return {!proto.trb.instruments.v1.InstrumentListItem}
670
+ */
671
+ proto.trb.instruments.v1.InstrumentListItem.deserializeBinary = function(bytes) {
672
+ var reader = new jspb.BinaryReader(bytes);
673
+ var msg = new proto.trb.instruments.v1.InstrumentListItem;
674
+ return proto.trb.instruments.v1.InstrumentListItem.deserializeBinaryFromReader(msg, reader);
675
+ };
676
+
677
+
678
+ /**
679
+ * Deserializes binary data (in protobuf wire format) from the
680
+ * given reader into the given message object.
681
+ * @param {!proto.trb.instruments.v1.InstrumentListItem} msg The message object to deserialize into.
682
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
683
+ * @return {!proto.trb.instruments.v1.InstrumentListItem}
684
+ */
685
+ proto.trb.instruments.v1.InstrumentListItem.deserializeBinaryFromReader = function(msg, reader) {
686
+ while (reader.nextField()) {
687
+ if (reader.isEndGroup()) {
688
+ break;
689
+ }
690
+ var field = reader.getFieldNumber();
691
+ switch (field) {
692
+ case 1:
693
+ var value = new api_tinvest_instruments_pb.Share;
694
+ reader.readMessage(value,api_tinvest_instruments_pb.Share.deserializeBinaryFromReader);
695
+ msg.setShare(value);
696
+ break;
697
+ case 2:
698
+ var value = new google_protobuf_timestamp_pb.Timestamp;
699
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
700
+ msg.setVersion(value);
701
+ break;
702
+ case 3:
703
+ var value = /** @type {number} */ (reader.readInt32());
704
+ msg.setVersionCount(value);
705
+ break;
706
+ default:
707
+ reader.skipField();
708
+ break;
709
+ }
710
+ }
711
+ return msg;
712
+ };
713
+
714
+
715
+ /**
716
+ * Serializes the message to binary data (in protobuf wire format).
717
+ * @return {!Uint8Array}
718
+ */
719
+ proto.trb.instruments.v1.InstrumentListItem.prototype.serializeBinary = function() {
720
+ var writer = new jspb.BinaryWriter();
721
+ proto.trb.instruments.v1.InstrumentListItem.serializeBinaryToWriter(this, writer);
722
+ return writer.getResultBuffer();
723
+ };
724
+
725
+
726
+ /**
727
+ * Serializes the given message to binary data (in protobuf wire
728
+ * format), writing to the given BinaryWriter.
729
+ * @param {!proto.trb.instruments.v1.InstrumentListItem} message
730
+ * @param {!jspb.BinaryWriter} writer
731
+ * @suppress {unusedLocalVariables} f is only used for nested messages
732
+ */
733
+ proto.trb.instruments.v1.InstrumentListItem.serializeBinaryToWriter = function(message, writer) {
734
+ var f = undefined;
735
+ f = message.getShare();
736
+ if (f != null) {
737
+ writer.writeMessage(
738
+ 1,
739
+ f,
740
+ api_tinvest_instruments_pb.Share.serializeBinaryToWriter
741
+ );
742
+ }
743
+ f = message.getVersion();
744
+ if (f != null) {
745
+ writer.writeMessage(
746
+ 2,
747
+ f,
748
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
749
+ );
750
+ }
751
+ f = message.getVersionCount();
752
+ if (f !== 0) {
753
+ writer.writeInt32(
754
+ 3,
755
+ f
756
+ );
757
+ }
758
+ };
759
+
760
+
761
+ /**
762
+ * optional tinkoff.public.invest.api.contract.v1.Share share = 1;
763
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.Share}
764
+ */
765
+ proto.trb.instruments.v1.InstrumentListItem.prototype.getShare = function() {
766
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.Share} */ (
767
+ jspb.Message.getWrapperField(this, api_tinvest_instruments_pb.Share, 1));
768
+ };
769
+
770
+
771
+ /**
772
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.Share|undefined} value
773
+ * @return {!proto.trb.instruments.v1.InstrumentListItem} returns this
774
+ */
775
+ proto.trb.instruments.v1.InstrumentListItem.prototype.setShare = function(value) {
776
+ return jspb.Message.setWrapperField(this, 1, value);
777
+ };
778
+
779
+
780
+ /**
781
+ * Clears the message field making it undefined.
782
+ * @return {!proto.trb.instruments.v1.InstrumentListItem} returns this
783
+ */
784
+ proto.trb.instruments.v1.InstrumentListItem.prototype.clearShare = function() {
785
+ return this.setShare(undefined);
786
+ };
787
+
788
+
789
+ /**
790
+ * Returns whether this field is set.
791
+ * @return {boolean}
792
+ */
793
+ proto.trb.instruments.v1.InstrumentListItem.prototype.hasShare = function() {
794
+ return jspb.Message.getField(this, 1) != null;
795
+ };
796
+
797
+
798
+ /**
799
+ * optional google.protobuf.Timestamp version = 2;
800
+ * @return {?proto.google.protobuf.Timestamp}
801
+ */
802
+ proto.trb.instruments.v1.InstrumentListItem.prototype.getVersion = function() {
803
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
804
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
805
+ };
806
+
807
+
808
+ /**
809
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
810
+ * @return {!proto.trb.instruments.v1.InstrumentListItem} returns this
811
+ */
812
+ proto.trb.instruments.v1.InstrumentListItem.prototype.setVersion = function(value) {
813
+ return jspb.Message.setWrapperField(this, 2, value);
814
+ };
815
+
816
+
817
+ /**
818
+ * Clears the message field making it undefined.
819
+ * @return {!proto.trb.instruments.v1.InstrumentListItem} returns this
820
+ */
821
+ proto.trb.instruments.v1.InstrumentListItem.prototype.clearVersion = function() {
822
+ return this.setVersion(undefined);
823
+ };
824
+
825
+
826
+ /**
827
+ * Returns whether this field is set.
828
+ * @return {boolean}
829
+ */
830
+ proto.trb.instruments.v1.InstrumentListItem.prototype.hasVersion = function() {
831
+ return jspb.Message.getField(this, 2) != null;
832
+ };
833
+
834
+
835
+ /**
836
+ * optional int32 version_count = 3;
837
+ * @return {number}
838
+ */
839
+ proto.trb.instruments.v1.InstrumentListItem.prototype.getVersionCount = function() {
840
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
841
+ };
842
+
843
+
844
+ /**
845
+ * @param {number} value
846
+ * @return {!proto.trb.instruments.v1.InstrumentListItem} returns this
847
+ */
848
+ proto.trb.instruments.v1.InstrumentListItem.prototype.setVersionCount = function(value) {
849
+ return jspb.Message.setProto3IntField(this, 3, value);
850
+ };
851
+
852
+
853
+
854
+ /**
855
+ * List of repeated fields within this message type.
856
+ * @private {!Array<number>}
857
+ * @const
858
+ */
859
+ proto.trb.instruments.v1.ListInstrumentsResponse.repeatedFields_ = [1];
860
+
861
+
862
+
863
+ if (jspb.Message.GENERATE_TO_OBJECT) {
864
+ /**
865
+ * Creates an object representation of this proto.
866
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
867
+ * Optional fields that are not set will be set to undefined.
868
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
869
+ * For the list of reserved names please see:
870
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
871
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
872
+ * JSPB instance for transitional soy proto support:
873
+ * http://goto/soy-param-migration
874
+ * @return {!Object}
875
+ */
876
+ proto.trb.instruments.v1.ListInstrumentsResponse.prototype.toObject = function(opt_includeInstance) {
877
+ return proto.trb.instruments.v1.ListInstrumentsResponse.toObject(opt_includeInstance, this);
878
+ };
879
+
880
+
881
+ /**
882
+ * Static version of the {@see toObject} method.
883
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
884
+ * the JSPB instance for transitional soy proto support:
885
+ * http://goto/soy-param-migration
886
+ * @param {!proto.trb.instruments.v1.ListInstrumentsResponse} msg The msg instance to transform.
887
+ * @return {!Object}
888
+ * @suppress {unusedLocalVariables} f is only used for nested messages
889
+ */
890
+ proto.trb.instruments.v1.ListInstrumentsResponse.toObject = function(includeInstance, msg) {
891
+ var f, obj = {
892
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
893
+ proto.trb.instruments.v1.InstrumentListItem.toObject, includeInstance)
894
+ };
895
+
896
+ if (includeInstance) {
897
+ obj.$jspbMessageInstance = msg;
898
+ }
899
+ return obj;
900
+ };
901
+ }
902
+
903
+
904
+ /**
905
+ * Deserializes binary data (in protobuf wire format).
906
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
907
+ * @return {!proto.trb.instruments.v1.ListInstrumentsResponse}
908
+ */
909
+ proto.trb.instruments.v1.ListInstrumentsResponse.deserializeBinary = function(bytes) {
910
+ var reader = new jspb.BinaryReader(bytes);
911
+ var msg = new proto.trb.instruments.v1.ListInstrumentsResponse;
912
+ return proto.trb.instruments.v1.ListInstrumentsResponse.deserializeBinaryFromReader(msg, reader);
913
+ };
914
+
915
+
916
+ /**
917
+ * Deserializes binary data (in protobuf wire format) from the
918
+ * given reader into the given message object.
919
+ * @param {!proto.trb.instruments.v1.ListInstrumentsResponse} msg The message object to deserialize into.
920
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
921
+ * @return {!proto.trb.instruments.v1.ListInstrumentsResponse}
922
+ */
923
+ proto.trb.instruments.v1.ListInstrumentsResponse.deserializeBinaryFromReader = function(msg, reader) {
924
+ while (reader.nextField()) {
925
+ if (reader.isEndGroup()) {
926
+ break;
927
+ }
928
+ var field = reader.getFieldNumber();
929
+ switch (field) {
930
+ case 1:
931
+ var value = new proto.trb.instruments.v1.InstrumentListItem;
932
+ reader.readMessage(value,proto.trb.instruments.v1.InstrumentListItem.deserializeBinaryFromReader);
933
+ msg.addItems(value);
934
+ break;
935
+ default:
936
+ reader.skipField();
937
+ break;
938
+ }
939
+ }
940
+ return msg;
941
+ };
942
+
943
+
944
+ /**
945
+ * Serializes the message to binary data (in protobuf wire format).
946
+ * @return {!Uint8Array}
947
+ */
948
+ proto.trb.instruments.v1.ListInstrumentsResponse.prototype.serializeBinary = function() {
949
+ var writer = new jspb.BinaryWriter();
950
+ proto.trb.instruments.v1.ListInstrumentsResponse.serializeBinaryToWriter(this, writer);
951
+ return writer.getResultBuffer();
952
+ };
953
+
954
+
955
+ /**
956
+ * Serializes the given message to binary data (in protobuf wire
957
+ * format), writing to the given BinaryWriter.
958
+ * @param {!proto.trb.instruments.v1.ListInstrumentsResponse} message
959
+ * @param {!jspb.BinaryWriter} writer
960
+ * @suppress {unusedLocalVariables} f is only used for nested messages
961
+ */
962
+ proto.trb.instruments.v1.ListInstrumentsResponse.serializeBinaryToWriter = function(message, writer) {
963
+ var f = undefined;
964
+ f = message.getItemsList();
965
+ if (f.length > 0) {
966
+ writer.writeRepeatedMessage(
967
+ 1,
968
+ f,
969
+ proto.trb.instruments.v1.InstrumentListItem.serializeBinaryToWriter
970
+ );
971
+ }
972
+ };
973
+
974
+
975
+ /**
976
+ * repeated InstrumentListItem items = 1;
977
+ * @return {!Array<!proto.trb.instruments.v1.InstrumentListItem>}
978
+ */
979
+ proto.trb.instruments.v1.ListInstrumentsResponse.prototype.getItemsList = function() {
980
+ return /** @type{!Array<!proto.trb.instruments.v1.InstrumentListItem>} */ (
981
+ jspb.Message.getRepeatedWrapperField(this, proto.trb.instruments.v1.InstrumentListItem, 1));
982
+ };
983
+
984
+
985
+ /**
986
+ * @param {!Array<!proto.trb.instruments.v1.InstrumentListItem>} value
987
+ * @return {!proto.trb.instruments.v1.ListInstrumentsResponse} returns this
988
+ */
989
+ proto.trb.instruments.v1.ListInstrumentsResponse.prototype.setItemsList = function(value) {
990
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
991
+ };
992
+
993
+
994
+ /**
995
+ * @param {!proto.trb.instruments.v1.InstrumentListItem=} opt_value
996
+ * @param {number=} opt_index
997
+ * @return {!proto.trb.instruments.v1.InstrumentListItem}
998
+ */
999
+ proto.trb.instruments.v1.ListInstrumentsResponse.prototype.addItems = function(opt_value, opt_index) {
1000
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.trb.instruments.v1.InstrumentListItem, opt_index);
1001
+ };
1002
+
1003
+
1004
+ /**
1005
+ * Clears the list making it empty but non-null.
1006
+ * @return {!proto.trb.instruments.v1.ListInstrumentsResponse} returns this
1007
+ */
1008
+ proto.trb.instruments.v1.ListInstrumentsResponse.prototype.clearItemsList = function() {
1009
+ return this.setItemsList([]);
1010
+ };
1011
+
1012
+
1013
+
1014
+
1015
+
1016
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1017
+ /**
1018
+ * Creates an object representation of this proto.
1019
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1020
+ * Optional fields that are not set will be set to undefined.
1021
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1022
+ * For the list of reserved names please see:
1023
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1024
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1025
+ * JSPB instance for transitional soy proto support:
1026
+ * http://goto/soy-param-migration
1027
+ * @return {!Object}
1028
+ */
1029
+ proto.trb.instruments.v1.ListInstrumentVersionsRequest.prototype.toObject = function(opt_includeInstance) {
1030
+ return proto.trb.instruments.v1.ListInstrumentVersionsRequest.toObject(opt_includeInstance, this);
1031
+ };
1032
+
1033
+
1034
+ /**
1035
+ * Static version of the {@see toObject} method.
1036
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1037
+ * the JSPB instance for transitional soy proto support:
1038
+ * http://goto/soy-param-migration
1039
+ * @param {!proto.trb.instruments.v1.ListInstrumentVersionsRequest} msg The msg instance to transform.
1040
+ * @return {!Object}
1041
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1042
+ */
1043
+ proto.trb.instruments.v1.ListInstrumentVersionsRequest.toObject = function(includeInstance, msg) {
1044
+ var f, obj = {
1045
+ uid: jspb.Message.getFieldWithDefault(msg, 1, "")
1046
+ };
1047
+
1048
+ if (includeInstance) {
1049
+ obj.$jspbMessageInstance = msg;
1050
+ }
1051
+ return obj;
1052
+ };
1053
+ }
1054
+
1055
+
1056
+ /**
1057
+ * Deserializes binary data (in protobuf wire format).
1058
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1059
+ * @return {!proto.trb.instruments.v1.ListInstrumentVersionsRequest}
1060
+ */
1061
+ proto.trb.instruments.v1.ListInstrumentVersionsRequest.deserializeBinary = function(bytes) {
1062
+ var reader = new jspb.BinaryReader(bytes);
1063
+ var msg = new proto.trb.instruments.v1.ListInstrumentVersionsRequest;
1064
+ return proto.trb.instruments.v1.ListInstrumentVersionsRequest.deserializeBinaryFromReader(msg, reader);
1065
+ };
1066
+
1067
+
1068
+ /**
1069
+ * Deserializes binary data (in protobuf wire format) from the
1070
+ * given reader into the given message object.
1071
+ * @param {!proto.trb.instruments.v1.ListInstrumentVersionsRequest} msg The message object to deserialize into.
1072
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1073
+ * @return {!proto.trb.instruments.v1.ListInstrumentVersionsRequest}
1074
+ */
1075
+ proto.trb.instruments.v1.ListInstrumentVersionsRequest.deserializeBinaryFromReader = function(msg, reader) {
1076
+ while (reader.nextField()) {
1077
+ if (reader.isEndGroup()) {
1078
+ break;
1079
+ }
1080
+ var field = reader.getFieldNumber();
1081
+ switch (field) {
1082
+ case 1:
1083
+ var value = /** @type {string} */ (reader.readString());
1084
+ msg.setUid(value);
1085
+ break;
1086
+ default:
1087
+ reader.skipField();
1088
+ break;
1089
+ }
1090
+ }
1091
+ return msg;
1092
+ };
1093
+
1094
+
1095
+ /**
1096
+ * Serializes the message to binary data (in protobuf wire format).
1097
+ * @return {!Uint8Array}
1098
+ */
1099
+ proto.trb.instruments.v1.ListInstrumentVersionsRequest.prototype.serializeBinary = function() {
1100
+ var writer = new jspb.BinaryWriter();
1101
+ proto.trb.instruments.v1.ListInstrumentVersionsRequest.serializeBinaryToWriter(this, writer);
1102
+ return writer.getResultBuffer();
1103
+ };
1104
+
1105
+
1106
+ /**
1107
+ * Serializes the given message to binary data (in protobuf wire
1108
+ * format), writing to the given BinaryWriter.
1109
+ * @param {!proto.trb.instruments.v1.ListInstrumentVersionsRequest} message
1110
+ * @param {!jspb.BinaryWriter} writer
1111
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1112
+ */
1113
+ proto.trb.instruments.v1.ListInstrumentVersionsRequest.serializeBinaryToWriter = function(message, writer) {
1114
+ var f = undefined;
1115
+ f = message.getUid();
1116
+ if (f.length > 0) {
1117
+ writer.writeString(
1118
+ 1,
1119
+ f
1120
+ );
1121
+ }
1122
+ };
1123
+
1124
+
1125
+ /**
1126
+ * optional string uid = 1;
1127
+ * @return {string}
1128
+ */
1129
+ proto.trb.instruments.v1.ListInstrumentVersionsRequest.prototype.getUid = function() {
1130
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1131
+ };
1132
+
1133
+
1134
+ /**
1135
+ * @param {string} value
1136
+ * @return {!proto.trb.instruments.v1.ListInstrumentVersionsRequest} returns this
1137
+ */
1138
+ proto.trb.instruments.v1.ListInstrumentVersionsRequest.prototype.setUid = function(value) {
1139
+ return jspb.Message.setProto3StringField(this, 1, value);
1140
+ };
1141
+
1142
+
1143
+
1144
+
1145
+
1146
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1147
+ /**
1148
+ * Creates an object representation of this proto.
1149
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1150
+ * Optional fields that are not set will be set to undefined.
1151
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1152
+ * For the list of reserved names please see:
1153
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1154
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1155
+ * JSPB instance for transitional soy proto support:
1156
+ * http://goto/soy-param-migration
1157
+ * @return {!Object}
1158
+ */
1159
+ proto.trb.instruments.v1.InstrumentVersion.prototype.toObject = function(opt_includeInstance) {
1160
+ return proto.trb.instruments.v1.InstrumentVersion.toObject(opt_includeInstance, this);
1161
+ };
1162
+
1163
+
1164
+ /**
1165
+ * Static version of the {@see toObject} method.
1166
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1167
+ * the JSPB instance for transitional soy proto support:
1168
+ * http://goto/soy-param-migration
1169
+ * @param {!proto.trb.instruments.v1.InstrumentVersion} msg The msg instance to transform.
1170
+ * @return {!Object}
1171
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1172
+ */
1173
+ proto.trb.instruments.v1.InstrumentVersion.toObject = function(includeInstance, msg) {
1174
+ var f, obj = {
1175
+ share: (f = msg.getShare()) && api_tinvest_instruments_pb.Share.toObject(includeInstance, f),
1176
+ version: (f = msg.getVersion()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
1177
+ };
1178
+
1179
+ if (includeInstance) {
1180
+ obj.$jspbMessageInstance = msg;
1181
+ }
1182
+ return obj;
1183
+ };
1184
+ }
1185
+
1186
+
1187
+ /**
1188
+ * Deserializes binary data (in protobuf wire format).
1189
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1190
+ * @return {!proto.trb.instruments.v1.InstrumentVersion}
1191
+ */
1192
+ proto.trb.instruments.v1.InstrumentVersion.deserializeBinary = function(bytes) {
1193
+ var reader = new jspb.BinaryReader(bytes);
1194
+ var msg = new proto.trb.instruments.v1.InstrumentVersion;
1195
+ return proto.trb.instruments.v1.InstrumentVersion.deserializeBinaryFromReader(msg, reader);
1196
+ };
1197
+
1198
+
1199
+ /**
1200
+ * Deserializes binary data (in protobuf wire format) from the
1201
+ * given reader into the given message object.
1202
+ * @param {!proto.trb.instruments.v1.InstrumentVersion} msg The message object to deserialize into.
1203
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1204
+ * @return {!proto.trb.instruments.v1.InstrumentVersion}
1205
+ */
1206
+ proto.trb.instruments.v1.InstrumentVersion.deserializeBinaryFromReader = function(msg, reader) {
1207
+ while (reader.nextField()) {
1208
+ if (reader.isEndGroup()) {
1209
+ break;
1210
+ }
1211
+ var field = reader.getFieldNumber();
1212
+ switch (field) {
1213
+ case 1:
1214
+ var value = new api_tinvest_instruments_pb.Share;
1215
+ reader.readMessage(value,api_tinvest_instruments_pb.Share.deserializeBinaryFromReader);
1216
+ msg.setShare(value);
1217
+ break;
1218
+ case 2:
1219
+ var value = new google_protobuf_timestamp_pb.Timestamp;
1220
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1221
+ msg.setVersion(value);
1222
+ break;
1223
+ default:
1224
+ reader.skipField();
1225
+ break;
1226
+ }
1227
+ }
1228
+ return msg;
1229
+ };
1230
+
1231
+
1232
+ /**
1233
+ * Serializes the message to binary data (in protobuf wire format).
1234
+ * @return {!Uint8Array}
1235
+ */
1236
+ proto.trb.instruments.v1.InstrumentVersion.prototype.serializeBinary = function() {
1237
+ var writer = new jspb.BinaryWriter();
1238
+ proto.trb.instruments.v1.InstrumentVersion.serializeBinaryToWriter(this, writer);
1239
+ return writer.getResultBuffer();
1240
+ };
1241
+
1242
+
1243
+ /**
1244
+ * Serializes the given message to binary data (in protobuf wire
1245
+ * format), writing to the given BinaryWriter.
1246
+ * @param {!proto.trb.instruments.v1.InstrumentVersion} message
1247
+ * @param {!jspb.BinaryWriter} writer
1248
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1249
+ */
1250
+ proto.trb.instruments.v1.InstrumentVersion.serializeBinaryToWriter = function(message, writer) {
1251
+ var f = undefined;
1252
+ f = message.getShare();
1253
+ if (f != null) {
1254
+ writer.writeMessage(
1255
+ 1,
1256
+ f,
1257
+ api_tinvest_instruments_pb.Share.serializeBinaryToWriter
1258
+ );
1259
+ }
1260
+ f = message.getVersion();
1261
+ if (f != null) {
1262
+ writer.writeMessage(
1263
+ 2,
1264
+ f,
1265
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1266
+ );
1267
+ }
1268
+ };
1269
+
1270
+
1271
+ /**
1272
+ * optional tinkoff.public.invest.api.contract.v1.Share share = 1;
1273
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.Share}
1274
+ */
1275
+ proto.trb.instruments.v1.InstrumentVersion.prototype.getShare = function() {
1276
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.Share} */ (
1277
+ jspb.Message.getWrapperField(this, api_tinvest_instruments_pb.Share, 1));
1278
+ };
1279
+
1280
+
1281
+ /**
1282
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.Share|undefined} value
1283
+ * @return {!proto.trb.instruments.v1.InstrumentVersion} returns this
1284
+ */
1285
+ proto.trb.instruments.v1.InstrumentVersion.prototype.setShare = function(value) {
1286
+ return jspb.Message.setWrapperField(this, 1, value);
1287
+ };
1288
+
1289
+
1290
+ /**
1291
+ * Clears the message field making it undefined.
1292
+ * @return {!proto.trb.instruments.v1.InstrumentVersion} returns this
1293
+ */
1294
+ proto.trb.instruments.v1.InstrumentVersion.prototype.clearShare = function() {
1295
+ return this.setShare(undefined);
1296
+ };
1297
+
1298
+
1299
+ /**
1300
+ * Returns whether this field is set.
1301
+ * @return {boolean}
1302
+ */
1303
+ proto.trb.instruments.v1.InstrumentVersion.prototype.hasShare = function() {
1304
+ return jspb.Message.getField(this, 1) != null;
1305
+ };
1306
+
1307
+
1308
+ /**
1309
+ * optional google.protobuf.Timestamp version = 2;
1310
+ * @return {?proto.google.protobuf.Timestamp}
1311
+ */
1312
+ proto.trb.instruments.v1.InstrumentVersion.prototype.getVersion = function() {
1313
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1314
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
1315
+ };
1316
+
1317
+
1318
+ /**
1319
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1320
+ * @return {!proto.trb.instruments.v1.InstrumentVersion} returns this
1321
+ */
1322
+ proto.trb.instruments.v1.InstrumentVersion.prototype.setVersion = function(value) {
1323
+ return jspb.Message.setWrapperField(this, 2, value);
1324
+ };
1325
+
1326
+
1327
+ /**
1328
+ * Clears the message field making it undefined.
1329
+ * @return {!proto.trb.instruments.v1.InstrumentVersion} returns this
1330
+ */
1331
+ proto.trb.instruments.v1.InstrumentVersion.prototype.clearVersion = function() {
1332
+ return this.setVersion(undefined);
1333
+ };
1334
+
1335
+
1336
+ /**
1337
+ * Returns whether this field is set.
1338
+ * @return {boolean}
1339
+ */
1340
+ proto.trb.instruments.v1.InstrumentVersion.prototype.hasVersion = function() {
1341
+ return jspb.Message.getField(this, 2) != null;
1342
+ };
1343
+
1344
+
1345
+
1346
+ /**
1347
+ * List of repeated fields within this message type.
1348
+ * @private {!Array<number>}
1349
+ * @const
1350
+ */
1351
+ proto.trb.instruments.v1.ListInstrumentVersionsResponse.repeatedFields_ = [1];
1352
+
1353
+
1354
+
1355
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1356
+ /**
1357
+ * Creates an object representation of this proto.
1358
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1359
+ * Optional fields that are not set will be set to undefined.
1360
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1361
+ * For the list of reserved names please see:
1362
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1363
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1364
+ * JSPB instance for transitional soy proto support:
1365
+ * http://goto/soy-param-migration
1366
+ * @return {!Object}
1367
+ */
1368
+ proto.trb.instruments.v1.ListInstrumentVersionsResponse.prototype.toObject = function(opt_includeInstance) {
1369
+ return proto.trb.instruments.v1.ListInstrumentVersionsResponse.toObject(opt_includeInstance, this);
1370
+ };
1371
+
1372
+
1373
+ /**
1374
+ * Static version of the {@see toObject} method.
1375
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1376
+ * the JSPB instance for transitional soy proto support:
1377
+ * http://goto/soy-param-migration
1378
+ * @param {!proto.trb.instruments.v1.ListInstrumentVersionsResponse} msg The msg instance to transform.
1379
+ * @return {!Object}
1380
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1381
+ */
1382
+ proto.trb.instruments.v1.ListInstrumentVersionsResponse.toObject = function(includeInstance, msg) {
1383
+ var f, obj = {
1384
+ itemsList: jspb.Message.toObjectList(msg.getItemsList(),
1385
+ proto.trb.instruments.v1.InstrumentVersion.toObject, includeInstance)
1386
+ };
1387
+
1388
+ if (includeInstance) {
1389
+ obj.$jspbMessageInstance = msg;
1390
+ }
1391
+ return obj;
1392
+ };
1393
+ }
1394
+
1395
+
1396
+ /**
1397
+ * Deserializes binary data (in protobuf wire format).
1398
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1399
+ * @return {!proto.trb.instruments.v1.ListInstrumentVersionsResponse}
1400
+ */
1401
+ proto.trb.instruments.v1.ListInstrumentVersionsResponse.deserializeBinary = function(bytes) {
1402
+ var reader = new jspb.BinaryReader(bytes);
1403
+ var msg = new proto.trb.instruments.v1.ListInstrumentVersionsResponse;
1404
+ return proto.trb.instruments.v1.ListInstrumentVersionsResponse.deserializeBinaryFromReader(msg, reader);
1405
+ };
1406
+
1407
+
1408
+ /**
1409
+ * Deserializes binary data (in protobuf wire format) from the
1410
+ * given reader into the given message object.
1411
+ * @param {!proto.trb.instruments.v1.ListInstrumentVersionsResponse} msg The message object to deserialize into.
1412
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1413
+ * @return {!proto.trb.instruments.v1.ListInstrumentVersionsResponse}
1414
+ */
1415
+ proto.trb.instruments.v1.ListInstrumentVersionsResponse.deserializeBinaryFromReader = function(msg, reader) {
1416
+ while (reader.nextField()) {
1417
+ if (reader.isEndGroup()) {
1418
+ break;
1419
+ }
1420
+ var field = reader.getFieldNumber();
1421
+ switch (field) {
1422
+ case 1:
1423
+ var value = new proto.trb.instruments.v1.InstrumentVersion;
1424
+ reader.readMessage(value,proto.trb.instruments.v1.InstrumentVersion.deserializeBinaryFromReader);
1425
+ msg.addItems(value);
1426
+ break;
1427
+ default:
1428
+ reader.skipField();
1429
+ break;
1430
+ }
1431
+ }
1432
+ return msg;
1433
+ };
1434
+
1435
+
1436
+ /**
1437
+ * Serializes the message to binary data (in protobuf wire format).
1438
+ * @return {!Uint8Array}
1439
+ */
1440
+ proto.trb.instruments.v1.ListInstrumentVersionsResponse.prototype.serializeBinary = function() {
1441
+ var writer = new jspb.BinaryWriter();
1442
+ proto.trb.instruments.v1.ListInstrumentVersionsResponse.serializeBinaryToWriter(this, writer);
1443
+ return writer.getResultBuffer();
1444
+ };
1445
+
1446
+
1447
+ /**
1448
+ * Serializes the given message to binary data (in protobuf wire
1449
+ * format), writing to the given BinaryWriter.
1450
+ * @param {!proto.trb.instruments.v1.ListInstrumentVersionsResponse} message
1451
+ * @param {!jspb.BinaryWriter} writer
1452
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1453
+ */
1454
+ proto.trb.instruments.v1.ListInstrumentVersionsResponse.serializeBinaryToWriter = function(message, writer) {
1455
+ var f = undefined;
1456
+ f = message.getItemsList();
1457
+ if (f.length > 0) {
1458
+ writer.writeRepeatedMessage(
1459
+ 1,
1460
+ f,
1461
+ proto.trb.instruments.v1.InstrumentVersion.serializeBinaryToWriter
1462
+ );
1463
+ }
1464
+ };
1465
+
1466
+
1467
+ /**
1468
+ * repeated InstrumentVersion items = 1;
1469
+ * @return {!Array<!proto.trb.instruments.v1.InstrumentVersion>}
1470
+ */
1471
+ proto.trb.instruments.v1.ListInstrumentVersionsResponse.prototype.getItemsList = function() {
1472
+ return /** @type{!Array<!proto.trb.instruments.v1.InstrumentVersion>} */ (
1473
+ jspb.Message.getRepeatedWrapperField(this, proto.trb.instruments.v1.InstrumentVersion, 1));
1474
+ };
1475
+
1476
+
1477
+ /**
1478
+ * @param {!Array<!proto.trb.instruments.v1.InstrumentVersion>} value
1479
+ * @return {!proto.trb.instruments.v1.ListInstrumentVersionsResponse} returns this
1480
+ */
1481
+ proto.trb.instruments.v1.ListInstrumentVersionsResponse.prototype.setItemsList = function(value) {
1482
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
1483
+ };
1484
+
1485
+
1486
+ /**
1487
+ * @param {!proto.trb.instruments.v1.InstrumentVersion=} opt_value
1488
+ * @param {number=} opt_index
1489
+ * @return {!proto.trb.instruments.v1.InstrumentVersion}
1490
+ */
1491
+ proto.trb.instruments.v1.ListInstrumentVersionsResponse.prototype.addItems = function(opt_value, opt_index) {
1492
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.trb.instruments.v1.InstrumentVersion, opt_index);
1493
+ };
1494
+
1495
+
1496
+ /**
1497
+ * Clears the list making it empty but non-null.
1498
+ * @return {!proto.trb.instruments.v1.ListInstrumentVersionsResponse} returns this
1499
+ */
1500
+ proto.trb.instruments.v1.ListInstrumentVersionsResponse.prototype.clearItemsList = function() {
1501
+ return this.setItemsList([]);
1502
+ };
1503
+
1504
+
1505
+
1506
+
1507
+
1508
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1509
+ /**
1510
+ * Creates an object representation of this proto.
1511
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1512
+ * Optional fields that are not set will be set to undefined.
1513
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1514
+ * For the list of reserved names please see:
1515
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1516
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1517
+ * JSPB instance for transitional soy proto support:
1518
+ * http://goto/soy-param-migration
1519
+ * @return {!Object}
1520
+ */
1521
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.prototype.toObject = function(opt_includeInstance) {
1522
+ return proto.trb.instruments.v1.UpsertInstrumentsResponse.toObject(opt_includeInstance, this);
1523
+ };
1524
+
1525
+
1526
+ /**
1527
+ * Static version of the {@see toObject} method.
1528
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1529
+ * the JSPB instance for transitional soy proto support:
1530
+ * http://goto/soy-param-migration
1531
+ * @param {!proto.trb.instruments.v1.UpsertInstrumentsResponse} msg The msg instance to transform.
1532
+ * @return {!Object}
1533
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1534
+ */
1535
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.toObject = function(includeInstance, msg) {
1536
+ var f, obj = {
1537
+ fetched: jspb.Message.getFieldWithDefault(msg, 1, 0),
1538
+ inserted: jspb.Message.getFieldWithDefault(msg, 2, 0),
1539
+ updated: jspb.Message.getFieldWithDefault(msg, 3, 0),
1540
+ unchanged: jspb.Message.getFieldWithDefault(msg, 4, 0)
1541
+ };
1542
+
1543
+ if (includeInstance) {
1544
+ obj.$jspbMessageInstance = msg;
1545
+ }
1546
+ return obj;
1547
+ };
1548
+ }
1549
+
1550
+
1551
+ /**
1552
+ * Deserializes binary data (in protobuf wire format).
1553
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1554
+ * @return {!proto.trb.instruments.v1.UpsertInstrumentsResponse}
1555
+ */
1556
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.deserializeBinary = function(bytes) {
1557
+ var reader = new jspb.BinaryReader(bytes);
1558
+ var msg = new proto.trb.instruments.v1.UpsertInstrumentsResponse;
1559
+ return proto.trb.instruments.v1.UpsertInstrumentsResponse.deserializeBinaryFromReader(msg, reader);
1560
+ };
1561
+
1562
+
1563
+ /**
1564
+ * Deserializes binary data (in protobuf wire format) from the
1565
+ * given reader into the given message object.
1566
+ * @param {!proto.trb.instruments.v1.UpsertInstrumentsResponse} msg The message object to deserialize into.
1567
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1568
+ * @return {!proto.trb.instruments.v1.UpsertInstrumentsResponse}
1569
+ */
1570
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.deserializeBinaryFromReader = function(msg, reader) {
1571
+ while (reader.nextField()) {
1572
+ if (reader.isEndGroup()) {
1573
+ break;
1574
+ }
1575
+ var field = reader.getFieldNumber();
1576
+ switch (field) {
1577
+ case 1:
1578
+ var value = /** @type {number} */ (reader.readInt32());
1579
+ msg.setFetched(value);
1580
+ break;
1581
+ case 2:
1582
+ var value = /** @type {number} */ (reader.readInt32());
1583
+ msg.setInserted(value);
1584
+ break;
1585
+ case 3:
1586
+ var value = /** @type {number} */ (reader.readInt32());
1587
+ msg.setUpdated(value);
1588
+ break;
1589
+ case 4:
1590
+ var value = /** @type {number} */ (reader.readInt32());
1591
+ msg.setUnchanged(value);
1592
+ break;
1593
+ default:
1594
+ reader.skipField();
1595
+ break;
1596
+ }
1597
+ }
1598
+ return msg;
1599
+ };
1600
+
1601
+
1602
+ /**
1603
+ * Serializes the message to binary data (in protobuf wire format).
1604
+ * @return {!Uint8Array}
1605
+ */
1606
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.prototype.serializeBinary = function() {
1607
+ var writer = new jspb.BinaryWriter();
1608
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.serializeBinaryToWriter(this, writer);
1609
+ return writer.getResultBuffer();
1610
+ };
1611
+
1612
+
1613
+ /**
1614
+ * Serializes the given message to binary data (in protobuf wire
1615
+ * format), writing to the given BinaryWriter.
1616
+ * @param {!proto.trb.instruments.v1.UpsertInstrumentsResponse} message
1617
+ * @param {!jspb.BinaryWriter} writer
1618
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1619
+ */
1620
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.serializeBinaryToWriter = function(message, writer) {
1621
+ var f = undefined;
1622
+ f = message.getFetched();
1623
+ if (f !== 0) {
1624
+ writer.writeInt32(
1625
+ 1,
1626
+ f
1627
+ );
1628
+ }
1629
+ f = message.getInserted();
1630
+ if (f !== 0) {
1631
+ writer.writeInt32(
1632
+ 2,
1633
+ f
1634
+ );
1635
+ }
1636
+ f = message.getUpdated();
1637
+ if (f !== 0) {
1638
+ writer.writeInt32(
1639
+ 3,
1640
+ f
1641
+ );
1642
+ }
1643
+ f = message.getUnchanged();
1644
+ if (f !== 0) {
1645
+ writer.writeInt32(
1646
+ 4,
1647
+ f
1648
+ );
1649
+ }
1650
+ };
1651
+
1652
+
1653
+ /**
1654
+ * optional int32 fetched = 1;
1655
+ * @return {number}
1656
+ */
1657
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.prototype.getFetched = function() {
1658
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
1659
+ };
1660
+
1661
+
1662
+ /**
1663
+ * @param {number} value
1664
+ * @return {!proto.trb.instruments.v1.UpsertInstrumentsResponse} returns this
1665
+ */
1666
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.prototype.setFetched = function(value) {
1667
+ return jspb.Message.setProto3IntField(this, 1, value);
1668
+ };
1669
+
1670
+
1671
+ /**
1672
+ * optional int32 inserted = 2;
1673
+ * @return {number}
1674
+ */
1675
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.prototype.getInserted = function() {
1676
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1677
+ };
1678
+
1679
+
1680
+ /**
1681
+ * @param {number} value
1682
+ * @return {!proto.trb.instruments.v1.UpsertInstrumentsResponse} returns this
1683
+ */
1684
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.prototype.setInserted = function(value) {
1685
+ return jspb.Message.setProto3IntField(this, 2, value);
1686
+ };
1687
+
1688
+
1689
+ /**
1690
+ * optional int32 updated = 3;
1691
+ * @return {number}
1692
+ */
1693
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.prototype.getUpdated = function() {
1694
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
1695
+ };
1696
+
1697
+
1698
+ /**
1699
+ * @param {number} value
1700
+ * @return {!proto.trb.instruments.v1.UpsertInstrumentsResponse} returns this
1701
+ */
1702
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.prototype.setUpdated = function(value) {
1703
+ return jspb.Message.setProto3IntField(this, 3, value);
1704
+ };
1705
+
1706
+
1707
+ /**
1708
+ * optional int32 unchanged = 4;
1709
+ * @return {number}
1710
+ */
1711
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.prototype.getUnchanged = function() {
1712
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
1713
+ };
1714
+
1715
+
1716
+ /**
1717
+ * @param {number} value
1718
+ * @return {!proto.trb.instruments.v1.UpsertInstrumentsResponse} returns this
1719
+ */
1720
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.prototype.setUnchanged = function(value) {
1721
+ return jspb.Message.setProto3IntField(this, 4, value);
1722
+ };
1723
+
1724
+
1725
+
1726
+
1727
+
1728
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1729
+ /**
1730
+ * Creates an object representation of this proto.
1731
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1732
+ * Optional fields that are not set will be set to undefined.
1733
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1734
+ * For the list of reserved names please see:
1735
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1736
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1737
+ * JSPB instance for transitional soy proto support:
1738
+ * http://goto/soy-param-migration
1739
+ * @return {!Object}
1740
+ */
1741
+ proto.trb.instruments.v1.SyncInstrumentsRequest.prototype.toObject = function(opt_includeInstance) {
1742
+ return proto.trb.instruments.v1.SyncInstrumentsRequest.toObject(opt_includeInstance, this);
1743
+ };
1744
+
1745
+
1746
+ /**
1747
+ * Static version of the {@see toObject} method.
1748
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1749
+ * the JSPB instance for transitional soy proto support:
1750
+ * http://goto/soy-param-migration
1751
+ * @param {!proto.trb.instruments.v1.SyncInstrumentsRequest} msg The msg instance to transform.
1752
+ * @return {!Object}
1753
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1754
+ */
1755
+ proto.trb.instruments.v1.SyncInstrumentsRequest.toObject = function(includeInstance, msg) {
1756
+ var f, obj = {
1757
+
1758
+ };
1759
+
1760
+ if (includeInstance) {
1761
+ obj.$jspbMessageInstance = msg;
1762
+ }
1763
+ return obj;
1764
+ };
1765
+ }
1766
+
1767
+
1768
+ /**
1769
+ * Deserializes binary data (in protobuf wire format).
1770
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1771
+ * @return {!proto.trb.instruments.v1.SyncInstrumentsRequest}
1772
+ */
1773
+ proto.trb.instruments.v1.SyncInstrumentsRequest.deserializeBinary = function(bytes) {
1774
+ var reader = new jspb.BinaryReader(bytes);
1775
+ var msg = new proto.trb.instruments.v1.SyncInstrumentsRequest;
1776
+ return proto.trb.instruments.v1.SyncInstrumentsRequest.deserializeBinaryFromReader(msg, reader);
1777
+ };
1778
+
1779
+
1780
+ /**
1781
+ * Deserializes binary data (in protobuf wire format) from the
1782
+ * given reader into the given message object.
1783
+ * @param {!proto.trb.instruments.v1.SyncInstrumentsRequest} msg The message object to deserialize into.
1784
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1785
+ * @return {!proto.trb.instruments.v1.SyncInstrumentsRequest}
1786
+ */
1787
+ proto.trb.instruments.v1.SyncInstrumentsRequest.deserializeBinaryFromReader = function(msg, reader) {
1788
+ while (reader.nextField()) {
1789
+ if (reader.isEndGroup()) {
1790
+ break;
1791
+ }
1792
+ var field = reader.getFieldNumber();
1793
+ switch (field) {
1794
+ default:
1795
+ reader.skipField();
1796
+ break;
1797
+ }
1798
+ }
1799
+ return msg;
1800
+ };
1801
+
1802
+
1803
+ /**
1804
+ * Serializes the message to binary data (in protobuf wire format).
1805
+ * @return {!Uint8Array}
1806
+ */
1807
+ proto.trb.instruments.v1.SyncInstrumentsRequest.prototype.serializeBinary = function() {
1808
+ var writer = new jspb.BinaryWriter();
1809
+ proto.trb.instruments.v1.SyncInstrumentsRequest.serializeBinaryToWriter(this, writer);
1810
+ return writer.getResultBuffer();
1811
+ };
1812
+
1813
+
1814
+ /**
1815
+ * Serializes the given message to binary data (in protobuf wire
1816
+ * format), writing to the given BinaryWriter.
1817
+ * @param {!proto.trb.instruments.v1.SyncInstrumentsRequest} message
1818
+ * @param {!jspb.BinaryWriter} writer
1819
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1820
+ */
1821
+ proto.trb.instruments.v1.SyncInstrumentsRequest.serializeBinaryToWriter = function(message, writer) {
1822
+ var f = undefined;
1823
+ };
1824
+
1825
+
1826
+
1827
+
1828
+
1829
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1830
+ /**
1831
+ * Creates an object representation of this proto.
1832
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1833
+ * Optional fields that are not set will be set to undefined.
1834
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1835
+ * For the list of reserved names please see:
1836
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1837
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1838
+ * JSPB instance for transitional soy proto support:
1839
+ * http://goto/soy-param-migration
1840
+ * @return {!Object}
1841
+ */
1842
+ proto.trb.instruments.v1.SyncInstrumentsResponse.prototype.toObject = function(opt_includeInstance) {
1843
+ return proto.trb.instruments.v1.SyncInstrumentsResponse.toObject(opt_includeInstance, this);
1844
+ };
1845
+
1846
+
1847
+ /**
1848
+ * Static version of the {@see toObject} method.
1849
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1850
+ * the JSPB instance for transitional soy proto support:
1851
+ * http://goto/soy-param-migration
1852
+ * @param {!proto.trb.instruments.v1.SyncInstrumentsResponse} msg The msg instance to transform.
1853
+ * @return {!Object}
1854
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1855
+ */
1856
+ proto.trb.instruments.v1.SyncInstrumentsResponse.toObject = function(includeInstance, msg) {
1857
+ var f, obj = {
1858
+ upsert: (f = msg.getUpsert()) && proto.trb.instruments.v1.UpsertInstrumentsResponse.toObject(includeInstance, f)
1859
+ };
1860
+
1861
+ if (includeInstance) {
1862
+ obj.$jspbMessageInstance = msg;
1863
+ }
1864
+ return obj;
1865
+ };
1866
+ }
1867
+
1868
+
1869
+ /**
1870
+ * Deserializes binary data (in protobuf wire format).
1871
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1872
+ * @return {!proto.trb.instruments.v1.SyncInstrumentsResponse}
1873
+ */
1874
+ proto.trb.instruments.v1.SyncInstrumentsResponse.deserializeBinary = function(bytes) {
1875
+ var reader = new jspb.BinaryReader(bytes);
1876
+ var msg = new proto.trb.instruments.v1.SyncInstrumentsResponse;
1877
+ return proto.trb.instruments.v1.SyncInstrumentsResponse.deserializeBinaryFromReader(msg, reader);
1878
+ };
1879
+
1880
+
1881
+ /**
1882
+ * Deserializes binary data (in protobuf wire format) from the
1883
+ * given reader into the given message object.
1884
+ * @param {!proto.trb.instruments.v1.SyncInstrumentsResponse} msg The message object to deserialize into.
1885
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1886
+ * @return {!proto.trb.instruments.v1.SyncInstrumentsResponse}
1887
+ */
1888
+ proto.trb.instruments.v1.SyncInstrumentsResponse.deserializeBinaryFromReader = function(msg, reader) {
1889
+ while (reader.nextField()) {
1890
+ if (reader.isEndGroup()) {
1891
+ break;
1892
+ }
1893
+ var field = reader.getFieldNumber();
1894
+ switch (field) {
1895
+ case 1:
1896
+ var value = new proto.trb.instruments.v1.UpsertInstrumentsResponse;
1897
+ reader.readMessage(value,proto.trb.instruments.v1.UpsertInstrumentsResponse.deserializeBinaryFromReader);
1898
+ msg.setUpsert(value);
1899
+ break;
1900
+ default:
1901
+ reader.skipField();
1902
+ break;
1903
+ }
1904
+ }
1905
+ return msg;
1906
+ };
1907
+
1908
+
1909
+ /**
1910
+ * Serializes the message to binary data (in protobuf wire format).
1911
+ * @return {!Uint8Array}
1912
+ */
1913
+ proto.trb.instruments.v1.SyncInstrumentsResponse.prototype.serializeBinary = function() {
1914
+ var writer = new jspb.BinaryWriter();
1915
+ proto.trb.instruments.v1.SyncInstrumentsResponse.serializeBinaryToWriter(this, writer);
1916
+ return writer.getResultBuffer();
1917
+ };
1918
+
1919
+
1920
+ /**
1921
+ * Serializes the given message to binary data (in protobuf wire
1922
+ * format), writing to the given BinaryWriter.
1923
+ * @param {!proto.trb.instruments.v1.SyncInstrumentsResponse} message
1924
+ * @param {!jspb.BinaryWriter} writer
1925
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1926
+ */
1927
+ proto.trb.instruments.v1.SyncInstrumentsResponse.serializeBinaryToWriter = function(message, writer) {
1928
+ var f = undefined;
1929
+ f = message.getUpsert();
1930
+ if (f != null) {
1931
+ writer.writeMessage(
1932
+ 1,
1933
+ f,
1934
+ proto.trb.instruments.v1.UpsertInstrumentsResponse.serializeBinaryToWriter
1935
+ );
1936
+ }
1937
+ };
1938
+
1939
+
1940
+ /**
1941
+ * optional UpsertInstrumentsResponse upsert = 1;
1942
+ * @return {?proto.trb.instruments.v1.UpsertInstrumentsResponse}
1943
+ */
1944
+ proto.trb.instruments.v1.SyncInstrumentsResponse.prototype.getUpsert = function() {
1945
+ return /** @type{?proto.trb.instruments.v1.UpsertInstrumentsResponse} */ (
1946
+ jspb.Message.getWrapperField(this, proto.trb.instruments.v1.UpsertInstrumentsResponse, 1));
1947
+ };
1948
+
1949
+
1950
+ /**
1951
+ * @param {?proto.trb.instruments.v1.UpsertInstrumentsResponse|undefined} value
1952
+ * @return {!proto.trb.instruments.v1.SyncInstrumentsResponse} returns this
1953
+ */
1954
+ proto.trb.instruments.v1.SyncInstrumentsResponse.prototype.setUpsert = function(value) {
1955
+ return jspb.Message.setWrapperField(this, 1, value);
1956
+ };
1957
+
1958
+
1959
+ /**
1960
+ * Clears the message field making it undefined.
1961
+ * @return {!proto.trb.instruments.v1.SyncInstrumentsResponse} returns this
1962
+ */
1963
+ proto.trb.instruments.v1.SyncInstrumentsResponse.prototype.clearUpsert = function() {
1964
+ return this.setUpsert(undefined);
1965
+ };
1966
+
1967
+
1968
+ /**
1969
+ * Returns whether this field is set.
1970
+ * @return {boolean}
1971
+ */
1972
+ proto.trb.instruments.v1.SyncInstrumentsResponse.prototype.hasUpsert = function() {
1973
+ return jspb.Message.getField(this, 1) != null;
1974
+ };
1975
+
1976
+
1977
+ goog.object.extend(exports, proto.trb.instruments.v1);