@marleena/trb-proto 1.0.52 → 1.0.54

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