@miradorlabs/web-grpc 1.0.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.
Files changed (33) hide show
  1. package/README.md +5 -0
  2. package/google/protobuf/timestamp.ts +229 -0
  3. package/package.json +11 -0
  4. package/proto/gateway/common/v1/status.ts +179 -0
  5. package/proto/gateway/common/v1/status_grpc_pb.js +1 -0
  6. package/proto/gateway/common/v1/status_pb.js +237 -0
  7. package/proto/gateway/common/v1/types.ts +176 -0
  8. package/proto/gateway/common/v1/types_grpc_pb.js +1 -0
  9. package/proto/gateway/common/v1/types_pb.js +216 -0
  10. package/proto/gateway/web/v1/account_gateway.ts +7037 -0
  11. package/proto/gateway/web/v1/account_gateway_grpc_pb.js +813 -0
  12. package/proto/gateway/web/v1/account_gateway_pb.js +14338 -0
  13. package/proto/gateway/web/v1/automation_gateway.ts +5605 -0
  14. package/proto/gateway/web/v1/automation_gateway_grpc_pb.js +485 -0
  15. package/proto/gateway/web/v1/automation_gateway_pb.js +11618 -0
  16. package/proto/gateway/web/v1/chain_gateway.ts +3805 -0
  17. package/proto/gateway/web/v1/chain_gateway_grpc_pb.js +115 -0
  18. package/proto/gateway/web/v1/chain_gateway_pb.js +7049 -0
  19. package/proto/gateway/web/v1/market_gateway.ts +492 -0
  20. package/proto/gateway/web/v1/market_gateway_grpc_pb.js +45 -0
  21. package/proto/gateway/web/v1/market_gateway_pb.js +1063 -0
  22. package/proto/gateway/web/v1/oauth_gateway.ts +1163 -0
  23. package/proto/gateway/web/v1/oauth_gateway_grpc_pb.js +150 -0
  24. package/proto/gateway/web/v1/oauth_gateway_pb.js +2316 -0
  25. package/proto/gateway/web/v1/plan_gateway.ts +2463 -0
  26. package/proto/gateway/web/v1/plan_gateway_grpc_pb.js +152 -0
  27. package/proto/gateway/web/v1/plan_gateway_pb.js +4840 -0
  28. package/proto/gateway/web/v1/stream_gateway.ts +2354 -0
  29. package/proto/gateway/web/v1/stream_gateway_grpc_pb.js +145 -0
  30. package/proto/gateway/web/v1/stream_gateway_pb.js +4593 -0
  31. package/proto/gateway/web/v1/trace_gateway.ts +16320 -0
  32. package/proto/gateway/web/v1/trace_gateway_grpc_pb.js +280 -0
  33. package/proto/gateway/web/v1/trace_gateway_pb.js +28667 -0
@@ -0,0 +1,1063 @@
1
+ // source: proto/gateway/web/v1/market_gateway.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
+ goog.exportSymbol('proto.gateway.web.v1.CryptoFxRate', null, global);
25
+ goog.exportSymbol('proto.gateway.web.v1.FxRateEnvelope', null, global);
26
+ goog.exportSymbol('proto.gateway.web.v1.FxRateEnvelope.EventCase', null, global);
27
+ goog.exportSymbol('proto.gateway.web.v1.FxRateSnapshot', null, global);
28
+ goog.exportSymbol('proto.gateway.web.v1.FxRateUpdate', null, global);
29
+ goog.exportSymbol('proto.gateway.web.v1.StreamFxRatesRequest', null, global);
30
+ /**
31
+ * Generated by JsPbCodeGenerator.
32
+ * @param {Array=} opt_data Optional initial data array, typically from a
33
+ * server response, or constructed directly in Javascript. The array is used
34
+ * in place and becomes part of the constructed object. It is not cloned.
35
+ * If no data is provided, the constructed object will be empty, but still
36
+ * valid.
37
+ * @extends {jspb.Message}
38
+ * @constructor
39
+ */
40
+ proto.gateway.web.v1.StreamFxRatesRequest = function(opt_data) {
41
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
42
+ };
43
+ goog.inherits(proto.gateway.web.v1.StreamFxRatesRequest, jspb.Message);
44
+ if (goog.DEBUG && !COMPILED) {
45
+ /**
46
+ * @public
47
+ * @override
48
+ */
49
+ proto.gateway.web.v1.StreamFxRatesRequest.displayName = 'proto.gateway.web.v1.StreamFxRatesRequest';
50
+ }
51
+ /**
52
+ * Generated by JsPbCodeGenerator.
53
+ * @param {Array=} opt_data Optional initial data array, typically from a
54
+ * server response, or constructed directly in Javascript. The array is used
55
+ * in place and becomes part of the constructed object. It is not cloned.
56
+ * If no data is provided, the constructed object will be empty, but still
57
+ * valid.
58
+ * @extends {jspb.Message}
59
+ * @constructor
60
+ */
61
+ proto.gateway.web.v1.FxRateEnvelope = function(opt_data) {
62
+ jspb.Message.initialize(this, opt_data, 0, -1, null, proto.gateway.web.v1.FxRateEnvelope.oneofGroups_);
63
+ };
64
+ goog.inherits(proto.gateway.web.v1.FxRateEnvelope, jspb.Message);
65
+ if (goog.DEBUG && !COMPILED) {
66
+ /**
67
+ * @public
68
+ * @override
69
+ */
70
+ proto.gateway.web.v1.FxRateEnvelope.displayName = 'proto.gateway.web.v1.FxRateEnvelope';
71
+ }
72
+ /**
73
+ * Generated by JsPbCodeGenerator.
74
+ * @param {Array=} opt_data Optional initial data array, typically from a
75
+ * server response, or constructed directly in Javascript. The array is used
76
+ * in place and becomes part of the constructed object. It is not cloned.
77
+ * If no data is provided, the constructed object will be empty, but still
78
+ * valid.
79
+ * @extends {jspb.Message}
80
+ * @constructor
81
+ */
82
+ proto.gateway.web.v1.FxRateSnapshot = function(opt_data) {
83
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.gateway.web.v1.FxRateSnapshot.repeatedFields_, null);
84
+ };
85
+ goog.inherits(proto.gateway.web.v1.FxRateSnapshot, jspb.Message);
86
+ if (goog.DEBUG && !COMPILED) {
87
+ /**
88
+ * @public
89
+ * @override
90
+ */
91
+ proto.gateway.web.v1.FxRateSnapshot.displayName = 'proto.gateway.web.v1.FxRateSnapshot';
92
+ }
93
+ /**
94
+ * Generated by JsPbCodeGenerator.
95
+ * @param {Array=} opt_data Optional initial data array, typically from a
96
+ * server response, or constructed directly in Javascript. The array is used
97
+ * in place and becomes part of the constructed object. It is not cloned.
98
+ * If no data is provided, the constructed object will be empty, but still
99
+ * valid.
100
+ * @extends {jspb.Message}
101
+ * @constructor
102
+ */
103
+ proto.gateway.web.v1.FxRateUpdate = function(opt_data) {
104
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.gateway.web.v1.FxRateUpdate.repeatedFields_, null);
105
+ };
106
+ goog.inherits(proto.gateway.web.v1.FxRateUpdate, jspb.Message);
107
+ if (goog.DEBUG && !COMPILED) {
108
+ /**
109
+ * @public
110
+ * @override
111
+ */
112
+ proto.gateway.web.v1.FxRateUpdate.displayName = 'proto.gateway.web.v1.FxRateUpdate';
113
+ }
114
+ /**
115
+ * Generated by JsPbCodeGenerator.
116
+ * @param {Array=} opt_data Optional initial data array, typically from a
117
+ * server response, or constructed directly in Javascript. The array is used
118
+ * in place and becomes part of the constructed object. It is not cloned.
119
+ * If no data is provided, the constructed object will be empty, but still
120
+ * valid.
121
+ * @extends {jspb.Message}
122
+ * @constructor
123
+ */
124
+ proto.gateway.web.v1.CryptoFxRate = function(opt_data) {
125
+ jspb.Message.initialize(this, opt_data, 0, -1, null, null);
126
+ };
127
+ goog.inherits(proto.gateway.web.v1.CryptoFxRate, jspb.Message);
128
+ if (goog.DEBUG && !COMPILED) {
129
+ /**
130
+ * @public
131
+ * @override
132
+ */
133
+ proto.gateway.web.v1.CryptoFxRate.displayName = 'proto.gateway.web.v1.CryptoFxRate';
134
+ }
135
+
136
+
137
+
138
+ if (jspb.Message.GENERATE_TO_OBJECT) {
139
+ /**
140
+ * Creates an object representation of this proto.
141
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
142
+ * Optional fields that are not set will be set to undefined.
143
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
144
+ * For the list of reserved names please see:
145
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
146
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
147
+ * JSPB instance for transitional soy proto support:
148
+ * http://goto/soy-param-migration
149
+ * @return {!Object}
150
+ */
151
+ proto.gateway.web.v1.StreamFxRatesRequest.prototype.toObject = function(opt_includeInstance) {
152
+ return proto.gateway.web.v1.StreamFxRatesRequest.toObject(opt_includeInstance, this);
153
+ };
154
+
155
+
156
+ /**
157
+ * Static version of the {@see toObject} method.
158
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
159
+ * the JSPB instance for transitional soy proto support:
160
+ * http://goto/soy-param-migration
161
+ * @param {!proto.gateway.web.v1.StreamFxRatesRequest} msg The msg instance to transform.
162
+ * @return {!Object}
163
+ * @suppress {unusedLocalVariables} f is only used for nested messages
164
+ */
165
+ proto.gateway.web.v1.StreamFxRatesRequest.toObject = function(includeInstance, msg) {
166
+ var f, obj = {
167
+ currency: jspb.Message.getFieldWithDefault(msg, 1, "")
168
+ };
169
+
170
+ if (includeInstance) {
171
+ obj.$jspbMessageInstance = msg;
172
+ }
173
+ return obj;
174
+ };
175
+ }
176
+
177
+
178
+ /**
179
+ * Deserializes binary data (in protobuf wire format).
180
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
181
+ * @return {!proto.gateway.web.v1.StreamFxRatesRequest}
182
+ */
183
+ proto.gateway.web.v1.StreamFxRatesRequest.deserializeBinary = function(bytes) {
184
+ var reader = new jspb.BinaryReader(bytes);
185
+ var msg = new proto.gateway.web.v1.StreamFxRatesRequest;
186
+ return proto.gateway.web.v1.StreamFxRatesRequest.deserializeBinaryFromReader(msg, reader);
187
+ };
188
+
189
+
190
+ /**
191
+ * Deserializes binary data (in protobuf wire format) from the
192
+ * given reader into the given message object.
193
+ * @param {!proto.gateway.web.v1.StreamFxRatesRequest} msg The message object to deserialize into.
194
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
195
+ * @return {!proto.gateway.web.v1.StreamFxRatesRequest}
196
+ */
197
+ proto.gateway.web.v1.StreamFxRatesRequest.deserializeBinaryFromReader = function(msg, reader) {
198
+ while (reader.nextField()) {
199
+ if (reader.isEndGroup()) {
200
+ break;
201
+ }
202
+ var field = reader.getFieldNumber();
203
+ switch (field) {
204
+ case 1:
205
+ var value = /** @type {string} */ (reader.readString());
206
+ msg.setCurrency(value);
207
+ break;
208
+ default:
209
+ reader.skipField();
210
+ break;
211
+ }
212
+ }
213
+ return msg;
214
+ };
215
+
216
+
217
+ /**
218
+ * Serializes the message to binary data (in protobuf wire format).
219
+ * @return {!Uint8Array}
220
+ */
221
+ proto.gateway.web.v1.StreamFxRatesRequest.prototype.serializeBinary = function() {
222
+ var writer = new jspb.BinaryWriter();
223
+ proto.gateway.web.v1.StreamFxRatesRequest.serializeBinaryToWriter(this, writer);
224
+ return writer.getResultBuffer();
225
+ };
226
+
227
+
228
+ /**
229
+ * Serializes the given message to binary data (in protobuf wire
230
+ * format), writing to the given BinaryWriter.
231
+ * @param {!proto.gateway.web.v1.StreamFxRatesRequest} message
232
+ * @param {!jspb.BinaryWriter} writer
233
+ * @suppress {unusedLocalVariables} f is only used for nested messages
234
+ */
235
+ proto.gateway.web.v1.StreamFxRatesRequest.serializeBinaryToWriter = function(message, writer) {
236
+ var f = undefined;
237
+ f = message.getCurrency();
238
+ if (f.length > 0) {
239
+ writer.writeString(
240
+ 1,
241
+ f
242
+ );
243
+ }
244
+ };
245
+
246
+
247
+ /**
248
+ * optional string currency = 1;
249
+ * @return {string}
250
+ */
251
+ proto.gateway.web.v1.StreamFxRatesRequest.prototype.getCurrency = function() {
252
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
253
+ };
254
+
255
+
256
+ /**
257
+ * @param {string} value
258
+ * @return {!proto.gateway.web.v1.StreamFxRatesRequest} returns this
259
+ */
260
+ proto.gateway.web.v1.StreamFxRatesRequest.prototype.setCurrency = function(value) {
261
+ return jspb.Message.setProto3StringField(this, 1, value);
262
+ };
263
+
264
+
265
+
266
+ /**
267
+ * Oneof group definitions for this message. Each group defines the field
268
+ * numbers belonging to that group. When of these fields' value is set, all
269
+ * other fields in the group are cleared. During deserialization, if multiple
270
+ * fields are encountered for a group, only the last value seen will be kept.
271
+ * @private {!Array<!Array<number>>}
272
+ * @const
273
+ */
274
+ proto.gateway.web.v1.FxRateEnvelope.oneofGroups_ = [[1,2]];
275
+
276
+ /**
277
+ * @enum {number}
278
+ */
279
+ proto.gateway.web.v1.FxRateEnvelope.EventCase = {
280
+ EVENT_NOT_SET: 0,
281
+ SNAPSHOT: 1,
282
+ UPDATE: 2
283
+ };
284
+
285
+ /**
286
+ * @return {proto.gateway.web.v1.FxRateEnvelope.EventCase}
287
+ */
288
+ proto.gateway.web.v1.FxRateEnvelope.prototype.getEventCase = function() {
289
+ return /** @type {proto.gateway.web.v1.FxRateEnvelope.EventCase} */(jspb.Message.computeOneofCase(this, proto.gateway.web.v1.FxRateEnvelope.oneofGroups_[0]));
290
+ };
291
+
292
+
293
+
294
+ if (jspb.Message.GENERATE_TO_OBJECT) {
295
+ /**
296
+ * Creates an object representation of this proto.
297
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
298
+ * Optional fields that are not set will be set to undefined.
299
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
300
+ * For the list of reserved names please see:
301
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
302
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
303
+ * JSPB instance for transitional soy proto support:
304
+ * http://goto/soy-param-migration
305
+ * @return {!Object}
306
+ */
307
+ proto.gateway.web.v1.FxRateEnvelope.prototype.toObject = function(opt_includeInstance) {
308
+ return proto.gateway.web.v1.FxRateEnvelope.toObject(opt_includeInstance, this);
309
+ };
310
+
311
+
312
+ /**
313
+ * Static version of the {@see toObject} method.
314
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
315
+ * the JSPB instance for transitional soy proto support:
316
+ * http://goto/soy-param-migration
317
+ * @param {!proto.gateway.web.v1.FxRateEnvelope} msg The msg instance to transform.
318
+ * @return {!Object}
319
+ * @suppress {unusedLocalVariables} f is only used for nested messages
320
+ */
321
+ proto.gateway.web.v1.FxRateEnvelope.toObject = function(includeInstance, msg) {
322
+ var f, obj = {
323
+ snapshot: (f = msg.getSnapshot()) && proto.gateway.web.v1.FxRateSnapshot.toObject(includeInstance, f),
324
+ update: (f = msg.getUpdate()) && proto.gateway.web.v1.FxRateUpdate.toObject(includeInstance, f)
325
+ };
326
+
327
+ if (includeInstance) {
328
+ obj.$jspbMessageInstance = msg;
329
+ }
330
+ return obj;
331
+ };
332
+ }
333
+
334
+
335
+ /**
336
+ * Deserializes binary data (in protobuf wire format).
337
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
338
+ * @return {!proto.gateway.web.v1.FxRateEnvelope}
339
+ */
340
+ proto.gateway.web.v1.FxRateEnvelope.deserializeBinary = function(bytes) {
341
+ var reader = new jspb.BinaryReader(bytes);
342
+ var msg = new proto.gateway.web.v1.FxRateEnvelope;
343
+ return proto.gateway.web.v1.FxRateEnvelope.deserializeBinaryFromReader(msg, reader);
344
+ };
345
+
346
+
347
+ /**
348
+ * Deserializes binary data (in protobuf wire format) from the
349
+ * given reader into the given message object.
350
+ * @param {!proto.gateway.web.v1.FxRateEnvelope} msg The message object to deserialize into.
351
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
352
+ * @return {!proto.gateway.web.v1.FxRateEnvelope}
353
+ */
354
+ proto.gateway.web.v1.FxRateEnvelope.deserializeBinaryFromReader = function(msg, reader) {
355
+ while (reader.nextField()) {
356
+ if (reader.isEndGroup()) {
357
+ break;
358
+ }
359
+ var field = reader.getFieldNumber();
360
+ switch (field) {
361
+ case 1:
362
+ var value = new proto.gateway.web.v1.FxRateSnapshot;
363
+ reader.readMessage(value,proto.gateway.web.v1.FxRateSnapshot.deserializeBinaryFromReader);
364
+ msg.setSnapshot(value);
365
+ break;
366
+ case 2:
367
+ var value = new proto.gateway.web.v1.FxRateUpdate;
368
+ reader.readMessage(value,proto.gateway.web.v1.FxRateUpdate.deserializeBinaryFromReader);
369
+ msg.setUpdate(value);
370
+ break;
371
+ default:
372
+ reader.skipField();
373
+ break;
374
+ }
375
+ }
376
+ return msg;
377
+ };
378
+
379
+
380
+ /**
381
+ * Serializes the message to binary data (in protobuf wire format).
382
+ * @return {!Uint8Array}
383
+ */
384
+ proto.gateway.web.v1.FxRateEnvelope.prototype.serializeBinary = function() {
385
+ var writer = new jspb.BinaryWriter();
386
+ proto.gateway.web.v1.FxRateEnvelope.serializeBinaryToWriter(this, writer);
387
+ return writer.getResultBuffer();
388
+ };
389
+
390
+
391
+ /**
392
+ * Serializes the given message to binary data (in protobuf wire
393
+ * format), writing to the given BinaryWriter.
394
+ * @param {!proto.gateway.web.v1.FxRateEnvelope} message
395
+ * @param {!jspb.BinaryWriter} writer
396
+ * @suppress {unusedLocalVariables} f is only used for nested messages
397
+ */
398
+ proto.gateway.web.v1.FxRateEnvelope.serializeBinaryToWriter = function(message, writer) {
399
+ var f = undefined;
400
+ f = message.getSnapshot();
401
+ if (f != null) {
402
+ writer.writeMessage(
403
+ 1,
404
+ f,
405
+ proto.gateway.web.v1.FxRateSnapshot.serializeBinaryToWriter
406
+ );
407
+ }
408
+ f = message.getUpdate();
409
+ if (f != null) {
410
+ writer.writeMessage(
411
+ 2,
412
+ f,
413
+ proto.gateway.web.v1.FxRateUpdate.serializeBinaryToWriter
414
+ );
415
+ }
416
+ };
417
+
418
+
419
+ /**
420
+ * optional FxRateSnapshot snapshot = 1;
421
+ * @return {?proto.gateway.web.v1.FxRateSnapshot}
422
+ */
423
+ proto.gateway.web.v1.FxRateEnvelope.prototype.getSnapshot = function() {
424
+ return /** @type{?proto.gateway.web.v1.FxRateSnapshot} */ (
425
+ jspb.Message.getWrapperField(this, proto.gateway.web.v1.FxRateSnapshot, 1));
426
+ };
427
+
428
+
429
+ /**
430
+ * @param {?proto.gateway.web.v1.FxRateSnapshot|undefined} value
431
+ * @return {!proto.gateway.web.v1.FxRateEnvelope} returns this
432
+ */
433
+ proto.gateway.web.v1.FxRateEnvelope.prototype.setSnapshot = function(value) {
434
+ return jspb.Message.setOneofWrapperField(this, 1, proto.gateway.web.v1.FxRateEnvelope.oneofGroups_[0], value);
435
+ };
436
+
437
+
438
+ /**
439
+ * Clears the message field making it undefined.
440
+ * @return {!proto.gateway.web.v1.FxRateEnvelope} returns this
441
+ */
442
+ proto.gateway.web.v1.FxRateEnvelope.prototype.clearSnapshot = function() {
443
+ return this.setSnapshot(undefined);
444
+ };
445
+
446
+
447
+ /**
448
+ * Returns whether this field is set.
449
+ * @return {boolean}
450
+ */
451
+ proto.gateway.web.v1.FxRateEnvelope.prototype.hasSnapshot = function() {
452
+ return jspb.Message.getField(this, 1) != null;
453
+ };
454
+
455
+
456
+ /**
457
+ * optional FxRateUpdate update = 2;
458
+ * @return {?proto.gateway.web.v1.FxRateUpdate}
459
+ */
460
+ proto.gateway.web.v1.FxRateEnvelope.prototype.getUpdate = function() {
461
+ return /** @type{?proto.gateway.web.v1.FxRateUpdate} */ (
462
+ jspb.Message.getWrapperField(this, proto.gateway.web.v1.FxRateUpdate, 2));
463
+ };
464
+
465
+
466
+ /**
467
+ * @param {?proto.gateway.web.v1.FxRateUpdate|undefined} value
468
+ * @return {!proto.gateway.web.v1.FxRateEnvelope} returns this
469
+ */
470
+ proto.gateway.web.v1.FxRateEnvelope.prototype.setUpdate = function(value) {
471
+ return jspb.Message.setOneofWrapperField(this, 2, proto.gateway.web.v1.FxRateEnvelope.oneofGroups_[0], value);
472
+ };
473
+
474
+
475
+ /**
476
+ * Clears the message field making it undefined.
477
+ * @return {!proto.gateway.web.v1.FxRateEnvelope} returns this
478
+ */
479
+ proto.gateway.web.v1.FxRateEnvelope.prototype.clearUpdate = function() {
480
+ return this.setUpdate(undefined);
481
+ };
482
+
483
+
484
+ /**
485
+ * Returns whether this field is set.
486
+ * @return {boolean}
487
+ */
488
+ proto.gateway.web.v1.FxRateEnvelope.prototype.hasUpdate = function() {
489
+ return jspb.Message.getField(this, 2) != null;
490
+ };
491
+
492
+
493
+
494
+ /**
495
+ * List of repeated fields within this message type.
496
+ * @private {!Array<number>}
497
+ * @const
498
+ */
499
+ proto.gateway.web.v1.FxRateSnapshot.repeatedFields_ = [1];
500
+
501
+
502
+
503
+ if (jspb.Message.GENERATE_TO_OBJECT) {
504
+ /**
505
+ * Creates an object representation of this proto.
506
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
507
+ * Optional fields that are not set will be set to undefined.
508
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
509
+ * For the list of reserved names please see:
510
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
511
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
512
+ * JSPB instance for transitional soy proto support:
513
+ * http://goto/soy-param-migration
514
+ * @return {!Object}
515
+ */
516
+ proto.gateway.web.v1.FxRateSnapshot.prototype.toObject = function(opt_includeInstance) {
517
+ return proto.gateway.web.v1.FxRateSnapshot.toObject(opt_includeInstance, this);
518
+ };
519
+
520
+
521
+ /**
522
+ * Static version of the {@see toObject} method.
523
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
524
+ * the JSPB instance for transitional soy proto support:
525
+ * http://goto/soy-param-migration
526
+ * @param {!proto.gateway.web.v1.FxRateSnapshot} msg The msg instance to transform.
527
+ * @return {!Object}
528
+ * @suppress {unusedLocalVariables} f is only used for nested messages
529
+ */
530
+ proto.gateway.web.v1.FxRateSnapshot.toObject = function(includeInstance, msg) {
531
+ var f, obj = {
532
+ ratesList: jspb.Message.toObjectList(msg.getRatesList(),
533
+ proto.gateway.web.v1.CryptoFxRate.toObject, includeInstance),
534
+ currency: jspb.Message.getFieldWithDefault(msg, 2, "")
535
+ };
536
+
537
+ if (includeInstance) {
538
+ obj.$jspbMessageInstance = msg;
539
+ }
540
+ return obj;
541
+ };
542
+ }
543
+
544
+
545
+ /**
546
+ * Deserializes binary data (in protobuf wire format).
547
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
548
+ * @return {!proto.gateway.web.v1.FxRateSnapshot}
549
+ */
550
+ proto.gateway.web.v1.FxRateSnapshot.deserializeBinary = function(bytes) {
551
+ var reader = new jspb.BinaryReader(bytes);
552
+ var msg = new proto.gateway.web.v1.FxRateSnapshot;
553
+ return proto.gateway.web.v1.FxRateSnapshot.deserializeBinaryFromReader(msg, reader);
554
+ };
555
+
556
+
557
+ /**
558
+ * Deserializes binary data (in protobuf wire format) from the
559
+ * given reader into the given message object.
560
+ * @param {!proto.gateway.web.v1.FxRateSnapshot} msg The message object to deserialize into.
561
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
562
+ * @return {!proto.gateway.web.v1.FxRateSnapshot}
563
+ */
564
+ proto.gateway.web.v1.FxRateSnapshot.deserializeBinaryFromReader = function(msg, reader) {
565
+ while (reader.nextField()) {
566
+ if (reader.isEndGroup()) {
567
+ break;
568
+ }
569
+ var field = reader.getFieldNumber();
570
+ switch (field) {
571
+ case 1:
572
+ var value = new proto.gateway.web.v1.CryptoFxRate;
573
+ reader.readMessage(value,proto.gateway.web.v1.CryptoFxRate.deserializeBinaryFromReader);
574
+ msg.addRates(value);
575
+ break;
576
+ case 2:
577
+ var value = /** @type {string} */ (reader.readString());
578
+ msg.setCurrency(value);
579
+ break;
580
+ default:
581
+ reader.skipField();
582
+ break;
583
+ }
584
+ }
585
+ return msg;
586
+ };
587
+
588
+
589
+ /**
590
+ * Serializes the message to binary data (in protobuf wire format).
591
+ * @return {!Uint8Array}
592
+ */
593
+ proto.gateway.web.v1.FxRateSnapshot.prototype.serializeBinary = function() {
594
+ var writer = new jspb.BinaryWriter();
595
+ proto.gateway.web.v1.FxRateSnapshot.serializeBinaryToWriter(this, writer);
596
+ return writer.getResultBuffer();
597
+ };
598
+
599
+
600
+ /**
601
+ * Serializes the given message to binary data (in protobuf wire
602
+ * format), writing to the given BinaryWriter.
603
+ * @param {!proto.gateway.web.v1.FxRateSnapshot} message
604
+ * @param {!jspb.BinaryWriter} writer
605
+ * @suppress {unusedLocalVariables} f is only used for nested messages
606
+ */
607
+ proto.gateway.web.v1.FxRateSnapshot.serializeBinaryToWriter = function(message, writer) {
608
+ var f = undefined;
609
+ f = message.getRatesList();
610
+ if (f.length > 0) {
611
+ writer.writeRepeatedMessage(
612
+ 1,
613
+ f,
614
+ proto.gateway.web.v1.CryptoFxRate.serializeBinaryToWriter
615
+ );
616
+ }
617
+ f = message.getCurrency();
618
+ if (f.length > 0) {
619
+ writer.writeString(
620
+ 2,
621
+ f
622
+ );
623
+ }
624
+ };
625
+
626
+
627
+ /**
628
+ * repeated CryptoFxRate rates = 1;
629
+ * @return {!Array<!proto.gateway.web.v1.CryptoFxRate>}
630
+ */
631
+ proto.gateway.web.v1.FxRateSnapshot.prototype.getRatesList = function() {
632
+ return /** @type{!Array<!proto.gateway.web.v1.CryptoFxRate>} */ (
633
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.web.v1.CryptoFxRate, 1));
634
+ };
635
+
636
+
637
+ /**
638
+ * @param {!Array<!proto.gateway.web.v1.CryptoFxRate>} value
639
+ * @return {!proto.gateway.web.v1.FxRateSnapshot} returns this
640
+ */
641
+ proto.gateway.web.v1.FxRateSnapshot.prototype.setRatesList = function(value) {
642
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
643
+ };
644
+
645
+
646
+ /**
647
+ * @param {!proto.gateway.web.v1.CryptoFxRate=} opt_value
648
+ * @param {number=} opt_index
649
+ * @return {!proto.gateway.web.v1.CryptoFxRate}
650
+ */
651
+ proto.gateway.web.v1.FxRateSnapshot.prototype.addRates = function(opt_value, opt_index) {
652
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.gateway.web.v1.CryptoFxRate, opt_index);
653
+ };
654
+
655
+
656
+ /**
657
+ * Clears the list making it empty but non-null.
658
+ * @return {!proto.gateway.web.v1.FxRateSnapshot} returns this
659
+ */
660
+ proto.gateway.web.v1.FxRateSnapshot.prototype.clearRatesList = function() {
661
+ return this.setRatesList([]);
662
+ };
663
+
664
+
665
+ /**
666
+ * optional string currency = 2;
667
+ * @return {string}
668
+ */
669
+ proto.gateway.web.v1.FxRateSnapshot.prototype.getCurrency = function() {
670
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
671
+ };
672
+
673
+
674
+ /**
675
+ * @param {string} value
676
+ * @return {!proto.gateway.web.v1.FxRateSnapshot} returns this
677
+ */
678
+ proto.gateway.web.v1.FxRateSnapshot.prototype.setCurrency = function(value) {
679
+ return jspb.Message.setProto3StringField(this, 2, value);
680
+ };
681
+
682
+
683
+
684
+ /**
685
+ * List of repeated fields within this message type.
686
+ * @private {!Array<number>}
687
+ * @const
688
+ */
689
+ proto.gateway.web.v1.FxRateUpdate.repeatedFields_ = [1];
690
+
691
+
692
+
693
+ if (jspb.Message.GENERATE_TO_OBJECT) {
694
+ /**
695
+ * Creates an object representation of this proto.
696
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
697
+ * Optional fields that are not set will be set to undefined.
698
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
699
+ * For the list of reserved names please see:
700
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
701
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
702
+ * JSPB instance for transitional soy proto support:
703
+ * http://goto/soy-param-migration
704
+ * @return {!Object}
705
+ */
706
+ proto.gateway.web.v1.FxRateUpdate.prototype.toObject = function(opt_includeInstance) {
707
+ return proto.gateway.web.v1.FxRateUpdate.toObject(opt_includeInstance, this);
708
+ };
709
+
710
+
711
+ /**
712
+ * Static version of the {@see toObject} method.
713
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
714
+ * the JSPB instance for transitional soy proto support:
715
+ * http://goto/soy-param-migration
716
+ * @param {!proto.gateway.web.v1.FxRateUpdate} msg The msg instance to transform.
717
+ * @return {!Object}
718
+ * @suppress {unusedLocalVariables} f is only used for nested messages
719
+ */
720
+ proto.gateway.web.v1.FxRateUpdate.toObject = function(includeInstance, msg) {
721
+ var f, obj = {
722
+ ratesList: jspb.Message.toObjectList(msg.getRatesList(),
723
+ proto.gateway.web.v1.CryptoFxRate.toObject, includeInstance),
724
+ currency: jspb.Message.getFieldWithDefault(msg, 2, "")
725
+ };
726
+
727
+ if (includeInstance) {
728
+ obj.$jspbMessageInstance = msg;
729
+ }
730
+ return obj;
731
+ };
732
+ }
733
+
734
+
735
+ /**
736
+ * Deserializes binary data (in protobuf wire format).
737
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
738
+ * @return {!proto.gateway.web.v1.FxRateUpdate}
739
+ */
740
+ proto.gateway.web.v1.FxRateUpdate.deserializeBinary = function(bytes) {
741
+ var reader = new jspb.BinaryReader(bytes);
742
+ var msg = new proto.gateway.web.v1.FxRateUpdate;
743
+ return proto.gateway.web.v1.FxRateUpdate.deserializeBinaryFromReader(msg, reader);
744
+ };
745
+
746
+
747
+ /**
748
+ * Deserializes binary data (in protobuf wire format) from the
749
+ * given reader into the given message object.
750
+ * @param {!proto.gateway.web.v1.FxRateUpdate} msg The message object to deserialize into.
751
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
752
+ * @return {!proto.gateway.web.v1.FxRateUpdate}
753
+ */
754
+ proto.gateway.web.v1.FxRateUpdate.deserializeBinaryFromReader = function(msg, reader) {
755
+ while (reader.nextField()) {
756
+ if (reader.isEndGroup()) {
757
+ break;
758
+ }
759
+ var field = reader.getFieldNumber();
760
+ switch (field) {
761
+ case 1:
762
+ var value = new proto.gateway.web.v1.CryptoFxRate;
763
+ reader.readMessage(value,proto.gateway.web.v1.CryptoFxRate.deserializeBinaryFromReader);
764
+ msg.addRates(value);
765
+ break;
766
+ case 2:
767
+ var value = /** @type {string} */ (reader.readString());
768
+ msg.setCurrency(value);
769
+ break;
770
+ default:
771
+ reader.skipField();
772
+ break;
773
+ }
774
+ }
775
+ return msg;
776
+ };
777
+
778
+
779
+ /**
780
+ * Serializes the message to binary data (in protobuf wire format).
781
+ * @return {!Uint8Array}
782
+ */
783
+ proto.gateway.web.v1.FxRateUpdate.prototype.serializeBinary = function() {
784
+ var writer = new jspb.BinaryWriter();
785
+ proto.gateway.web.v1.FxRateUpdate.serializeBinaryToWriter(this, writer);
786
+ return writer.getResultBuffer();
787
+ };
788
+
789
+
790
+ /**
791
+ * Serializes the given message to binary data (in protobuf wire
792
+ * format), writing to the given BinaryWriter.
793
+ * @param {!proto.gateway.web.v1.FxRateUpdate} message
794
+ * @param {!jspb.BinaryWriter} writer
795
+ * @suppress {unusedLocalVariables} f is only used for nested messages
796
+ */
797
+ proto.gateway.web.v1.FxRateUpdate.serializeBinaryToWriter = function(message, writer) {
798
+ var f = undefined;
799
+ f = message.getRatesList();
800
+ if (f.length > 0) {
801
+ writer.writeRepeatedMessage(
802
+ 1,
803
+ f,
804
+ proto.gateway.web.v1.CryptoFxRate.serializeBinaryToWriter
805
+ );
806
+ }
807
+ f = message.getCurrency();
808
+ if (f.length > 0) {
809
+ writer.writeString(
810
+ 2,
811
+ f
812
+ );
813
+ }
814
+ };
815
+
816
+
817
+ /**
818
+ * repeated CryptoFxRate rates = 1;
819
+ * @return {!Array<!proto.gateway.web.v1.CryptoFxRate>}
820
+ */
821
+ proto.gateway.web.v1.FxRateUpdate.prototype.getRatesList = function() {
822
+ return /** @type{!Array<!proto.gateway.web.v1.CryptoFxRate>} */ (
823
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.web.v1.CryptoFxRate, 1));
824
+ };
825
+
826
+
827
+ /**
828
+ * @param {!Array<!proto.gateway.web.v1.CryptoFxRate>} value
829
+ * @return {!proto.gateway.web.v1.FxRateUpdate} returns this
830
+ */
831
+ proto.gateway.web.v1.FxRateUpdate.prototype.setRatesList = function(value) {
832
+ return jspb.Message.setRepeatedWrapperField(this, 1, value);
833
+ };
834
+
835
+
836
+ /**
837
+ * @param {!proto.gateway.web.v1.CryptoFxRate=} opt_value
838
+ * @param {number=} opt_index
839
+ * @return {!proto.gateway.web.v1.CryptoFxRate}
840
+ */
841
+ proto.gateway.web.v1.FxRateUpdate.prototype.addRates = function(opt_value, opt_index) {
842
+ return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.gateway.web.v1.CryptoFxRate, opt_index);
843
+ };
844
+
845
+
846
+ /**
847
+ * Clears the list making it empty but non-null.
848
+ * @return {!proto.gateway.web.v1.FxRateUpdate} returns this
849
+ */
850
+ proto.gateway.web.v1.FxRateUpdate.prototype.clearRatesList = function() {
851
+ return this.setRatesList([]);
852
+ };
853
+
854
+
855
+ /**
856
+ * optional string currency = 2;
857
+ * @return {string}
858
+ */
859
+ proto.gateway.web.v1.FxRateUpdate.prototype.getCurrency = function() {
860
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
861
+ };
862
+
863
+
864
+ /**
865
+ * @param {string} value
866
+ * @return {!proto.gateway.web.v1.FxRateUpdate} returns this
867
+ */
868
+ proto.gateway.web.v1.FxRateUpdate.prototype.setCurrency = function(value) {
869
+ return jspb.Message.setProto3StringField(this, 2, value);
870
+ };
871
+
872
+
873
+
874
+
875
+
876
+ if (jspb.Message.GENERATE_TO_OBJECT) {
877
+ /**
878
+ * Creates an object representation of this proto.
879
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
880
+ * Optional fields that are not set will be set to undefined.
881
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
882
+ * For the list of reserved names please see:
883
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
884
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
885
+ * JSPB instance for transitional soy proto support:
886
+ * http://goto/soy-param-migration
887
+ * @return {!Object}
888
+ */
889
+ proto.gateway.web.v1.CryptoFxRate.prototype.toObject = function(opt_includeInstance) {
890
+ return proto.gateway.web.v1.CryptoFxRate.toObject(opt_includeInstance, this);
891
+ };
892
+
893
+
894
+ /**
895
+ * Static version of the {@see toObject} method.
896
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
897
+ * the JSPB instance for transitional soy proto support:
898
+ * http://goto/soy-param-migration
899
+ * @param {!proto.gateway.web.v1.CryptoFxRate} msg The msg instance to transform.
900
+ * @return {!Object}
901
+ * @suppress {unusedLocalVariables} f is only used for nested messages
902
+ */
903
+ proto.gateway.web.v1.CryptoFxRate.toObject = function(includeInstance, msg) {
904
+ var f, obj = {
905
+ symbol: jspb.Message.getFieldWithDefault(msg, 1, ""),
906
+ price: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
907
+ formatted: jspb.Message.getFieldWithDefault(msg, 3, "")
908
+ };
909
+
910
+ if (includeInstance) {
911
+ obj.$jspbMessageInstance = msg;
912
+ }
913
+ return obj;
914
+ };
915
+ }
916
+
917
+
918
+ /**
919
+ * Deserializes binary data (in protobuf wire format).
920
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
921
+ * @return {!proto.gateway.web.v1.CryptoFxRate}
922
+ */
923
+ proto.gateway.web.v1.CryptoFxRate.deserializeBinary = function(bytes) {
924
+ var reader = new jspb.BinaryReader(bytes);
925
+ var msg = new proto.gateway.web.v1.CryptoFxRate;
926
+ return proto.gateway.web.v1.CryptoFxRate.deserializeBinaryFromReader(msg, reader);
927
+ };
928
+
929
+
930
+ /**
931
+ * Deserializes binary data (in protobuf wire format) from the
932
+ * given reader into the given message object.
933
+ * @param {!proto.gateway.web.v1.CryptoFxRate} msg The message object to deserialize into.
934
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
935
+ * @return {!proto.gateway.web.v1.CryptoFxRate}
936
+ */
937
+ proto.gateway.web.v1.CryptoFxRate.deserializeBinaryFromReader = function(msg, reader) {
938
+ while (reader.nextField()) {
939
+ if (reader.isEndGroup()) {
940
+ break;
941
+ }
942
+ var field = reader.getFieldNumber();
943
+ switch (field) {
944
+ case 1:
945
+ var value = /** @type {string} */ (reader.readString());
946
+ msg.setSymbol(value);
947
+ break;
948
+ case 2:
949
+ var value = /** @type {number} */ (reader.readDouble());
950
+ msg.setPrice(value);
951
+ break;
952
+ case 3:
953
+ var value = /** @type {string} */ (reader.readString());
954
+ msg.setFormatted(value);
955
+ break;
956
+ default:
957
+ reader.skipField();
958
+ break;
959
+ }
960
+ }
961
+ return msg;
962
+ };
963
+
964
+
965
+ /**
966
+ * Serializes the message to binary data (in protobuf wire format).
967
+ * @return {!Uint8Array}
968
+ */
969
+ proto.gateway.web.v1.CryptoFxRate.prototype.serializeBinary = function() {
970
+ var writer = new jspb.BinaryWriter();
971
+ proto.gateway.web.v1.CryptoFxRate.serializeBinaryToWriter(this, writer);
972
+ return writer.getResultBuffer();
973
+ };
974
+
975
+
976
+ /**
977
+ * Serializes the given message to binary data (in protobuf wire
978
+ * format), writing to the given BinaryWriter.
979
+ * @param {!proto.gateway.web.v1.CryptoFxRate} message
980
+ * @param {!jspb.BinaryWriter} writer
981
+ * @suppress {unusedLocalVariables} f is only used for nested messages
982
+ */
983
+ proto.gateway.web.v1.CryptoFxRate.serializeBinaryToWriter = function(message, writer) {
984
+ var f = undefined;
985
+ f = message.getSymbol();
986
+ if (f.length > 0) {
987
+ writer.writeString(
988
+ 1,
989
+ f
990
+ );
991
+ }
992
+ f = message.getPrice();
993
+ if (f !== 0.0) {
994
+ writer.writeDouble(
995
+ 2,
996
+ f
997
+ );
998
+ }
999
+ f = message.getFormatted();
1000
+ if (f.length > 0) {
1001
+ writer.writeString(
1002
+ 3,
1003
+ f
1004
+ );
1005
+ }
1006
+ };
1007
+
1008
+
1009
+ /**
1010
+ * optional string symbol = 1;
1011
+ * @return {string}
1012
+ */
1013
+ proto.gateway.web.v1.CryptoFxRate.prototype.getSymbol = function() {
1014
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1015
+ };
1016
+
1017
+
1018
+ /**
1019
+ * @param {string} value
1020
+ * @return {!proto.gateway.web.v1.CryptoFxRate} returns this
1021
+ */
1022
+ proto.gateway.web.v1.CryptoFxRate.prototype.setSymbol = function(value) {
1023
+ return jspb.Message.setProto3StringField(this, 1, value);
1024
+ };
1025
+
1026
+
1027
+ /**
1028
+ * optional double price = 2;
1029
+ * @return {number}
1030
+ */
1031
+ proto.gateway.web.v1.CryptoFxRate.prototype.getPrice = function() {
1032
+ return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
1033
+ };
1034
+
1035
+
1036
+ /**
1037
+ * @param {number} value
1038
+ * @return {!proto.gateway.web.v1.CryptoFxRate} returns this
1039
+ */
1040
+ proto.gateway.web.v1.CryptoFxRate.prototype.setPrice = function(value) {
1041
+ return jspb.Message.setProto3FloatField(this, 2, value);
1042
+ };
1043
+
1044
+
1045
+ /**
1046
+ * optional string formatted = 3;
1047
+ * @return {string}
1048
+ */
1049
+ proto.gateway.web.v1.CryptoFxRate.prototype.getFormatted = function() {
1050
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1051
+ };
1052
+
1053
+
1054
+ /**
1055
+ * @param {string} value
1056
+ * @return {!proto.gateway.web.v1.CryptoFxRate} returns this
1057
+ */
1058
+ proto.gateway.web.v1.CryptoFxRate.prototype.setFormatted = function(value) {
1059
+ return jspb.Message.setProto3StringField(this, 3, value);
1060
+ };
1061
+
1062
+
1063
+ goog.object.extend(exports, proto.gateway.web.v1);