@marleena/trb-proto 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4934 @@
1
+ // source: tinvest/users.proto
2
+ /**
3
+ * @fileoverview
4
+ * @enhanceable
5
+ * @suppress {missingRequire} reports error on implicit type usages.
6
+ * @suppress {messageConventions} JS Compiler reports an error if a variable or
7
+ * field starts with 'MSG_' and isn't a translatable message.
8
+ * @public
9
+ */
10
+ // GENERATED CODE -- DO NOT EDIT!
11
+ /* eslint-disable */
12
+ // @ts-nocheck
13
+
14
+ var jspb = require('google-protobuf');
15
+ var goog = jspb;
16
+ var global =
17
+ (typeof globalThis !== 'undefined' && globalThis) ||
18
+ (typeof window !== 'undefined' && window) ||
19
+ (typeof global !== 'undefined' && global) ||
20
+ (typeof self !== 'undefined' && self) ||
21
+ (function () { return this; }).call(null) ||
22
+ Function('return this')();
23
+
24
+ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
25
+ goog.object.extend(proto, google_protobuf_timestamp_pb);
26
+ var google_api_field_behavior_pb = require('../google/api/field_behavior_pb.js');
27
+ goog.object.extend(proto, google_api_field_behavior_pb);
28
+ var tinvest_common_pb = require('../tinvest/common_pb.js');
29
+ goog.object.extend(proto, tinvest_common_pb);
30
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.AccessLevel', null, global);
31
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.Account', null, global);
32
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.AccountStatus', null, global);
33
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.AccountType', null, global);
34
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.AccountValue', null, global);
35
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters', null, global);
36
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.BankAccount', null, global);
37
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest', null, global);
38
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse', null, global);
39
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest', null, global);
40
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse', null, global);
41
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest', null, global);
42
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse', null, global);
43
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest', null, global);
44
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse', null, global);
45
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest', null, global);
46
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse', null, global);
47
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest', null, global);
48
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse', null, global);
49
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest', null, global);
50
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse', null, global);
51
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter', null, global);
52
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.PayInRequest', null, global);
53
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.PayInResponse', null, global);
54
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.StreamLimit', null, global);
55
+ goog.exportSymbol('proto.tinkoff.public.invest.api.contract.v1.UnaryLimit', null, global);
56
+ /**
57
+ * Generated by JsPbCodeGenerator.
58
+ * @param {Array=} opt_data Optional initial data array, typically from a
59
+ * server response, or constructed directly in Javascript. The array is used
60
+ * in place and becomes part of the constructed object. It is not cloned.
61
+ * If no data is provided, the constructed object will be empty, but still
62
+ * valid.
63
+ * @extends {jspb.Message}
64
+ * @constructor
65
+ */
66
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest = function(opt_data) {
67
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
68
+ };
69
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest, jspb.Message);
70
+ if (goog.DEBUG && !COMPILED) {
71
+ /**
72
+ * @public
73
+ * @override
74
+ */
75
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest.displayName = 'proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest';
76
+ }
77
+ /**
78
+ * Generated by JsPbCodeGenerator.
79
+ * @param {Array=} opt_data Optional initial data array, typically from a
80
+ * server response, or constructed directly in Javascript. The array is used
81
+ * in place and becomes part of the constructed object. It is not cloned.
82
+ * If no data is provided, the constructed object will be empty, but still
83
+ * valid.
84
+ * @extends {jspb.Message}
85
+ * @constructor
86
+ */
87
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse = function(opt_data) {
88
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse.repeatedFields_, null);
89
+ };
90
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse, jspb.Message);
91
+ if (goog.DEBUG && !COMPILED) {
92
+ /**
93
+ * @public
94
+ * @override
95
+ */
96
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse.displayName = 'proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse';
97
+ }
98
+ /**
99
+ * Generated by JsPbCodeGenerator.
100
+ * @param {Array=} opt_data Optional initial data array, typically from a
101
+ * server response, or constructed directly in Javascript. The array is used
102
+ * in place and becomes part of the constructed object. It is not cloned.
103
+ * If no data is provided, the constructed object will be empty, but still
104
+ * valid.
105
+ * @extends {jspb.Message}
106
+ * @constructor
107
+ */
108
+ proto.tinkoff.public.invest.api.contract.v1.Account = function(opt_data) {
109
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
110
+ };
111
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.Account, jspb.Message);
112
+ if (goog.DEBUG && !COMPILED) {
113
+ /**
114
+ * @public
115
+ * @override
116
+ */
117
+ proto.tinkoff.public.invest.api.contract.v1.Account.displayName = 'proto.tinkoff.public.invest.api.contract.v1.Account';
118
+ }
119
+ /**
120
+ * Generated by JsPbCodeGenerator.
121
+ * @param {Array=} opt_data Optional initial data array, typically from a
122
+ * server response, or constructed directly in Javascript. The array is used
123
+ * in place and becomes part of the constructed object. It is not cloned.
124
+ * If no data is provided, the constructed object will be empty, but still
125
+ * valid.
126
+ * @extends {jspb.Message}
127
+ * @constructor
128
+ */
129
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest = function(opt_data) {
130
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
131
+ };
132
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest, jspb.Message);
133
+ if (goog.DEBUG && !COMPILED) {
134
+ /**
135
+ * @public
136
+ * @override
137
+ */
138
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest.displayName = 'proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest';
139
+ }
140
+ /**
141
+ * Generated by JsPbCodeGenerator.
142
+ * @param {Array=} opt_data Optional initial data array, typically from a
143
+ * server response, or constructed directly in Javascript. The array is used
144
+ * in place and becomes part of the constructed object. It is not cloned.
145
+ * If no data is provided, the constructed object will be empty, but still
146
+ * valid.
147
+ * @extends {jspb.Message}
148
+ * @constructor
149
+ */
150
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse = function(opt_data) {
151
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
152
+ };
153
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse, jspb.Message);
154
+ if (goog.DEBUG && !COMPILED) {
155
+ /**
156
+ * @public
157
+ * @override
158
+ */
159
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.displayName = 'proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse';
160
+ }
161
+ /**
162
+ * Generated by JsPbCodeGenerator.
163
+ * @param {Array=} opt_data Optional initial data array, typically from a
164
+ * server response, or constructed directly in Javascript. The array is used
165
+ * in place and becomes part of the constructed object. It is not cloned.
166
+ * If no data is provided, the constructed object will be empty, but still
167
+ * valid.
168
+ * @extends {jspb.Message}
169
+ * @constructor
170
+ */
171
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest = function(opt_data) {
172
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
173
+ };
174
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest, jspb.Message);
175
+ if (goog.DEBUG && !COMPILED) {
176
+ /**
177
+ * @public
178
+ * @override
179
+ */
180
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest.displayName = 'proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest';
181
+ }
182
+ /**
183
+ * Generated by JsPbCodeGenerator.
184
+ * @param {Array=} opt_data Optional initial data array, typically from a
185
+ * server response, or constructed directly in Javascript. The array is used
186
+ * in place and becomes part of the constructed object. It is not cloned.
187
+ * If no data is provided, the constructed object will be empty, but still
188
+ * valid.
189
+ * @extends {jspb.Message}
190
+ * @constructor
191
+ */
192
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse = function(opt_data) {
193
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.repeatedFields_, null);
194
+ };
195
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse, jspb.Message);
196
+ if (goog.DEBUG && !COMPILED) {
197
+ /**
198
+ * @public
199
+ * @override
200
+ */
201
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.displayName = 'proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse';
202
+ }
203
+ /**
204
+ * Generated by JsPbCodeGenerator.
205
+ * @param {Array=} opt_data Optional initial data array, typically from a
206
+ * server response, or constructed directly in Javascript. The array is used
207
+ * in place and becomes part of the constructed object. It is not cloned.
208
+ * If no data is provided, the constructed object will be empty, but still
209
+ * valid.
210
+ * @extends {jspb.Message}
211
+ * @constructor
212
+ */
213
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit = function(opt_data) {
214
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.repeatedFields_, null);
215
+ };
216
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.UnaryLimit, jspb.Message);
217
+ if (goog.DEBUG && !COMPILED) {
218
+ /**
219
+ * @public
220
+ * @override
221
+ */
222
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.displayName = 'proto.tinkoff.public.invest.api.contract.v1.UnaryLimit';
223
+ }
224
+ /**
225
+ * Generated by JsPbCodeGenerator.
226
+ * @param {Array=} opt_data Optional initial data array, typically from a
227
+ * server response, or constructed directly in Javascript. The array is used
228
+ * in place and becomes part of the constructed object. It is not cloned.
229
+ * If no data is provided, the constructed object will be empty, but still
230
+ * valid.
231
+ * @extends {jspb.Message}
232
+ * @constructor
233
+ */
234
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit = function(opt_data) {
235
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tinkoff.public.invest.api.contract.v1.StreamLimit.repeatedFields_, null);
236
+ };
237
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.StreamLimit, jspb.Message);
238
+ if (goog.DEBUG && !COMPILED) {
239
+ /**
240
+ * @public
241
+ * @override
242
+ */
243
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.displayName = 'proto.tinkoff.public.invest.api.contract.v1.StreamLimit';
244
+ }
245
+ /**
246
+ * Generated by JsPbCodeGenerator.
247
+ * @param {Array=} opt_data Optional initial data array, typically from a
248
+ * server response, or constructed directly in Javascript. The array is used
249
+ * in place and becomes part of the constructed object. It is not cloned.
250
+ * If no data is provided, the constructed object will be empty, but still
251
+ * valid.
252
+ * @extends {jspb.Message}
253
+ * @constructor
254
+ */
255
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest = function(opt_data) {
256
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
257
+ };
258
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest, jspb.Message);
259
+ if (goog.DEBUG && !COMPILED) {
260
+ /**
261
+ * @public
262
+ * @override
263
+ */
264
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest.displayName = 'proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest';
265
+ }
266
+ /**
267
+ * Generated by JsPbCodeGenerator.
268
+ * @param {Array=} opt_data Optional initial data array, typically from a
269
+ * server response, or constructed directly in Javascript. The array is used
270
+ * in place and becomes part of the constructed object. It is not cloned.
271
+ * If no data is provided, the constructed object will be empty, but still
272
+ * valid.
273
+ * @extends {jspb.Message}
274
+ * @constructor
275
+ */
276
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse = function(opt_data) {
277
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.repeatedFields_, null);
278
+ };
279
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse, jspb.Message);
280
+ if (goog.DEBUG && !COMPILED) {
281
+ /**
282
+ * @public
283
+ * @override
284
+ */
285
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.displayName = 'proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse';
286
+ }
287
+ /**
288
+ * Generated by JsPbCodeGenerator.
289
+ * @param {Array=} opt_data Optional initial data array, typically from a
290
+ * server response, or constructed directly in Javascript. The array is used
291
+ * in place and becomes part of the constructed object. It is not cloned.
292
+ * If no data is provided, the constructed object will be empty, but still
293
+ * valid.
294
+ * @extends {jspb.Message}
295
+ * @constructor
296
+ */
297
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest = function(opt_data) {
298
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
299
+ };
300
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest, jspb.Message);
301
+ if (goog.DEBUG && !COMPILED) {
302
+ /**
303
+ * @public
304
+ * @override
305
+ */
306
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest.displayName = 'proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest';
307
+ }
308
+ /**
309
+ * Generated by JsPbCodeGenerator.
310
+ * @param {Array=} opt_data Optional initial data array, typically from a
311
+ * server response, or constructed directly in Javascript. The array is used
312
+ * in place and becomes part of the constructed object. It is not cloned.
313
+ * If no data is provided, the constructed object will be empty, but still
314
+ * valid.
315
+ * @extends {jspb.Message}
316
+ * @constructor
317
+ */
318
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse = function(opt_data) {
319
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse.repeatedFields_, null);
320
+ };
321
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse, jspb.Message);
322
+ if (goog.DEBUG && !COMPILED) {
323
+ /**
324
+ * @public
325
+ * @override
326
+ */
327
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse.displayName = 'proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse';
328
+ }
329
+ /**
330
+ * Generated by JsPbCodeGenerator.
331
+ * @param {Array=} opt_data Optional initial data array, typically from a
332
+ * server response, or constructed directly in Javascript. The array is used
333
+ * in place and becomes part of the constructed object. It is not cloned.
334
+ * If no data is provided, the constructed object will be empty, but still
335
+ * valid.
336
+ * @extends {jspb.Message}
337
+ * @constructor
338
+ */
339
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount = function(opt_data) {
340
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tinkoff.public.invest.api.contract.v1.BankAccount.repeatedFields_, null);
341
+ };
342
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.BankAccount, jspb.Message);
343
+ if (goog.DEBUG && !COMPILED) {
344
+ /**
345
+ * @public
346
+ * @override
347
+ */
348
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.displayName = 'proto.tinkoff.public.invest.api.contract.v1.BankAccount';
349
+ }
350
+ /**
351
+ * Generated by JsPbCodeGenerator.
352
+ * @param {Array=} opt_data Optional initial data array, typically from a
353
+ * server response, or constructed directly in Javascript. The array is used
354
+ * in place and becomes part of the constructed object. It is not cloned.
355
+ * If no data is provided, the constructed object will be empty, but still
356
+ * valid.
357
+ * @extends {jspb.Message}
358
+ * @constructor
359
+ */
360
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest = function(opt_data) {
361
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
362
+ };
363
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest, jspb.Message);
364
+ if (goog.DEBUG && !COMPILED) {
365
+ /**
366
+ * @public
367
+ * @override
368
+ */
369
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.displayName = 'proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest';
370
+ }
371
+ /**
372
+ * Generated by JsPbCodeGenerator.
373
+ * @param {Array=} opt_data Optional initial data array, typically from a
374
+ * server response, or constructed directly in Javascript. The array is used
375
+ * in place and becomes part of the constructed object. It is not cloned.
376
+ * If no data is provided, the constructed object will be empty, but still
377
+ * valid.
378
+ * @extends {jspb.Message}
379
+ * @constructor
380
+ */
381
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse = function(opt_data) {
382
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
383
+ };
384
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse, jspb.Message);
385
+ if (goog.DEBUG && !COMPILED) {
386
+ /**
387
+ * @public
388
+ * @override
389
+ */
390
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse.displayName = 'proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse';
391
+ }
392
+ /**
393
+ * Generated by JsPbCodeGenerator.
394
+ * @param {Array=} opt_data Optional initial data array, typically from a
395
+ * server response, or constructed directly in Javascript. The array is used
396
+ * in place and becomes part of the constructed object. It is not cloned.
397
+ * If no data is provided, the constructed object will be empty, but still
398
+ * valid.
399
+ * @extends {jspb.Message}
400
+ * @constructor
401
+ */
402
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest = function(opt_data) {
403
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
404
+ };
405
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.PayInRequest, jspb.Message);
406
+ if (goog.DEBUG && !COMPILED) {
407
+ /**
408
+ * @public
409
+ * @override
410
+ */
411
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest.displayName = 'proto.tinkoff.public.invest.api.contract.v1.PayInRequest';
412
+ }
413
+ /**
414
+ * Generated by JsPbCodeGenerator.
415
+ * @param {Array=} opt_data Optional initial data array, typically from a
416
+ * server response, or constructed directly in Javascript. The array is used
417
+ * in place and becomes part of the constructed object. It is not cloned.
418
+ * If no data is provided, the constructed object will be empty, but still
419
+ * valid.
420
+ * @extends {jspb.Message}
421
+ * @constructor
422
+ */
423
+ proto.tinkoff.public.invest.api.contract.v1.PayInResponse = function(opt_data) {
424
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
425
+ };
426
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.PayInResponse, jspb.Message);
427
+ if (goog.DEBUG && !COMPILED) {
428
+ /**
429
+ * @public
430
+ * @override
431
+ */
432
+ proto.tinkoff.public.invest.api.contract.v1.PayInResponse.displayName = 'proto.tinkoff.public.invest.api.contract.v1.PayInResponse';
433
+ }
434
+ /**
435
+ * Generated by JsPbCodeGenerator.
436
+ * @param {Array=} opt_data Optional initial data array, typically from a
437
+ * server response, or constructed directly in Javascript. The array is used
438
+ * in place and becomes part of the constructed object. It is not cloned.
439
+ * If no data is provided, the constructed object will be empty, but still
440
+ * valid.
441
+ * @extends {jspb.Message}
442
+ * @constructor
443
+ */
444
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest = function(opt_data) {
445
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.repeatedFields_, null);
446
+ };
447
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest, jspb.Message);
448
+ if (goog.DEBUG && !COMPILED) {
449
+ /**
450
+ * @public
451
+ * @override
452
+ */
453
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.displayName = 'proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest';
454
+ }
455
+ /**
456
+ * Generated by JsPbCodeGenerator.
457
+ * @param {Array=} opt_data Optional initial data array, typically from a
458
+ * server response, or constructed directly in Javascript. The array is used
459
+ * in place and becomes part of the constructed object. It is not cloned.
460
+ * If no data is provided, the constructed object will be empty, but still
461
+ * valid.
462
+ * @extends {jspb.Message}
463
+ * @constructor
464
+ */
465
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse = function(opt_data) {
466
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse.repeatedFields_, null);
467
+ };
468
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse, jspb.Message);
469
+ if (goog.DEBUG && !COMPILED) {
470
+ /**
471
+ * @public
472
+ * @override
473
+ */
474
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse.displayName = 'proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse';
475
+ }
476
+ /**
477
+ * Generated by JsPbCodeGenerator.
478
+ * @param {Array=} opt_data Optional initial data array, typically from a
479
+ * server response, or constructed directly in Javascript. The array is used
480
+ * in place and becomes part of the constructed object. It is not cloned.
481
+ * If no data is provided, the constructed object will be empty, but still
482
+ * valid.
483
+ * @extends {jspb.Message}
484
+ * @constructor
485
+ */
486
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters = function(opt_data) {
487
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.repeatedFields_, null);
488
+ };
489
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters, jspb.Message);
490
+ if (goog.DEBUG && !COMPILED) {
491
+ /**
492
+ * @public
493
+ * @override
494
+ */
495
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.displayName = 'proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters';
496
+ }
497
+ /**
498
+ * Generated by JsPbCodeGenerator.
499
+ * @param {Array=} opt_data Optional initial data array, typically from a
500
+ * server response, or constructed directly in Javascript. The array is used
501
+ * in place and becomes part of the constructed object. It is not cloned.
502
+ * If no data is provided, the constructed object will be empty, but still
503
+ * valid.
504
+ * @extends {jspb.Message}
505
+ * @constructor
506
+ */
507
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter = function(opt_data) {
508
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
509
+ };
510
+ goog.inherits(proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter, jspb.Message);
511
+ if (goog.DEBUG && !COMPILED) {
512
+ /**
513
+ * @public
514
+ * @override
515
+ */
516
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.displayName = 'proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter';
517
+ }
518
+
519
+
520
+
521
+ if (jspb.Message.GENERATE_TO_OBJECT) {
522
+ /**
523
+ * Creates an object representation of this proto.
524
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
525
+ * Optional fields that are not set will be set to undefined.
526
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
527
+ * For the list of reserved names please see:
528
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
529
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
530
+ * JSPB instance for transitional soy proto support:
531
+ * http://goto/soy-param-migration
532
+ * @return {!Object}
533
+ */
534
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest.prototype.toObject = function(opt_includeInstance) {
535
+ return proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest.toObject(opt_includeInstance, this);
536
+ };
537
+
538
+
539
+ /**
540
+ * Static version of the {@see toObject} method.
541
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
542
+ * the JSPB instance for transitional soy proto support:
543
+ * http://goto/soy-param-migration
544
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest} msg The msg instance to transform.
545
+ * @return {!Object}
546
+ * @suppress {unusedLocalVariables} f is only used for nested messages
547
+ */
548
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest.toObject = function(includeInstance, msg) {
549
+ var f, obj = {
550
+ status: (f = jspb.Message.getField(msg, 1)) == null ? undefined : f
551
+ };
552
+
553
+ if (includeInstance) {
554
+ obj.$jspbMessageInstance = msg;
555
+ }
556
+ return obj;
557
+ };
558
+ }
559
+
560
+
561
+ /**
562
+ * Deserializes binary data (in protobuf wire format).
563
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
564
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest}
565
+ */
566
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest.deserializeBinary = function(bytes) {
567
+ var reader = new jspb.BinaryReader(bytes);
568
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest;
569
+ return proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest.deserializeBinaryFromReader(msg, reader);
570
+ };
571
+
572
+
573
+ /**
574
+ * Deserializes binary data (in protobuf wire format) from the
575
+ * given reader into the given message object.
576
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest} msg The message object to deserialize into.
577
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
578
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest}
579
+ */
580
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest.deserializeBinaryFromReader = function(msg, reader) {
581
+ while (reader.nextField()) {
582
+ if (reader.isEndGroup()) {
583
+ break;
584
+ }
585
+ var field = reader.getFieldNumber();
586
+ switch (field) {
587
+ case 1:
588
+ var value = /** @type {!proto.tinkoff.public.invest.api.contract.v1.AccountStatus} */ (reader.readEnum());
589
+ msg.setStatus(value);
590
+ break;
591
+ default:
592
+ reader.skipField();
593
+ break;
594
+ }
595
+ }
596
+ return msg;
597
+ };
598
+
599
+
600
+ /**
601
+ * Serializes the message to binary data (in protobuf wire format).
602
+ * @return {!Uint8Array}
603
+ */
604
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest.prototype.serializeBinary = function() {
605
+ var writer = new jspb.BinaryWriter();
606
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest.serializeBinaryToWriter(this, writer);
607
+ return writer.getResultBuffer();
608
+ };
609
+
610
+
611
+ /**
612
+ * Serializes the given message to binary data (in protobuf wire
613
+ * format), writing to the given BinaryWriter.
614
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest} message
615
+ * @param {!jspb.BinaryWriter} writer
616
+ * @suppress {unusedLocalVariables} f is only used for nested messages
617
+ */
618
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest.serializeBinaryToWriter = function(message, writer) {
619
+ var f = undefined;
620
+ f = /** @type {!proto.tinkoff.public.invest.api.contract.v1.AccountStatus} */ (jspb.Message.getField(message, 1));
621
+ if (f != null) {
622
+ writer.writeEnum(
623
+ 1,
624
+ f
625
+ );
626
+ }
627
+ };
628
+
629
+
630
+ /**
631
+ * optional AccountStatus status = 1;
632
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.AccountStatus}
633
+ */
634
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest.prototype.getStatus = function() {
635
+ return /** @type {!proto.tinkoff.public.invest.api.contract.v1.AccountStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
636
+ };
637
+
638
+
639
+ /**
640
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.AccountStatus} value
641
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest} returns this
642
+ */
643
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest.prototype.setStatus = function(value) {
644
+ return jspb.Message.setField(this, 1, value);
645
+ };
646
+
647
+
648
+ /**
649
+ * Clears the field making it undefined.
650
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest} returns this
651
+ */
652
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest.prototype.clearStatus = function() {
653
+ return jspb.Message.setField(this, 1, undefined);
654
+ };
655
+
656
+
657
+ /**
658
+ * Returns whether this field is set.
659
+ * @return {boolean}
660
+ */
661
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsRequest.prototype.hasStatus = function() {
662
+ return jspb.Message.getField(this, 1) != null;
663
+ };
664
+
665
+
666
+
667
+ /**
668
+ * List of repeated fields within this message type.
669
+ * @private {!Array<number>}
670
+ * @const
671
+ */
672
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse.repeatedFields_ = [1];
673
+
674
+
675
+
676
+ if (jspb.Message.GENERATE_TO_OBJECT) {
677
+ /**
678
+ * Creates an object representation of this proto.
679
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
680
+ * Optional fields that are not set will be set to undefined.
681
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
682
+ * For the list of reserved names please see:
683
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
684
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
685
+ * JSPB instance for transitional soy proto support:
686
+ * http://goto/soy-param-migration
687
+ * @return {!Object}
688
+ */
689
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse.prototype.toObject = function(opt_includeInstance) {
690
+ return proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse.toObject(opt_includeInstance, this);
691
+ };
692
+
693
+
694
+ /**
695
+ * Static version of the {@see toObject} method.
696
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
697
+ * the JSPB instance for transitional soy proto support:
698
+ * http://goto/soy-param-migration
699
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse} msg The msg instance to transform.
700
+ * @return {!Object}
701
+ * @suppress {unusedLocalVariables} f is only used for nested messages
702
+ */
703
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse.toObject = function(includeInstance, msg) {
704
+ var f, obj = {
705
+ accountsList: jspb.Message.toObjectList(msg.getAccountsList(),
706
+ proto.tinkoff.public.invest.api.contract.v1.Account.toObject, includeInstance)
707
+ };
708
+
709
+ if (includeInstance) {
710
+ obj.$jspbMessageInstance = msg;
711
+ }
712
+ return obj;
713
+ };
714
+ }
715
+
716
+
717
+ /**
718
+ * Deserializes binary data (in protobuf wire format).
719
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
720
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse}
721
+ */
722
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse.deserializeBinary = function(bytes) {
723
+ var reader = new jspb.BinaryReader(bytes);
724
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse;
725
+ return proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse.deserializeBinaryFromReader(msg, reader);
726
+ };
727
+
728
+
729
+ /**
730
+ * Deserializes binary data (in protobuf wire format) from the
731
+ * given reader into the given message object.
732
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse} msg The message object to deserialize into.
733
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
734
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse}
735
+ */
736
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse.deserializeBinaryFromReader = function(msg, reader) {
737
+ while (reader.nextField()) {
738
+ if (reader.isEndGroup()) {
739
+ break;
740
+ }
741
+ var field = reader.getFieldNumber();
742
+ switch (field) {
743
+ case 1:
744
+ var value = new proto.tinkoff.public.invest.api.contract.v1.Account;
745
+ reader.readMessage(value,proto.tinkoff.public.invest.api.contract.v1.Account.deserializeBinaryFromReader);
746
+ msg.addAccounts(value);
747
+ break;
748
+ default:
749
+ reader.skipField();
750
+ break;
751
+ }
752
+ }
753
+ return msg;
754
+ };
755
+
756
+
757
+ /**
758
+ * Serializes the message to binary data (in protobuf wire format).
759
+ * @return {!Uint8Array}
760
+ */
761
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse.prototype.serializeBinary = function() {
762
+ var writer = new jspb.BinaryWriter();
763
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse.serializeBinaryToWriter(this, writer);
764
+ return writer.getResultBuffer();
765
+ };
766
+
767
+
768
+ /**
769
+ * Serializes the given message to binary data (in protobuf wire
770
+ * format), writing to the given BinaryWriter.
771
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse} message
772
+ * @param {!jspb.BinaryWriter} writer
773
+ * @suppress {unusedLocalVariables} f is only used for nested messages
774
+ */
775
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse.serializeBinaryToWriter = function(message, writer) {
776
+ var f = undefined;
777
+ f = message.getAccountsList();
778
+ if (f.length > 0) {
779
+ writer.writeRepeatedMessage(
780
+ 1,
781
+ f,
782
+ proto.tinkoff.public.invest.api.contract.v1.Account.serializeBinaryToWriter
783
+ );
784
+ }
785
+ };
786
+
787
+
788
+ /**
789
+ * repeated Account accounts = 1;
790
+ * @return {!Array<!proto.tinkoff.public.invest.api.contract.v1.Account>}
791
+ */
792
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse.prototype.getAccountsList = function() {
793
+ return /** @type{!Array<!proto.tinkoff.public.invest.api.contract.v1.Account>} */ (
794
+ jspb.Message.getRepeatedWrapperField(this, proto.tinkoff.public.invest.api.contract.v1.Account, 1));
795
+ };
796
+
797
+
798
+ /**
799
+ * @param {!Array<!proto.tinkoff.public.invest.api.contract.v1.Account>} value
800
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse} returns this
801
+ */
802
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse.prototype.setAccountsList = function(value) {
803
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
804
+ };
805
+
806
+
807
+ /**
808
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.Account=} opt_value
809
+ * @param {number=} opt_index
810
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Account}
811
+ */
812
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse.prototype.addAccounts = function(opt_value, opt_index) {
813
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tinkoff.public.invest.api.contract.v1.Account, opt_index);
814
+ };
815
+
816
+
817
+ /**
818
+ * Clears the list making it empty but non-null.
819
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse} returns this
820
+ */
821
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountsResponse.prototype.clearAccountsList = function() {
822
+ return this.setAccountsList([]);
823
+ };
824
+
825
+
826
+
827
+
828
+
829
+ if (jspb.Message.GENERATE_TO_OBJECT) {
830
+ /**
831
+ * Creates an object representation of this proto.
832
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
833
+ * Optional fields that are not set will be set to undefined.
834
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
835
+ * For the list of reserved names please see:
836
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
837
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
838
+ * JSPB instance for transitional soy proto support:
839
+ * http://goto/soy-param-migration
840
+ * @return {!Object}
841
+ */
842
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.toObject = function(opt_includeInstance) {
843
+ return proto.tinkoff.public.invest.api.contract.v1.Account.toObject(opt_includeInstance, this);
844
+ };
845
+
846
+
847
+ /**
848
+ * Static version of the {@see toObject} method.
849
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
850
+ * the JSPB instance for transitional soy proto support:
851
+ * http://goto/soy-param-migration
852
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.Account} msg The msg instance to transform.
853
+ * @return {!Object}
854
+ * @suppress {unusedLocalVariables} f is only used for nested messages
855
+ */
856
+ proto.tinkoff.public.invest.api.contract.v1.Account.toObject = function(includeInstance, msg) {
857
+ var f, obj = {
858
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
859
+ type: jspb.Message.getFieldWithDefault(msg, 2, 0),
860
+ name: jspb.Message.getFieldWithDefault(msg, 3, ""),
861
+ status: jspb.Message.getFieldWithDefault(msg, 4, 0),
862
+ openedDate: (f = msg.getOpenedDate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
863
+ closedDate: (f = msg.getClosedDate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
864
+ accessLevel: jspb.Message.getFieldWithDefault(msg, 7, 0)
865
+ };
866
+
867
+ if (includeInstance) {
868
+ obj.$jspbMessageInstance = msg;
869
+ }
870
+ return obj;
871
+ };
872
+ }
873
+
874
+
875
+ /**
876
+ * Deserializes binary data (in protobuf wire format).
877
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
878
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Account}
879
+ */
880
+ proto.tinkoff.public.invest.api.contract.v1.Account.deserializeBinary = function(bytes) {
881
+ var reader = new jspb.BinaryReader(bytes);
882
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.Account;
883
+ return proto.tinkoff.public.invest.api.contract.v1.Account.deserializeBinaryFromReader(msg, reader);
884
+ };
885
+
886
+
887
+ /**
888
+ * Deserializes binary data (in protobuf wire format) from the
889
+ * given reader into the given message object.
890
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.Account} msg The message object to deserialize into.
891
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
892
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Account}
893
+ */
894
+ proto.tinkoff.public.invest.api.contract.v1.Account.deserializeBinaryFromReader = function(msg, reader) {
895
+ while (reader.nextField()) {
896
+ if (reader.isEndGroup()) {
897
+ break;
898
+ }
899
+ var field = reader.getFieldNumber();
900
+ switch (field) {
901
+ case 1:
902
+ var value = /** @type {string} */ (reader.readString());
903
+ msg.setId(value);
904
+ break;
905
+ case 2:
906
+ var value = /** @type {!proto.tinkoff.public.invest.api.contract.v1.AccountType} */ (reader.readEnum());
907
+ msg.setType(value);
908
+ break;
909
+ case 3:
910
+ var value = /** @type {string} */ (reader.readString());
911
+ msg.setName(value);
912
+ break;
913
+ case 4:
914
+ var value = /** @type {!proto.tinkoff.public.invest.api.contract.v1.AccountStatus} */ (reader.readEnum());
915
+ msg.setStatus(value);
916
+ break;
917
+ case 5:
918
+ var value = new google_protobuf_timestamp_pb.Timestamp;
919
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
920
+ msg.setOpenedDate(value);
921
+ break;
922
+ case 6:
923
+ var value = new google_protobuf_timestamp_pb.Timestamp;
924
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
925
+ msg.setClosedDate(value);
926
+ break;
927
+ case 7:
928
+ var value = /** @type {!proto.tinkoff.public.invest.api.contract.v1.AccessLevel} */ (reader.readEnum());
929
+ msg.setAccessLevel(value);
930
+ break;
931
+ default:
932
+ reader.skipField();
933
+ break;
934
+ }
935
+ }
936
+ return msg;
937
+ };
938
+
939
+
940
+ /**
941
+ * Serializes the message to binary data (in protobuf wire format).
942
+ * @return {!Uint8Array}
943
+ */
944
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.serializeBinary = function() {
945
+ var writer = new jspb.BinaryWriter();
946
+ proto.tinkoff.public.invest.api.contract.v1.Account.serializeBinaryToWriter(this, writer);
947
+ return writer.getResultBuffer();
948
+ };
949
+
950
+
951
+ /**
952
+ * Serializes the given message to binary data (in protobuf wire
953
+ * format), writing to the given BinaryWriter.
954
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.Account} message
955
+ * @param {!jspb.BinaryWriter} writer
956
+ * @suppress {unusedLocalVariables} f is only used for nested messages
957
+ */
958
+ proto.tinkoff.public.invest.api.contract.v1.Account.serializeBinaryToWriter = function(message, writer) {
959
+ var f = undefined;
960
+ f = message.getId();
961
+ if (f.length > 0) {
962
+ writer.writeString(
963
+ 1,
964
+ f
965
+ );
966
+ }
967
+ f = message.getType();
968
+ if (f !== 0.0) {
969
+ writer.writeEnum(
970
+ 2,
971
+ f
972
+ );
973
+ }
974
+ f = message.getName();
975
+ if (f.length > 0) {
976
+ writer.writeString(
977
+ 3,
978
+ f
979
+ );
980
+ }
981
+ f = message.getStatus();
982
+ if (f !== 0.0) {
983
+ writer.writeEnum(
984
+ 4,
985
+ f
986
+ );
987
+ }
988
+ f = message.getOpenedDate();
989
+ if (f != null) {
990
+ writer.writeMessage(
991
+ 5,
992
+ f,
993
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
994
+ );
995
+ }
996
+ f = message.getClosedDate();
997
+ if (f != null) {
998
+ writer.writeMessage(
999
+ 6,
1000
+ f,
1001
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1002
+ );
1003
+ }
1004
+ f = message.getAccessLevel();
1005
+ if (f !== 0.0) {
1006
+ writer.writeEnum(
1007
+ 7,
1008
+ f
1009
+ );
1010
+ }
1011
+ };
1012
+
1013
+
1014
+ /**
1015
+ * optional string id = 1;
1016
+ * @return {string}
1017
+ */
1018
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.getId = function() {
1019
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1020
+ };
1021
+
1022
+
1023
+ /**
1024
+ * @param {string} value
1025
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Account} returns this
1026
+ */
1027
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.setId = function(value) {
1028
+ return jspb.Message.setProto3StringField(this, 1, value);
1029
+ };
1030
+
1031
+
1032
+ /**
1033
+ * optional AccountType type = 2;
1034
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.AccountType}
1035
+ */
1036
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.getType = function() {
1037
+ return /** @type {!proto.tinkoff.public.invest.api.contract.v1.AccountType} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1038
+ };
1039
+
1040
+
1041
+ /**
1042
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.AccountType} value
1043
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Account} returns this
1044
+ */
1045
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.setType = function(value) {
1046
+ return jspb.Message.setProto3EnumField(this, 2, value);
1047
+ };
1048
+
1049
+
1050
+ /**
1051
+ * optional string name = 3;
1052
+ * @return {string}
1053
+ */
1054
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.getName = function() {
1055
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1056
+ };
1057
+
1058
+
1059
+ /**
1060
+ * @param {string} value
1061
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Account} returns this
1062
+ */
1063
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.setName = function(value) {
1064
+ return jspb.Message.setProto3StringField(this, 3, value);
1065
+ };
1066
+
1067
+
1068
+ /**
1069
+ * optional AccountStatus status = 4;
1070
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.AccountStatus}
1071
+ */
1072
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.getStatus = function() {
1073
+ return /** @type {!proto.tinkoff.public.invest.api.contract.v1.AccountStatus} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
1074
+ };
1075
+
1076
+
1077
+ /**
1078
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.AccountStatus} value
1079
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Account} returns this
1080
+ */
1081
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.setStatus = function(value) {
1082
+ return jspb.Message.setProto3EnumField(this, 4, value);
1083
+ };
1084
+
1085
+
1086
+ /**
1087
+ * optional google.protobuf.Timestamp opened_date = 5;
1088
+ * @return {?proto.google.protobuf.Timestamp}
1089
+ */
1090
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.getOpenedDate = function() {
1091
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1092
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
1093
+ };
1094
+
1095
+
1096
+ /**
1097
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1098
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Account} returns this
1099
+ */
1100
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.setOpenedDate = function(value) {
1101
+ return jspb.Message.setWrapperField(this, 5, value);
1102
+ };
1103
+
1104
+
1105
+ /**
1106
+ * Clears the message field making it undefined.
1107
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Account} returns this
1108
+ */
1109
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.clearOpenedDate = function() {
1110
+ return this.setOpenedDate(undefined);
1111
+ };
1112
+
1113
+
1114
+ /**
1115
+ * Returns whether this field is set.
1116
+ * @return {boolean}
1117
+ */
1118
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.hasOpenedDate = function() {
1119
+ return jspb.Message.getField(this, 5) != null;
1120
+ };
1121
+
1122
+
1123
+ /**
1124
+ * optional google.protobuf.Timestamp closed_date = 6;
1125
+ * @return {?proto.google.protobuf.Timestamp}
1126
+ */
1127
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.getClosedDate = function() {
1128
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1129
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 6));
1130
+ };
1131
+
1132
+
1133
+ /**
1134
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1135
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Account} returns this
1136
+ */
1137
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.setClosedDate = function(value) {
1138
+ return jspb.Message.setWrapperField(this, 6, value);
1139
+ };
1140
+
1141
+
1142
+ /**
1143
+ * Clears the message field making it undefined.
1144
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Account} returns this
1145
+ */
1146
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.clearClosedDate = function() {
1147
+ return this.setClosedDate(undefined);
1148
+ };
1149
+
1150
+
1151
+ /**
1152
+ * Returns whether this field is set.
1153
+ * @return {boolean}
1154
+ */
1155
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.hasClosedDate = function() {
1156
+ return jspb.Message.getField(this, 6) != null;
1157
+ };
1158
+
1159
+
1160
+ /**
1161
+ * optional AccessLevel access_level = 7;
1162
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.AccessLevel}
1163
+ */
1164
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.getAccessLevel = function() {
1165
+ return /** @type {!proto.tinkoff.public.invest.api.contract.v1.AccessLevel} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
1166
+ };
1167
+
1168
+
1169
+ /**
1170
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.AccessLevel} value
1171
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.Account} returns this
1172
+ */
1173
+ proto.tinkoff.public.invest.api.contract.v1.Account.prototype.setAccessLevel = function(value) {
1174
+ return jspb.Message.setProto3EnumField(this, 7, value);
1175
+ };
1176
+
1177
+
1178
+
1179
+
1180
+
1181
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1182
+ /**
1183
+ * Creates an object representation of this proto.
1184
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1185
+ * Optional fields that are not set will be set to undefined.
1186
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1187
+ * For the list of reserved names please see:
1188
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1189
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1190
+ * JSPB instance for transitional soy proto support:
1191
+ * http://goto/soy-param-migration
1192
+ * @return {!Object}
1193
+ */
1194
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest.prototype.toObject = function(opt_includeInstance) {
1195
+ return proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest.toObject(opt_includeInstance, this);
1196
+ };
1197
+
1198
+
1199
+ /**
1200
+ * Static version of the {@see toObject} method.
1201
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1202
+ * the JSPB instance for transitional soy proto support:
1203
+ * http://goto/soy-param-migration
1204
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest} msg The msg instance to transform.
1205
+ * @return {!Object}
1206
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1207
+ */
1208
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest.toObject = function(includeInstance, msg) {
1209
+ var f, obj = {
1210
+ accountId: jspb.Message.getFieldWithDefault(msg, 1, "")
1211
+ };
1212
+
1213
+ if (includeInstance) {
1214
+ obj.$jspbMessageInstance = msg;
1215
+ }
1216
+ return obj;
1217
+ };
1218
+ }
1219
+
1220
+
1221
+ /**
1222
+ * Deserializes binary data (in protobuf wire format).
1223
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1224
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest}
1225
+ */
1226
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest.deserializeBinary = function(bytes) {
1227
+ var reader = new jspb.BinaryReader(bytes);
1228
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest;
1229
+ return proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest.deserializeBinaryFromReader(msg, reader);
1230
+ };
1231
+
1232
+
1233
+ /**
1234
+ * Deserializes binary data (in protobuf wire format) from the
1235
+ * given reader into the given message object.
1236
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest} msg The message object to deserialize into.
1237
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1238
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest}
1239
+ */
1240
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest.deserializeBinaryFromReader = function(msg, reader) {
1241
+ while (reader.nextField()) {
1242
+ if (reader.isEndGroup()) {
1243
+ break;
1244
+ }
1245
+ var field = reader.getFieldNumber();
1246
+ switch (field) {
1247
+ case 1:
1248
+ var value = /** @type {string} */ (reader.readString());
1249
+ msg.setAccountId(value);
1250
+ break;
1251
+ default:
1252
+ reader.skipField();
1253
+ break;
1254
+ }
1255
+ }
1256
+ return msg;
1257
+ };
1258
+
1259
+
1260
+ /**
1261
+ * Serializes the message to binary data (in protobuf wire format).
1262
+ * @return {!Uint8Array}
1263
+ */
1264
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest.prototype.serializeBinary = function() {
1265
+ var writer = new jspb.BinaryWriter();
1266
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest.serializeBinaryToWriter(this, writer);
1267
+ return writer.getResultBuffer();
1268
+ };
1269
+
1270
+
1271
+ /**
1272
+ * Serializes the given message to binary data (in protobuf wire
1273
+ * format), writing to the given BinaryWriter.
1274
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest} message
1275
+ * @param {!jspb.BinaryWriter} writer
1276
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1277
+ */
1278
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest.serializeBinaryToWriter = function(message, writer) {
1279
+ var f = undefined;
1280
+ f = message.getAccountId();
1281
+ if (f.length > 0) {
1282
+ writer.writeString(
1283
+ 1,
1284
+ f
1285
+ );
1286
+ }
1287
+ };
1288
+
1289
+
1290
+ /**
1291
+ * optional string account_id = 1;
1292
+ * @return {string}
1293
+ */
1294
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest.prototype.getAccountId = function() {
1295
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1296
+ };
1297
+
1298
+
1299
+ /**
1300
+ * @param {string} value
1301
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest} returns this
1302
+ */
1303
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesRequest.prototype.setAccountId = function(value) {
1304
+ return jspb.Message.setProto3StringField(this, 1, value);
1305
+ };
1306
+
1307
+
1308
+
1309
+
1310
+
1311
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1312
+ /**
1313
+ * Creates an object representation of this proto.
1314
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1315
+ * Optional fields that are not set will be set to undefined.
1316
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1317
+ * For the list of reserved names please see:
1318
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1319
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1320
+ * JSPB instance for transitional soy proto support:
1321
+ * http://goto/soy-param-migration
1322
+ * @return {!Object}
1323
+ */
1324
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.toObject = function(opt_includeInstance) {
1325
+ return proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.toObject(opt_includeInstance, this);
1326
+ };
1327
+
1328
+
1329
+ /**
1330
+ * Static version of the {@see toObject} method.
1331
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1332
+ * the JSPB instance for transitional soy proto support:
1333
+ * http://goto/soy-param-migration
1334
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} msg The msg instance to transform.
1335
+ * @return {!Object}
1336
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1337
+ */
1338
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.toObject = function(includeInstance, msg) {
1339
+ var f, obj = {
1340
+ liquidPortfolio: (f = msg.getLiquidPortfolio()) && tinvest_common_pb.MoneyValue.toObject(includeInstance, f),
1341
+ startingMargin: (f = msg.getStartingMargin()) && tinvest_common_pb.MoneyValue.toObject(includeInstance, f),
1342
+ minimalMargin: (f = msg.getMinimalMargin()) && tinvest_common_pb.MoneyValue.toObject(includeInstance, f),
1343
+ fundsSufficiencyLevel: (f = msg.getFundsSufficiencyLevel()) && tinvest_common_pb.Quotation.toObject(includeInstance, f),
1344
+ amountOfMissingFunds: (f = msg.getAmountOfMissingFunds()) && tinvest_common_pb.MoneyValue.toObject(includeInstance, f),
1345
+ correctedMargin: (f = msg.getCorrectedMargin()) && tinvest_common_pb.MoneyValue.toObject(includeInstance, f),
1346
+ guaranteeForFutures: (f = msg.getGuaranteeForFutures()) && tinvest_common_pb.MoneyValue.toObject(includeInstance, f)
1347
+ };
1348
+
1349
+ if (includeInstance) {
1350
+ obj.$jspbMessageInstance = msg;
1351
+ }
1352
+ return obj;
1353
+ };
1354
+ }
1355
+
1356
+
1357
+ /**
1358
+ * Deserializes binary data (in protobuf wire format).
1359
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1360
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse}
1361
+ */
1362
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.deserializeBinary = function(bytes) {
1363
+ var reader = new jspb.BinaryReader(bytes);
1364
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse;
1365
+ return proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.deserializeBinaryFromReader(msg, reader);
1366
+ };
1367
+
1368
+
1369
+ /**
1370
+ * Deserializes binary data (in protobuf wire format) from the
1371
+ * given reader into the given message object.
1372
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} msg The message object to deserialize into.
1373
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1374
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse}
1375
+ */
1376
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.deserializeBinaryFromReader = function(msg, reader) {
1377
+ while (reader.nextField()) {
1378
+ if (reader.isEndGroup()) {
1379
+ break;
1380
+ }
1381
+ var field = reader.getFieldNumber();
1382
+ switch (field) {
1383
+ case 1:
1384
+ var value = new tinvest_common_pb.MoneyValue;
1385
+ reader.readMessage(value,tinvest_common_pb.MoneyValue.deserializeBinaryFromReader);
1386
+ msg.setLiquidPortfolio(value);
1387
+ break;
1388
+ case 2:
1389
+ var value = new tinvest_common_pb.MoneyValue;
1390
+ reader.readMessage(value,tinvest_common_pb.MoneyValue.deserializeBinaryFromReader);
1391
+ msg.setStartingMargin(value);
1392
+ break;
1393
+ case 3:
1394
+ var value = new tinvest_common_pb.MoneyValue;
1395
+ reader.readMessage(value,tinvest_common_pb.MoneyValue.deserializeBinaryFromReader);
1396
+ msg.setMinimalMargin(value);
1397
+ break;
1398
+ case 4:
1399
+ var value = new tinvest_common_pb.Quotation;
1400
+ reader.readMessage(value,tinvest_common_pb.Quotation.deserializeBinaryFromReader);
1401
+ msg.setFundsSufficiencyLevel(value);
1402
+ break;
1403
+ case 5:
1404
+ var value = new tinvest_common_pb.MoneyValue;
1405
+ reader.readMessage(value,tinvest_common_pb.MoneyValue.deserializeBinaryFromReader);
1406
+ msg.setAmountOfMissingFunds(value);
1407
+ break;
1408
+ case 6:
1409
+ var value = new tinvest_common_pb.MoneyValue;
1410
+ reader.readMessage(value,tinvest_common_pb.MoneyValue.deserializeBinaryFromReader);
1411
+ msg.setCorrectedMargin(value);
1412
+ break;
1413
+ case 7:
1414
+ var value = new tinvest_common_pb.MoneyValue;
1415
+ reader.readMessage(value,tinvest_common_pb.MoneyValue.deserializeBinaryFromReader);
1416
+ msg.setGuaranteeForFutures(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.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.serializeBinary = function() {
1432
+ var writer = new jspb.BinaryWriter();
1433
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.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.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} message
1442
+ * @param {!jspb.BinaryWriter} writer
1443
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1444
+ */
1445
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.serializeBinaryToWriter = function(message, writer) {
1446
+ var f = undefined;
1447
+ f = message.getLiquidPortfolio();
1448
+ if (f != null) {
1449
+ writer.writeMessage(
1450
+ 1,
1451
+ f,
1452
+ tinvest_common_pb.MoneyValue.serializeBinaryToWriter
1453
+ );
1454
+ }
1455
+ f = message.getStartingMargin();
1456
+ if (f != null) {
1457
+ writer.writeMessage(
1458
+ 2,
1459
+ f,
1460
+ tinvest_common_pb.MoneyValue.serializeBinaryToWriter
1461
+ );
1462
+ }
1463
+ f = message.getMinimalMargin();
1464
+ if (f != null) {
1465
+ writer.writeMessage(
1466
+ 3,
1467
+ f,
1468
+ tinvest_common_pb.MoneyValue.serializeBinaryToWriter
1469
+ );
1470
+ }
1471
+ f = message.getFundsSufficiencyLevel();
1472
+ if (f != null) {
1473
+ writer.writeMessage(
1474
+ 4,
1475
+ f,
1476
+ tinvest_common_pb.Quotation.serializeBinaryToWriter
1477
+ );
1478
+ }
1479
+ f = message.getAmountOfMissingFunds();
1480
+ if (f != null) {
1481
+ writer.writeMessage(
1482
+ 5,
1483
+ f,
1484
+ tinvest_common_pb.MoneyValue.serializeBinaryToWriter
1485
+ );
1486
+ }
1487
+ f = message.getCorrectedMargin();
1488
+ if (f != null) {
1489
+ writer.writeMessage(
1490
+ 6,
1491
+ f,
1492
+ tinvest_common_pb.MoneyValue.serializeBinaryToWriter
1493
+ );
1494
+ }
1495
+ f = message.getGuaranteeForFutures();
1496
+ if (f != null) {
1497
+ writer.writeMessage(
1498
+ 7,
1499
+ f,
1500
+ tinvest_common_pb.MoneyValue.serializeBinaryToWriter
1501
+ );
1502
+ }
1503
+ };
1504
+
1505
+
1506
+ /**
1507
+ * optional MoneyValue liquid_portfolio = 1;
1508
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue}
1509
+ */
1510
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.getLiquidPortfolio = function() {
1511
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.MoneyValue} */ (
1512
+ jspb.Message.getWrapperField(this, tinvest_common_pb.MoneyValue, 1));
1513
+ };
1514
+
1515
+
1516
+ /**
1517
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue|undefined} value
1518
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} returns this
1519
+ */
1520
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.setLiquidPortfolio = function(value) {
1521
+ return jspb.Message.setWrapperField(this, 1, value);
1522
+ };
1523
+
1524
+
1525
+ /**
1526
+ * Clears the message field making it undefined.
1527
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} returns this
1528
+ */
1529
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.clearLiquidPortfolio = function() {
1530
+ return this.setLiquidPortfolio(undefined);
1531
+ };
1532
+
1533
+
1534
+ /**
1535
+ * Returns whether this field is set.
1536
+ * @return {boolean}
1537
+ */
1538
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.hasLiquidPortfolio = function() {
1539
+ return jspb.Message.getField(this, 1) != null;
1540
+ };
1541
+
1542
+
1543
+ /**
1544
+ * optional MoneyValue starting_margin = 2;
1545
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue}
1546
+ */
1547
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.getStartingMargin = function() {
1548
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.MoneyValue} */ (
1549
+ jspb.Message.getWrapperField(this, tinvest_common_pb.MoneyValue, 2));
1550
+ };
1551
+
1552
+
1553
+ /**
1554
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue|undefined} value
1555
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} returns this
1556
+ */
1557
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.setStartingMargin = function(value) {
1558
+ return jspb.Message.setWrapperField(this, 2, value);
1559
+ };
1560
+
1561
+
1562
+ /**
1563
+ * Clears the message field making it undefined.
1564
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} returns this
1565
+ */
1566
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.clearStartingMargin = function() {
1567
+ return this.setStartingMargin(undefined);
1568
+ };
1569
+
1570
+
1571
+ /**
1572
+ * Returns whether this field is set.
1573
+ * @return {boolean}
1574
+ */
1575
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.hasStartingMargin = function() {
1576
+ return jspb.Message.getField(this, 2) != null;
1577
+ };
1578
+
1579
+
1580
+ /**
1581
+ * optional MoneyValue minimal_margin = 3;
1582
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue}
1583
+ */
1584
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.getMinimalMargin = function() {
1585
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.MoneyValue} */ (
1586
+ jspb.Message.getWrapperField(this, tinvest_common_pb.MoneyValue, 3));
1587
+ };
1588
+
1589
+
1590
+ /**
1591
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue|undefined} value
1592
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} returns this
1593
+ */
1594
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.setMinimalMargin = function(value) {
1595
+ return jspb.Message.setWrapperField(this, 3, value);
1596
+ };
1597
+
1598
+
1599
+ /**
1600
+ * Clears the message field making it undefined.
1601
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} returns this
1602
+ */
1603
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.clearMinimalMargin = function() {
1604
+ return this.setMinimalMargin(undefined);
1605
+ };
1606
+
1607
+
1608
+ /**
1609
+ * Returns whether this field is set.
1610
+ * @return {boolean}
1611
+ */
1612
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.hasMinimalMargin = function() {
1613
+ return jspb.Message.getField(this, 3) != null;
1614
+ };
1615
+
1616
+
1617
+ /**
1618
+ * optional Quotation funds_sufficiency_level = 4;
1619
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.Quotation}
1620
+ */
1621
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.getFundsSufficiencyLevel = function() {
1622
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.Quotation} */ (
1623
+ jspb.Message.getWrapperField(this, tinvest_common_pb.Quotation, 4));
1624
+ };
1625
+
1626
+
1627
+ /**
1628
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.Quotation|undefined} value
1629
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} returns this
1630
+ */
1631
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.setFundsSufficiencyLevel = function(value) {
1632
+ return jspb.Message.setWrapperField(this, 4, value);
1633
+ };
1634
+
1635
+
1636
+ /**
1637
+ * Clears the message field making it undefined.
1638
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} returns this
1639
+ */
1640
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.clearFundsSufficiencyLevel = function() {
1641
+ return this.setFundsSufficiencyLevel(undefined);
1642
+ };
1643
+
1644
+
1645
+ /**
1646
+ * Returns whether this field is set.
1647
+ * @return {boolean}
1648
+ */
1649
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.hasFundsSufficiencyLevel = function() {
1650
+ return jspb.Message.getField(this, 4) != null;
1651
+ };
1652
+
1653
+
1654
+ /**
1655
+ * optional MoneyValue amount_of_missing_funds = 5;
1656
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue}
1657
+ */
1658
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.getAmountOfMissingFunds = function() {
1659
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.MoneyValue} */ (
1660
+ jspb.Message.getWrapperField(this, tinvest_common_pb.MoneyValue, 5));
1661
+ };
1662
+
1663
+
1664
+ /**
1665
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue|undefined} value
1666
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} returns this
1667
+ */
1668
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.setAmountOfMissingFunds = function(value) {
1669
+ return jspb.Message.setWrapperField(this, 5, value);
1670
+ };
1671
+
1672
+
1673
+ /**
1674
+ * Clears the message field making it undefined.
1675
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} returns this
1676
+ */
1677
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.clearAmountOfMissingFunds = function() {
1678
+ return this.setAmountOfMissingFunds(undefined);
1679
+ };
1680
+
1681
+
1682
+ /**
1683
+ * Returns whether this field is set.
1684
+ * @return {boolean}
1685
+ */
1686
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.hasAmountOfMissingFunds = function() {
1687
+ return jspb.Message.getField(this, 5) != null;
1688
+ };
1689
+
1690
+
1691
+ /**
1692
+ * optional MoneyValue corrected_margin = 6;
1693
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue}
1694
+ */
1695
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.getCorrectedMargin = function() {
1696
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.MoneyValue} */ (
1697
+ jspb.Message.getWrapperField(this, tinvest_common_pb.MoneyValue, 6));
1698
+ };
1699
+
1700
+
1701
+ /**
1702
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue|undefined} value
1703
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} returns this
1704
+ */
1705
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.setCorrectedMargin = function(value) {
1706
+ return jspb.Message.setWrapperField(this, 6, value);
1707
+ };
1708
+
1709
+
1710
+ /**
1711
+ * Clears the message field making it undefined.
1712
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} returns this
1713
+ */
1714
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.clearCorrectedMargin = function() {
1715
+ return this.setCorrectedMargin(undefined);
1716
+ };
1717
+
1718
+
1719
+ /**
1720
+ * Returns whether this field is set.
1721
+ * @return {boolean}
1722
+ */
1723
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.hasCorrectedMargin = function() {
1724
+ return jspb.Message.getField(this, 6) != null;
1725
+ };
1726
+
1727
+
1728
+ /**
1729
+ * optional MoneyValue guarantee_for_futures = 7;
1730
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue}
1731
+ */
1732
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.getGuaranteeForFutures = function() {
1733
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.MoneyValue} */ (
1734
+ jspb.Message.getWrapperField(this, tinvest_common_pb.MoneyValue, 7));
1735
+ };
1736
+
1737
+
1738
+ /**
1739
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue|undefined} value
1740
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} returns this
1741
+ */
1742
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.setGuaranteeForFutures = function(value) {
1743
+ return jspb.Message.setWrapperField(this, 7, value);
1744
+ };
1745
+
1746
+
1747
+ /**
1748
+ * Clears the message field making it undefined.
1749
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse} returns this
1750
+ */
1751
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.clearGuaranteeForFutures = function() {
1752
+ return this.setGuaranteeForFutures(undefined);
1753
+ };
1754
+
1755
+
1756
+ /**
1757
+ * Returns whether this field is set.
1758
+ * @return {boolean}
1759
+ */
1760
+ proto.tinkoff.public.invest.api.contract.v1.GetMarginAttributesResponse.prototype.hasGuaranteeForFutures = function() {
1761
+ return jspb.Message.getField(this, 7) != null;
1762
+ };
1763
+
1764
+
1765
+
1766
+
1767
+
1768
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1769
+ /**
1770
+ * Creates an object representation of this proto.
1771
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1772
+ * Optional fields that are not set will be set to undefined.
1773
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1774
+ * For the list of reserved names please see:
1775
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1776
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1777
+ * JSPB instance for transitional soy proto support:
1778
+ * http://goto/soy-param-migration
1779
+ * @return {!Object}
1780
+ */
1781
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest.prototype.toObject = function(opt_includeInstance) {
1782
+ return proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest.toObject(opt_includeInstance, this);
1783
+ };
1784
+
1785
+
1786
+ /**
1787
+ * Static version of the {@see toObject} method.
1788
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1789
+ * the JSPB instance for transitional soy proto support:
1790
+ * http://goto/soy-param-migration
1791
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest} msg The msg instance to transform.
1792
+ * @return {!Object}
1793
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1794
+ */
1795
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest.toObject = function(includeInstance, msg) {
1796
+ var f, obj = {
1797
+
1798
+ };
1799
+
1800
+ if (includeInstance) {
1801
+ obj.$jspbMessageInstance = msg;
1802
+ }
1803
+ return obj;
1804
+ };
1805
+ }
1806
+
1807
+
1808
+ /**
1809
+ * Deserializes binary data (in protobuf wire format).
1810
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1811
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest}
1812
+ */
1813
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest.deserializeBinary = function(bytes) {
1814
+ var reader = new jspb.BinaryReader(bytes);
1815
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest;
1816
+ return proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest.deserializeBinaryFromReader(msg, reader);
1817
+ };
1818
+
1819
+
1820
+ /**
1821
+ * Deserializes binary data (in protobuf wire format) from the
1822
+ * given reader into the given message object.
1823
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest} msg The message object to deserialize into.
1824
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1825
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest}
1826
+ */
1827
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest.deserializeBinaryFromReader = function(msg, reader) {
1828
+ while (reader.nextField()) {
1829
+ if (reader.isEndGroup()) {
1830
+ break;
1831
+ }
1832
+ var field = reader.getFieldNumber();
1833
+ switch (field) {
1834
+ default:
1835
+ reader.skipField();
1836
+ break;
1837
+ }
1838
+ }
1839
+ return msg;
1840
+ };
1841
+
1842
+
1843
+ /**
1844
+ * Serializes the message to binary data (in protobuf wire format).
1845
+ * @return {!Uint8Array}
1846
+ */
1847
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest.prototype.serializeBinary = function() {
1848
+ var writer = new jspb.BinaryWriter();
1849
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest.serializeBinaryToWriter(this, writer);
1850
+ return writer.getResultBuffer();
1851
+ };
1852
+
1853
+
1854
+ /**
1855
+ * Serializes the given message to binary data (in protobuf wire
1856
+ * format), writing to the given BinaryWriter.
1857
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest} message
1858
+ * @param {!jspb.BinaryWriter} writer
1859
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1860
+ */
1861
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffRequest.serializeBinaryToWriter = function(message, writer) {
1862
+ var f = undefined;
1863
+ };
1864
+
1865
+
1866
+
1867
+ /**
1868
+ * List of repeated fields within this message type.
1869
+ * @private {!Array<number>}
1870
+ * @const
1871
+ */
1872
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.repeatedFields_ = [1,2];
1873
+
1874
+
1875
+
1876
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1877
+ /**
1878
+ * Creates an object representation of this proto.
1879
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
1880
+ * Optional fields that are not set will be set to undefined.
1881
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1882
+ * For the list of reserved names please see:
1883
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1884
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1885
+ * JSPB instance for transitional soy proto support:
1886
+ * http://goto/soy-param-migration
1887
+ * @return {!Object}
1888
+ */
1889
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.prototype.toObject = function(opt_includeInstance) {
1890
+ return proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.toObject(opt_includeInstance, this);
1891
+ };
1892
+
1893
+
1894
+ /**
1895
+ * Static version of the {@see toObject} method.
1896
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1897
+ * the JSPB instance for transitional soy proto support:
1898
+ * http://goto/soy-param-migration
1899
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse} msg The msg instance to transform.
1900
+ * @return {!Object}
1901
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1902
+ */
1903
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.toObject = function(includeInstance, msg) {
1904
+ var f, obj = {
1905
+ unaryLimitsList: jspb.Message.toObjectList(msg.getUnaryLimitsList(),
1906
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.toObject, includeInstance),
1907
+ streamLimitsList: jspb.Message.toObjectList(msg.getStreamLimitsList(),
1908
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.toObject, includeInstance)
1909
+ };
1910
+
1911
+ if (includeInstance) {
1912
+ obj.$jspbMessageInstance = msg;
1913
+ }
1914
+ return obj;
1915
+ };
1916
+ }
1917
+
1918
+
1919
+ /**
1920
+ * Deserializes binary data (in protobuf wire format).
1921
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1922
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse}
1923
+ */
1924
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.deserializeBinary = function(bytes) {
1925
+ var reader = new jspb.BinaryReader(bytes);
1926
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse;
1927
+ return proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.deserializeBinaryFromReader(msg, reader);
1928
+ };
1929
+
1930
+
1931
+ /**
1932
+ * Deserializes binary data (in protobuf wire format) from the
1933
+ * given reader into the given message object.
1934
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse} msg The message object to deserialize into.
1935
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1936
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse}
1937
+ */
1938
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.deserializeBinaryFromReader = function(msg, reader) {
1939
+ while (reader.nextField()) {
1940
+ if (reader.isEndGroup()) {
1941
+ break;
1942
+ }
1943
+ var field = reader.getFieldNumber();
1944
+ switch (field) {
1945
+ case 1:
1946
+ var value = new proto.tinkoff.public.invest.api.contract.v1.UnaryLimit;
1947
+ reader.readMessage(value,proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.deserializeBinaryFromReader);
1948
+ msg.addUnaryLimits(value);
1949
+ break;
1950
+ case 2:
1951
+ var value = new proto.tinkoff.public.invest.api.contract.v1.StreamLimit;
1952
+ reader.readMessage(value,proto.tinkoff.public.invest.api.contract.v1.StreamLimit.deserializeBinaryFromReader);
1953
+ msg.addStreamLimits(value);
1954
+ break;
1955
+ default:
1956
+ reader.skipField();
1957
+ break;
1958
+ }
1959
+ }
1960
+ return msg;
1961
+ };
1962
+
1963
+
1964
+ /**
1965
+ * Serializes the message to binary data (in protobuf wire format).
1966
+ * @return {!Uint8Array}
1967
+ */
1968
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.prototype.serializeBinary = function() {
1969
+ var writer = new jspb.BinaryWriter();
1970
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.serializeBinaryToWriter(this, writer);
1971
+ return writer.getResultBuffer();
1972
+ };
1973
+
1974
+
1975
+ /**
1976
+ * Serializes the given message to binary data (in protobuf wire
1977
+ * format), writing to the given BinaryWriter.
1978
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse} message
1979
+ * @param {!jspb.BinaryWriter} writer
1980
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1981
+ */
1982
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.serializeBinaryToWriter = function(message, writer) {
1983
+ var f = undefined;
1984
+ f = message.getUnaryLimitsList();
1985
+ if (f.length > 0) {
1986
+ writer.writeRepeatedMessage(
1987
+ 1,
1988
+ f,
1989
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.serializeBinaryToWriter
1990
+ );
1991
+ }
1992
+ f = message.getStreamLimitsList();
1993
+ if (f.length > 0) {
1994
+ writer.writeRepeatedMessage(
1995
+ 2,
1996
+ f,
1997
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.serializeBinaryToWriter
1998
+ );
1999
+ }
2000
+ };
2001
+
2002
+
2003
+ /**
2004
+ * repeated UnaryLimit unary_limits = 1;
2005
+ * @return {!Array<!proto.tinkoff.public.invest.api.contract.v1.UnaryLimit>}
2006
+ */
2007
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.prototype.getUnaryLimitsList = function() {
2008
+ return /** @type{!Array<!proto.tinkoff.public.invest.api.contract.v1.UnaryLimit>} */ (
2009
+ jspb.Message.getRepeatedWrapperField(this, proto.tinkoff.public.invest.api.contract.v1.UnaryLimit, 1));
2010
+ };
2011
+
2012
+
2013
+ /**
2014
+ * @param {!Array<!proto.tinkoff.public.invest.api.contract.v1.UnaryLimit>} value
2015
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse} returns this
2016
+ */
2017
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.prototype.setUnaryLimitsList = function(value) {
2018
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
2019
+ };
2020
+
2021
+
2022
+ /**
2023
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.UnaryLimit=} opt_value
2024
+ * @param {number=} opt_index
2025
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.UnaryLimit}
2026
+ */
2027
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.prototype.addUnaryLimits = function(opt_value, opt_index) {
2028
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tinkoff.public.invest.api.contract.v1.UnaryLimit, opt_index);
2029
+ };
2030
+
2031
+
2032
+ /**
2033
+ * Clears the list making it empty but non-null.
2034
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse} returns this
2035
+ */
2036
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.prototype.clearUnaryLimitsList = function() {
2037
+ return this.setUnaryLimitsList([]);
2038
+ };
2039
+
2040
+
2041
+ /**
2042
+ * repeated StreamLimit stream_limits = 2;
2043
+ * @return {!Array<!proto.tinkoff.public.invest.api.contract.v1.StreamLimit>}
2044
+ */
2045
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.prototype.getStreamLimitsList = function() {
2046
+ return /** @type{!Array<!proto.tinkoff.public.invest.api.contract.v1.StreamLimit>} */ (
2047
+ jspb.Message.getRepeatedWrapperField(this, proto.tinkoff.public.invest.api.contract.v1.StreamLimit, 2));
2048
+ };
2049
+
2050
+
2051
+ /**
2052
+ * @param {!Array<!proto.tinkoff.public.invest.api.contract.v1.StreamLimit>} value
2053
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse} returns this
2054
+ */
2055
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.prototype.setStreamLimitsList = function(value) {
2056
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
2057
+ };
2058
+
2059
+
2060
+ /**
2061
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.StreamLimit=} opt_value
2062
+ * @param {number=} opt_index
2063
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.StreamLimit}
2064
+ */
2065
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.prototype.addStreamLimits = function(opt_value, opt_index) {
2066
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tinkoff.public.invest.api.contract.v1.StreamLimit, opt_index);
2067
+ };
2068
+
2069
+
2070
+ /**
2071
+ * Clears the list making it empty but non-null.
2072
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse} returns this
2073
+ */
2074
+ proto.tinkoff.public.invest.api.contract.v1.GetUserTariffResponse.prototype.clearStreamLimitsList = function() {
2075
+ return this.setStreamLimitsList([]);
2076
+ };
2077
+
2078
+
2079
+
2080
+ /**
2081
+ * List of repeated fields within this message type.
2082
+ * @private {!Array<number>}
2083
+ * @const
2084
+ */
2085
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.repeatedFields_ = [2];
2086
+
2087
+
2088
+
2089
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2090
+ /**
2091
+ * Creates an object representation of this proto.
2092
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2093
+ * Optional fields that are not set will be set to undefined.
2094
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2095
+ * For the list of reserved names please see:
2096
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2097
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2098
+ * JSPB instance for transitional soy proto support:
2099
+ * http://goto/soy-param-migration
2100
+ * @return {!Object}
2101
+ */
2102
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.prototype.toObject = function(opt_includeInstance) {
2103
+ return proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.toObject(opt_includeInstance, this);
2104
+ };
2105
+
2106
+
2107
+ /**
2108
+ * Static version of the {@see toObject} method.
2109
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2110
+ * the JSPB instance for transitional soy proto support:
2111
+ * http://goto/soy-param-migration
2112
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.UnaryLimit} msg The msg instance to transform.
2113
+ * @return {!Object}
2114
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2115
+ */
2116
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.toObject = function(includeInstance, msg) {
2117
+ var f, obj = {
2118
+ limitPerMinute: jspb.Message.getFieldWithDefault(msg, 1, 0),
2119
+ methodsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
2120
+ limitPerSecond: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f
2121
+ };
2122
+
2123
+ if (includeInstance) {
2124
+ obj.$jspbMessageInstance = msg;
2125
+ }
2126
+ return obj;
2127
+ };
2128
+ }
2129
+
2130
+
2131
+ /**
2132
+ * Deserializes binary data (in protobuf wire format).
2133
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2134
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.UnaryLimit}
2135
+ */
2136
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.deserializeBinary = function(bytes) {
2137
+ var reader = new jspb.BinaryReader(bytes);
2138
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.UnaryLimit;
2139
+ return proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.deserializeBinaryFromReader(msg, reader);
2140
+ };
2141
+
2142
+
2143
+ /**
2144
+ * Deserializes binary data (in protobuf wire format) from the
2145
+ * given reader into the given message object.
2146
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.UnaryLimit} msg The message object to deserialize into.
2147
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2148
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.UnaryLimit}
2149
+ */
2150
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.deserializeBinaryFromReader = function(msg, reader) {
2151
+ while (reader.nextField()) {
2152
+ if (reader.isEndGroup()) {
2153
+ break;
2154
+ }
2155
+ var field = reader.getFieldNumber();
2156
+ switch (field) {
2157
+ case 1:
2158
+ var value = /** @type {number} */ (reader.readInt32());
2159
+ msg.setLimitPerMinute(value);
2160
+ break;
2161
+ case 2:
2162
+ var value = /** @type {string} */ (reader.readString());
2163
+ msg.addMethods(value);
2164
+ break;
2165
+ case 3:
2166
+ var value = /** @type {number} */ (reader.readInt32());
2167
+ msg.setLimitPerSecond(value);
2168
+ break;
2169
+ default:
2170
+ reader.skipField();
2171
+ break;
2172
+ }
2173
+ }
2174
+ return msg;
2175
+ };
2176
+
2177
+
2178
+ /**
2179
+ * Serializes the message to binary data (in protobuf wire format).
2180
+ * @return {!Uint8Array}
2181
+ */
2182
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.prototype.serializeBinary = function() {
2183
+ var writer = new jspb.BinaryWriter();
2184
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.serializeBinaryToWriter(this, writer);
2185
+ return writer.getResultBuffer();
2186
+ };
2187
+
2188
+
2189
+ /**
2190
+ * Serializes the given message to binary data (in protobuf wire
2191
+ * format), writing to the given BinaryWriter.
2192
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.UnaryLimit} message
2193
+ * @param {!jspb.BinaryWriter} writer
2194
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2195
+ */
2196
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.serializeBinaryToWriter = function(message, writer) {
2197
+ var f = undefined;
2198
+ f = message.getLimitPerMinute();
2199
+ if (f !== 0) {
2200
+ writer.writeInt32(
2201
+ 1,
2202
+ f
2203
+ );
2204
+ }
2205
+ f = message.getMethodsList();
2206
+ if (f.length > 0) {
2207
+ writer.writeRepeatedString(
2208
+ 2,
2209
+ f
2210
+ );
2211
+ }
2212
+ f = /** @type {number} */ (jspb.Message.getField(message, 3));
2213
+ if (f != null) {
2214
+ writer.writeInt32(
2215
+ 3,
2216
+ f
2217
+ );
2218
+ }
2219
+ };
2220
+
2221
+
2222
+ /**
2223
+ * optional int32 limit_per_minute = 1;
2224
+ * @return {number}
2225
+ */
2226
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.prototype.getLimitPerMinute = function() {
2227
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2228
+ };
2229
+
2230
+
2231
+ /**
2232
+ * @param {number} value
2233
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.UnaryLimit} returns this
2234
+ */
2235
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.prototype.setLimitPerMinute = function(value) {
2236
+ return jspb.Message.setProto3IntField(this, 1, value);
2237
+ };
2238
+
2239
+
2240
+ /**
2241
+ * repeated string methods = 2;
2242
+ * @return {!Array<string>}
2243
+ */
2244
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.prototype.getMethodsList = function() {
2245
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
2246
+ };
2247
+
2248
+
2249
+ /**
2250
+ * @param {!Array<string>} value
2251
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.UnaryLimit} returns this
2252
+ */
2253
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.prototype.setMethodsList = function(value) {
2254
+ return jspb.Message.setField(this, 2, value || []);
2255
+ };
2256
+
2257
+
2258
+ /**
2259
+ * @param {string} value
2260
+ * @param {number=} opt_index
2261
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.UnaryLimit} returns this
2262
+ */
2263
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.prototype.addMethods = function(value, opt_index) {
2264
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
2265
+ };
2266
+
2267
+
2268
+ /**
2269
+ * Clears the list making it empty but non-null.
2270
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.UnaryLimit} returns this
2271
+ */
2272
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.prototype.clearMethodsList = function() {
2273
+ return this.setMethodsList([]);
2274
+ };
2275
+
2276
+
2277
+ /**
2278
+ * optional int32 limit_per_second = 3;
2279
+ * @return {number}
2280
+ */
2281
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.prototype.getLimitPerSecond = function() {
2282
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
2283
+ };
2284
+
2285
+
2286
+ /**
2287
+ * @param {number} value
2288
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.UnaryLimit} returns this
2289
+ */
2290
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.prototype.setLimitPerSecond = function(value) {
2291
+ return jspb.Message.setField(this, 3, value);
2292
+ };
2293
+
2294
+
2295
+ /**
2296
+ * Clears the field making it undefined.
2297
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.UnaryLimit} returns this
2298
+ */
2299
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.prototype.clearLimitPerSecond = function() {
2300
+ return jspb.Message.setField(this, 3, undefined);
2301
+ };
2302
+
2303
+
2304
+ /**
2305
+ * Returns whether this field is set.
2306
+ * @return {boolean}
2307
+ */
2308
+ proto.tinkoff.public.invest.api.contract.v1.UnaryLimit.prototype.hasLimitPerSecond = function() {
2309
+ return jspb.Message.getField(this, 3) != null;
2310
+ };
2311
+
2312
+
2313
+
2314
+ /**
2315
+ * List of repeated fields within this message type.
2316
+ * @private {!Array<number>}
2317
+ * @const
2318
+ */
2319
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.repeatedFields_ = [2];
2320
+
2321
+
2322
+
2323
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2324
+ /**
2325
+ * Creates an object representation of this proto.
2326
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2327
+ * Optional fields that are not set will be set to undefined.
2328
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2329
+ * For the list of reserved names please see:
2330
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2331
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2332
+ * JSPB instance for transitional soy proto support:
2333
+ * http://goto/soy-param-migration
2334
+ * @return {!Object}
2335
+ */
2336
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.prototype.toObject = function(opt_includeInstance) {
2337
+ return proto.tinkoff.public.invest.api.contract.v1.StreamLimit.toObject(opt_includeInstance, this);
2338
+ };
2339
+
2340
+
2341
+ /**
2342
+ * Static version of the {@see toObject} method.
2343
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2344
+ * the JSPB instance for transitional soy proto support:
2345
+ * http://goto/soy-param-migration
2346
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.StreamLimit} msg The msg instance to transform.
2347
+ * @return {!Object}
2348
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2349
+ */
2350
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.toObject = function(includeInstance, msg) {
2351
+ var f, obj = {
2352
+ limit: jspb.Message.getFieldWithDefault(msg, 1, 0),
2353
+ streamsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f,
2354
+ open: jspb.Message.getFieldWithDefault(msg, 3, 0)
2355
+ };
2356
+
2357
+ if (includeInstance) {
2358
+ obj.$jspbMessageInstance = msg;
2359
+ }
2360
+ return obj;
2361
+ };
2362
+ }
2363
+
2364
+
2365
+ /**
2366
+ * Deserializes binary data (in protobuf wire format).
2367
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2368
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.StreamLimit}
2369
+ */
2370
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.deserializeBinary = function(bytes) {
2371
+ var reader = new jspb.BinaryReader(bytes);
2372
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.StreamLimit;
2373
+ return proto.tinkoff.public.invest.api.contract.v1.StreamLimit.deserializeBinaryFromReader(msg, reader);
2374
+ };
2375
+
2376
+
2377
+ /**
2378
+ * Deserializes binary data (in protobuf wire format) from the
2379
+ * given reader into the given message object.
2380
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.StreamLimit} msg The message object to deserialize into.
2381
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2382
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.StreamLimit}
2383
+ */
2384
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.deserializeBinaryFromReader = function(msg, reader) {
2385
+ while (reader.nextField()) {
2386
+ if (reader.isEndGroup()) {
2387
+ break;
2388
+ }
2389
+ var field = reader.getFieldNumber();
2390
+ switch (field) {
2391
+ case 1:
2392
+ var value = /** @type {number} */ (reader.readInt32());
2393
+ msg.setLimit(value);
2394
+ break;
2395
+ case 2:
2396
+ var value = /** @type {string} */ (reader.readString());
2397
+ msg.addStreams(value);
2398
+ break;
2399
+ case 3:
2400
+ var value = /** @type {number} */ (reader.readInt32());
2401
+ msg.setOpen(value);
2402
+ break;
2403
+ default:
2404
+ reader.skipField();
2405
+ break;
2406
+ }
2407
+ }
2408
+ return msg;
2409
+ };
2410
+
2411
+
2412
+ /**
2413
+ * Serializes the message to binary data (in protobuf wire format).
2414
+ * @return {!Uint8Array}
2415
+ */
2416
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.prototype.serializeBinary = function() {
2417
+ var writer = new jspb.BinaryWriter();
2418
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.serializeBinaryToWriter(this, writer);
2419
+ return writer.getResultBuffer();
2420
+ };
2421
+
2422
+
2423
+ /**
2424
+ * Serializes the given message to binary data (in protobuf wire
2425
+ * format), writing to the given BinaryWriter.
2426
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.StreamLimit} message
2427
+ * @param {!jspb.BinaryWriter} writer
2428
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2429
+ */
2430
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.serializeBinaryToWriter = function(message, writer) {
2431
+ var f = undefined;
2432
+ f = message.getLimit();
2433
+ if (f !== 0) {
2434
+ writer.writeInt32(
2435
+ 1,
2436
+ f
2437
+ );
2438
+ }
2439
+ f = message.getStreamsList();
2440
+ if (f.length > 0) {
2441
+ writer.writeRepeatedString(
2442
+ 2,
2443
+ f
2444
+ );
2445
+ }
2446
+ f = message.getOpen();
2447
+ if (f !== 0) {
2448
+ writer.writeInt32(
2449
+ 3,
2450
+ f
2451
+ );
2452
+ }
2453
+ };
2454
+
2455
+
2456
+ /**
2457
+ * optional int32 limit = 1;
2458
+ * @return {number}
2459
+ */
2460
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.prototype.getLimit = function() {
2461
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2462
+ };
2463
+
2464
+
2465
+ /**
2466
+ * @param {number} value
2467
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.StreamLimit} returns this
2468
+ */
2469
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.prototype.setLimit = function(value) {
2470
+ return jspb.Message.setProto3IntField(this, 1, value);
2471
+ };
2472
+
2473
+
2474
+ /**
2475
+ * repeated string streams = 2;
2476
+ * @return {!Array<string>}
2477
+ */
2478
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.prototype.getStreamsList = function() {
2479
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 2));
2480
+ };
2481
+
2482
+
2483
+ /**
2484
+ * @param {!Array<string>} value
2485
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.StreamLimit} returns this
2486
+ */
2487
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.prototype.setStreamsList = function(value) {
2488
+ return jspb.Message.setField(this, 2, value || []);
2489
+ };
2490
+
2491
+
2492
+ /**
2493
+ * @param {string} value
2494
+ * @param {number=} opt_index
2495
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.StreamLimit} returns this
2496
+ */
2497
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.prototype.addStreams = function(value, opt_index) {
2498
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
2499
+ };
2500
+
2501
+
2502
+ /**
2503
+ * Clears the list making it empty but non-null.
2504
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.StreamLimit} returns this
2505
+ */
2506
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.prototype.clearStreamsList = function() {
2507
+ return this.setStreamsList([]);
2508
+ };
2509
+
2510
+
2511
+ /**
2512
+ * optional int32 open = 3;
2513
+ * @return {number}
2514
+ */
2515
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.prototype.getOpen = function() {
2516
+ return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
2517
+ };
2518
+
2519
+
2520
+ /**
2521
+ * @param {number} value
2522
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.StreamLimit} returns this
2523
+ */
2524
+ proto.tinkoff.public.invest.api.contract.v1.StreamLimit.prototype.setOpen = function(value) {
2525
+ return jspb.Message.setProto3IntField(this, 3, value);
2526
+ };
2527
+
2528
+
2529
+
2530
+
2531
+
2532
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2533
+ /**
2534
+ * Creates an object representation of this proto.
2535
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2536
+ * Optional fields that are not set will be set to undefined.
2537
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2538
+ * For the list of reserved names please see:
2539
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2540
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2541
+ * JSPB instance for transitional soy proto support:
2542
+ * http://goto/soy-param-migration
2543
+ * @return {!Object}
2544
+ */
2545
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest.prototype.toObject = function(opt_includeInstance) {
2546
+ return proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest.toObject(opt_includeInstance, this);
2547
+ };
2548
+
2549
+
2550
+ /**
2551
+ * Static version of the {@see toObject} method.
2552
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2553
+ * the JSPB instance for transitional soy proto support:
2554
+ * http://goto/soy-param-migration
2555
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest} msg The msg instance to transform.
2556
+ * @return {!Object}
2557
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2558
+ */
2559
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest.toObject = function(includeInstance, msg) {
2560
+ var f, obj = {
2561
+
2562
+ };
2563
+
2564
+ if (includeInstance) {
2565
+ obj.$jspbMessageInstance = msg;
2566
+ }
2567
+ return obj;
2568
+ };
2569
+ }
2570
+
2571
+
2572
+ /**
2573
+ * Deserializes binary data (in protobuf wire format).
2574
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2575
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest}
2576
+ */
2577
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest.deserializeBinary = function(bytes) {
2578
+ var reader = new jspb.BinaryReader(bytes);
2579
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest;
2580
+ return proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest.deserializeBinaryFromReader(msg, reader);
2581
+ };
2582
+
2583
+
2584
+ /**
2585
+ * Deserializes binary data (in protobuf wire format) from the
2586
+ * given reader into the given message object.
2587
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest} msg The message object to deserialize into.
2588
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2589
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest}
2590
+ */
2591
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest.deserializeBinaryFromReader = function(msg, reader) {
2592
+ while (reader.nextField()) {
2593
+ if (reader.isEndGroup()) {
2594
+ break;
2595
+ }
2596
+ var field = reader.getFieldNumber();
2597
+ switch (field) {
2598
+ default:
2599
+ reader.skipField();
2600
+ break;
2601
+ }
2602
+ }
2603
+ return msg;
2604
+ };
2605
+
2606
+
2607
+ /**
2608
+ * Serializes the message to binary data (in protobuf wire format).
2609
+ * @return {!Uint8Array}
2610
+ */
2611
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest.prototype.serializeBinary = function() {
2612
+ var writer = new jspb.BinaryWriter();
2613
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest.serializeBinaryToWriter(this, writer);
2614
+ return writer.getResultBuffer();
2615
+ };
2616
+
2617
+
2618
+ /**
2619
+ * Serializes the given message to binary data (in protobuf wire
2620
+ * format), writing to the given BinaryWriter.
2621
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest} message
2622
+ * @param {!jspb.BinaryWriter} writer
2623
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2624
+ */
2625
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoRequest.serializeBinaryToWriter = function(message, writer) {
2626
+ var f = undefined;
2627
+ };
2628
+
2629
+
2630
+
2631
+ /**
2632
+ * List of repeated fields within this message type.
2633
+ * @private {!Array<number>}
2634
+ * @const
2635
+ */
2636
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.repeatedFields_ = [3];
2637
+
2638
+
2639
+
2640
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2641
+ /**
2642
+ * Creates an object representation of this proto.
2643
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2644
+ * Optional fields that are not set will be set to undefined.
2645
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2646
+ * For the list of reserved names please see:
2647
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2648
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2649
+ * JSPB instance for transitional soy proto support:
2650
+ * http://goto/soy-param-migration
2651
+ * @return {!Object}
2652
+ */
2653
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.prototype.toObject = function(opt_includeInstance) {
2654
+ return proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.toObject(opt_includeInstance, this);
2655
+ };
2656
+
2657
+
2658
+ /**
2659
+ * Static version of the {@see toObject} method.
2660
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2661
+ * the JSPB instance for transitional soy proto support:
2662
+ * http://goto/soy-param-migration
2663
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse} msg The msg instance to transform.
2664
+ * @return {!Object}
2665
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2666
+ */
2667
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.toObject = function(includeInstance, msg) {
2668
+ var f, obj = {
2669
+ premStatus: jspb.Message.getBooleanFieldWithDefault(msg, 1, false),
2670
+ qualStatus: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
2671
+ qualifiedForWorkWithList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
2672
+ tariff: jspb.Message.getFieldWithDefault(msg, 4, ""),
2673
+ userId: jspb.Message.getFieldWithDefault(msg, 9, ""),
2674
+ riskLevelCode: jspb.Message.getFieldWithDefault(msg, 12, "")
2675
+ };
2676
+
2677
+ if (includeInstance) {
2678
+ obj.$jspbMessageInstance = msg;
2679
+ }
2680
+ return obj;
2681
+ };
2682
+ }
2683
+
2684
+
2685
+ /**
2686
+ * Deserializes binary data (in protobuf wire format).
2687
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2688
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse}
2689
+ */
2690
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.deserializeBinary = function(bytes) {
2691
+ var reader = new jspb.BinaryReader(bytes);
2692
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse;
2693
+ return proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.deserializeBinaryFromReader(msg, reader);
2694
+ };
2695
+
2696
+
2697
+ /**
2698
+ * Deserializes binary data (in protobuf wire format) from the
2699
+ * given reader into the given message object.
2700
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse} msg The message object to deserialize into.
2701
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2702
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse}
2703
+ */
2704
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.deserializeBinaryFromReader = function(msg, reader) {
2705
+ while (reader.nextField()) {
2706
+ if (reader.isEndGroup()) {
2707
+ break;
2708
+ }
2709
+ var field = reader.getFieldNumber();
2710
+ switch (field) {
2711
+ case 1:
2712
+ var value = /** @type {boolean} */ (reader.readBool());
2713
+ msg.setPremStatus(value);
2714
+ break;
2715
+ case 2:
2716
+ var value = /** @type {boolean} */ (reader.readBool());
2717
+ msg.setQualStatus(value);
2718
+ break;
2719
+ case 3:
2720
+ var value = /** @type {string} */ (reader.readString());
2721
+ msg.addQualifiedForWorkWith(value);
2722
+ break;
2723
+ case 4:
2724
+ var value = /** @type {string} */ (reader.readString());
2725
+ msg.setTariff(value);
2726
+ break;
2727
+ case 9:
2728
+ var value = /** @type {string} */ (reader.readString());
2729
+ msg.setUserId(value);
2730
+ break;
2731
+ case 12:
2732
+ var value = /** @type {string} */ (reader.readString());
2733
+ msg.setRiskLevelCode(value);
2734
+ break;
2735
+ default:
2736
+ reader.skipField();
2737
+ break;
2738
+ }
2739
+ }
2740
+ return msg;
2741
+ };
2742
+
2743
+
2744
+ /**
2745
+ * Serializes the message to binary data (in protobuf wire format).
2746
+ * @return {!Uint8Array}
2747
+ */
2748
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.prototype.serializeBinary = function() {
2749
+ var writer = new jspb.BinaryWriter();
2750
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.serializeBinaryToWriter(this, writer);
2751
+ return writer.getResultBuffer();
2752
+ };
2753
+
2754
+
2755
+ /**
2756
+ * Serializes the given message to binary data (in protobuf wire
2757
+ * format), writing to the given BinaryWriter.
2758
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse} message
2759
+ * @param {!jspb.BinaryWriter} writer
2760
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2761
+ */
2762
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.serializeBinaryToWriter = function(message, writer) {
2763
+ var f = undefined;
2764
+ f = message.getPremStatus();
2765
+ if (f) {
2766
+ writer.writeBool(
2767
+ 1,
2768
+ f
2769
+ );
2770
+ }
2771
+ f = message.getQualStatus();
2772
+ if (f) {
2773
+ writer.writeBool(
2774
+ 2,
2775
+ f
2776
+ );
2777
+ }
2778
+ f = message.getQualifiedForWorkWithList();
2779
+ if (f.length > 0) {
2780
+ writer.writeRepeatedString(
2781
+ 3,
2782
+ f
2783
+ );
2784
+ }
2785
+ f = message.getTariff();
2786
+ if (f.length > 0) {
2787
+ writer.writeString(
2788
+ 4,
2789
+ f
2790
+ );
2791
+ }
2792
+ f = message.getUserId();
2793
+ if (f.length > 0) {
2794
+ writer.writeString(
2795
+ 9,
2796
+ f
2797
+ );
2798
+ }
2799
+ f = message.getRiskLevelCode();
2800
+ if (f.length > 0) {
2801
+ writer.writeString(
2802
+ 12,
2803
+ f
2804
+ );
2805
+ }
2806
+ };
2807
+
2808
+
2809
+ /**
2810
+ * optional bool prem_status = 1;
2811
+ * @return {boolean}
2812
+ */
2813
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.prototype.getPremStatus = function() {
2814
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false));
2815
+ };
2816
+
2817
+
2818
+ /**
2819
+ * @param {boolean} value
2820
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse} returns this
2821
+ */
2822
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.prototype.setPremStatus = function(value) {
2823
+ return jspb.Message.setProto3BooleanField(this, 1, value);
2824
+ };
2825
+
2826
+
2827
+ /**
2828
+ * optional bool qual_status = 2;
2829
+ * @return {boolean}
2830
+ */
2831
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.prototype.getQualStatus = function() {
2832
+ return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
2833
+ };
2834
+
2835
+
2836
+ /**
2837
+ * @param {boolean} value
2838
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse} returns this
2839
+ */
2840
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.prototype.setQualStatus = function(value) {
2841
+ return jspb.Message.setProto3BooleanField(this, 2, value);
2842
+ };
2843
+
2844
+
2845
+ /**
2846
+ * repeated string qualified_for_work_with = 3;
2847
+ * @return {!Array<string>}
2848
+ */
2849
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.prototype.getQualifiedForWorkWithList = function() {
2850
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
2851
+ };
2852
+
2853
+
2854
+ /**
2855
+ * @param {!Array<string>} value
2856
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse} returns this
2857
+ */
2858
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.prototype.setQualifiedForWorkWithList = function(value) {
2859
+ return jspb.Message.setField(this, 3, value || []);
2860
+ };
2861
+
2862
+
2863
+ /**
2864
+ * @param {string} value
2865
+ * @param {number=} opt_index
2866
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse} returns this
2867
+ */
2868
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.prototype.addQualifiedForWorkWith = function(value, opt_index) {
2869
+ return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
2870
+ };
2871
+
2872
+
2873
+ /**
2874
+ * Clears the list making it empty but non-null.
2875
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse} returns this
2876
+ */
2877
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.prototype.clearQualifiedForWorkWithList = function() {
2878
+ return this.setQualifiedForWorkWithList([]);
2879
+ };
2880
+
2881
+
2882
+ /**
2883
+ * optional string tariff = 4;
2884
+ * @return {string}
2885
+ */
2886
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.prototype.getTariff = function() {
2887
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
2888
+ };
2889
+
2890
+
2891
+ /**
2892
+ * @param {string} value
2893
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse} returns this
2894
+ */
2895
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.prototype.setTariff = function(value) {
2896
+ return jspb.Message.setProto3StringField(this, 4, value);
2897
+ };
2898
+
2899
+
2900
+ /**
2901
+ * optional string user_id = 9;
2902
+ * @return {string}
2903
+ */
2904
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.prototype.getUserId = function() {
2905
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, ""));
2906
+ };
2907
+
2908
+
2909
+ /**
2910
+ * @param {string} value
2911
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse} returns this
2912
+ */
2913
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.prototype.setUserId = function(value) {
2914
+ return jspb.Message.setProto3StringField(this, 9, value);
2915
+ };
2916
+
2917
+
2918
+ /**
2919
+ * optional string risk_level_code = 12;
2920
+ * @return {string}
2921
+ */
2922
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.prototype.getRiskLevelCode = function() {
2923
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, ""));
2924
+ };
2925
+
2926
+
2927
+ /**
2928
+ * @param {string} value
2929
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse} returns this
2930
+ */
2931
+ proto.tinkoff.public.invest.api.contract.v1.GetInfoResponse.prototype.setRiskLevelCode = function(value) {
2932
+ return jspb.Message.setProto3StringField(this, 12, value);
2933
+ };
2934
+
2935
+
2936
+
2937
+
2938
+
2939
+ if (jspb.Message.GENERATE_TO_OBJECT) {
2940
+ /**
2941
+ * Creates an object representation of this proto.
2942
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
2943
+ * Optional fields that are not set will be set to undefined.
2944
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2945
+ * For the list of reserved names please see:
2946
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2947
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2948
+ * JSPB instance for transitional soy proto support:
2949
+ * http://goto/soy-param-migration
2950
+ * @return {!Object}
2951
+ */
2952
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest.prototype.toObject = function(opt_includeInstance) {
2953
+ return proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest.toObject(opt_includeInstance, this);
2954
+ };
2955
+
2956
+
2957
+ /**
2958
+ * Static version of the {@see toObject} method.
2959
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2960
+ * the JSPB instance for transitional soy proto support:
2961
+ * http://goto/soy-param-migration
2962
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest} msg The msg instance to transform.
2963
+ * @return {!Object}
2964
+ * @suppress {unusedLocalVariables} f is only used for nested messages
2965
+ */
2966
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest.toObject = function(includeInstance, msg) {
2967
+ var f, obj = {
2968
+
2969
+ };
2970
+
2971
+ if (includeInstance) {
2972
+ obj.$jspbMessageInstance = msg;
2973
+ }
2974
+ return obj;
2975
+ };
2976
+ }
2977
+
2978
+
2979
+ /**
2980
+ * Deserializes binary data (in protobuf wire format).
2981
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
2982
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest}
2983
+ */
2984
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest.deserializeBinary = function(bytes) {
2985
+ var reader = new jspb.BinaryReader(bytes);
2986
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest;
2987
+ return proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest.deserializeBinaryFromReader(msg, reader);
2988
+ };
2989
+
2990
+
2991
+ /**
2992
+ * Deserializes binary data (in protobuf wire format) from the
2993
+ * given reader into the given message object.
2994
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest} msg The message object to deserialize into.
2995
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2996
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest}
2997
+ */
2998
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest.deserializeBinaryFromReader = function(msg, reader) {
2999
+ while (reader.nextField()) {
3000
+ if (reader.isEndGroup()) {
3001
+ break;
3002
+ }
3003
+ var field = reader.getFieldNumber();
3004
+ switch (field) {
3005
+ default:
3006
+ reader.skipField();
3007
+ break;
3008
+ }
3009
+ }
3010
+ return msg;
3011
+ };
3012
+
3013
+
3014
+ /**
3015
+ * Serializes the message to binary data (in protobuf wire format).
3016
+ * @return {!Uint8Array}
3017
+ */
3018
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest.prototype.serializeBinary = function() {
3019
+ var writer = new jspb.BinaryWriter();
3020
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest.serializeBinaryToWriter(this, writer);
3021
+ return writer.getResultBuffer();
3022
+ };
3023
+
3024
+
3025
+ /**
3026
+ * Serializes the given message to binary data (in protobuf wire
3027
+ * format), writing to the given BinaryWriter.
3028
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest} message
3029
+ * @param {!jspb.BinaryWriter} writer
3030
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3031
+ */
3032
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsRequest.serializeBinaryToWriter = function(message, writer) {
3033
+ var f = undefined;
3034
+ };
3035
+
3036
+
3037
+
3038
+ /**
3039
+ * List of repeated fields within this message type.
3040
+ * @private {!Array<number>}
3041
+ * @const
3042
+ */
3043
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse.repeatedFields_ = [1];
3044
+
3045
+
3046
+
3047
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3048
+ /**
3049
+ * Creates an object representation of this proto.
3050
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3051
+ * Optional fields that are not set will be set to undefined.
3052
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3053
+ * For the list of reserved names please see:
3054
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3055
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3056
+ * JSPB instance for transitional soy proto support:
3057
+ * http://goto/soy-param-migration
3058
+ * @return {!Object}
3059
+ */
3060
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse.prototype.toObject = function(opt_includeInstance) {
3061
+ return proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse.toObject(opt_includeInstance, this);
3062
+ };
3063
+
3064
+
3065
+ /**
3066
+ * Static version of the {@see toObject} method.
3067
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3068
+ * the JSPB instance for transitional soy proto support:
3069
+ * http://goto/soy-param-migration
3070
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse} msg The msg instance to transform.
3071
+ * @return {!Object}
3072
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3073
+ */
3074
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse.toObject = function(includeInstance, msg) {
3075
+ var f, obj = {
3076
+ bankAccountsList: jspb.Message.toObjectList(msg.getBankAccountsList(),
3077
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.toObject, includeInstance)
3078
+ };
3079
+
3080
+ if (includeInstance) {
3081
+ obj.$jspbMessageInstance = msg;
3082
+ }
3083
+ return obj;
3084
+ };
3085
+ }
3086
+
3087
+
3088
+ /**
3089
+ * Deserializes binary data (in protobuf wire format).
3090
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3091
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse}
3092
+ */
3093
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse.deserializeBinary = function(bytes) {
3094
+ var reader = new jspb.BinaryReader(bytes);
3095
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse;
3096
+ return proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse.deserializeBinaryFromReader(msg, reader);
3097
+ };
3098
+
3099
+
3100
+ /**
3101
+ * Deserializes binary data (in protobuf wire format) from the
3102
+ * given reader into the given message object.
3103
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse} msg The message object to deserialize into.
3104
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3105
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse}
3106
+ */
3107
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse.deserializeBinaryFromReader = function(msg, reader) {
3108
+ while (reader.nextField()) {
3109
+ if (reader.isEndGroup()) {
3110
+ break;
3111
+ }
3112
+ var field = reader.getFieldNumber();
3113
+ switch (field) {
3114
+ case 1:
3115
+ var value = new proto.tinkoff.public.invest.api.contract.v1.BankAccount;
3116
+ reader.readMessage(value,proto.tinkoff.public.invest.api.contract.v1.BankAccount.deserializeBinaryFromReader);
3117
+ msg.addBankAccounts(value);
3118
+ break;
3119
+ default:
3120
+ reader.skipField();
3121
+ break;
3122
+ }
3123
+ }
3124
+ return msg;
3125
+ };
3126
+
3127
+
3128
+ /**
3129
+ * Serializes the message to binary data (in protobuf wire format).
3130
+ * @return {!Uint8Array}
3131
+ */
3132
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse.prototype.serializeBinary = function() {
3133
+ var writer = new jspb.BinaryWriter();
3134
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse.serializeBinaryToWriter(this, writer);
3135
+ return writer.getResultBuffer();
3136
+ };
3137
+
3138
+
3139
+ /**
3140
+ * Serializes the given message to binary data (in protobuf wire
3141
+ * format), writing to the given BinaryWriter.
3142
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse} message
3143
+ * @param {!jspb.BinaryWriter} writer
3144
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3145
+ */
3146
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse.serializeBinaryToWriter = function(message, writer) {
3147
+ var f = undefined;
3148
+ f = message.getBankAccountsList();
3149
+ if (f.length > 0) {
3150
+ writer.writeRepeatedMessage(
3151
+ 1,
3152
+ f,
3153
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.serializeBinaryToWriter
3154
+ );
3155
+ }
3156
+ };
3157
+
3158
+
3159
+ /**
3160
+ * repeated BankAccount bank_accounts = 1;
3161
+ * @return {!Array<!proto.tinkoff.public.invest.api.contract.v1.BankAccount>}
3162
+ */
3163
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse.prototype.getBankAccountsList = function() {
3164
+ return /** @type{!Array<!proto.tinkoff.public.invest.api.contract.v1.BankAccount>} */ (
3165
+ jspb.Message.getRepeatedWrapperField(this, proto.tinkoff.public.invest.api.contract.v1.BankAccount, 1));
3166
+ };
3167
+
3168
+
3169
+ /**
3170
+ * @param {!Array<!proto.tinkoff.public.invest.api.contract.v1.BankAccount>} value
3171
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse} returns this
3172
+ */
3173
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse.prototype.setBankAccountsList = function(value) {
3174
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
3175
+ };
3176
+
3177
+
3178
+ /**
3179
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.BankAccount=} opt_value
3180
+ * @param {number=} opt_index
3181
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.BankAccount}
3182
+ */
3183
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse.prototype.addBankAccounts = function(opt_value, opt_index) {
3184
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tinkoff.public.invest.api.contract.v1.BankAccount, opt_index);
3185
+ };
3186
+
3187
+
3188
+ /**
3189
+ * Clears the list making it empty but non-null.
3190
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse} returns this
3191
+ */
3192
+ proto.tinkoff.public.invest.api.contract.v1.GetBankAccountsResponse.prototype.clearBankAccountsList = function() {
3193
+ return this.setBankAccountsList([]);
3194
+ };
3195
+
3196
+
3197
+
3198
+ /**
3199
+ * List of repeated fields within this message type.
3200
+ * @private {!Array<number>}
3201
+ * @const
3202
+ */
3203
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.repeatedFields_ = [3];
3204
+
3205
+
3206
+
3207
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3208
+ /**
3209
+ * Creates an object representation of this proto.
3210
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3211
+ * Optional fields that are not set will be set to undefined.
3212
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3213
+ * For the list of reserved names please see:
3214
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3215
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3216
+ * JSPB instance for transitional soy proto support:
3217
+ * http://goto/soy-param-migration
3218
+ * @return {!Object}
3219
+ */
3220
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.prototype.toObject = function(opt_includeInstance) {
3221
+ return proto.tinkoff.public.invest.api.contract.v1.BankAccount.toObject(opt_includeInstance, this);
3222
+ };
3223
+
3224
+
3225
+ /**
3226
+ * Static version of the {@see toObject} method.
3227
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3228
+ * the JSPB instance for transitional soy proto support:
3229
+ * http://goto/soy-param-migration
3230
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.BankAccount} msg The msg instance to transform.
3231
+ * @return {!Object}
3232
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3233
+ */
3234
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.toObject = function(includeInstance, msg) {
3235
+ var f, obj = {
3236
+ id: jspb.Message.getFieldWithDefault(msg, 1, ""),
3237
+ name: jspb.Message.getFieldWithDefault(msg, 2, ""),
3238
+ moneyList: jspb.Message.toObjectList(msg.getMoneyList(),
3239
+ tinvest_common_pb.MoneyValue.toObject, includeInstance),
3240
+ openedDate: (f = msg.getOpenedDate()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
3241
+ type: jspb.Message.getFieldWithDefault(msg, 5, 0)
3242
+ };
3243
+
3244
+ if (includeInstance) {
3245
+ obj.$jspbMessageInstance = msg;
3246
+ }
3247
+ return obj;
3248
+ };
3249
+ }
3250
+
3251
+
3252
+ /**
3253
+ * Deserializes binary data (in protobuf wire format).
3254
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3255
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.BankAccount}
3256
+ */
3257
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.deserializeBinary = function(bytes) {
3258
+ var reader = new jspb.BinaryReader(bytes);
3259
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.BankAccount;
3260
+ return proto.tinkoff.public.invest.api.contract.v1.BankAccount.deserializeBinaryFromReader(msg, reader);
3261
+ };
3262
+
3263
+
3264
+ /**
3265
+ * Deserializes binary data (in protobuf wire format) from the
3266
+ * given reader into the given message object.
3267
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.BankAccount} msg The message object to deserialize into.
3268
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3269
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.BankAccount}
3270
+ */
3271
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.deserializeBinaryFromReader = function(msg, reader) {
3272
+ while (reader.nextField()) {
3273
+ if (reader.isEndGroup()) {
3274
+ break;
3275
+ }
3276
+ var field = reader.getFieldNumber();
3277
+ switch (field) {
3278
+ case 1:
3279
+ var value = /** @type {string} */ (reader.readString());
3280
+ msg.setId(value);
3281
+ break;
3282
+ case 2:
3283
+ var value = /** @type {string} */ (reader.readString());
3284
+ msg.setName(value);
3285
+ break;
3286
+ case 3:
3287
+ var value = new tinvest_common_pb.MoneyValue;
3288
+ reader.readMessage(value,tinvest_common_pb.MoneyValue.deserializeBinaryFromReader);
3289
+ msg.addMoney(value);
3290
+ break;
3291
+ case 4:
3292
+ var value = new google_protobuf_timestamp_pb.Timestamp;
3293
+ reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
3294
+ msg.setOpenedDate(value);
3295
+ break;
3296
+ case 5:
3297
+ var value = /** @type {!proto.tinkoff.public.invest.api.contract.v1.AccountType} */ (reader.readEnum());
3298
+ msg.setType(value);
3299
+ break;
3300
+ default:
3301
+ reader.skipField();
3302
+ break;
3303
+ }
3304
+ }
3305
+ return msg;
3306
+ };
3307
+
3308
+
3309
+ /**
3310
+ * Serializes the message to binary data (in protobuf wire format).
3311
+ * @return {!Uint8Array}
3312
+ */
3313
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.prototype.serializeBinary = function() {
3314
+ var writer = new jspb.BinaryWriter();
3315
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.serializeBinaryToWriter(this, writer);
3316
+ return writer.getResultBuffer();
3317
+ };
3318
+
3319
+
3320
+ /**
3321
+ * Serializes the given message to binary data (in protobuf wire
3322
+ * format), writing to the given BinaryWriter.
3323
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.BankAccount} message
3324
+ * @param {!jspb.BinaryWriter} writer
3325
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3326
+ */
3327
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.serializeBinaryToWriter = function(message, writer) {
3328
+ var f = undefined;
3329
+ f = message.getId();
3330
+ if (f.length > 0) {
3331
+ writer.writeString(
3332
+ 1,
3333
+ f
3334
+ );
3335
+ }
3336
+ f = message.getName();
3337
+ if (f.length > 0) {
3338
+ writer.writeString(
3339
+ 2,
3340
+ f
3341
+ );
3342
+ }
3343
+ f = message.getMoneyList();
3344
+ if (f.length > 0) {
3345
+ writer.writeRepeatedMessage(
3346
+ 3,
3347
+ f,
3348
+ tinvest_common_pb.MoneyValue.serializeBinaryToWriter
3349
+ );
3350
+ }
3351
+ f = message.getOpenedDate();
3352
+ if (f != null) {
3353
+ writer.writeMessage(
3354
+ 4,
3355
+ f,
3356
+ google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
3357
+ );
3358
+ }
3359
+ f = message.getType();
3360
+ if (f !== 0.0) {
3361
+ writer.writeEnum(
3362
+ 5,
3363
+ f
3364
+ );
3365
+ }
3366
+ };
3367
+
3368
+
3369
+ /**
3370
+ * optional string id = 1;
3371
+ * @return {string}
3372
+ */
3373
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.prototype.getId = function() {
3374
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3375
+ };
3376
+
3377
+
3378
+ /**
3379
+ * @param {string} value
3380
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.BankAccount} returns this
3381
+ */
3382
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.prototype.setId = function(value) {
3383
+ return jspb.Message.setProto3StringField(this, 1, value);
3384
+ };
3385
+
3386
+
3387
+ /**
3388
+ * optional string name = 2;
3389
+ * @return {string}
3390
+ */
3391
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.prototype.getName = function() {
3392
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3393
+ };
3394
+
3395
+
3396
+ /**
3397
+ * @param {string} value
3398
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.BankAccount} returns this
3399
+ */
3400
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.prototype.setName = function(value) {
3401
+ return jspb.Message.setProto3StringField(this, 2, value);
3402
+ };
3403
+
3404
+
3405
+ /**
3406
+ * repeated MoneyValue money = 3;
3407
+ * @return {!Array<!proto.tinkoff.public.invest.api.contract.v1.MoneyValue>}
3408
+ */
3409
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.prototype.getMoneyList = function() {
3410
+ return /** @type{!Array<!proto.tinkoff.public.invest.api.contract.v1.MoneyValue>} */ (
3411
+ jspb.Message.getRepeatedWrapperField(this, tinvest_common_pb.MoneyValue, 3));
3412
+ };
3413
+
3414
+
3415
+ /**
3416
+ * @param {!Array<!proto.tinkoff.public.invest.api.contract.v1.MoneyValue>} value
3417
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.BankAccount} returns this
3418
+ */
3419
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.prototype.setMoneyList = function(value) {
3420
+ return jspb.Message.setRepeatedWrapperField(this, 3, value);
3421
+ };
3422
+
3423
+
3424
+ /**
3425
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.MoneyValue=} opt_value
3426
+ * @param {number=} opt_index
3427
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.MoneyValue}
3428
+ */
3429
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.prototype.addMoney = function(opt_value, opt_index) {
3430
+ return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.tinkoff.public.invest.api.contract.v1.MoneyValue, opt_index);
3431
+ };
3432
+
3433
+
3434
+ /**
3435
+ * Clears the list making it empty but non-null.
3436
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.BankAccount} returns this
3437
+ */
3438
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.prototype.clearMoneyList = function() {
3439
+ return this.setMoneyList([]);
3440
+ };
3441
+
3442
+
3443
+ /**
3444
+ * optional google.protobuf.Timestamp opened_date = 4;
3445
+ * @return {?proto.google.protobuf.Timestamp}
3446
+ */
3447
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.prototype.getOpenedDate = function() {
3448
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
3449
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
3450
+ };
3451
+
3452
+
3453
+ /**
3454
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
3455
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.BankAccount} returns this
3456
+ */
3457
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.prototype.setOpenedDate = function(value) {
3458
+ return jspb.Message.setWrapperField(this, 4, value);
3459
+ };
3460
+
3461
+
3462
+ /**
3463
+ * Clears the message field making it undefined.
3464
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.BankAccount} returns this
3465
+ */
3466
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.prototype.clearOpenedDate = function() {
3467
+ return this.setOpenedDate(undefined);
3468
+ };
3469
+
3470
+
3471
+ /**
3472
+ * Returns whether this field is set.
3473
+ * @return {boolean}
3474
+ */
3475
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.prototype.hasOpenedDate = function() {
3476
+ return jspb.Message.getField(this, 4) != null;
3477
+ };
3478
+
3479
+
3480
+ /**
3481
+ * optional AccountType type = 5;
3482
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.AccountType}
3483
+ */
3484
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.prototype.getType = function() {
3485
+ return /** @type {!proto.tinkoff.public.invest.api.contract.v1.AccountType} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
3486
+ };
3487
+
3488
+
3489
+ /**
3490
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.AccountType} value
3491
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.BankAccount} returns this
3492
+ */
3493
+ proto.tinkoff.public.invest.api.contract.v1.BankAccount.prototype.setType = function(value) {
3494
+ return jspb.Message.setProto3EnumField(this, 5, value);
3495
+ };
3496
+
3497
+
3498
+
3499
+
3500
+
3501
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3502
+ /**
3503
+ * Creates an object representation of this proto.
3504
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3505
+ * Optional fields that are not set will be set to undefined.
3506
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3507
+ * For the list of reserved names please see:
3508
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3509
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3510
+ * JSPB instance for transitional soy proto support:
3511
+ * http://goto/soy-param-migration
3512
+ * @return {!Object}
3513
+ */
3514
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.prototype.toObject = function(opt_includeInstance) {
3515
+ return proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.toObject(opt_includeInstance, this);
3516
+ };
3517
+
3518
+
3519
+ /**
3520
+ * Static version of the {@see toObject} method.
3521
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3522
+ * the JSPB instance for transitional soy proto support:
3523
+ * http://goto/soy-param-migration
3524
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest} msg The msg instance to transform.
3525
+ * @return {!Object}
3526
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3527
+ */
3528
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.toObject = function(includeInstance, msg) {
3529
+ var f, obj = {
3530
+ fromAccountId: jspb.Message.getFieldWithDefault(msg, 1, ""),
3531
+ toAccountId: jspb.Message.getFieldWithDefault(msg, 2, ""),
3532
+ amount: (f = msg.getAmount()) && tinvest_common_pb.MoneyValue.toObject(includeInstance, f),
3533
+ transactionId: jspb.Message.getFieldWithDefault(msg, 4, "")
3534
+ };
3535
+
3536
+ if (includeInstance) {
3537
+ obj.$jspbMessageInstance = msg;
3538
+ }
3539
+ return obj;
3540
+ };
3541
+ }
3542
+
3543
+
3544
+ /**
3545
+ * Deserializes binary data (in protobuf wire format).
3546
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3547
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest}
3548
+ */
3549
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.deserializeBinary = function(bytes) {
3550
+ var reader = new jspb.BinaryReader(bytes);
3551
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest;
3552
+ return proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.deserializeBinaryFromReader(msg, reader);
3553
+ };
3554
+
3555
+
3556
+ /**
3557
+ * Deserializes binary data (in protobuf wire format) from the
3558
+ * given reader into the given message object.
3559
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest} msg The message object to deserialize into.
3560
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3561
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest}
3562
+ */
3563
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.deserializeBinaryFromReader = function(msg, reader) {
3564
+ while (reader.nextField()) {
3565
+ if (reader.isEndGroup()) {
3566
+ break;
3567
+ }
3568
+ var field = reader.getFieldNumber();
3569
+ switch (field) {
3570
+ case 1:
3571
+ var value = /** @type {string} */ (reader.readString());
3572
+ msg.setFromAccountId(value);
3573
+ break;
3574
+ case 2:
3575
+ var value = /** @type {string} */ (reader.readString());
3576
+ msg.setToAccountId(value);
3577
+ break;
3578
+ case 3:
3579
+ var value = new tinvest_common_pb.MoneyValue;
3580
+ reader.readMessage(value,tinvest_common_pb.MoneyValue.deserializeBinaryFromReader);
3581
+ msg.setAmount(value);
3582
+ break;
3583
+ case 4:
3584
+ var value = /** @type {string} */ (reader.readString());
3585
+ msg.setTransactionId(value);
3586
+ break;
3587
+ default:
3588
+ reader.skipField();
3589
+ break;
3590
+ }
3591
+ }
3592
+ return msg;
3593
+ };
3594
+
3595
+
3596
+ /**
3597
+ * Serializes the message to binary data (in protobuf wire format).
3598
+ * @return {!Uint8Array}
3599
+ */
3600
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.prototype.serializeBinary = function() {
3601
+ var writer = new jspb.BinaryWriter();
3602
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.serializeBinaryToWriter(this, writer);
3603
+ return writer.getResultBuffer();
3604
+ };
3605
+
3606
+
3607
+ /**
3608
+ * Serializes the given message to binary data (in protobuf wire
3609
+ * format), writing to the given BinaryWriter.
3610
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest} message
3611
+ * @param {!jspb.BinaryWriter} writer
3612
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3613
+ */
3614
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.serializeBinaryToWriter = function(message, writer) {
3615
+ var f = undefined;
3616
+ f = message.getFromAccountId();
3617
+ if (f.length > 0) {
3618
+ writer.writeString(
3619
+ 1,
3620
+ f
3621
+ );
3622
+ }
3623
+ f = message.getToAccountId();
3624
+ if (f.length > 0) {
3625
+ writer.writeString(
3626
+ 2,
3627
+ f
3628
+ );
3629
+ }
3630
+ f = message.getAmount();
3631
+ if (f != null) {
3632
+ writer.writeMessage(
3633
+ 3,
3634
+ f,
3635
+ tinvest_common_pb.MoneyValue.serializeBinaryToWriter
3636
+ );
3637
+ }
3638
+ f = message.getTransactionId();
3639
+ if (f.length > 0) {
3640
+ writer.writeString(
3641
+ 4,
3642
+ f
3643
+ );
3644
+ }
3645
+ };
3646
+
3647
+
3648
+ /**
3649
+ * optional string from_account_id = 1;
3650
+ * @return {string}
3651
+ */
3652
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.prototype.getFromAccountId = function() {
3653
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3654
+ };
3655
+
3656
+
3657
+ /**
3658
+ * @param {string} value
3659
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest} returns this
3660
+ */
3661
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.prototype.setFromAccountId = function(value) {
3662
+ return jspb.Message.setProto3StringField(this, 1, value);
3663
+ };
3664
+
3665
+
3666
+ /**
3667
+ * optional string to_account_id = 2;
3668
+ * @return {string}
3669
+ */
3670
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.prototype.getToAccountId = function() {
3671
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3672
+ };
3673
+
3674
+
3675
+ /**
3676
+ * @param {string} value
3677
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest} returns this
3678
+ */
3679
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.prototype.setToAccountId = function(value) {
3680
+ return jspb.Message.setProto3StringField(this, 2, value);
3681
+ };
3682
+
3683
+
3684
+ /**
3685
+ * optional MoneyValue amount = 3;
3686
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue}
3687
+ */
3688
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.prototype.getAmount = function() {
3689
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.MoneyValue} */ (
3690
+ jspb.Message.getWrapperField(this, tinvest_common_pb.MoneyValue, 3));
3691
+ };
3692
+
3693
+
3694
+ /**
3695
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue|undefined} value
3696
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest} returns this
3697
+ */
3698
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.prototype.setAmount = function(value) {
3699
+ return jspb.Message.setWrapperField(this, 3, value);
3700
+ };
3701
+
3702
+
3703
+ /**
3704
+ * Clears the message field making it undefined.
3705
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest} returns this
3706
+ */
3707
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.prototype.clearAmount = function() {
3708
+ return this.setAmount(undefined);
3709
+ };
3710
+
3711
+
3712
+ /**
3713
+ * Returns whether this field is set.
3714
+ * @return {boolean}
3715
+ */
3716
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.prototype.hasAmount = function() {
3717
+ return jspb.Message.getField(this, 3) != null;
3718
+ };
3719
+
3720
+
3721
+ /**
3722
+ * optional string transaction_id = 4;
3723
+ * @return {string}
3724
+ */
3725
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.prototype.getTransactionId = function() {
3726
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
3727
+ };
3728
+
3729
+
3730
+ /**
3731
+ * @param {string} value
3732
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest} returns this
3733
+ */
3734
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferRequest.prototype.setTransactionId = function(value) {
3735
+ return jspb.Message.setProto3StringField(this, 4, value);
3736
+ };
3737
+
3738
+
3739
+
3740
+
3741
+
3742
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3743
+ /**
3744
+ * Creates an object representation of this proto.
3745
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3746
+ * Optional fields that are not set will be set to undefined.
3747
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3748
+ * For the list of reserved names please see:
3749
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3750
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3751
+ * JSPB instance for transitional soy proto support:
3752
+ * http://goto/soy-param-migration
3753
+ * @return {!Object}
3754
+ */
3755
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse.prototype.toObject = function(opt_includeInstance) {
3756
+ return proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse.toObject(opt_includeInstance, this);
3757
+ };
3758
+
3759
+
3760
+ /**
3761
+ * Static version of the {@see toObject} method.
3762
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3763
+ * the JSPB instance for transitional soy proto support:
3764
+ * http://goto/soy-param-migration
3765
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse} msg The msg instance to transform.
3766
+ * @return {!Object}
3767
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3768
+ */
3769
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse.toObject = function(includeInstance, msg) {
3770
+ var f, obj = {
3771
+
3772
+ };
3773
+
3774
+ if (includeInstance) {
3775
+ obj.$jspbMessageInstance = msg;
3776
+ }
3777
+ return obj;
3778
+ };
3779
+ }
3780
+
3781
+
3782
+ /**
3783
+ * Deserializes binary data (in protobuf wire format).
3784
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3785
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse}
3786
+ */
3787
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse.deserializeBinary = function(bytes) {
3788
+ var reader = new jspb.BinaryReader(bytes);
3789
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse;
3790
+ return proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse.deserializeBinaryFromReader(msg, reader);
3791
+ };
3792
+
3793
+
3794
+ /**
3795
+ * Deserializes binary data (in protobuf wire format) from the
3796
+ * given reader into the given message object.
3797
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse} msg The message object to deserialize into.
3798
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3799
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse}
3800
+ */
3801
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse.deserializeBinaryFromReader = function(msg, reader) {
3802
+ while (reader.nextField()) {
3803
+ if (reader.isEndGroup()) {
3804
+ break;
3805
+ }
3806
+ var field = reader.getFieldNumber();
3807
+ switch (field) {
3808
+ default:
3809
+ reader.skipField();
3810
+ break;
3811
+ }
3812
+ }
3813
+ return msg;
3814
+ };
3815
+
3816
+
3817
+ /**
3818
+ * Serializes the message to binary data (in protobuf wire format).
3819
+ * @return {!Uint8Array}
3820
+ */
3821
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse.prototype.serializeBinary = function() {
3822
+ var writer = new jspb.BinaryWriter();
3823
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse.serializeBinaryToWriter(this, writer);
3824
+ return writer.getResultBuffer();
3825
+ };
3826
+
3827
+
3828
+ /**
3829
+ * Serializes the given message to binary data (in protobuf wire
3830
+ * format), writing to the given BinaryWriter.
3831
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse} message
3832
+ * @param {!jspb.BinaryWriter} writer
3833
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3834
+ */
3835
+ proto.tinkoff.public.invest.api.contract.v1.CurrencyTransferResponse.serializeBinaryToWriter = function(message, writer) {
3836
+ var f = undefined;
3837
+ };
3838
+
3839
+
3840
+
3841
+
3842
+
3843
+ if (jspb.Message.GENERATE_TO_OBJECT) {
3844
+ /**
3845
+ * Creates an object representation of this proto.
3846
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
3847
+ * Optional fields that are not set will be set to undefined.
3848
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3849
+ * For the list of reserved names please see:
3850
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3851
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3852
+ * JSPB instance for transitional soy proto support:
3853
+ * http://goto/soy-param-migration
3854
+ * @return {!Object}
3855
+ */
3856
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest.prototype.toObject = function(opt_includeInstance) {
3857
+ return proto.tinkoff.public.invest.api.contract.v1.PayInRequest.toObject(opt_includeInstance, this);
3858
+ };
3859
+
3860
+
3861
+ /**
3862
+ * Static version of the {@see toObject} method.
3863
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3864
+ * the JSPB instance for transitional soy proto support:
3865
+ * http://goto/soy-param-migration
3866
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.PayInRequest} msg The msg instance to transform.
3867
+ * @return {!Object}
3868
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3869
+ */
3870
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest.toObject = function(includeInstance, msg) {
3871
+ var f, obj = {
3872
+ fromAccountId: jspb.Message.getFieldWithDefault(msg, 1, ""),
3873
+ toAccountId: jspb.Message.getFieldWithDefault(msg, 2, ""),
3874
+ amount: (f = msg.getAmount()) && tinvest_common_pb.MoneyValue.toObject(includeInstance, f)
3875
+ };
3876
+
3877
+ if (includeInstance) {
3878
+ obj.$jspbMessageInstance = msg;
3879
+ }
3880
+ return obj;
3881
+ };
3882
+ }
3883
+
3884
+
3885
+ /**
3886
+ * Deserializes binary data (in protobuf wire format).
3887
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
3888
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.PayInRequest}
3889
+ */
3890
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest.deserializeBinary = function(bytes) {
3891
+ var reader = new jspb.BinaryReader(bytes);
3892
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.PayInRequest;
3893
+ return proto.tinkoff.public.invest.api.contract.v1.PayInRequest.deserializeBinaryFromReader(msg, reader);
3894
+ };
3895
+
3896
+
3897
+ /**
3898
+ * Deserializes binary data (in protobuf wire format) from the
3899
+ * given reader into the given message object.
3900
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.PayInRequest} msg The message object to deserialize into.
3901
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3902
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.PayInRequest}
3903
+ */
3904
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest.deserializeBinaryFromReader = function(msg, reader) {
3905
+ while (reader.nextField()) {
3906
+ if (reader.isEndGroup()) {
3907
+ break;
3908
+ }
3909
+ var field = reader.getFieldNumber();
3910
+ switch (field) {
3911
+ case 1:
3912
+ var value = /** @type {string} */ (reader.readString());
3913
+ msg.setFromAccountId(value);
3914
+ break;
3915
+ case 2:
3916
+ var value = /** @type {string} */ (reader.readString());
3917
+ msg.setToAccountId(value);
3918
+ break;
3919
+ case 3:
3920
+ var value = new tinvest_common_pb.MoneyValue;
3921
+ reader.readMessage(value,tinvest_common_pb.MoneyValue.deserializeBinaryFromReader);
3922
+ msg.setAmount(value);
3923
+ break;
3924
+ default:
3925
+ reader.skipField();
3926
+ break;
3927
+ }
3928
+ }
3929
+ return msg;
3930
+ };
3931
+
3932
+
3933
+ /**
3934
+ * Serializes the message to binary data (in protobuf wire format).
3935
+ * @return {!Uint8Array}
3936
+ */
3937
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest.prototype.serializeBinary = function() {
3938
+ var writer = new jspb.BinaryWriter();
3939
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest.serializeBinaryToWriter(this, writer);
3940
+ return writer.getResultBuffer();
3941
+ };
3942
+
3943
+
3944
+ /**
3945
+ * Serializes the given message to binary data (in protobuf wire
3946
+ * format), writing to the given BinaryWriter.
3947
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.PayInRequest} message
3948
+ * @param {!jspb.BinaryWriter} writer
3949
+ * @suppress {unusedLocalVariables} f is only used for nested messages
3950
+ */
3951
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest.serializeBinaryToWriter = function(message, writer) {
3952
+ var f = undefined;
3953
+ f = message.getFromAccountId();
3954
+ if (f.length > 0) {
3955
+ writer.writeString(
3956
+ 1,
3957
+ f
3958
+ );
3959
+ }
3960
+ f = message.getToAccountId();
3961
+ if (f.length > 0) {
3962
+ writer.writeString(
3963
+ 2,
3964
+ f
3965
+ );
3966
+ }
3967
+ f = message.getAmount();
3968
+ if (f != null) {
3969
+ writer.writeMessage(
3970
+ 3,
3971
+ f,
3972
+ tinvest_common_pb.MoneyValue.serializeBinaryToWriter
3973
+ );
3974
+ }
3975
+ };
3976
+
3977
+
3978
+ /**
3979
+ * optional string from_account_id = 1;
3980
+ * @return {string}
3981
+ */
3982
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest.prototype.getFromAccountId = function() {
3983
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3984
+ };
3985
+
3986
+
3987
+ /**
3988
+ * @param {string} value
3989
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.PayInRequest} returns this
3990
+ */
3991
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest.prototype.setFromAccountId = function(value) {
3992
+ return jspb.Message.setProto3StringField(this, 1, value);
3993
+ };
3994
+
3995
+
3996
+ /**
3997
+ * optional string to_account_id = 2;
3998
+ * @return {string}
3999
+ */
4000
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest.prototype.getToAccountId = function() {
4001
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
4002
+ };
4003
+
4004
+
4005
+ /**
4006
+ * @param {string} value
4007
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.PayInRequest} returns this
4008
+ */
4009
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest.prototype.setToAccountId = function(value) {
4010
+ return jspb.Message.setProto3StringField(this, 2, value);
4011
+ };
4012
+
4013
+
4014
+ /**
4015
+ * optional MoneyValue amount = 3;
4016
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue}
4017
+ */
4018
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest.prototype.getAmount = function() {
4019
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.MoneyValue} */ (
4020
+ jspb.Message.getWrapperField(this, tinvest_common_pb.MoneyValue, 3));
4021
+ };
4022
+
4023
+
4024
+ /**
4025
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue|undefined} value
4026
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.PayInRequest} returns this
4027
+ */
4028
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest.prototype.setAmount = function(value) {
4029
+ return jspb.Message.setWrapperField(this, 3, value);
4030
+ };
4031
+
4032
+
4033
+ /**
4034
+ * Clears the message field making it undefined.
4035
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.PayInRequest} returns this
4036
+ */
4037
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest.prototype.clearAmount = function() {
4038
+ return this.setAmount(undefined);
4039
+ };
4040
+
4041
+
4042
+ /**
4043
+ * Returns whether this field is set.
4044
+ * @return {boolean}
4045
+ */
4046
+ proto.tinkoff.public.invest.api.contract.v1.PayInRequest.prototype.hasAmount = function() {
4047
+ return jspb.Message.getField(this, 3) != null;
4048
+ };
4049
+
4050
+
4051
+
4052
+
4053
+
4054
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4055
+ /**
4056
+ * Creates an object representation of this proto.
4057
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4058
+ * Optional fields that are not set will be set to undefined.
4059
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4060
+ * For the list of reserved names please see:
4061
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4062
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4063
+ * JSPB instance for transitional soy proto support:
4064
+ * http://goto/soy-param-migration
4065
+ * @return {!Object}
4066
+ */
4067
+ proto.tinkoff.public.invest.api.contract.v1.PayInResponse.prototype.toObject = function(opt_includeInstance) {
4068
+ return proto.tinkoff.public.invest.api.contract.v1.PayInResponse.toObject(opt_includeInstance, this);
4069
+ };
4070
+
4071
+
4072
+ /**
4073
+ * Static version of the {@see toObject} method.
4074
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4075
+ * the JSPB instance for transitional soy proto support:
4076
+ * http://goto/soy-param-migration
4077
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.PayInResponse} msg The msg instance to transform.
4078
+ * @return {!Object}
4079
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4080
+ */
4081
+ proto.tinkoff.public.invest.api.contract.v1.PayInResponse.toObject = function(includeInstance, msg) {
4082
+ var f, obj = {
4083
+
4084
+ };
4085
+
4086
+ if (includeInstance) {
4087
+ obj.$jspbMessageInstance = msg;
4088
+ }
4089
+ return obj;
4090
+ };
4091
+ }
4092
+
4093
+
4094
+ /**
4095
+ * Deserializes binary data (in protobuf wire format).
4096
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4097
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.PayInResponse}
4098
+ */
4099
+ proto.tinkoff.public.invest.api.contract.v1.PayInResponse.deserializeBinary = function(bytes) {
4100
+ var reader = new jspb.BinaryReader(bytes);
4101
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.PayInResponse;
4102
+ return proto.tinkoff.public.invest.api.contract.v1.PayInResponse.deserializeBinaryFromReader(msg, reader);
4103
+ };
4104
+
4105
+
4106
+ /**
4107
+ * Deserializes binary data (in protobuf wire format) from the
4108
+ * given reader into the given message object.
4109
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.PayInResponse} msg The message object to deserialize into.
4110
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4111
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.PayInResponse}
4112
+ */
4113
+ proto.tinkoff.public.invest.api.contract.v1.PayInResponse.deserializeBinaryFromReader = function(msg, reader) {
4114
+ while (reader.nextField()) {
4115
+ if (reader.isEndGroup()) {
4116
+ break;
4117
+ }
4118
+ var field = reader.getFieldNumber();
4119
+ switch (field) {
4120
+ default:
4121
+ reader.skipField();
4122
+ break;
4123
+ }
4124
+ }
4125
+ return msg;
4126
+ };
4127
+
4128
+
4129
+ /**
4130
+ * Serializes the message to binary data (in protobuf wire format).
4131
+ * @return {!Uint8Array}
4132
+ */
4133
+ proto.tinkoff.public.invest.api.contract.v1.PayInResponse.prototype.serializeBinary = function() {
4134
+ var writer = new jspb.BinaryWriter();
4135
+ proto.tinkoff.public.invest.api.contract.v1.PayInResponse.serializeBinaryToWriter(this, writer);
4136
+ return writer.getResultBuffer();
4137
+ };
4138
+
4139
+
4140
+ /**
4141
+ * Serializes the given message to binary data (in protobuf wire
4142
+ * format), writing to the given BinaryWriter.
4143
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.PayInResponse} message
4144
+ * @param {!jspb.BinaryWriter} writer
4145
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4146
+ */
4147
+ proto.tinkoff.public.invest.api.contract.v1.PayInResponse.serializeBinaryToWriter = function(message, writer) {
4148
+ var f = undefined;
4149
+ };
4150
+
4151
+
4152
+
4153
+ /**
4154
+ * List of repeated fields within this message type.
4155
+ * @private {!Array<number>}
4156
+ * @const
4157
+ */
4158
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.repeatedFields_ = [1,2];
4159
+
4160
+
4161
+
4162
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4163
+ /**
4164
+ * Creates an object representation of this proto.
4165
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4166
+ * Optional fields that are not set will be set to undefined.
4167
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4168
+ * For the list of reserved names please see:
4169
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4170
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4171
+ * JSPB instance for transitional soy proto support:
4172
+ * http://goto/soy-param-migration
4173
+ * @return {!Object}
4174
+ */
4175
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.prototype.toObject = function(opt_includeInstance) {
4176
+ return proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.toObject(opt_includeInstance, this);
4177
+ };
4178
+
4179
+
4180
+ /**
4181
+ * Static version of the {@see toObject} method.
4182
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4183
+ * the JSPB instance for transitional soy proto support:
4184
+ * http://goto/soy-param-migration
4185
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest} msg The msg instance to transform.
4186
+ * @return {!Object}
4187
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4188
+ */
4189
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.toObject = function(includeInstance, msg) {
4190
+ var f, obj = {
4191
+ accountsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
4192
+ valuesList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f
4193
+ };
4194
+
4195
+ if (includeInstance) {
4196
+ obj.$jspbMessageInstance = msg;
4197
+ }
4198
+ return obj;
4199
+ };
4200
+ }
4201
+
4202
+
4203
+ /**
4204
+ * Deserializes binary data (in protobuf wire format).
4205
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4206
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest}
4207
+ */
4208
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.deserializeBinary = function(bytes) {
4209
+ var reader = new jspb.BinaryReader(bytes);
4210
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest;
4211
+ return proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.deserializeBinaryFromReader(msg, reader);
4212
+ };
4213
+
4214
+
4215
+ /**
4216
+ * Deserializes binary data (in protobuf wire format) from the
4217
+ * given reader into the given message object.
4218
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest} msg The message object to deserialize into.
4219
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4220
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest}
4221
+ */
4222
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.deserializeBinaryFromReader = function(msg, reader) {
4223
+ while (reader.nextField()) {
4224
+ if (reader.isEndGroup()) {
4225
+ break;
4226
+ }
4227
+ var field = reader.getFieldNumber();
4228
+ switch (field) {
4229
+ case 1:
4230
+ var value = /** @type {string} */ (reader.readString());
4231
+ msg.addAccounts(value);
4232
+ break;
4233
+ case 2:
4234
+ var values = /** @type {!Array<!proto.tinkoff.public.invest.api.contract.v1.AccountValue>} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]);
4235
+ for (var i = 0; i < values.length; i++) {
4236
+ msg.addValues(values[i]);
4237
+ }
4238
+ break;
4239
+ default:
4240
+ reader.skipField();
4241
+ break;
4242
+ }
4243
+ }
4244
+ return msg;
4245
+ };
4246
+
4247
+
4248
+ /**
4249
+ * Serializes the message to binary data (in protobuf wire format).
4250
+ * @return {!Uint8Array}
4251
+ */
4252
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.prototype.serializeBinary = function() {
4253
+ var writer = new jspb.BinaryWriter();
4254
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.serializeBinaryToWriter(this, writer);
4255
+ return writer.getResultBuffer();
4256
+ };
4257
+
4258
+
4259
+ /**
4260
+ * Serializes the given message to binary data (in protobuf wire
4261
+ * format), writing to the given BinaryWriter.
4262
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest} message
4263
+ * @param {!jspb.BinaryWriter} writer
4264
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4265
+ */
4266
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.serializeBinaryToWriter = function(message, writer) {
4267
+ var f = undefined;
4268
+ f = message.getAccountsList();
4269
+ if (f.length > 0) {
4270
+ writer.writeRepeatedString(
4271
+ 1,
4272
+ f
4273
+ );
4274
+ }
4275
+ f = message.getValuesList();
4276
+ if (f.length > 0) {
4277
+ writer.writePackedEnum(
4278
+ 2,
4279
+ f
4280
+ );
4281
+ }
4282
+ };
4283
+
4284
+
4285
+ /**
4286
+ * repeated string accounts = 1;
4287
+ * @return {!Array<string>}
4288
+ */
4289
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.prototype.getAccountsList = function() {
4290
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
4291
+ };
4292
+
4293
+
4294
+ /**
4295
+ * @param {!Array<string>} value
4296
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest} returns this
4297
+ */
4298
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.prototype.setAccountsList = function(value) {
4299
+ return jspb.Message.setField(this, 1, value || []);
4300
+ };
4301
+
4302
+
4303
+ /**
4304
+ * @param {string} value
4305
+ * @param {number=} opt_index
4306
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest} returns this
4307
+ */
4308
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.prototype.addAccounts = function(value, opt_index) {
4309
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
4310
+ };
4311
+
4312
+
4313
+ /**
4314
+ * Clears the list making it empty but non-null.
4315
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest} returns this
4316
+ */
4317
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.prototype.clearAccountsList = function() {
4318
+ return this.setAccountsList([]);
4319
+ };
4320
+
4321
+
4322
+ /**
4323
+ * repeated AccountValue values = 2;
4324
+ * @return {!Array<!proto.tinkoff.public.invest.api.contract.v1.AccountValue>}
4325
+ */
4326
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.prototype.getValuesList = function() {
4327
+ return /** @type {!Array<!proto.tinkoff.public.invest.api.contract.v1.AccountValue>} */ (jspb.Message.getRepeatedField(this, 2));
4328
+ };
4329
+
4330
+
4331
+ /**
4332
+ * @param {!Array<!proto.tinkoff.public.invest.api.contract.v1.AccountValue>} value
4333
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest} returns this
4334
+ */
4335
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.prototype.setValuesList = function(value) {
4336
+ return jspb.Message.setField(this, 2, value || []);
4337
+ };
4338
+
4339
+
4340
+ /**
4341
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.AccountValue} value
4342
+ * @param {number=} opt_index
4343
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest} returns this
4344
+ */
4345
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.prototype.addValues = function(value, opt_index) {
4346
+ return jspb.Message.addToRepeatedField(this, 2, value, opt_index);
4347
+ };
4348
+
4349
+
4350
+ /**
4351
+ * Clears the list making it empty but non-null.
4352
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest} returns this
4353
+ */
4354
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesRequest.prototype.clearValuesList = function() {
4355
+ return this.setValuesList([]);
4356
+ };
4357
+
4358
+
4359
+
4360
+ /**
4361
+ * List of repeated fields within this message type.
4362
+ * @private {!Array<number>}
4363
+ * @const
4364
+ */
4365
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse.repeatedFields_ = [1];
4366
+
4367
+
4368
+
4369
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4370
+ /**
4371
+ * Creates an object representation of this proto.
4372
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4373
+ * Optional fields that are not set will be set to undefined.
4374
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4375
+ * For the list of reserved names please see:
4376
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4377
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4378
+ * JSPB instance for transitional soy proto support:
4379
+ * http://goto/soy-param-migration
4380
+ * @return {!Object}
4381
+ */
4382
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse.prototype.toObject = function(opt_includeInstance) {
4383
+ return proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse.toObject(opt_includeInstance, this);
4384
+ };
4385
+
4386
+
4387
+ /**
4388
+ * Static version of the {@see toObject} method.
4389
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4390
+ * the JSPB instance for transitional soy proto support:
4391
+ * http://goto/soy-param-migration
4392
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse} msg The msg instance to transform.
4393
+ * @return {!Object}
4394
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4395
+ */
4396
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse.toObject = function(includeInstance, msg) {
4397
+ var f, obj = {
4398
+ accountsList: jspb.Message.toObjectList(msg.getAccountsList(),
4399
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.toObject, includeInstance)
4400
+ };
4401
+
4402
+ if (includeInstance) {
4403
+ obj.$jspbMessageInstance = msg;
4404
+ }
4405
+ return obj;
4406
+ };
4407
+ }
4408
+
4409
+
4410
+ /**
4411
+ * Deserializes binary data (in protobuf wire format).
4412
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4413
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse}
4414
+ */
4415
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse.deserializeBinary = function(bytes) {
4416
+ var reader = new jspb.BinaryReader(bytes);
4417
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse;
4418
+ return proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse.deserializeBinaryFromReader(msg, reader);
4419
+ };
4420
+
4421
+
4422
+ /**
4423
+ * Deserializes binary data (in protobuf wire format) from the
4424
+ * given reader into the given message object.
4425
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse} msg The message object to deserialize into.
4426
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4427
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse}
4428
+ */
4429
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse.deserializeBinaryFromReader = function(msg, reader) {
4430
+ while (reader.nextField()) {
4431
+ if (reader.isEndGroup()) {
4432
+ break;
4433
+ }
4434
+ var field = reader.getFieldNumber();
4435
+ switch (field) {
4436
+ case 1:
4437
+ var value = new proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters;
4438
+ reader.readMessage(value,proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.deserializeBinaryFromReader);
4439
+ msg.addAccounts(value);
4440
+ break;
4441
+ default:
4442
+ reader.skipField();
4443
+ break;
4444
+ }
4445
+ }
4446
+ return msg;
4447
+ };
4448
+
4449
+
4450
+ /**
4451
+ * Serializes the message to binary data (in protobuf wire format).
4452
+ * @return {!Uint8Array}
4453
+ */
4454
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse.prototype.serializeBinary = function() {
4455
+ var writer = new jspb.BinaryWriter();
4456
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse.serializeBinaryToWriter(this, writer);
4457
+ return writer.getResultBuffer();
4458
+ };
4459
+
4460
+
4461
+ /**
4462
+ * Serializes the given message to binary data (in protobuf wire
4463
+ * format), writing to the given BinaryWriter.
4464
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse} message
4465
+ * @param {!jspb.BinaryWriter} writer
4466
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4467
+ */
4468
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse.serializeBinaryToWriter = function(message, writer) {
4469
+ var f = undefined;
4470
+ f = message.getAccountsList();
4471
+ if (f.length > 0) {
4472
+ writer.writeRepeatedMessage(
4473
+ 1,
4474
+ f,
4475
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.serializeBinaryToWriter
4476
+ );
4477
+ }
4478
+ };
4479
+
4480
+
4481
+ /**
4482
+ * repeated AccountValuesWithParameters accounts = 1;
4483
+ * @return {!Array<!proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters>}
4484
+ */
4485
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse.prototype.getAccountsList = function() {
4486
+ return /** @type{!Array<!proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters>} */ (
4487
+ jspb.Message.getRepeatedWrapperField(this, proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters, 1));
4488
+ };
4489
+
4490
+
4491
+ /**
4492
+ * @param {!Array<!proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters>} value
4493
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse} returns this
4494
+ */
4495
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse.prototype.setAccountsList = function(value) {
4496
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
4497
+ };
4498
+
4499
+
4500
+ /**
4501
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters=} opt_value
4502
+ * @param {number=} opt_index
4503
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters}
4504
+ */
4505
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse.prototype.addAccounts = function(opt_value, opt_index) {
4506
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters, opt_index);
4507
+ };
4508
+
4509
+
4510
+ /**
4511
+ * Clears the list making it empty but non-null.
4512
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse} returns this
4513
+ */
4514
+ proto.tinkoff.public.invest.api.contract.v1.GetAccountValuesResponse.prototype.clearAccountsList = function() {
4515
+ return this.setAccountsList([]);
4516
+ };
4517
+
4518
+
4519
+
4520
+ /**
4521
+ * List of repeated fields within this message type.
4522
+ * @private {!Array<number>}
4523
+ * @const
4524
+ */
4525
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.repeatedFields_ = [2];
4526
+
4527
+
4528
+
4529
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4530
+ /**
4531
+ * Creates an object representation of this proto.
4532
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4533
+ * Optional fields that are not set will be set to undefined.
4534
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4535
+ * For the list of reserved names please see:
4536
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4537
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4538
+ * JSPB instance for transitional soy proto support:
4539
+ * http://goto/soy-param-migration
4540
+ * @return {!Object}
4541
+ */
4542
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.prototype.toObject = function(opt_includeInstance) {
4543
+ return proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.toObject(opt_includeInstance, this);
4544
+ };
4545
+
4546
+
4547
+ /**
4548
+ * Static version of the {@see toObject} method.
4549
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4550
+ * the JSPB instance for transitional soy proto support:
4551
+ * http://goto/soy-param-migration
4552
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters} msg The msg instance to transform.
4553
+ * @return {!Object}
4554
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4555
+ */
4556
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.toObject = function(includeInstance, msg) {
4557
+ var f, obj = {
4558
+ accountId: jspb.Message.getFieldWithDefault(msg, 1, ""),
4559
+ valuesList: jspb.Message.toObjectList(msg.getValuesList(),
4560
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.toObject, includeInstance)
4561
+ };
4562
+
4563
+ if (includeInstance) {
4564
+ obj.$jspbMessageInstance = msg;
4565
+ }
4566
+ return obj;
4567
+ };
4568
+ }
4569
+
4570
+
4571
+ /**
4572
+ * Deserializes binary data (in protobuf wire format).
4573
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4574
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters}
4575
+ */
4576
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.deserializeBinary = function(bytes) {
4577
+ var reader = new jspb.BinaryReader(bytes);
4578
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters;
4579
+ return proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.deserializeBinaryFromReader(msg, reader);
4580
+ };
4581
+
4582
+
4583
+ /**
4584
+ * Deserializes binary data (in protobuf wire format) from the
4585
+ * given reader into the given message object.
4586
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters} msg The message object to deserialize into.
4587
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4588
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters}
4589
+ */
4590
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.deserializeBinaryFromReader = function(msg, reader) {
4591
+ while (reader.nextField()) {
4592
+ if (reader.isEndGroup()) {
4593
+ break;
4594
+ }
4595
+ var field = reader.getFieldNumber();
4596
+ switch (field) {
4597
+ case 1:
4598
+ var value = /** @type {string} */ (reader.readString());
4599
+ msg.setAccountId(value);
4600
+ break;
4601
+ case 2:
4602
+ var value = new proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter;
4603
+ reader.readMessage(value,proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.deserializeBinaryFromReader);
4604
+ msg.addValues(value);
4605
+ break;
4606
+ default:
4607
+ reader.skipField();
4608
+ break;
4609
+ }
4610
+ }
4611
+ return msg;
4612
+ };
4613
+
4614
+
4615
+ /**
4616
+ * Serializes the message to binary data (in protobuf wire format).
4617
+ * @return {!Uint8Array}
4618
+ */
4619
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.prototype.serializeBinary = function() {
4620
+ var writer = new jspb.BinaryWriter();
4621
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.serializeBinaryToWriter(this, writer);
4622
+ return writer.getResultBuffer();
4623
+ };
4624
+
4625
+
4626
+ /**
4627
+ * Serializes the given message to binary data (in protobuf wire
4628
+ * format), writing to the given BinaryWriter.
4629
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters} message
4630
+ * @param {!jspb.BinaryWriter} writer
4631
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4632
+ */
4633
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.serializeBinaryToWriter = function(message, writer) {
4634
+ var f = undefined;
4635
+ f = message.getAccountId();
4636
+ if (f.length > 0) {
4637
+ writer.writeString(
4638
+ 1,
4639
+ f
4640
+ );
4641
+ }
4642
+ f = message.getValuesList();
4643
+ if (f.length > 0) {
4644
+ writer.writeRepeatedMessage(
4645
+ 2,
4646
+ f,
4647
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.serializeBinaryToWriter
4648
+ );
4649
+ }
4650
+ };
4651
+
4652
+
4653
+ /**
4654
+ * optional string account_id = 1;
4655
+ * @return {string}
4656
+ */
4657
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.prototype.getAccountId = function() {
4658
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
4659
+ };
4660
+
4661
+
4662
+ /**
4663
+ * @param {string} value
4664
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters} returns this
4665
+ */
4666
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.prototype.setAccountId = function(value) {
4667
+ return jspb.Message.setProto3StringField(this, 1, value);
4668
+ };
4669
+
4670
+
4671
+ /**
4672
+ * repeated InstrumentParameter values = 2;
4673
+ * @return {!Array<!proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter>}
4674
+ */
4675
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.prototype.getValuesList = function() {
4676
+ return /** @type{!Array<!proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter>} */ (
4677
+ jspb.Message.getRepeatedWrapperField(this, proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter, 2));
4678
+ };
4679
+
4680
+
4681
+ /**
4682
+ * @param {!Array<!proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter>} value
4683
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters} returns this
4684
+ */
4685
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.prototype.setValuesList = function(value) {
4686
+ return jspb.Message.setRepeatedWrapperField(this, 2, value);
4687
+ };
4688
+
4689
+
4690
+ /**
4691
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter=} opt_value
4692
+ * @param {number=} opt_index
4693
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter}
4694
+ */
4695
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.prototype.addValues = function(opt_value, opt_index) {
4696
+ return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter, opt_index);
4697
+ };
4698
+
4699
+
4700
+ /**
4701
+ * Clears the list making it empty but non-null.
4702
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters} returns this
4703
+ */
4704
+ proto.tinkoff.public.invest.api.contract.v1.AccountValuesWithParameters.prototype.clearValuesList = function() {
4705
+ return this.setValuesList([]);
4706
+ };
4707
+
4708
+
4709
+
4710
+
4711
+
4712
+ if (jspb.Message.GENERATE_TO_OBJECT) {
4713
+ /**
4714
+ * Creates an object representation of this proto.
4715
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
4716
+ * Optional fields that are not set will be set to undefined.
4717
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
4718
+ * For the list of reserved names please see:
4719
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
4720
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
4721
+ * JSPB instance for transitional soy proto support:
4722
+ * http://goto/soy-param-migration
4723
+ * @return {!Object}
4724
+ */
4725
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.prototype.toObject = function(opt_includeInstance) {
4726
+ return proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.toObject(opt_includeInstance, this);
4727
+ };
4728
+
4729
+
4730
+ /**
4731
+ * Static version of the {@see toObject} method.
4732
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
4733
+ * the JSPB instance for transitional soy proto support:
4734
+ * http://goto/soy-param-migration
4735
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter} msg The msg instance to transform.
4736
+ * @return {!Object}
4737
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4738
+ */
4739
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.toObject = function(includeInstance, msg) {
4740
+ var f, obj = {
4741
+ name: jspb.Message.getFieldWithDefault(msg, 1, 0),
4742
+ value: (f = msg.getValue()) && tinvest_common_pb.MoneyValue.toObject(includeInstance, f)
4743
+ };
4744
+
4745
+ if (includeInstance) {
4746
+ obj.$jspbMessageInstance = msg;
4747
+ }
4748
+ return obj;
4749
+ };
4750
+ }
4751
+
4752
+
4753
+ /**
4754
+ * Deserializes binary data (in protobuf wire format).
4755
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
4756
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter}
4757
+ */
4758
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.deserializeBinary = function(bytes) {
4759
+ var reader = new jspb.BinaryReader(bytes);
4760
+ var msg = new proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter;
4761
+ return proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.deserializeBinaryFromReader(msg, reader);
4762
+ };
4763
+
4764
+
4765
+ /**
4766
+ * Deserializes binary data (in protobuf wire format) from the
4767
+ * given reader into the given message object.
4768
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter} msg The message object to deserialize into.
4769
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
4770
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter}
4771
+ */
4772
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.deserializeBinaryFromReader = function(msg, reader) {
4773
+ while (reader.nextField()) {
4774
+ if (reader.isEndGroup()) {
4775
+ break;
4776
+ }
4777
+ var field = reader.getFieldNumber();
4778
+ switch (field) {
4779
+ case 1:
4780
+ var value = /** @type {!proto.tinkoff.public.invest.api.contract.v1.AccountValue} */ (reader.readEnum());
4781
+ msg.setName(value);
4782
+ break;
4783
+ case 2:
4784
+ var value = new tinvest_common_pb.MoneyValue;
4785
+ reader.readMessage(value,tinvest_common_pb.MoneyValue.deserializeBinaryFromReader);
4786
+ msg.setValue(value);
4787
+ break;
4788
+ default:
4789
+ reader.skipField();
4790
+ break;
4791
+ }
4792
+ }
4793
+ return msg;
4794
+ };
4795
+
4796
+
4797
+ /**
4798
+ * Serializes the message to binary data (in protobuf wire format).
4799
+ * @return {!Uint8Array}
4800
+ */
4801
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.prototype.serializeBinary = function() {
4802
+ var writer = new jspb.BinaryWriter();
4803
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.serializeBinaryToWriter(this, writer);
4804
+ return writer.getResultBuffer();
4805
+ };
4806
+
4807
+
4808
+ /**
4809
+ * Serializes the given message to binary data (in protobuf wire
4810
+ * format), writing to the given BinaryWriter.
4811
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter} message
4812
+ * @param {!jspb.BinaryWriter} writer
4813
+ * @suppress {unusedLocalVariables} f is only used for nested messages
4814
+ */
4815
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.serializeBinaryToWriter = function(message, writer) {
4816
+ var f = undefined;
4817
+ f = message.getName();
4818
+ if (f !== 0.0) {
4819
+ writer.writeEnum(
4820
+ 1,
4821
+ f
4822
+ );
4823
+ }
4824
+ f = message.getValue();
4825
+ if (f != null) {
4826
+ writer.writeMessage(
4827
+ 2,
4828
+ f,
4829
+ tinvest_common_pb.MoneyValue.serializeBinaryToWriter
4830
+ );
4831
+ }
4832
+ };
4833
+
4834
+
4835
+ /**
4836
+ * optional AccountValue name = 1;
4837
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.AccountValue}
4838
+ */
4839
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.prototype.getName = function() {
4840
+ return /** @type {!proto.tinkoff.public.invest.api.contract.v1.AccountValue} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
4841
+ };
4842
+
4843
+
4844
+ /**
4845
+ * @param {!proto.tinkoff.public.invest.api.contract.v1.AccountValue} value
4846
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter} returns this
4847
+ */
4848
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.prototype.setName = function(value) {
4849
+ return jspb.Message.setProto3EnumField(this, 1, value);
4850
+ };
4851
+
4852
+
4853
+ /**
4854
+ * optional MoneyValue value = 2;
4855
+ * @return {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue}
4856
+ */
4857
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.prototype.getValue = function() {
4858
+ return /** @type{?proto.tinkoff.public.invest.api.contract.v1.MoneyValue} */ (
4859
+ jspb.Message.getWrapperField(this, tinvest_common_pb.MoneyValue, 2));
4860
+ };
4861
+
4862
+
4863
+ /**
4864
+ * @param {?proto.tinkoff.public.invest.api.contract.v1.MoneyValue|undefined} value
4865
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter} returns this
4866
+ */
4867
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.prototype.setValue = function(value) {
4868
+ return jspb.Message.setWrapperField(this, 2, value);
4869
+ };
4870
+
4871
+
4872
+ /**
4873
+ * Clears the message field making it undefined.
4874
+ * @return {!proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter} returns this
4875
+ */
4876
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.prototype.clearValue = function() {
4877
+ return this.setValue(undefined);
4878
+ };
4879
+
4880
+
4881
+ /**
4882
+ * Returns whether this field is set.
4883
+ * @return {boolean}
4884
+ */
4885
+ proto.tinkoff.public.invest.api.contract.v1.InstrumentParameter.prototype.hasValue = function() {
4886
+ return jspb.Message.getField(this, 2) != null;
4887
+ };
4888
+
4889
+
4890
+ /**
4891
+ * @enum {number}
4892
+ */
4893
+ proto.tinkoff.public.invest.api.contract.v1.AccountType = {
4894
+ ACCOUNT_TYPE_UNSPECIFIED: 0,
4895
+ ACCOUNT_TYPE_TINKOFF: 1,
4896
+ ACCOUNT_TYPE_TINKOFF_IIS: 2,
4897
+ ACCOUNT_TYPE_INVEST_BOX: 3,
4898
+ ACCOUNT_TYPE_INVEST_FUND: 4,
4899
+ ACCOUNT_TYPE_DEBIT: 5,
4900
+ ACCOUNT_TYPE_SAVING: 6,
4901
+ ACCOUNT_TYPE_DFA: 7
4902
+ };
4903
+
4904
+ /**
4905
+ * @enum {number}
4906
+ */
4907
+ proto.tinkoff.public.invest.api.contract.v1.AccountStatus = {
4908
+ ACCOUNT_STATUS_UNSPECIFIED: 0,
4909
+ ACCOUNT_STATUS_NEW: 1,
4910
+ ACCOUNT_STATUS_OPEN: 2,
4911
+ ACCOUNT_STATUS_CLOSED: 3,
4912
+ ACCOUNT_STATUS_ALL: 4
4913
+ };
4914
+
4915
+ /**
4916
+ * @enum {number}
4917
+ */
4918
+ proto.tinkoff.public.invest.api.contract.v1.AccessLevel = {
4919
+ ACCOUNT_ACCESS_LEVEL_UNSPECIFIED: 0,
4920
+ ACCOUNT_ACCESS_LEVEL_FULL_ACCESS: 1,
4921
+ ACCOUNT_ACCESS_LEVEL_READ_ONLY: 2,
4922
+ ACCOUNT_ACCESS_LEVEL_NO_ACCESS: 3
4923
+ };
4924
+
4925
+ /**
4926
+ * @enum {number}
4927
+ */
4928
+ proto.tinkoff.public.invest.api.contract.v1.AccountValue = {
4929
+ ACCOUNT_VALUE_UNSPECIFIED: 0,
4930
+ ACCOUNT_VALUE_MARGIN_FEE: 1,
4931
+ ACCOUNT_VALUE_AMOUNT_WITHOUT_EXTRA_FEE: 2
4932
+ };
4933
+
4934
+ goog.object.extend(exports, proto.tinkoff.public.invest.api.contract.v1);