github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/js/proto/rpcevents_pb.js (about) 1 // source: rpcevents.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 = Function('return this')(); 17 18 var gogoproto_gogo_pb = require('./gogoproto/gogo_pb.js'); 19 goog.object.extend(proto, gogoproto_gogo_pb); 20 var exec_pb = require('./exec_pb.js'); 21 goog.object.extend(proto, exec_pb); 22 goog.exportSymbol('proto.rpcevents.BlockRange', null, global); 23 goog.exportSymbol('proto.rpcevents.BlocksRequest', null, global); 24 goog.exportSymbol('proto.rpcevents.Bound', null, global); 25 goog.exportSymbol('proto.rpcevents.Bound.BoundType', null, global); 26 goog.exportSymbol('proto.rpcevents.EventsResponse', null, global); 27 goog.exportSymbol('proto.rpcevents.GetBlockRequest', null, global); 28 goog.exportSymbol('proto.rpcevents.GetTxsRequest', null, global); 29 goog.exportSymbol('proto.rpcevents.GetTxsResponse', null, global); 30 goog.exportSymbol('proto.rpcevents.TxRequest', null, global); 31 /** 32 * Generated by JsPbCodeGenerator. 33 * @param {Array=} opt_data Optional initial data array, typically from a 34 * server response, or constructed directly in Javascript. The array is used 35 * in place and becomes part of the constructed object. It is not cloned. 36 * If no data is provided, the constructed object will be empty, but still 37 * valid. 38 * @extends {jspb.Message} 39 * @constructor 40 */ 41 proto.rpcevents.GetBlockRequest = function(opt_data) { 42 jspb.Message.initialize(this, opt_data, 0, -1, null, null); 43 }; 44 goog.inherits(proto.rpcevents.GetBlockRequest, jspb.Message); 45 if (goog.DEBUG && !COMPILED) { 46 /** 47 * @public 48 * @override 49 */ 50 proto.rpcevents.GetBlockRequest.displayName = 'proto.rpcevents.GetBlockRequest'; 51 } 52 /** 53 * Generated by JsPbCodeGenerator. 54 * @param {Array=} opt_data Optional initial data array, typically from a 55 * server response, or constructed directly in Javascript. The array is used 56 * in place and becomes part of the constructed object. It is not cloned. 57 * If no data is provided, the constructed object will be empty, but still 58 * valid. 59 * @extends {jspb.Message} 60 * @constructor 61 */ 62 proto.rpcevents.TxRequest = function(opt_data) { 63 jspb.Message.initialize(this, opt_data, 0, -1, null, null); 64 }; 65 goog.inherits(proto.rpcevents.TxRequest, jspb.Message); 66 if (goog.DEBUG && !COMPILED) { 67 /** 68 * @public 69 * @override 70 */ 71 proto.rpcevents.TxRequest.displayName = 'proto.rpcevents.TxRequest'; 72 } 73 /** 74 * Generated by JsPbCodeGenerator. 75 * @param {Array=} opt_data Optional initial data array, typically from a 76 * server response, or constructed directly in Javascript. The array is used 77 * in place and becomes part of the constructed object. It is not cloned. 78 * If no data is provided, the constructed object will be empty, but still 79 * valid. 80 * @extends {jspb.Message} 81 * @constructor 82 */ 83 proto.rpcevents.BlocksRequest = function(opt_data) { 84 jspb.Message.initialize(this, opt_data, 0, -1, null, null); 85 }; 86 goog.inherits(proto.rpcevents.BlocksRequest, jspb.Message); 87 if (goog.DEBUG && !COMPILED) { 88 /** 89 * @public 90 * @override 91 */ 92 proto.rpcevents.BlocksRequest.displayName = 'proto.rpcevents.BlocksRequest'; 93 } 94 /** 95 * Generated by JsPbCodeGenerator. 96 * @param {Array=} opt_data Optional initial data array, typically from a 97 * server response, or constructed directly in Javascript. The array is used 98 * in place and becomes part of the constructed object. It is not cloned. 99 * If no data is provided, the constructed object will be empty, but still 100 * valid. 101 * @extends {jspb.Message} 102 * @constructor 103 */ 104 proto.rpcevents.EventsResponse = function(opt_data) { 105 jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcevents.EventsResponse.repeatedFields_, null); 106 }; 107 goog.inherits(proto.rpcevents.EventsResponse, jspb.Message); 108 if (goog.DEBUG && !COMPILED) { 109 /** 110 * @public 111 * @override 112 */ 113 proto.rpcevents.EventsResponse.displayName = 'proto.rpcevents.EventsResponse'; 114 } 115 /** 116 * Generated by JsPbCodeGenerator. 117 * @param {Array=} opt_data Optional initial data array, typically from a 118 * server response, or constructed directly in Javascript. The array is used 119 * in place and becomes part of the constructed object. It is not cloned. 120 * If no data is provided, the constructed object will be empty, but still 121 * valid. 122 * @extends {jspb.Message} 123 * @constructor 124 */ 125 proto.rpcevents.GetTxsRequest = function(opt_data) { 126 jspb.Message.initialize(this, opt_data, 0, -1, null, null); 127 }; 128 goog.inherits(proto.rpcevents.GetTxsRequest, jspb.Message); 129 if (goog.DEBUG && !COMPILED) { 130 /** 131 * @public 132 * @override 133 */ 134 proto.rpcevents.GetTxsRequest.displayName = 'proto.rpcevents.GetTxsRequest'; 135 } 136 /** 137 * Generated by JsPbCodeGenerator. 138 * @param {Array=} opt_data Optional initial data array, typically from a 139 * server response, or constructed directly in Javascript. The array is used 140 * in place and becomes part of the constructed object. It is not cloned. 141 * If no data is provided, the constructed object will be empty, but still 142 * valid. 143 * @extends {jspb.Message} 144 * @constructor 145 */ 146 proto.rpcevents.GetTxsResponse = function(opt_data) { 147 jspb.Message.initialize(this, opt_data, 0, -1, proto.rpcevents.GetTxsResponse.repeatedFields_, null); 148 }; 149 goog.inherits(proto.rpcevents.GetTxsResponse, jspb.Message); 150 if (goog.DEBUG && !COMPILED) { 151 /** 152 * @public 153 * @override 154 */ 155 proto.rpcevents.GetTxsResponse.displayName = 'proto.rpcevents.GetTxsResponse'; 156 } 157 /** 158 * Generated by JsPbCodeGenerator. 159 * @param {Array=} opt_data Optional initial data array, typically from a 160 * server response, or constructed directly in Javascript. The array is used 161 * in place and becomes part of the constructed object. It is not cloned. 162 * If no data is provided, the constructed object will be empty, but still 163 * valid. 164 * @extends {jspb.Message} 165 * @constructor 166 */ 167 proto.rpcevents.Bound = function(opt_data) { 168 jspb.Message.initialize(this, opt_data, 0, -1, null, null); 169 }; 170 goog.inherits(proto.rpcevents.Bound, jspb.Message); 171 if (goog.DEBUG && !COMPILED) { 172 /** 173 * @public 174 * @override 175 */ 176 proto.rpcevents.Bound.displayName = 'proto.rpcevents.Bound'; 177 } 178 /** 179 * Generated by JsPbCodeGenerator. 180 * @param {Array=} opt_data Optional initial data array, typically from a 181 * server response, or constructed directly in Javascript. The array is used 182 * in place and becomes part of the constructed object. It is not cloned. 183 * If no data is provided, the constructed object will be empty, but still 184 * valid. 185 * @extends {jspb.Message} 186 * @constructor 187 */ 188 proto.rpcevents.BlockRange = function(opt_data) { 189 jspb.Message.initialize(this, opt_data, 0, -1, null, null); 190 }; 191 goog.inherits(proto.rpcevents.BlockRange, jspb.Message); 192 if (goog.DEBUG && !COMPILED) { 193 /** 194 * @public 195 * @override 196 */ 197 proto.rpcevents.BlockRange.displayName = 'proto.rpcevents.BlockRange'; 198 } 199 200 201 202 if (jspb.Message.GENERATE_TO_OBJECT) { 203 /** 204 * Creates an object representation of this proto. 205 * Field names that are reserved in JavaScript and will be renamed to pb_name. 206 * Optional fields that are not set will be set to undefined. 207 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 208 * For the list of reserved names please see: 209 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 210 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 211 * JSPB instance for transitional soy proto support: 212 * http://goto/soy-param-migration 213 * @return {!Object} 214 */ 215 proto.rpcevents.GetBlockRequest.prototype.toObject = function(opt_includeInstance) { 216 return proto.rpcevents.GetBlockRequest.toObject(opt_includeInstance, this); 217 }; 218 219 220 /** 221 * Static version of the {@see toObject} method. 222 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 223 * the JSPB instance for transitional soy proto support: 224 * http://goto/soy-param-migration 225 * @param {!proto.rpcevents.GetBlockRequest} msg The msg instance to transform. 226 * @return {!Object} 227 * @suppress {unusedLocalVariables} f is only used for nested messages 228 */ 229 proto.rpcevents.GetBlockRequest.toObject = function(includeInstance, msg) { 230 var f, obj = { 231 height: jspb.Message.getFieldWithDefault(msg, 1, 0), 232 wait: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) 233 }; 234 235 if (includeInstance) { 236 obj.$jspbMessageInstance = msg; 237 } 238 return obj; 239 }; 240 } 241 242 243 /** 244 * Deserializes binary data (in protobuf wire format). 245 * @param {jspb.ByteSource} bytes The bytes to deserialize. 246 * @return {!proto.rpcevents.GetBlockRequest} 247 */ 248 proto.rpcevents.GetBlockRequest.deserializeBinary = function(bytes) { 249 var reader = new jspb.BinaryReader(bytes); 250 var msg = new proto.rpcevents.GetBlockRequest; 251 return proto.rpcevents.GetBlockRequest.deserializeBinaryFromReader(msg, reader); 252 }; 253 254 255 /** 256 * Deserializes binary data (in protobuf wire format) from the 257 * given reader into the given message object. 258 * @param {!proto.rpcevents.GetBlockRequest} msg The message object to deserialize into. 259 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 260 * @return {!proto.rpcevents.GetBlockRequest} 261 */ 262 proto.rpcevents.GetBlockRequest.deserializeBinaryFromReader = function(msg, reader) { 263 while (reader.nextField()) { 264 if (reader.isEndGroup()) { 265 break; 266 } 267 var field = reader.getFieldNumber(); 268 switch (field) { 269 case 1: 270 var value = /** @type {number} */ (reader.readUint64()); 271 msg.setHeight(value); 272 break; 273 case 2: 274 var value = /** @type {boolean} */ (reader.readBool()); 275 msg.setWait(value); 276 break; 277 default: 278 reader.skipField(); 279 break; 280 } 281 } 282 return msg; 283 }; 284 285 286 /** 287 * Serializes the message to binary data (in protobuf wire format). 288 * @return {!Uint8Array} 289 */ 290 proto.rpcevents.GetBlockRequest.prototype.serializeBinary = function() { 291 var writer = new jspb.BinaryWriter(); 292 proto.rpcevents.GetBlockRequest.serializeBinaryToWriter(this, writer); 293 return writer.getResultBuffer(); 294 }; 295 296 297 /** 298 * Serializes the given message to binary data (in protobuf wire 299 * format), writing to the given BinaryWriter. 300 * @param {!proto.rpcevents.GetBlockRequest} message 301 * @param {!jspb.BinaryWriter} writer 302 * @suppress {unusedLocalVariables} f is only used for nested messages 303 */ 304 proto.rpcevents.GetBlockRequest.serializeBinaryToWriter = function(message, writer) { 305 var f = undefined; 306 f = message.getHeight(); 307 if (f !== 0) { 308 writer.writeUint64( 309 1, 310 f 311 ); 312 } 313 f = message.getWait(); 314 if (f) { 315 writer.writeBool( 316 2, 317 f 318 ); 319 } 320 }; 321 322 323 /** 324 * optional uint64 Height = 1; 325 * @return {number} 326 */ 327 proto.rpcevents.GetBlockRequest.prototype.getHeight = function() { 328 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); 329 }; 330 331 332 /** 333 * @param {number} value 334 * @return {!proto.rpcevents.GetBlockRequest} returns this 335 */ 336 proto.rpcevents.GetBlockRequest.prototype.setHeight = function(value) { 337 return jspb.Message.setProto3IntField(this, 1, value); 338 }; 339 340 341 /** 342 * optional bool Wait = 2; 343 * @return {boolean} 344 */ 345 proto.rpcevents.GetBlockRequest.prototype.getWait = function() { 346 return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); 347 }; 348 349 350 /** 351 * @param {boolean} value 352 * @return {!proto.rpcevents.GetBlockRequest} returns this 353 */ 354 proto.rpcevents.GetBlockRequest.prototype.setWait = function(value) { 355 return jspb.Message.setProto3BooleanField(this, 2, value); 356 }; 357 358 359 360 361 362 if (jspb.Message.GENERATE_TO_OBJECT) { 363 /** 364 * Creates an object representation of this proto. 365 * Field names that are reserved in JavaScript and will be renamed to pb_name. 366 * Optional fields that are not set will be set to undefined. 367 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 368 * For the list of reserved names please see: 369 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 370 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 371 * JSPB instance for transitional soy proto support: 372 * http://goto/soy-param-migration 373 * @return {!Object} 374 */ 375 proto.rpcevents.TxRequest.prototype.toObject = function(opt_includeInstance) { 376 return proto.rpcevents.TxRequest.toObject(opt_includeInstance, this); 377 }; 378 379 380 /** 381 * Static version of the {@see toObject} method. 382 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 383 * the JSPB instance for transitional soy proto support: 384 * http://goto/soy-param-migration 385 * @param {!proto.rpcevents.TxRequest} msg The msg instance to transform. 386 * @return {!Object} 387 * @suppress {unusedLocalVariables} f is only used for nested messages 388 */ 389 proto.rpcevents.TxRequest.toObject = function(includeInstance, msg) { 390 var f, obj = { 391 txhash: msg.getTxhash_asB64(), 392 wait: jspb.Message.getBooleanFieldWithDefault(msg, 2, false) 393 }; 394 395 if (includeInstance) { 396 obj.$jspbMessageInstance = msg; 397 } 398 return obj; 399 }; 400 } 401 402 403 /** 404 * Deserializes binary data (in protobuf wire format). 405 * @param {jspb.ByteSource} bytes The bytes to deserialize. 406 * @return {!proto.rpcevents.TxRequest} 407 */ 408 proto.rpcevents.TxRequest.deserializeBinary = function(bytes) { 409 var reader = new jspb.BinaryReader(bytes); 410 var msg = new proto.rpcevents.TxRequest; 411 return proto.rpcevents.TxRequest.deserializeBinaryFromReader(msg, reader); 412 }; 413 414 415 /** 416 * Deserializes binary data (in protobuf wire format) from the 417 * given reader into the given message object. 418 * @param {!proto.rpcevents.TxRequest} msg The message object to deserialize into. 419 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 420 * @return {!proto.rpcevents.TxRequest} 421 */ 422 proto.rpcevents.TxRequest.deserializeBinaryFromReader = function(msg, reader) { 423 while (reader.nextField()) { 424 if (reader.isEndGroup()) { 425 break; 426 } 427 var field = reader.getFieldNumber(); 428 switch (field) { 429 case 1: 430 var value = /** @type {!Uint8Array} */ (reader.readBytes()); 431 msg.setTxhash(value); 432 break; 433 case 2: 434 var value = /** @type {boolean} */ (reader.readBool()); 435 msg.setWait(value); 436 break; 437 default: 438 reader.skipField(); 439 break; 440 } 441 } 442 return msg; 443 }; 444 445 446 /** 447 * Serializes the message to binary data (in protobuf wire format). 448 * @return {!Uint8Array} 449 */ 450 proto.rpcevents.TxRequest.prototype.serializeBinary = function() { 451 var writer = new jspb.BinaryWriter(); 452 proto.rpcevents.TxRequest.serializeBinaryToWriter(this, writer); 453 return writer.getResultBuffer(); 454 }; 455 456 457 /** 458 * Serializes the given message to binary data (in protobuf wire 459 * format), writing to the given BinaryWriter. 460 * @param {!proto.rpcevents.TxRequest} message 461 * @param {!jspb.BinaryWriter} writer 462 * @suppress {unusedLocalVariables} f is only used for nested messages 463 */ 464 proto.rpcevents.TxRequest.serializeBinaryToWriter = function(message, writer) { 465 var f = undefined; 466 f = message.getTxhash_asU8(); 467 if (f.length > 0) { 468 writer.writeBytes( 469 1, 470 f 471 ); 472 } 473 f = message.getWait(); 474 if (f) { 475 writer.writeBool( 476 2, 477 f 478 ); 479 } 480 }; 481 482 483 /** 484 * optional bytes TxHash = 1; 485 * @return {!(string|Uint8Array)} 486 */ 487 proto.rpcevents.TxRequest.prototype.getTxhash = function() { 488 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); 489 }; 490 491 492 /** 493 * optional bytes TxHash = 1; 494 * This is a type-conversion wrapper around `getTxhash()` 495 * @return {string} 496 */ 497 proto.rpcevents.TxRequest.prototype.getTxhash_asB64 = function() { 498 return /** @type {string} */ (jspb.Message.bytesAsB64( 499 this.getTxhash())); 500 }; 501 502 503 /** 504 * optional bytes TxHash = 1; 505 * Note that Uint8Array is not supported on all browsers. 506 * @see http://caniuse.com/Uint8Array 507 * This is a type-conversion wrapper around `getTxhash()` 508 * @return {!Uint8Array} 509 */ 510 proto.rpcevents.TxRequest.prototype.getTxhash_asU8 = function() { 511 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( 512 this.getTxhash())); 513 }; 514 515 516 /** 517 * @param {!(string|Uint8Array)} value 518 * @return {!proto.rpcevents.TxRequest} returns this 519 */ 520 proto.rpcevents.TxRequest.prototype.setTxhash = function(value) { 521 return jspb.Message.setProto3BytesField(this, 1, value); 522 }; 523 524 525 /** 526 * optional bool Wait = 2; 527 * @return {boolean} 528 */ 529 proto.rpcevents.TxRequest.prototype.getWait = function() { 530 return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); 531 }; 532 533 534 /** 535 * @param {boolean} value 536 * @return {!proto.rpcevents.TxRequest} returns this 537 */ 538 proto.rpcevents.TxRequest.prototype.setWait = function(value) { 539 return jspb.Message.setProto3BooleanField(this, 2, value); 540 }; 541 542 543 544 545 546 if (jspb.Message.GENERATE_TO_OBJECT) { 547 /** 548 * Creates an object representation of this proto. 549 * Field names that are reserved in JavaScript and will be renamed to pb_name. 550 * Optional fields that are not set will be set to undefined. 551 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 552 * For the list of reserved names please see: 553 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 554 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 555 * JSPB instance for transitional soy proto support: 556 * http://goto/soy-param-migration 557 * @return {!Object} 558 */ 559 proto.rpcevents.BlocksRequest.prototype.toObject = function(opt_includeInstance) { 560 return proto.rpcevents.BlocksRequest.toObject(opt_includeInstance, this); 561 }; 562 563 564 /** 565 * Static version of the {@see toObject} method. 566 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 567 * the JSPB instance for transitional soy proto support: 568 * http://goto/soy-param-migration 569 * @param {!proto.rpcevents.BlocksRequest} msg The msg instance to transform. 570 * @return {!Object} 571 * @suppress {unusedLocalVariables} f is only used for nested messages 572 */ 573 proto.rpcevents.BlocksRequest.toObject = function(includeInstance, msg) { 574 var f, obj = { 575 blockrange: (f = msg.getBlockrange()) && proto.rpcevents.BlockRange.toObject(includeInstance, f), 576 query: jspb.Message.getFieldWithDefault(msg, 2, "") 577 }; 578 579 if (includeInstance) { 580 obj.$jspbMessageInstance = msg; 581 } 582 return obj; 583 }; 584 } 585 586 587 /** 588 * Deserializes binary data (in protobuf wire format). 589 * @param {jspb.ByteSource} bytes The bytes to deserialize. 590 * @return {!proto.rpcevents.BlocksRequest} 591 */ 592 proto.rpcevents.BlocksRequest.deserializeBinary = function(bytes) { 593 var reader = new jspb.BinaryReader(bytes); 594 var msg = new proto.rpcevents.BlocksRequest; 595 return proto.rpcevents.BlocksRequest.deserializeBinaryFromReader(msg, reader); 596 }; 597 598 599 /** 600 * Deserializes binary data (in protobuf wire format) from the 601 * given reader into the given message object. 602 * @param {!proto.rpcevents.BlocksRequest} msg The message object to deserialize into. 603 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 604 * @return {!proto.rpcevents.BlocksRequest} 605 */ 606 proto.rpcevents.BlocksRequest.deserializeBinaryFromReader = function(msg, reader) { 607 while (reader.nextField()) { 608 if (reader.isEndGroup()) { 609 break; 610 } 611 var field = reader.getFieldNumber(); 612 switch (field) { 613 case 1: 614 var value = new proto.rpcevents.BlockRange; 615 reader.readMessage(value,proto.rpcevents.BlockRange.deserializeBinaryFromReader); 616 msg.setBlockrange(value); 617 break; 618 case 2: 619 var value = /** @type {string} */ (reader.readString()); 620 msg.setQuery(value); 621 break; 622 default: 623 reader.skipField(); 624 break; 625 } 626 } 627 return msg; 628 }; 629 630 631 /** 632 * Serializes the message to binary data (in protobuf wire format). 633 * @return {!Uint8Array} 634 */ 635 proto.rpcevents.BlocksRequest.prototype.serializeBinary = function() { 636 var writer = new jspb.BinaryWriter(); 637 proto.rpcevents.BlocksRequest.serializeBinaryToWriter(this, writer); 638 return writer.getResultBuffer(); 639 }; 640 641 642 /** 643 * Serializes the given message to binary data (in protobuf wire 644 * format), writing to the given BinaryWriter. 645 * @param {!proto.rpcevents.BlocksRequest} message 646 * @param {!jspb.BinaryWriter} writer 647 * @suppress {unusedLocalVariables} f is only used for nested messages 648 */ 649 proto.rpcevents.BlocksRequest.serializeBinaryToWriter = function(message, writer) { 650 var f = undefined; 651 f = message.getBlockrange(); 652 if (f != null) { 653 writer.writeMessage( 654 1, 655 f, 656 proto.rpcevents.BlockRange.serializeBinaryToWriter 657 ); 658 } 659 f = message.getQuery(); 660 if (f.length > 0) { 661 writer.writeString( 662 2, 663 f 664 ); 665 } 666 }; 667 668 669 /** 670 * optional BlockRange BlockRange = 1; 671 * @return {?proto.rpcevents.BlockRange} 672 */ 673 proto.rpcevents.BlocksRequest.prototype.getBlockrange = function() { 674 return /** @type{?proto.rpcevents.BlockRange} */ ( 675 jspb.Message.getWrapperField(this, proto.rpcevents.BlockRange, 1)); 676 }; 677 678 679 /** 680 * @param {?proto.rpcevents.BlockRange|undefined} value 681 * @return {!proto.rpcevents.BlocksRequest} returns this 682 */ 683 proto.rpcevents.BlocksRequest.prototype.setBlockrange = function(value) { 684 return jspb.Message.setWrapperField(this, 1, value); 685 }; 686 687 688 /** 689 * Clears the message field making it undefined. 690 * @return {!proto.rpcevents.BlocksRequest} returns this 691 */ 692 proto.rpcevents.BlocksRequest.prototype.clearBlockrange = function() { 693 return this.setBlockrange(undefined); 694 }; 695 696 697 /** 698 * Returns whether this field is set. 699 * @return {boolean} 700 */ 701 proto.rpcevents.BlocksRequest.prototype.hasBlockrange = function() { 702 return jspb.Message.getField(this, 1) != null; 703 }; 704 705 706 /** 707 * optional string Query = 2; 708 * @return {string} 709 */ 710 proto.rpcevents.BlocksRequest.prototype.getQuery = function() { 711 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); 712 }; 713 714 715 /** 716 * @param {string} value 717 * @return {!proto.rpcevents.BlocksRequest} returns this 718 */ 719 proto.rpcevents.BlocksRequest.prototype.setQuery = function(value) { 720 return jspb.Message.setProto3StringField(this, 2, value); 721 }; 722 723 724 725 /** 726 * List of repeated fields within this message type. 727 * @private {!Array<number>} 728 * @const 729 */ 730 proto.rpcevents.EventsResponse.repeatedFields_ = [2]; 731 732 733 734 if (jspb.Message.GENERATE_TO_OBJECT) { 735 /** 736 * Creates an object representation of this proto. 737 * Field names that are reserved in JavaScript and will be renamed to pb_name. 738 * Optional fields that are not set will be set to undefined. 739 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 740 * For the list of reserved names please see: 741 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 742 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 743 * JSPB instance for transitional soy proto support: 744 * http://goto/soy-param-migration 745 * @return {!Object} 746 */ 747 proto.rpcevents.EventsResponse.prototype.toObject = function(opt_includeInstance) { 748 return proto.rpcevents.EventsResponse.toObject(opt_includeInstance, this); 749 }; 750 751 752 /** 753 * Static version of the {@see toObject} method. 754 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 755 * the JSPB instance for transitional soy proto support: 756 * http://goto/soy-param-migration 757 * @param {!proto.rpcevents.EventsResponse} msg The msg instance to transform. 758 * @return {!Object} 759 * @suppress {unusedLocalVariables} f is only used for nested messages 760 */ 761 proto.rpcevents.EventsResponse.toObject = function(includeInstance, msg) { 762 var f, obj = { 763 height: jspb.Message.getFieldWithDefault(msg, 1, 0), 764 eventsList: jspb.Message.toObjectList(msg.getEventsList(), 765 exec_pb.Event.toObject, includeInstance) 766 }; 767 768 if (includeInstance) { 769 obj.$jspbMessageInstance = msg; 770 } 771 return obj; 772 }; 773 } 774 775 776 /** 777 * Deserializes binary data (in protobuf wire format). 778 * @param {jspb.ByteSource} bytes The bytes to deserialize. 779 * @return {!proto.rpcevents.EventsResponse} 780 */ 781 proto.rpcevents.EventsResponse.deserializeBinary = function(bytes) { 782 var reader = new jspb.BinaryReader(bytes); 783 var msg = new proto.rpcevents.EventsResponse; 784 return proto.rpcevents.EventsResponse.deserializeBinaryFromReader(msg, reader); 785 }; 786 787 788 /** 789 * Deserializes binary data (in protobuf wire format) from the 790 * given reader into the given message object. 791 * @param {!proto.rpcevents.EventsResponse} msg The message object to deserialize into. 792 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 793 * @return {!proto.rpcevents.EventsResponse} 794 */ 795 proto.rpcevents.EventsResponse.deserializeBinaryFromReader = function(msg, reader) { 796 while (reader.nextField()) { 797 if (reader.isEndGroup()) { 798 break; 799 } 800 var field = reader.getFieldNumber(); 801 switch (field) { 802 case 1: 803 var value = /** @type {number} */ (reader.readUint64()); 804 msg.setHeight(value); 805 break; 806 case 2: 807 var value = new exec_pb.Event; 808 reader.readMessage(value,exec_pb.Event.deserializeBinaryFromReader); 809 msg.addEvents(value); 810 break; 811 default: 812 reader.skipField(); 813 break; 814 } 815 } 816 return msg; 817 }; 818 819 820 /** 821 * Serializes the message to binary data (in protobuf wire format). 822 * @return {!Uint8Array} 823 */ 824 proto.rpcevents.EventsResponse.prototype.serializeBinary = function() { 825 var writer = new jspb.BinaryWriter(); 826 proto.rpcevents.EventsResponse.serializeBinaryToWriter(this, writer); 827 return writer.getResultBuffer(); 828 }; 829 830 831 /** 832 * Serializes the given message to binary data (in protobuf wire 833 * format), writing to the given BinaryWriter. 834 * @param {!proto.rpcevents.EventsResponse} message 835 * @param {!jspb.BinaryWriter} writer 836 * @suppress {unusedLocalVariables} f is only used for nested messages 837 */ 838 proto.rpcevents.EventsResponse.serializeBinaryToWriter = function(message, writer) { 839 var f = undefined; 840 f = message.getHeight(); 841 if (f !== 0) { 842 writer.writeUint64( 843 1, 844 f 845 ); 846 } 847 f = message.getEventsList(); 848 if (f.length > 0) { 849 writer.writeRepeatedMessage( 850 2, 851 f, 852 exec_pb.Event.serializeBinaryToWriter 853 ); 854 } 855 }; 856 857 858 /** 859 * optional uint64 Height = 1; 860 * @return {number} 861 */ 862 proto.rpcevents.EventsResponse.prototype.getHeight = function() { 863 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); 864 }; 865 866 867 /** 868 * @param {number} value 869 * @return {!proto.rpcevents.EventsResponse} returns this 870 */ 871 proto.rpcevents.EventsResponse.prototype.setHeight = function(value) { 872 return jspb.Message.setProto3IntField(this, 1, value); 873 }; 874 875 876 /** 877 * repeated exec.Event Events = 2; 878 * @return {!Array<!proto.exec.Event>} 879 */ 880 proto.rpcevents.EventsResponse.prototype.getEventsList = function() { 881 return /** @type{!Array<!proto.exec.Event>} */ ( 882 jspb.Message.getRepeatedWrapperField(this, exec_pb.Event, 2)); 883 }; 884 885 886 /** 887 * @param {!Array<!proto.exec.Event>} value 888 * @return {!proto.rpcevents.EventsResponse} returns this 889 */ 890 proto.rpcevents.EventsResponse.prototype.setEventsList = function(value) { 891 return jspb.Message.setRepeatedWrapperField(this, 2, value); 892 }; 893 894 895 /** 896 * @param {!proto.exec.Event=} opt_value 897 * @param {number=} opt_index 898 * @return {!proto.exec.Event} 899 */ 900 proto.rpcevents.EventsResponse.prototype.addEvents = function(opt_value, opt_index) { 901 return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.exec.Event, opt_index); 902 }; 903 904 905 /** 906 * Clears the list making it empty but non-null. 907 * @return {!proto.rpcevents.EventsResponse} returns this 908 */ 909 proto.rpcevents.EventsResponse.prototype.clearEventsList = function() { 910 return this.setEventsList([]); 911 }; 912 913 914 915 916 917 if (jspb.Message.GENERATE_TO_OBJECT) { 918 /** 919 * Creates an object representation of this proto. 920 * Field names that are reserved in JavaScript and will be renamed to pb_name. 921 * Optional fields that are not set will be set to undefined. 922 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 923 * For the list of reserved names please see: 924 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 925 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 926 * JSPB instance for transitional soy proto support: 927 * http://goto/soy-param-migration 928 * @return {!Object} 929 */ 930 proto.rpcevents.GetTxsRequest.prototype.toObject = function(opt_includeInstance) { 931 return proto.rpcevents.GetTxsRequest.toObject(opt_includeInstance, this); 932 }; 933 934 935 /** 936 * Static version of the {@see toObject} method. 937 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 938 * the JSPB instance for transitional soy proto support: 939 * http://goto/soy-param-migration 940 * @param {!proto.rpcevents.GetTxsRequest} msg The msg instance to transform. 941 * @return {!Object} 942 * @suppress {unusedLocalVariables} f is only used for nested messages 943 */ 944 proto.rpcevents.GetTxsRequest.toObject = function(includeInstance, msg) { 945 var f, obj = { 946 startheight: jspb.Message.getFieldWithDefault(msg, 1, 0), 947 endheight: jspb.Message.getFieldWithDefault(msg, 2, 0), 948 query: jspb.Message.getFieldWithDefault(msg, 3, "") 949 }; 950 951 if (includeInstance) { 952 obj.$jspbMessageInstance = msg; 953 } 954 return obj; 955 }; 956 } 957 958 959 /** 960 * Deserializes binary data (in protobuf wire format). 961 * @param {jspb.ByteSource} bytes The bytes to deserialize. 962 * @return {!proto.rpcevents.GetTxsRequest} 963 */ 964 proto.rpcevents.GetTxsRequest.deserializeBinary = function(bytes) { 965 var reader = new jspb.BinaryReader(bytes); 966 var msg = new proto.rpcevents.GetTxsRequest; 967 return proto.rpcevents.GetTxsRequest.deserializeBinaryFromReader(msg, reader); 968 }; 969 970 971 /** 972 * Deserializes binary data (in protobuf wire format) from the 973 * given reader into the given message object. 974 * @param {!proto.rpcevents.GetTxsRequest} msg The message object to deserialize into. 975 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 976 * @return {!proto.rpcevents.GetTxsRequest} 977 */ 978 proto.rpcevents.GetTxsRequest.deserializeBinaryFromReader = function(msg, reader) { 979 while (reader.nextField()) { 980 if (reader.isEndGroup()) { 981 break; 982 } 983 var field = reader.getFieldNumber(); 984 switch (field) { 985 case 1: 986 var value = /** @type {number} */ (reader.readUint64()); 987 msg.setStartheight(value); 988 break; 989 case 2: 990 var value = /** @type {number} */ (reader.readUint64()); 991 msg.setEndheight(value); 992 break; 993 case 3: 994 var value = /** @type {string} */ (reader.readString()); 995 msg.setQuery(value); 996 break; 997 default: 998 reader.skipField(); 999 break; 1000 } 1001 } 1002 return msg; 1003 }; 1004 1005 1006 /** 1007 * Serializes the message to binary data (in protobuf wire format). 1008 * @return {!Uint8Array} 1009 */ 1010 proto.rpcevents.GetTxsRequest.prototype.serializeBinary = function() { 1011 var writer = new jspb.BinaryWriter(); 1012 proto.rpcevents.GetTxsRequest.serializeBinaryToWriter(this, writer); 1013 return writer.getResultBuffer(); 1014 }; 1015 1016 1017 /** 1018 * Serializes the given message to binary data (in protobuf wire 1019 * format), writing to the given BinaryWriter. 1020 * @param {!proto.rpcevents.GetTxsRequest} message 1021 * @param {!jspb.BinaryWriter} writer 1022 * @suppress {unusedLocalVariables} f is only used for nested messages 1023 */ 1024 proto.rpcevents.GetTxsRequest.serializeBinaryToWriter = function(message, writer) { 1025 var f = undefined; 1026 f = message.getStartheight(); 1027 if (f !== 0) { 1028 writer.writeUint64( 1029 1, 1030 f 1031 ); 1032 } 1033 f = message.getEndheight(); 1034 if (f !== 0) { 1035 writer.writeUint64( 1036 2, 1037 f 1038 ); 1039 } 1040 f = message.getQuery(); 1041 if (f.length > 0) { 1042 writer.writeString( 1043 3, 1044 f 1045 ); 1046 } 1047 }; 1048 1049 1050 /** 1051 * optional uint64 StartHeight = 1; 1052 * @return {number} 1053 */ 1054 proto.rpcevents.GetTxsRequest.prototype.getStartheight = function() { 1055 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); 1056 }; 1057 1058 1059 /** 1060 * @param {number} value 1061 * @return {!proto.rpcevents.GetTxsRequest} returns this 1062 */ 1063 proto.rpcevents.GetTxsRequest.prototype.setStartheight = function(value) { 1064 return jspb.Message.setProto3IntField(this, 1, value); 1065 }; 1066 1067 1068 /** 1069 * optional uint64 EndHeight = 2; 1070 * @return {number} 1071 */ 1072 proto.rpcevents.GetTxsRequest.prototype.getEndheight = function() { 1073 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); 1074 }; 1075 1076 1077 /** 1078 * @param {number} value 1079 * @return {!proto.rpcevents.GetTxsRequest} returns this 1080 */ 1081 proto.rpcevents.GetTxsRequest.prototype.setEndheight = function(value) { 1082 return jspb.Message.setProto3IntField(this, 2, value); 1083 }; 1084 1085 1086 /** 1087 * optional string Query = 3; 1088 * @return {string} 1089 */ 1090 proto.rpcevents.GetTxsRequest.prototype.getQuery = function() { 1091 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); 1092 }; 1093 1094 1095 /** 1096 * @param {string} value 1097 * @return {!proto.rpcevents.GetTxsRequest} returns this 1098 */ 1099 proto.rpcevents.GetTxsRequest.prototype.setQuery = function(value) { 1100 return jspb.Message.setProto3StringField(this, 3, value); 1101 }; 1102 1103 1104 1105 /** 1106 * List of repeated fields within this message type. 1107 * @private {!Array<number>} 1108 * @const 1109 */ 1110 proto.rpcevents.GetTxsResponse.repeatedFields_ = [2]; 1111 1112 1113 1114 if (jspb.Message.GENERATE_TO_OBJECT) { 1115 /** 1116 * Creates an object representation of this proto. 1117 * Field names that are reserved in JavaScript and will be renamed to pb_name. 1118 * Optional fields that are not set will be set to undefined. 1119 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 1120 * For the list of reserved names please see: 1121 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 1122 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 1123 * JSPB instance for transitional soy proto support: 1124 * http://goto/soy-param-migration 1125 * @return {!Object} 1126 */ 1127 proto.rpcevents.GetTxsResponse.prototype.toObject = function(opt_includeInstance) { 1128 return proto.rpcevents.GetTxsResponse.toObject(opt_includeInstance, this); 1129 }; 1130 1131 1132 /** 1133 * Static version of the {@see toObject} method. 1134 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 1135 * the JSPB instance for transitional soy proto support: 1136 * http://goto/soy-param-migration 1137 * @param {!proto.rpcevents.GetTxsResponse} msg The msg instance to transform. 1138 * @return {!Object} 1139 * @suppress {unusedLocalVariables} f is only used for nested messages 1140 */ 1141 proto.rpcevents.GetTxsResponse.toObject = function(includeInstance, msg) { 1142 var f, obj = { 1143 height: jspb.Message.getFieldWithDefault(msg, 1, 0), 1144 txexecutionsList: jspb.Message.toObjectList(msg.getTxexecutionsList(), 1145 exec_pb.TxExecution.toObject, includeInstance) 1146 }; 1147 1148 if (includeInstance) { 1149 obj.$jspbMessageInstance = msg; 1150 } 1151 return obj; 1152 }; 1153 } 1154 1155 1156 /** 1157 * Deserializes binary data (in protobuf wire format). 1158 * @param {jspb.ByteSource} bytes The bytes to deserialize. 1159 * @return {!proto.rpcevents.GetTxsResponse} 1160 */ 1161 proto.rpcevents.GetTxsResponse.deserializeBinary = function(bytes) { 1162 var reader = new jspb.BinaryReader(bytes); 1163 var msg = new proto.rpcevents.GetTxsResponse; 1164 return proto.rpcevents.GetTxsResponse.deserializeBinaryFromReader(msg, reader); 1165 }; 1166 1167 1168 /** 1169 * Deserializes binary data (in protobuf wire format) from the 1170 * given reader into the given message object. 1171 * @param {!proto.rpcevents.GetTxsResponse} msg The message object to deserialize into. 1172 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 1173 * @return {!proto.rpcevents.GetTxsResponse} 1174 */ 1175 proto.rpcevents.GetTxsResponse.deserializeBinaryFromReader = function(msg, reader) { 1176 while (reader.nextField()) { 1177 if (reader.isEndGroup()) { 1178 break; 1179 } 1180 var field = reader.getFieldNumber(); 1181 switch (field) { 1182 case 1: 1183 var value = /** @type {number} */ (reader.readUint64()); 1184 msg.setHeight(value); 1185 break; 1186 case 2: 1187 var value = new exec_pb.TxExecution; 1188 reader.readMessage(value,exec_pb.TxExecution.deserializeBinaryFromReader); 1189 msg.addTxexecutions(value); 1190 break; 1191 default: 1192 reader.skipField(); 1193 break; 1194 } 1195 } 1196 return msg; 1197 }; 1198 1199 1200 /** 1201 * Serializes the message to binary data (in protobuf wire format). 1202 * @return {!Uint8Array} 1203 */ 1204 proto.rpcevents.GetTxsResponse.prototype.serializeBinary = function() { 1205 var writer = new jspb.BinaryWriter(); 1206 proto.rpcevents.GetTxsResponse.serializeBinaryToWriter(this, writer); 1207 return writer.getResultBuffer(); 1208 }; 1209 1210 1211 /** 1212 * Serializes the given message to binary data (in protobuf wire 1213 * format), writing to the given BinaryWriter. 1214 * @param {!proto.rpcevents.GetTxsResponse} message 1215 * @param {!jspb.BinaryWriter} writer 1216 * @suppress {unusedLocalVariables} f is only used for nested messages 1217 */ 1218 proto.rpcevents.GetTxsResponse.serializeBinaryToWriter = function(message, writer) { 1219 var f = undefined; 1220 f = message.getHeight(); 1221 if (f !== 0) { 1222 writer.writeUint64( 1223 1, 1224 f 1225 ); 1226 } 1227 f = message.getTxexecutionsList(); 1228 if (f.length > 0) { 1229 writer.writeRepeatedMessage( 1230 2, 1231 f, 1232 exec_pb.TxExecution.serializeBinaryToWriter 1233 ); 1234 } 1235 }; 1236 1237 1238 /** 1239 * optional uint64 Height = 1; 1240 * @return {number} 1241 */ 1242 proto.rpcevents.GetTxsResponse.prototype.getHeight = function() { 1243 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); 1244 }; 1245 1246 1247 /** 1248 * @param {number} value 1249 * @return {!proto.rpcevents.GetTxsResponse} returns this 1250 */ 1251 proto.rpcevents.GetTxsResponse.prototype.setHeight = function(value) { 1252 return jspb.Message.setProto3IntField(this, 1, value); 1253 }; 1254 1255 1256 /** 1257 * repeated exec.TxExecution TxExecutions = 2; 1258 * @return {!Array<!proto.exec.TxExecution>} 1259 */ 1260 proto.rpcevents.GetTxsResponse.prototype.getTxexecutionsList = function() { 1261 return /** @type{!Array<!proto.exec.TxExecution>} */ ( 1262 jspb.Message.getRepeatedWrapperField(this, exec_pb.TxExecution, 2)); 1263 }; 1264 1265 1266 /** 1267 * @param {!Array<!proto.exec.TxExecution>} value 1268 * @return {!proto.rpcevents.GetTxsResponse} returns this 1269 */ 1270 proto.rpcevents.GetTxsResponse.prototype.setTxexecutionsList = function(value) { 1271 return jspb.Message.setRepeatedWrapperField(this, 2, value); 1272 }; 1273 1274 1275 /** 1276 * @param {!proto.exec.TxExecution=} opt_value 1277 * @param {number=} opt_index 1278 * @return {!proto.exec.TxExecution} 1279 */ 1280 proto.rpcevents.GetTxsResponse.prototype.addTxexecutions = function(opt_value, opt_index) { 1281 return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.exec.TxExecution, opt_index); 1282 }; 1283 1284 1285 /** 1286 * Clears the list making it empty but non-null. 1287 * @return {!proto.rpcevents.GetTxsResponse} returns this 1288 */ 1289 proto.rpcevents.GetTxsResponse.prototype.clearTxexecutionsList = function() { 1290 return this.setTxexecutionsList([]); 1291 }; 1292 1293 1294 1295 1296 1297 if (jspb.Message.GENERATE_TO_OBJECT) { 1298 /** 1299 * Creates an object representation of this proto. 1300 * Field names that are reserved in JavaScript and will be renamed to pb_name. 1301 * Optional fields that are not set will be set to undefined. 1302 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 1303 * For the list of reserved names please see: 1304 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 1305 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 1306 * JSPB instance for transitional soy proto support: 1307 * http://goto/soy-param-migration 1308 * @return {!Object} 1309 */ 1310 proto.rpcevents.Bound.prototype.toObject = function(opt_includeInstance) { 1311 return proto.rpcevents.Bound.toObject(opt_includeInstance, this); 1312 }; 1313 1314 1315 /** 1316 * Static version of the {@see toObject} method. 1317 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 1318 * the JSPB instance for transitional soy proto support: 1319 * http://goto/soy-param-migration 1320 * @param {!proto.rpcevents.Bound} msg The msg instance to transform. 1321 * @return {!Object} 1322 * @suppress {unusedLocalVariables} f is only used for nested messages 1323 */ 1324 proto.rpcevents.Bound.toObject = function(includeInstance, msg) { 1325 var f, obj = { 1326 type: jspb.Message.getFieldWithDefault(msg, 1, 0), 1327 index: jspb.Message.getFieldWithDefault(msg, 2, 0) 1328 }; 1329 1330 if (includeInstance) { 1331 obj.$jspbMessageInstance = msg; 1332 } 1333 return obj; 1334 }; 1335 } 1336 1337 1338 /** 1339 * Deserializes binary data (in protobuf wire format). 1340 * @param {jspb.ByteSource} bytes The bytes to deserialize. 1341 * @return {!proto.rpcevents.Bound} 1342 */ 1343 proto.rpcevents.Bound.deserializeBinary = function(bytes) { 1344 var reader = new jspb.BinaryReader(bytes); 1345 var msg = new proto.rpcevents.Bound; 1346 return proto.rpcevents.Bound.deserializeBinaryFromReader(msg, reader); 1347 }; 1348 1349 1350 /** 1351 * Deserializes binary data (in protobuf wire format) from the 1352 * given reader into the given message object. 1353 * @param {!proto.rpcevents.Bound} msg The message object to deserialize into. 1354 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 1355 * @return {!proto.rpcevents.Bound} 1356 */ 1357 proto.rpcevents.Bound.deserializeBinaryFromReader = function(msg, reader) { 1358 while (reader.nextField()) { 1359 if (reader.isEndGroup()) { 1360 break; 1361 } 1362 var field = reader.getFieldNumber(); 1363 switch (field) { 1364 case 1: 1365 var value = /** @type {!proto.rpcevents.Bound.BoundType} */ (reader.readEnum()); 1366 msg.setType(value); 1367 break; 1368 case 2: 1369 var value = /** @type {number} */ (reader.readUint64()); 1370 msg.setIndex(value); 1371 break; 1372 default: 1373 reader.skipField(); 1374 break; 1375 } 1376 } 1377 return msg; 1378 }; 1379 1380 1381 /** 1382 * Serializes the message to binary data (in protobuf wire format). 1383 * @return {!Uint8Array} 1384 */ 1385 proto.rpcevents.Bound.prototype.serializeBinary = function() { 1386 var writer = new jspb.BinaryWriter(); 1387 proto.rpcevents.Bound.serializeBinaryToWriter(this, writer); 1388 return writer.getResultBuffer(); 1389 }; 1390 1391 1392 /** 1393 * Serializes the given message to binary data (in protobuf wire 1394 * format), writing to the given BinaryWriter. 1395 * @param {!proto.rpcevents.Bound} message 1396 * @param {!jspb.BinaryWriter} writer 1397 * @suppress {unusedLocalVariables} f is only used for nested messages 1398 */ 1399 proto.rpcevents.Bound.serializeBinaryToWriter = function(message, writer) { 1400 var f = undefined; 1401 f = message.getType(); 1402 if (f !== 0.0) { 1403 writer.writeEnum( 1404 1, 1405 f 1406 ); 1407 } 1408 f = message.getIndex(); 1409 if (f !== 0) { 1410 writer.writeUint64( 1411 2, 1412 f 1413 ); 1414 } 1415 }; 1416 1417 1418 /** 1419 * @enum {number} 1420 */ 1421 proto.rpcevents.Bound.BoundType = { 1422 ABSOLUTE: 0, 1423 RELATIVE: 1, 1424 FIRST: 2, 1425 LATEST: 3, 1426 STREAM: 4 1427 }; 1428 1429 /** 1430 * optional BoundType Type = 1; 1431 * @return {!proto.rpcevents.Bound.BoundType} 1432 */ 1433 proto.rpcevents.Bound.prototype.getType = function() { 1434 return /** @type {!proto.rpcevents.Bound.BoundType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); 1435 }; 1436 1437 1438 /** 1439 * @param {!proto.rpcevents.Bound.BoundType} value 1440 * @return {!proto.rpcevents.Bound} returns this 1441 */ 1442 proto.rpcevents.Bound.prototype.setType = function(value) { 1443 return jspb.Message.setProto3EnumField(this, 1, value); 1444 }; 1445 1446 1447 /** 1448 * optional uint64 Index = 2; 1449 * @return {number} 1450 */ 1451 proto.rpcevents.Bound.prototype.getIndex = function() { 1452 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); 1453 }; 1454 1455 1456 /** 1457 * @param {number} value 1458 * @return {!proto.rpcevents.Bound} returns this 1459 */ 1460 proto.rpcevents.Bound.prototype.setIndex = function(value) { 1461 return jspb.Message.setProto3IntField(this, 2, value); 1462 }; 1463 1464 1465 1466 1467 1468 if (jspb.Message.GENERATE_TO_OBJECT) { 1469 /** 1470 * Creates an object representation of this proto. 1471 * Field names that are reserved in JavaScript and will be renamed to pb_name. 1472 * Optional fields that are not set will be set to undefined. 1473 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 1474 * For the list of reserved names please see: 1475 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 1476 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 1477 * JSPB instance for transitional soy proto support: 1478 * http://goto/soy-param-migration 1479 * @return {!Object} 1480 */ 1481 proto.rpcevents.BlockRange.prototype.toObject = function(opt_includeInstance) { 1482 return proto.rpcevents.BlockRange.toObject(opt_includeInstance, this); 1483 }; 1484 1485 1486 /** 1487 * Static version of the {@see toObject} method. 1488 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 1489 * the JSPB instance for transitional soy proto support: 1490 * http://goto/soy-param-migration 1491 * @param {!proto.rpcevents.BlockRange} msg The msg instance to transform. 1492 * @return {!Object} 1493 * @suppress {unusedLocalVariables} f is only used for nested messages 1494 */ 1495 proto.rpcevents.BlockRange.toObject = function(includeInstance, msg) { 1496 var f, obj = { 1497 start: (f = msg.getStart()) && proto.rpcevents.Bound.toObject(includeInstance, f), 1498 end: (f = msg.getEnd()) && proto.rpcevents.Bound.toObject(includeInstance, f) 1499 }; 1500 1501 if (includeInstance) { 1502 obj.$jspbMessageInstance = msg; 1503 } 1504 return obj; 1505 }; 1506 } 1507 1508 1509 /** 1510 * Deserializes binary data (in protobuf wire format). 1511 * @param {jspb.ByteSource} bytes The bytes to deserialize. 1512 * @return {!proto.rpcevents.BlockRange} 1513 */ 1514 proto.rpcevents.BlockRange.deserializeBinary = function(bytes) { 1515 var reader = new jspb.BinaryReader(bytes); 1516 var msg = new proto.rpcevents.BlockRange; 1517 return proto.rpcevents.BlockRange.deserializeBinaryFromReader(msg, reader); 1518 }; 1519 1520 1521 /** 1522 * Deserializes binary data (in protobuf wire format) from the 1523 * given reader into the given message object. 1524 * @param {!proto.rpcevents.BlockRange} msg The message object to deserialize into. 1525 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 1526 * @return {!proto.rpcevents.BlockRange} 1527 */ 1528 proto.rpcevents.BlockRange.deserializeBinaryFromReader = function(msg, reader) { 1529 while (reader.nextField()) { 1530 if (reader.isEndGroup()) { 1531 break; 1532 } 1533 var field = reader.getFieldNumber(); 1534 switch (field) { 1535 case 1: 1536 var value = new proto.rpcevents.Bound; 1537 reader.readMessage(value,proto.rpcevents.Bound.deserializeBinaryFromReader); 1538 msg.setStart(value); 1539 break; 1540 case 2: 1541 var value = new proto.rpcevents.Bound; 1542 reader.readMessage(value,proto.rpcevents.Bound.deserializeBinaryFromReader); 1543 msg.setEnd(value); 1544 break; 1545 default: 1546 reader.skipField(); 1547 break; 1548 } 1549 } 1550 return msg; 1551 }; 1552 1553 1554 /** 1555 * Serializes the message to binary data (in protobuf wire format). 1556 * @return {!Uint8Array} 1557 */ 1558 proto.rpcevents.BlockRange.prototype.serializeBinary = function() { 1559 var writer = new jspb.BinaryWriter(); 1560 proto.rpcevents.BlockRange.serializeBinaryToWriter(this, writer); 1561 return writer.getResultBuffer(); 1562 }; 1563 1564 1565 /** 1566 * Serializes the given message to binary data (in protobuf wire 1567 * format), writing to the given BinaryWriter. 1568 * @param {!proto.rpcevents.BlockRange} message 1569 * @param {!jspb.BinaryWriter} writer 1570 * @suppress {unusedLocalVariables} f is only used for nested messages 1571 */ 1572 proto.rpcevents.BlockRange.serializeBinaryToWriter = function(message, writer) { 1573 var f = undefined; 1574 f = message.getStart(); 1575 if (f != null) { 1576 writer.writeMessage( 1577 1, 1578 f, 1579 proto.rpcevents.Bound.serializeBinaryToWriter 1580 ); 1581 } 1582 f = message.getEnd(); 1583 if (f != null) { 1584 writer.writeMessage( 1585 2, 1586 f, 1587 proto.rpcevents.Bound.serializeBinaryToWriter 1588 ); 1589 } 1590 }; 1591 1592 1593 /** 1594 * optional Bound Start = 1; 1595 * @return {?proto.rpcevents.Bound} 1596 */ 1597 proto.rpcevents.BlockRange.prototype.getStart = function() { 1598 return /** @type{?proto.rpcevents.Bound} */ ( 1599 jspb.Message.getWrapperField(this, proto.rpcevents.Bound, 1)); 1600 }; 1601 1602 1603 /** 1604 * @param {?proto.rpcevents.Bound|undefined} value 1605 * @return {!proto.rpcevents.BlockRange} returns this 1606 */ 1607 proto.rpcevents.BlockRange.prototype.setStart = function(value) { 1608 return jspb.Message.setWrapperField(this, 1, value); 1609 }; 1610 1611 1612 /** 1613 * Clears the message field making it undefined. 1614 * @return {!proto.rpcevents.BlockRange} returns this 1615 */ 1616 proto.rpcevents.BlockRange.prototype.clearStart = function() { 1617 return this.setStart(undefined); 1618 }; 1619 1620 1621 /** 1622 * Returns whether this field is set. 1623 * @return {boolean} 1624 */ 1625 proto.rpcevents.BlockRange.prototype.hasStart = function() { 1626 return jspb.Message.getField(this, 1) != null; 1627 }; 1628 1629 1630 /** 1631 * optional Bound End = 2; 1632 * @return {?proto.rpcevents.Bound} 1633 */ 1634 proto.rpcevents.BlockRange.prototype.getEnd = function() { 1635 return /** @type{?proto.rpcevents.Bound} */ ( 1636 jspb.Message.getWrapperField(this, proto.rpcevents.Bound, 2)); 1637 }; 1638 1639 1640 /** 1641 * @param {?proto.rpcevents.Bound|undefined} value 1642 * @return {!proto.rpcevents.BlockRange} returns this 1643 */ 1644 proto.rpcevents.BlockRange.prototype.setEnd = function(value) { 1645 return jspb.Message.setWrapperField(this, 2, value); 1646 }; 1647 1648 1649 /** 1650 * Clears the message field making it undefined. 1651 * @return {!proto.rpcevents.BlockRange} returns this 1652 */ 1653 proto.rpcevents.BlockRange.prototype.clearEnd = function() { 1654 return this.setEnd(undefined); 1655 }; 1656 1657 1658 /** 1659 * Returns whether this field is set. 1660 * @return {boolean} 1661 */ 1662 proto.rpcevents.BlockRange.prototype.hasEnd = function() { 1663 return jspb.Message.getField(this, 2) != null; 1664 }; 1665 1666 1667 goog.object.extend(exports, proto.rpcevents);