github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/js/proto/tendermint/consensus/wal_pb.js (about) 1 // source: tendermint/consensus/wal.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 tendermint_consensus_types_pb = require('../../tendermint/consensus/types_pb.js'); 21 goog.object.extend(proto, tendermint_consensus_types_pb); 22 var tendermint_types_events_pb = require('../../tendermint/types/events_pb.js'); 23 goog.object.extend(proto, tendermint_types_events_pb); 24 var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); 25 goog.object.extend(proto, google_protobuf_duration_pb); 26 var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); 27 goog.object.extend(proto, google_protobuf_timestamp_pb); 28 goog.exportSymbol('proto.tendermint.consensus.EndHeight', null, global); 29 goog.exportSymbol('proto.tendermint.consensus.MsgInfo', null, global); 30 goog.exportSymbol('proto.tendermint.consensus.TimedWALMessage', null, global); 31 goog.exportSymbol('proto.tendermint.consensus.TimeoutInfo', null, global); 32 goog.exportSymbol('proto.tendermint.consensus.WALMessage', null, global); 33 goog.exportSymbol('proto.tendermint.consensus.WALMessage.SumCase', null, global); 34 /** 35 * Generated by JsPbCodeGenerator. 36 * @param {Array=} opt_data Optional initial data array, typically from a 37 * server response, or constructed directly in Javascript. The array is used 38 * in place and becomes part of the constructed object. It is not cloned. 39 * If no data is provided, the constructed object will be empty, but still 40 * valid. 41 * @extends {jspb.Message} 42 * @constructor 43 */ 44 proto.tendermint.consensus.MsgInfo = function(opt_data) { 45 jspb.Message.initialize(this, opt_data, 0, -1, null, null); 46 }; 47 goog.inherits(proto.tendermint.consensus.MsgInfo, jspb.Message); 48 if (goog.DEBUG && !COMPILED) { 49 /** 50 * @public 51 * @override 52 */ 53 proto.tendermint.consensus.MsgInfo.displayName = 'proto.tendermint.consensus.MsgInfo'; 54 } 55 /** 56 * Generated by JsPbCodeGenerator. 57 * @param {Array=} opt_data Optional initial data array, typically from a 58 * server response, or constructed directly in Javascript. The array is used 59 * in place and becomes part of the constructed object. It is not cloned. 60 * If no data is provided, the constructed object will be empty, but still 61 * valid. 62 * @extends {jspb.Message} 63 * @constructor 64 */ 65 proto.tendermint.consensus.TimeoutInfo = function(opt_data) { 66 jspb.Message.initialize(this, opt_data, 0, -1, null, null); 67 }; 68 goog.inherits(proto.tendermint.consensus.TimeoutInfo, jspb.Message); 69 if (goog.DEBUG && !COMPILED) { 70 /** 71 * @public 72 * @override 73 */ 74 proto.tendermint.consensus.TimeoutInfo.displayName = 'proto.tendermint.consensus.TimeoutInfo'; 75 } 76 /** 77 * Generated by JsPbCodeGenerator. 78 * @param {Array=} opt_data Optional initial data array, typically from a 79 * server response, or constructed directly in Javascript. The array is used 80 * in place and becomes part of the constructed object. It is not cloned. 81 * If no data is provided, the constructed object will be empty, but still 82 * valid. 83 * @extends {jspb.Message} 84 * @constructor 85 */ 86 proto.tendermint.consensus.EndHeight = function(opt_data) { 87 jspb.Message.initialize(this, opt_data, 0, -1, null, null); 88 }; 89 goog.inherits(proto.tendermint.consensus.EndHeight, jspb.Message); 90 if (goog.DEBUG && !COMPILED) { 91 /** 92 * @public 93 * @override 94 */ 95 proto.tendermint.consensus.EndHeight.displayName = 'proto.tendermint.consensus.EndHeight'; 96 } 97 /** 98 * Generated by JsPbCodeGenerator. 99 * @param {Array=} opt_data Optional initial data array, typically from a 100 * server response, or constructed directly in Javascript. The array is used 101 * in place and becomes part of the constructed object. It is not cloned. 102 * If no data is provided, the constructed object will be empty, but still 103 * valid. 104 * @extends {jspb.Message} 105 * @constructor 106 */ 107 proto.tendermint.consensus.WALMessage = function(opt_data) { 108 jspb.Message.initialize(this, opt_data, 0, -1, null, proto.tendermint.consensus.WALMessage.oneofGroups_); 109 }; 110 goog.inherits(proto.tendermint.consensus.WALMessage, jspb.Message); 111 if (goog.DEBUG && !COMPILED) { 112 /** 113 * @public 114 * @override 115 */ 116 proto.tendermint.consensus.WALMessage.displayName = 'proto.tendermint.consensus.WALMessage'; 117 } 118 /** 119 * Generated by JsPbCodeGenerator. 120 * @param {Array=} opt_data Optional initial data array, typically from a 121 * server response, or constructed directly in Javascript. The array is used 122 * in place and becomes part of the constructed object. It is not cloned. 123 * If no data is provided, the constructed object will be empty, but still 124 * valid. 125 * @extends {jspb.Message} 126 * @constructor 127 */ 128 proto.tendermint.consensus.TimedWALMessage = function(opt_data) { 129 jspb.Message.initialize(this, opt_data, 0, -1, null, null); 130 }; 131 goog.inherits(proto.tendermint.consensus.TimedWALMessage, jspb.Message); 132 if (goog.DEBUG && !COMPILED) { 133 /** 134 * @public 135 * @override 136 */ 137 proto.tendermint.consensus.TimedWALMessage.displayName = 'proto.tendermint.consensus.TimedWALMessage'; 138 } 139 140 141 142 if (jspb.Message.GENERATE_TO_OBJECT) { 143 /** 144 * Creates an object representation of this proto. 145 * Field names that are reserved in JavaScript and will be renamed to pb_name. 146 * Optional fields that are not set will be set to undefined. 147 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 148 * For the list of reserved names please see: 149 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 150 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 151 * JSPB instance for transitional soy proto support: 152 * http://goto/soy-param-migration 153 * @return {!Object} 154 */ 155 proto.tendermint.consensus.MsgInfo.prototype.toObject = function(opt_includeInstance) { 156 return proto.tendermint.consensus.MsgInfo.toObject(opt_includeInstance, this); 157 }; 158 159 160 /** 161 * Static version of the {@see toObject} method. 162 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 163 * the JSPB instance for transitional soy proto support: 164 * http://goto/soy-param-migration 165 * @param {!proto.tendermint.consensus.MsgInfo} msg The msg instance to transform. 166 * @return {!Object} 167 * @suppress {unusedLocalVariables} f is only used for nested messages 168 */ 169 proto.tendermint.consensus.MsgInfo.toObject = function(includeInstance, msg) { 170 var f, obj = { 171 msg: (f = msg.getMsg()) && tendermint_consensus_types_pb.Message.toObject(includeInstance, f), 172 peerId: jspb.Message.getFieldWithDefault(msg, 2, "") 173 }; 174 175 if (includeInstance) { 176 obj.$jspbMessageInstance = msg; 177 } 178 return obj; 179 }; 180 } 181 182 183 /** 184 * Deserializes binary data (in protobuf wire format). 185 * @param {jspb.ByteSource} bytes The bytes to deserialize. 186 * @return {!proto.tendermint.consensus.MsgInfo} 187 */ 188 proto.tendermint.consensus.MsgInfo.deserializeBinary = function(bytes) { 189 var reader = new jspb.BinaryReader(bytes); 190 var msg = new proto.tendermint.consensus.MsgInfo; 191 return proto.tendermint.consensus.MsgInfo.deserializeBinaryFromReader(msg, reader); 192 }; 193 194 195 /** 196 * Deserializes binary data (in protobuf wire format) from the 197 * given reader into the given message object. 198 * @param {!proto.tendermint.consensus.MsgInfo} msg The message object to deserialize into. 199 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 200 * @return {!proto.tendermint.consensus.MsgInfo} 201 */ 202 proto.tendermint.consensus.MsgInfo.deserializeBinaryFromReader = function(msg, reader) { 203 while (reader.nextField()) { 204 if (reader.isEndGroup()) { 205 break; 206 } 207 var field = reader.getFieldNumber(); 208 switch (field) { 209 case 1: 210 var value = new tendermint_consensus_types_pb.Message; 211 reader.readMessage(value,tendermint_consensus_types_pb.Message.deserializeBinaryFromReader); 212 msg.setMsg(value); 213 break; 214 case 2: 215 var value = /** @type {string} */ (reader.readString()); 216 msg.setPeerId(value); 217 break; 218 default: 219 reader.skipField(); 220 break; 221 } 222 } 223 return msg; 224 }; 225 226 227 /** 228 * Serializes the message to binary data (in protobuf wire format). 229 * @return {!Uint8Array} 230 */ 231 proto.tendermint.consensus.MsgInfo.prototype.serializeBinary = function() { 232 var writer = new jspb.BinaryWriter(); 233 proto.tendermint.consensus.MsgInfo.serializeBinaryToWriter(this, writer); 234 return writer.getResultBuffer(); 235 }; 236 237 238 /** 239 * Serializes the given message to binary data (in protobuf wire 240 * format), writing to the given BinaryWriter. 241 * @param {!proto.tendermint.consensus.MsgInfo} message 242 * @param {!jspb.BinaryWriter} writer 243 * @suppress {unusedLocalVariables} f is only used for nested messages 244 */ 245 proto.tendermint.consensus.MsgInfo.serializeBinaryToWriter = function(message, writer) { 246 var f = undefined; 247 f = message.getMsg(); 248 if (f != null) { 249 writer.writeMessage( 250 1, 251 f, 252 tendermint_consensus_types_pb.Message.serializeBinaryToWriter 253 ); 254 } 255 f = message.getPeerId(); 256 if (f.length > 0) { 257 writer.writeString( 258 2, 259 f 260 ); 261 } 262 }; 263 264 265 /** 266 * optional Message msg = 1; 267 * @return {?proto.tendermint.consensus.Message} 268 */ 269 proto.tendermint.consensus.MsgInfo.prototype.getMsg = function() { 270 return /** @type{?proto.tendermint.consensus.Message} */ ( 271 jspb.Message.getWrapperField(this, tendermint_consensus_types_pb.Message, 1)); 272 }; 273 274 275 /** 276 * @param {?proto.tendermint.consensus.Message|undefined} value 277 * @return {!proto.tendermint.consensus.MsgInfo} returns this 278 */ 279 proto.tendermint.consensus.MsgInfo.prototype.setMsg = function(value) { 280 return jspb.Message.setWrapperField(this, 1, value); 281 }; 282 283 284 /** 285 * Clears the message field making it undefined. 286 * @return {!proto.tendermint.consensus.MsgInfo} returns this 287 */ 288 proto.tendermint.consensus.MsgInfo.prototype.clearMsg = function() { 289 return this.setMsg(undefined); 290 }; 291 292 293 /** 294 * Returns whether this field is set. 295 * @return {boolean} 296 */ 297 proto.tendermint.consensus.MsgInfo.prototype.hasMsg = function() { 298 return jspb.Message.getField(this, 1) != null; 299 }; 300 301 302 /** 303 * optional string peer_id = 2; 304 * @return {string} 305 */ 306 proto.tendermint.consensus.MsgInfo.prototype.getPeerId = function() { 307 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); 308 }; 309 310 311 /** 312 * @param {string} value 313 * @return {!proto.tendermint.consensus.MsgInfo} returns this 314 */ 315 proto.tendermint.consensus.MsgInfo.prototype.setPeerId = function(value) { 316 return jspb.Message.setProto3StringField(this, 2, value); 317 }; 318 319 320 321 322 323 if (jspb.Message.GENERATE_TO_OBJECT) { 324 /** 325 * Creates an object representation of this proto. 326 * Field names that are reserved in JavaScript and will be renamed to pb_name. 327 * Optional fields that are not set will be set to undefined. 328 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 329 * For the list of reserved names please see: 330 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 331 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 332 * JSPB instance for transitional soy proto support: 333 * http://goto/soy-param-migration 334 * @return {!Object} 335 */ 336 proto.tendermint.consensus.TimeoutInfo.prototype.toObject = function(opt_includeInstance) { 337 return proto.tendermint.consensus.TimeoutInfo.toObject(opt_includeInstance, this); 338 }; 339 340 341 /** 342 * Static version of the {@see toObject} method. 343 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 344 * the JSPB instance for transitional soy proto support: 345 * http://goto/soy-param-migration 346 * @param {!proto.tendermint.consensus.TimeoutInfo} msg The msg instance to transform. 347 * @return {!Object} 348 * @suppress {unusedLocalVariables} f is only used for nested messages 349 */ 350 proto.tendermint.consensus.TimeoutInfo.toObject = function(includeInstance, msg) { 351 var f, obj = { 352 duration: (f = msg.getDuration()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), 353 height: jspb.Message.getFieldWithDefault(msg, 2, 0), 354 round: jspb.Message.getFieldWithDefault(msg, 3, 0), 355 step: jspb.Message.getFieldWithDefault(msg, 4, 0) 356 }; 357 358 if (includeInstance) { 359 obj.$jspbMessageInstance = msg; 360 } 361 return obj; 362 }; 363 } 364 365 366 /** 367 * Deserializes binary data (in protobuf wire format). 368 * @param {jspb.ByteSource} bytes The bytes to deserialize. 369 * @return {!proto.tendermint.consensus.TimeoutInfo} 370 */ 371 proto.tendermint.consensus.TimeoutInfo.deserializeBinary = function(bytes) { 372 var reader = new jspb.BinaryReader(bytes); 373 var msg = new proto.tendermint.consensus.TimeoutInfo; 374 return proto.tendermint.consensus.TimeoutInfo.deserializeBinaryFromReader(msg, reader); 375 }; 376 377 378 /** 379 * Deserializes binary data (in protobuf wire format) from the 380 * given reader into the given message object. 381 * @param {!proto.tendermint.consensus.TimeoutInfo} msg The message object to deserialize into. 382 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 383 * @return {!proto.tendermint.consensus.TimeoutInfo} 384 */ 385 proto.tendermint.consensus.TimeoutInfo.deserializeBinaryFromReader = function(msg, reader) { 386 while (reader.nextField()) { 387 if (reader.isEndGroup()) { 388 break; 389 } 390 var field = reader.getFieldNumber(); 391 switch (field) { 392 case 1: 393 var value = new google_protobuf_duration_pb.Duration; 394 reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); 395 msg.setDuration(value); 396 break; 397 case 2: 398 var value = /** @type {number} */ (reader.readInt64()); 399 msg.setHeight(value); 400 break; 401 case 3: 402 var value = /** @type {number} */ (reader.readInt32()); 403 msg.setRound(value); 404 break; 405 case 4: 406 var value = /** @type {number} */ (reader.readUint32()); 407 msg.setStep(value); 408 break; 409 default: 410 reader.skipField(); 411 break; 412 } 413 } 414 return msg; 415 }; 416 417 418 /** 419 * Serializes the message to binary data (in protobuf wire format). 420 * @return {!Uint8Array} 421 */ 422 proto.tendermint.consensus.TimeoutInfo.prototype.serializeBinary = function() { 423 var writer = new jspb.BinaryWriter(); 424 proto.tendermint.consensus.TimeoutInfo.serializeBinaryToWriter(this, writer); 425 return writer.getResultBuffer(); 426 }; 427 428 429 /** 430 * Serializes the given message to binary data (in protobuf wire 431 * format), writing to the given BinaryWriter. 432 * @param {!proto.tendermint.consensus.TimeoutInfo} message 433 * @param {!jspb.BinaryWriter} writer 434 * @suppress {unusedLocalVariables} f is only used for nested messages 435 */ 436 proto.tendermint.consensus.TimeoutInfo.serializeBinaryToWriter = function(message, writer) { 437 var f = undefined; 438 f = message.getDuration(); 439 if (f != null) { 440 writer.writeMessage( 441 1, 442 f, 443 google_protobuf_duration_pb.Duration.serializeBinaryToWriter 444 ); 445 } 446 f = message.getHeight(); 447 if (f !== 0) { 448 writer.writeInt64( 449 2, 450 f 451 ); 452 } 453 f = message.getRound(); 454 if (f !== 0) { 455 writer.writeInt32( 456 3, 457 f 458 ); 459 } 460 f = message.getStep(); 461 if (f !== 0) { 462 writer.writeUint32( 463 4, 464 f 465 ); 466 } 467 }; 468 469 470 /** 471 * optional google.protobuf.Duration duration = 1; 472 * @return {?proto.google.protobuf.Duration} 473 */ 474 proto.tendermint.consensus.TimeoutInfo.prototype.getDuration = function() { 475 return /** @type{?proto.google.protobuf.Duration} */ ( 476 jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 1)); 477 }; 478 479 480 /** 481 * @param {?proto.google.protobuf.Duration|undefined} value 482 * @return {!proto.tendermint.consensus.TimeoutInfo} returns this 483 */ 484 proto.tendermint.consensus.TimeoutInfo.prototype.setDuration = function(value) { 485 return jspb.Message.setWrapperField(this, 1, value); 486 }; 487 488 489 /** 490 * Clears the message field making it undefined. 491 * @return {!proto.tendermint.consensus.TimeoutInfo} returns this 492 */ 493 proto.tendermint.consensus.TimeoutInfo.prototype.clearDuration = function() { 494 return this.setDuration(undefined); 495 }; 496 497 498 /** 499 * Returns whether this field is set. 500 * @return {boolean} 501 */ 502 proto.tendermint.consensus.TimeoutInfo.prototype.hasDuration = function() { 503 return jspb.Message.getField(this, 1) != null; 504 }; 505 506 507 /** 508 * optional int64 height = 2; 509 * @return {number} 510 */ 511 proto.tendermint.consensus.TimeoutInfo.prototype.getHeight = function() { 512 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); 513 }; 514 515 516 /** 517 * @param {number} value 518 * @return {!proto.tendermint.consensus.TimeoutInfo} returns this 519 */ 520 proto.tendermint.consensus.TimeoutInfo.prototype.setHeight = function(value) { 521 return jspb.Message.setProto3IntField(this, 2, value); 522 }; 523 524 525 /** 526 * optional int32 round = 3; 527 * @return {number} 528 */ 529 proto.tendermint.consensus.TimeoutInfo.prototype.getRound = function() { 530 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); 531 }; 532 533 534 /** 535 * @param {number} value 536 * @return {!proto.tendermint.consensus.TimeoutInfo} returns this 537 */ 538 proto.tendermint.consensus.TimeoutInfo.prototype.setRound = function(value) { 539 return jspb.Message.setProto3IntField(this, 3, value); 540 }; 541 542 543 /** 544 * optional uint32 step = 4; 545 * @return {number} 546 */ 547 proto.tendermint.consensus.TimeoutInfo.prototype.getStep = function() { 548 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); 549 }; 550 551 552 /** 553 * @param {number} value 554 * @return {!proto.tendermint.consensus.TimeoutInfo} returns this 555 */ 556 proto.tendermint.consensus.TimeoutInfo.prototype.setStep = function(value) { 557 return jspb.Message.setProto3IntField(this, 4, value); 558 }; 559 560 561 562 563 564 if (jspb.Message.GENERATE_TO_OBJECT) { 565 /** 566 * Creates an object representation of this proto. 567 * Field names that are reserved in JavaScript and will be renamed to pb_name. 568 * Optional fields that are not set will be set to undefined. 569 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 570 * For the list of reserved names please see: 571 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 572 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 573 * JSPB instance for transitional soy proto support: 574 * http://goto/soy-param-migration 575 * @return {!Object} 576 */ 577 proto.tendermint.consensus.EndHeight.prototype.toObject = function(opt_includeInstance) { 578 return proto.tendermint.consensus.EndHeight.toObject(opt_includeInstance, this); 579 }; 580 581 582 /** 583 * Static version of the {@see toObject} method. 584 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 585 * the JSPB instance for transitional soy proto support: 586 * http://goto/soy-param-migration 587 * @param {!proto.tendermint.consensus.EndHeight} msg The msg instance to transform. 588 * @return {!Object} 589 * @suppress {unusedLocalVariables} f is only used for nested messages 590 */ 591 proto.tendermint.consensus.EndHeight.toObject = function(includeInstance, msg) { 592 var f, obj = { 593 height: jspb.Message.getFieldWithDefault(msg, 1, 0) 594 }; 595 596 if (includeInstance) { 597 obj.$jspbMessageInstance = msg; 598 } 599 return obj; 600 }; 601 } 602 603 604 /** 605 * Deserializes binary data (in protobuf wire format). 606 * @param {jspb.ByteSource} bytes The bytes to deserialize. 607 * @return {!proto.tendermint.consensus.EndHeight} 608 */ 609 proto.tendermint.consensus.EndHeight.deserializeBinary = function(bytes) { 610 var reader = new jspb.BinaryReader(bytes); 611 var msg = new proto.tendermint.consensus.EndHeight; 612 return proto.tendermint.consensus.EndHeight.deserializeBinaryFromReader(msg, reader); 613 }; 614 615 616 /** 617 * Deserializes binary data (in protobuf wire format) from the 618 * given reader into the given message object. 619 * @param {!proto.tendermint.consensus.EndHeight} msg The message object to deserialize into. 620 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 621 * @return {!proto.tendermint.consensus.EndHeight} 622 */ 623 proto.tendermint.consensus.EndHeight.deserializeBinaryFromReader = function(msg, reader) { 624 while (reader.nextField()) { 625 if (reader.isEndGroup()) { 626 break; 627 } 628 var field = reader.getFieldNumber(); 629 switch (field) { 630 case 1: 631 var value = /** @type {number} */ (reader.readInt64()); 632 msg.setHeight(value); 633 break; 634 default: 635 reader.skipField(); 636 break; 637 } 638 } 639 return msg; 640 }; 641 642 643 /** 644 * Serializes the message to binary data (in protobuf wire format). 645 * @return {!Uint8Array} 646 */ 647 proto.tendermint.consensus.EndHeight.prototype.serializeBinary = function() { 648 var writer = new jspb.BinaryWriter(); 649 proto.tendermint.consensus.EndHeight.serializeBinaryToWriter(this, writer); 650 return writer.getResultBuffer(); 651 }; 652 653 654 /** 655 * Serializes the given message to binary data (in protobuf wire 656 * format), writing to the given BinaryWriter. 657 * @param {!proto.tendermint.consensus.EndHeight} message 658 * @param {!jspb.BinaryWriter} writer 659 * @suppress {unusedLocalVariables} f is only used for nested messages 660 */ 661 proto.tendermint.consensus.EndHeight.serializeBinaryToWriter = function(message, writer) { 662 var f = undefined; 663 f = message.getHeight(); 664 if (f !== 0) { 665 writer.writeInt64( 666 1, 667 f 668 ); 669 } 670 }; 671 672 673 /** 674 * optional int64 height = 1; 675 * @return {number} 676 */ 677 proto.tendermint.consensus.EndHeight.prototype.getHeight = function() { 678 return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); 679 }; 680 681 682 /** 683 * @param {number} value 684 * @return {!proto.tendermint.consensus.EndHeight} returns this 685 */ 686 proto.tendermint.consensus.EndHeight.prototype.setHeight = function(value) { 687 return jspb.Message.setProto3IntField(this, 1, value); 688 }; 689 690 691 692 /** 693 * Oneof group definitions for this message. Each group defines the field 694 * numbers belonging to that group. When of these fields' value is set, all 695 * other fields in the group are cleared. During deserialization, if multiple 696 * fields are encountered for a group, only the last value seen will be kept. 697 * @private {!Array<!Array<number>>} 698 * @const 699 */ 700 proto.tendermint.consensus.WALMessage.oneofGroups_ = [[1,2,3,4]]; 701 702 /** 703 * @enum {number} 704 */ 705 proto.tendermint.consensus.WALMessage.SumCase = { 706 SUM_NOT_SET: 0, 707 EVENT_DATA_ROUND_STATE: 1, 708 MSG_INFO: 2, 709 TIMEOUT_INFO: 3, 710 END_HEIGHT: 4 711 }; 712 713 /** 714 * @return {proto.tendermint.consensus.WALMessage.SumCase} 715 */ 716 proto.tendermint.consensus.WALMessage.prototype.getSumCase = function() { 717 return /** @type {proto.tendermint.consensus.WALMessage.SumCase} */(jspb.Message.computeOneofCase(this, proto.tendermint.consensus.WALMessage.oneofGroups_[0])); 718 }; 719 720 721 722 if (jspb.Message.GENERATE_TO_OBJECT) { 723 /** 724 * Creates an object representation of this proto. 725 * Field names that are reserved in JavaScript and will be renamed to pb_name. 726 * Optional fields that are not set will be set to undefined. 727 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 728 * For the list of reserved names please see: 729 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 730 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 731 * JSPB instance for transitional soy proto support: 732 * http://goto/soy-param-migration 733 * @return {!Object} 734 */ 735 proto.tendermint.consensus.WALMessage.prototype.toObject = function(opt_includeInstance) { 736 return proto.tendermint.consensus.WALMessage.toObject(opt_includeInstance, this); 737 }; 738 739 740 /** 741 * Static version of the {@see toObject} method. 742 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 743 * the JSPB instance for transitional soy proto support: 744 * http://goto/soy-param-migration 745 * @param {!proto.tendermint.consensus.WALMessage} msg The msg instance to transform. 746 * @return {!Object} 747 * @suppress {unusedLocalVariables} f is only used for nested messages 748 */ 749 proto.tendermint.consensus.WALMessage.toObject = function(includeInstance, msg) { 750 var f, obj = { 751 eventDataRoundState: (f = msg.getEventDataRoundState()) && tendermint_types_events_pb.EventDataRoundState.toObject(includeInstance, f), 752 msgInfo: (f = msg.getMsgInfo()) && proto.tendermint.consensus.MsgInfo.toObject(includeInstance, f), 753 timeoutInfo: (f = msg.getTimeoutInfo()) && proto.tendermint.consensus.TimeoutInfo.toObject(includeInstance, f), 754 endHeight: (f = msg.getEndHeight()) && proto.tendermint.consensus.EndHeight.toObject(includeInstance, f) 755 }; 756 757 if (includeInstance) { 758 obj.$jspbMessageInstance = msg; 759 } 760 return obj; 761 }; 762 } 763 764 765 /** 766 * Deserializes binary data (in protobuf wire format). 767 * @param {jspb.ByteSource} bytes The bytes to deserialize. 768 * @return {!proto.tendermint.consensus.WALMessage} 769 */ 770 proto.tendermint.consensus.WALMessage.deserializeBinary = function(bytes) { 771 var reader = new jspb.BinaryReader(bytes); 772 var msg = new proto.tendermint.consensus.WALMessage; 773 return proto.tendermint.consensus.WALMessage.deserializeBinaryFromReader(msg, reader); 774 }; 775 776 777 /** 778 * Deserializes binary data (in protobuf wire format) from the 779 * given reader into the given message object. 780 * @param {!proto.tendermint.consensus.WALMessage} msg The message object to deserialize into. 781 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 782 * @return {!proto.tendermint.consensus.WALMessage} 783 */ 784 proto.tendermint.consensus.WALMessage.deserializeBinaryFromReader = function(msg, reader) { 785 while (reader.nextField()) { 786 if (reader.isEndGroup()) { 787 break; 788 } 789 var field = reader.getFieldNumber(); 790 switch (field) { 791 case 1: 792 var value = new tendermint_types_events_pb.EventDataRoundState; 793 reader.readMessage(value,tendermint_types_events_pb.EventDataRoundState.deserializeBinaryFromReader); 794 msg.setEventDataRoundState(value); 795 break; 796 case 2: 797 var value = new proto.tendermint.consensus.MsgInfo; 798 reader.readMessage(value,proto.tendermint.consensus.MsgInfo.deserializeBinaryFromReader); 799 msg.setMsgInfo(value); 800 break; 801 case 3: 802 var value = new proto.tendermint.consensus.TimeoutInfo; 803 reader.readMessage(value,proto.tendermint.consensus.TimeoutInfo.deserializeBinaryFromReader); 804 msg.setTimeoutInfo(value); 805 break; 806 case 4: 807 var value = new proto.tendermint.consensus.EndHeight; 808 reader.readMessage(value,proto.tendermint.consensus.EndHeight.deserializeBinaryFromReader); 809 msg.setEndHeight(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.tendermint.consensus.WALMessage.prototype.serializeBinary = function() { 825 var writer = new jspb.BinaryWriter(); 826 proto.tendermint.consensus.WALMessage.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.tendermint.consensus.WALMessage} message 835 * @param {!jspb.BinaryWriter} writer 836 * @suppress {unusedLocalVariables} f is only used for nested messages 837 */ 838 proto.tendermint.consensus.WALMessage.serializeBinaryToWriter = function(message, writer) { 839 var f = undefined; 840 f = message.getEventDataRoundState(); 841 if (f != null) { 842 writer.writeMessage( 843 1, 844 f, 845 tendermint_types_events_pb.EventDataRoundState.serializeBinaryToWriter 846 ); 847 } 848 f = message.getMsgInfo(); 849 if (f != null) { 850 writer.writeMessage( 851 2, 852 f, 853 proto.tendermint.consensus.MsgInfo.serializeBinaryToWriter 854 ); 855 } 856 f = message.getTimeoutInfo(); 857 if (f != null) { 858 writer.writeMessage( 859 3, 860 f, 861 proto.tendermint.consensus.TimeoutInfo.serializeBinaryToWriter 862 ); 863 } 864 f = message.getEndHeight(); 865 if (f != null) { 866 writer.writeMessage( 867 4, 868 f, 869 proto.tendermint.consensus.EndHeight.serializeBinaryToWriter 870 ); 871 } 872 }; 873 874 875 /** 876 * optional tendermint.types.EventDataRoundState event_data_round_state = 1; 877 * @return {?proto.tendermint.types.EventDataRoundState} 878 */ 879 proto.tendermint.consensus.WALMessage.prototype.getEventDataRoundState = function() { 880 return /** @type{?proto.tendermint.types.EventDataRoundState} */ ( 881 jspb.Message.getWrapperField(this, tendermint_types_events_pb.EventDataRoundState, 1)); 882 }; 883 884 885 /** 886 * @param {?proto.tendermint.types.EventDataRoundState|undefined} value 887 * @return {!proto.tendermint.consensus.WALMessage} returns this 888 */ 889 proto.tendermint.consensus.WALMessage.prototype.setEventDataRoundState = function(value) { 890 return jspb.Message.setOneofWrapperField(this, 1, proto.tendermint.consensus.WALMessage.oneofGroups_[0], value); 891 }; 892 893 894 /** 895 * Clears the message field making it undefined. 896 * @return {!proto.tendermint.consensus.WALMessage} returns this 897 */ 898 proto.tendermint.consensus.WALMessage.prototype.clearEventDataRoundState = function() { 899 return this.setEventDataRoundState(undefined); 900 }; 901 902 903 /** 904 * Returns whether this field is set. 905 * @return {boolean} 906 */ 907 proto.tendermint.consensus.WALMessage.prototype.hasEventDataRoundState = function() { 908 return jspb.Message.getField(this, 1) != null; 909 }; 910 911 912 /** 913 * optional MsgInfo msg_info = 2; 914 * @return {?proto.tendermint.consensus.MsgInfo} 915 */ 916 proto.tendermint.consensus.WALMessage.prototype.getMsgInfo = function() { 917 return /** @type{?proto.tendermint.consensus.MsgInfo} */ ( 918 jspb.Message.getWrapperField(this, proto.tendermint.consensus.MsgInfo, 2)); 919 }; 920 921 922 /** 923 * @param {?proto.tendermint.consensus.MsgInfo|undefined} value 924 * @return {!proto.tendermint.consensus.WALMessage} returns this 925 */ 926 proto.tendermint.consensus.WALMessage.prototype.setMsgInfo = function(value) { 927 return jspb.Message.setOneofWrapperField(this, 2, proto.tendermint.consensus.WALMessage.oneofGroups_[0], value); 928 }; 929 930 931 /** 932 * Clears the message field making it undefined. 933 * @return {!proto.tendermint.consensus.WALMessage} returns this 934 */ 935 proto.tendermint.consensus.WALMessage.prototype.clearMsgInfo = function() { 936 return this.setMsgInfo(undefined); 937 }; 938 939 940 /** 941 * Returns whether this field is set. 942 * @return {boolean} 943 */ 944 proto.tendermint.consensus.WALMessage.prototype.hasMsgInfo = function() { 945 return jspb.Message.getField(this, 2) != null; 946 }; 947 948 949 /** 950 * optional TimeoutInfo timeout_info = 3; 951 * @return {?proto.tendermint.consensus.TimeoutInfo} 952 */ 953 proto.tendermint.consensus.WALMessage.prototype.getTimeoutInfo = function() { 954 return /** @type{?proto.tendermint.consensus.TimeoutInfo} */ ( 955 jspb.Message.getWrapperField(this, proto.tendermint.consensus.TimeoutInfo, 3)); 956 }; 957 958 959 /** 960 * @param {?proto.tendermint.consensus.TimeoutInfo|undefined} value 961 * @return {!proto.tendermint.consensus.WALMessage} returns this 962 */ 963 proto.tendermint.consensus.WALMessage.prototype.setTimeoutInfo = function(value) { 964 return jspb.Message.setOneofWrapperField(this, 3, proto.tendermint.consensus.WALMessage.oneofGroups_[0], value); 965 }; 966 967 968 /** 969 * Clears the message field making it undefined. 970 * @return {!proto.tendermint.consensus.WALMessage} returns this 971 */ 972 proto.tendermint.consensus.WALMessage.prototype.clearTimeoutInfo = function() { 973 return this.setTimeoutInfo(undefined); 974 }; 975 976 977 /** 978 * Returns whether this field is set. 979 * @return {boolean} 980 */ 981 proto.tendermint.consensus.WALMessage.prototype.hasTimeoutInfo = function() { 982 return jspb.Message.getField(this, 3) != null; 983 }; 984 985 986 /** 987 * optional EndHeight end_height = 4; 988 * @return {?proto.tendermint.consensus.EndHeight} 989 */ 990 proto.tendermint.consensus.WALMessage.prototype.getEndHeight = function() { 991 return /** @type{?proto.tendermint.consensus.EndHeight} */ ( 992 jspb.Message.getWrapperField(this, proto.tendermint.consensus.EndHeight, 4)); 993 }; 994 995 996 /** 997 * @param {?proto.tendermint.consensus.EndHeight|undefined} value 998 * @return {!proto.tendermint.consensus.WALMessage} returns this 999 */ 1000 proto.tendermint.consensus.WALMessage.prototype.setEndHeight = function(value) { 1001 return jspb.Message.setOneofWrapperField(this, 4, proto.tendermint.consensus.WALMessage.oneofGroups_[0], value); 1002 }; 1003 1004 1005 /** 1006 * Clears the message field making it undefined. 1007 * @return {!proto.tendermint.consensus.WALMessage} returns this 1008 */ 1009 proto.tendermint.consensus.WALMessage.prototype.clearEndHeight = function() { 1010 return this.setEndHeight(undefined); 1011 }; 1012 1013 1014 /** 1015 * Returns whether this field is set. 1016 * @return {boolean} 1017 */ 1018 proto.tendermint.consensus.WALMessage.prototype.hasEndHeight = function() { 1019 return jspb.Message.getField(this, 4) != null; 1020 }; 1021 1022 1023 1024 1025 1026 if (jspb.Message.GENERATE_TO_OBJECT) { 1027 /** 1028 * Creates an object representation of this proto. 1029 * Field names that are reserved in JavaScript and will be renamed to pb_name. 1030 * Optional fields that are not set will be set to undefined. 1031 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 1032 * For the list of reserved names please see: 1033 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 1034 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 1035 * JSPB instance for transitional soy proto support: 1036 * http://goto/soy-param-migration 1037 * @return {!Object} 1038 */ 1039 proto.tendermint.consensus.TimedWALMessage.prototype.toObject = function(opt_includeInstance) { 1040 return proto.tendermint.consensus.TimedWALMessage.toObject(opt_includeInstance, this); 1041 }; 1042 1043 1044 /** 1045 * Static version of the {@see toObject} method. 1046 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 1047 * the JSPB instance for transitional soy proto support: 1048 * http://goto/soy-param-migration 1049 * @param {!proto.tendermint.consensus.TimedWALMessage} msg The msg instance to transform. 1050 * @return {!Object} 1051 * @suppress {unusedLocalVariables} f is only used for nested messages 1052 */ 1053 proto.tendermint.consensus.TimedWALMessage.toObject = function(includeInstance, msg) { 1054 var f, obj = { 1055 time: (f = msg.getTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), 1056 msg: (f = msg.getMsg()) && proto.tendermint.consensus.WALMessage.toObject(includeInstance, f) 1057 }; 1058 1059 if (includeInstance) { 1060 obj.$jspbMessageInstance = msg; 1061 } 1062 return obj; 1063 }; 1064 } 1065 1066 1067 /** 1068 * Deserializes binary data (in protobuf wire format). 1069 * @param {jspb.ByteSource} bytes The bytes to deserialize. 1070 * @return {!proto.tendermint.consensus.TimedWALMessage} 1071 */ 1072 proto.tendermint.consensus.TimedWALMessage.deserializeBinary = function(bytes) { 1073 var reader = new jspb.BinaryReader(bytes); 1074 var msg = new proto.tendermint.consensus.TimedWALMessage; 1075 return proto.tendermint.consensus.TimedWALMessage.deserializeBinaryFromReader(msg, reader); 1076 }; 1077 1078 1079 /** 1080 * Deserializes binary data (in protobuf wire format) from the 1081 * given reader into the given message object. 1082 * @param {!proto.tendermint.consensus.TimedWALMessage} msg The message object to deserialize into. 1083 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 1084 * @return {!proto.tendermint.consensus.TimedWALMessage} 1085 */ 1086 proto.tendermint.consensus.TimedWALMessage.deserializeBinaryFromReader = function(msg, reader) { 1087 while (reader.nextField()) { 1088 if (reader.isEndGroup()) { 1089 break; 1090 } 1091 var field = reader.getFieldNumber(); 1092 switch (field) { 1093 case 1: 1094 var value = new google_protobuf_timestamp_pb.Timestamp; 1095 reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); 1096 msg.setTime(value); 1097 break; 1098 case 2: 1099 var value = new proto.tendermint.consensus.WALMessage; 1100 reader.readMessage(value,proto.tendermint.consensus.WALMessage.deserializeBinaryFromReader); 1101 msg.setMsg(value); 1102 break; 1103 default: 1104 reader.skipField(); 1105 break; 1106 } 1107 } 1108 return msg; 1109 }; 1110 1111 1112 /** 1113 * Serializes the message to binary data (in protobuf wire format). 1114 * @return {!Uint8Array} 1115 */ 1116 proto.tendermint.consensus.TimedWALMessage.prototype.serializeBinary = function() { 1117 var writer = new jspb.BinaryWriter(); 1118 proto.tendermint.consensus.TimedWALMessage.serializeBinaryToWriter(this, writer); 1119 return writer.getResultBuffer(); 1120 }; 1121 1122 1123 /** 1124 * Serializes the given message to binary data (in protobuf wire 1125 * format), writing to the given BinaryWriter. 1126 * @param {!proto.tendermint.consensus.TimedWALMessage} message 1127 * @param {!jspb.BinaryWriter} writer 1128 * @suppress {unusedLocalVariables} f is only used for nested messages 1129 */ 1130 proto.tendermint.consensus.TimedWALMessage.serializeBinaryToWriter = function(message, writer) { 1131 var f = undefined; 1132 f = message.getTime(); 1133 if (f != null) { 1134 writer.writeMessage( 1135 1, 1136 f, 1137 google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter 1138 ); 1139 } 1140 f = message.getMsg(); 1141 if (f != null) { 1142 writer.writeMessage( 1143 2, 1144 f, 1145 proto.tendermint.consensus.WALMessage.serializeBinaryToWriter 1146 ); 1147 } 1148 }; 1149 1150 1151 /** 1152 * optional google.protobuf.Timestamp time = 1; 1153 * @return {?proto.google.protobuf.Timestamp} 1154 */ 1155 proto.tendermint.consensus.TimedWALMessage.prototype.getTime = function() { 1156 return /** @type{?proto.google.protobuf.Timestamp} */ ( 1157 jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); 1158 }; 1159 1160 1161 /** 1162 * @param {?proto.google.protobuf.Timestamp|undefined} value 1163 * @return {!proto.tendermint.consensus.TimedWALMessage} returns this 1164 */ 1165 proto.tendermint.consensus.TimedWALMessage.prototype.setTime = function(value) { 1166 return jspb.Message.setWrapperField(this, 1, value); 1167 }; 1168 1169 1170 /** 1171 * Clears the message field making it undefined. 1172 * @return {!proto.tendermint.consensus.TimedWALMessage} returns this 1173 */ 1174 proto.tendermint.consensus.TimedWALMessage.prototype.clearTime = function() { 1175 return this.setTime(undefined); 1176 }; 1177 1178 1179 /** 1180 * Returns whether this field is set. 1181 * @return {boolean} 1182 */ 1183 proto.tendermint.consensus.TimedWALMessage.prototype.hasTime = function() { 1184 return jspb.Message.getField(this, 1) != null; 1185 }; 1186 1187 1188 /** 1189 * optional WALMessage msg = 2; 1190 * @return {?proto.tendermint.consensus.WALMessage} 1191 */ 1192 proto.tendermint.consensus.TimedWALMessage.prototype.getMsg = function() { 1193 return /** @type{?proto.tendermint.consensus.WALMessage} */ ( 1194 jspb.Message.getWrapperField(this, proto.tendermint.consensus.WALMessage, 2)); 1195 }; 1196 1197 1198 /** 1199 * @param {?proto.tendermint.consensus.WALMessage|undefined} value 1200 * @return {!proto.tendermint.consensus.TimedWALMessage} returns this 1201 */ 1202 proto.tendermint.consensus.TimedWALMessage.prototype.setMsg = function(value) { 1203 return jspb.Message.setWrapperField(this, 2, value); 1204 }; 1205 1206 1207 /** 1208 * Clears the message field making it undefined. 1209 * @return {!proto.tendermint.consensus.TimedWALMessage} returns this 1210 */ 1211 proto.tendermint.consensus.TimedWALMessage.prototype.clearMsg = function() { 1212 return this.setMsg(undefined); 1213 }; 1214 1215 1216 /** 1217 * Returns whether this field is set. 1218 * @return {boolean} 1219 */ 1220 proto.tendermint.consensus.TimedWALMessage.prototype.hasMsg = function() { 1221 return jspb.Message.getField(this, 2) != null; 1222 }; 1223 1224 1225 goog.object.extend(exports, proto.tendermint.consensus);