github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/js/proto/rpc_pb.js (about) 1 // source: rpc.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_pb = require('./tendermint_pb.js'); 21 goog.object.extend(proto, tendermint_pb); 22 var validator_pb = require('./validator_pb.js'); 23 goog.object.extend(proto, validator_pb); 24 var bcm_pb = require('./bcm_pb.js'); 25 goog.object.extend(proto, bcm_pb); 26 goog.exportSymbol('proto.rpc.ResultStatus', null, global); 27 /** 28 * Generated by JsPbCodeGenerator. 29 * @param {Array=} opt_data Optional initial data array, typically from a 30 * server response, or constructed directly in Javascript. The array is used 31 * in place and becomes part of the constructed object. It is not cloned. 32 * If no data is provided, the constructed object will be empty, but still 33 * valid. 34 * @extends {jspb.Message} 35 * @constructor 36 */ 37 proto.rpc.ResultStatus = function(opt_data) { 38 jspb.Message.initialize(this, opt_data, 0, -1, null, null); 39 }; 40 goog.inherits(proto.rpc.ResultStatus, jspb.Message); 41 if (goog.DEBUG && !COMPILED) { 42 /** 43 * @public 44 * @override 45 */ 46 proto.rpc.ResultStatus.displayName = 'proto.rpc.ResultStatus'; 47 } 48 49 50 51 if (jspb.Message.GENERATE_TO_OBJECT) { 52 /** 53 * Creates an object representation of this proto. 54 * Field names that are reserved in JavaScript and will be renamed to pb_name. 55 * Optional fields that are not set will be set to undefined. 56 * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. 57 * For the list of reserved names please see: 58 * net/proto2/compiler/js/internal/generator.cc#kKeyword. 59 * @param {boolean=} opt_includeInstance Deprecated. whether to include the 60 * JSPB instance for transitional soy proto support: 61 * http://goto/soy-param-migration 62 * @return {!Object} 63 */ 64 proto.rpc.ResultStatus.prototype.toObject = function(opt_includeInstance) { 65 return proto.rpc.ResultStatus.toObject(opt_includeInstance, this); 66 }; 67 68 69 /** 70 * Static version of the {@see toObject} method. 71 * @param {boolean|undefined} includeInstance Deprecated. Whether to include 72 * the JSPB instance for transitional soy proto support: 73 * http://goto/soy-param-migration 74 * @param {!proto.rpc.ResultStatus} msg The msg instance to transform. 75 * @return {!Object} 76 * @suppress {unusedLocalVariables} f is only used for nested messages 77 */ 78 proto.rpc.ResultStatus.toObject = function(includeInstance, msg) { 79 var f, obj = { 80 chainid: jspb.Message.getFieldWithDefault(msg, 1, ""), 81 runid: jspb.Message.getFieldWithDefault(msg, 2, ""), 82 burrowversion: jspb.Message.getFieldWithDefault(msg, 3, ""), 83 genesishash: msg.getGenesishash_asB64(), 84 nodeinfo: (f = msg.getNodeinfo()) && tendermint_pb.NodeInfo.toObject(includeInstance, f), 85 syncinfo: (f = msg.getSyncinfo()) && bcm_pb.SyncInfo.toObject(includeInstance, f), 86 catchingup: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), 87 validatorinfo: (f = msg.getValidatorinfo()) && validator_pb.Validator.toObject(includeInstance, f) 88 }; 89 90 if (includeInstance) { 91 obj.$jspbMessageInstance = msg; 92 } 93 return obj; 94 }; 95 } 96 97 98 /** 99 * Deserializes binary data (in protobuf wire format). 100 * @param {jspb.ByteSource} bytes The bytes to deserialize. 101 * @return {!proto.rpc.ResultStatus} 102 */ 103 proto.rpc.ResultStatus.deserializeBinary = function(bytes) { 104 var reader = new jspb.BinaryReader(bytes); 105 var msg = new proto.rpc.ResultStatus; 106 return proto.rpc.ResultStatus.deserializeBinaryFromReader(msg, reader); 107 }; 108 109 110 /** 111 * Deserializes binary data (in protobuf wire format) from the 112 * given reader into the given message object. 113 * @param {!proto.rpc.ResultStatus} msg The message object to deserialize into. 114 * @param {!jspb.BinaryReader} reader The BinaryReader to use. 115 * @return {!proto.rpc.ResultStatus} 116 */ 117 proto.rpc.ResultStatus.deserializeBinaryFromReader = function(msg, reader) { 118 while (reader.nextField()) { 119 if (reader.isEndGroup()) { 120 break; 121 } 122 var field = reader.getFieldNumber(); 123 switch (field) { 124 case 1: 125 var value = /** @type {string} */ (reader.readString()); 126 msg.setChainid(value); 127 break; 128 case 2: 129 var value = /** @type {string} */ (reader.readString()); 130 msg.setRunid(value); 131 break; 132 case 3: 133 var value = /** @type {string} */ (reader.readString()); 134 msg.setBurrowversion(value); 135 break; 136 case 4: 137 var value = /** @type {!Uint8Array} */ (reader.readBytes()); 138 msg.setGenesishash(value); 139 break; 140 case 5: 141 var value = new tendermint_pb.NodeInfo; 142 reader.readMessage(value,tendermint_pb.NodeInfo.deserializeBinaryFromReader); 143 msg.setNodeinfo(value); 144 break; 145 case 6: 146 var value = new bcm_pb.SyncInfo; 147 reader.readMessage(value,bcm_pb.SyncInfo.deserializeBinaryFromReader); 148 msg.setSyncinfo(value); 149 break; 150 case 8: 151 var value = /** @type {boolean} */ (reader.readBool()); 152 msg.setCatchingup(value); 153 break; 154 case 7: 155 var value = new validator_pb.Validator; 156 reader.readMessage(value,validator_pb.Validator.deserializeBinaryFromReader); 157 msg.setValidatorinfo(value); 158 break; 159 default: 160 reader.skipField(); 161 break; 162 } 163 } 164 return msg; 165 }; 166 167 168 /** 169 * Serializes the message to binary data (in protobuf wire format). 170 * @return {!Uint8Array} 171 */ 172 proto.rpc.ResultStatus.prototype.serializeBinary = function() { 173 var writer = new jspb.BinaryWriter(); 174 proto.rpc.ResultStatus.serializeBinaryToWriter(this, writer); 175 return writer.getResultBuffer(); 176 }; 177 178 179 /** 180 * Serializes the given message to binary data (in protobuf wire 181 * format), writing to the given BinaryWriter. 182 * @param {!proto.rpc.ResultStatus} message 183 * @param {!jspb.BinaryWriter} writer 184 * @suppress {unusedLocalVariables} f is only used for nested messages 185 */ 186 proto.rpc.ResultStatus.serializeBinaryToWriter = function(message, writer) { 187 var f = undefined; 188 f = message.getChainid(); 189 if (f.length > 0) { 190 writer.writeString( 191 1, 192 f 193 ); 194 } 195 f = message.getRunid(); 196 if (f.length > 0) { 197 writer.writeString( 198 2, 199 f 200 ); 201 } 202 f = message.getBurrowversion(); 203 if (f.length > 0) { 204 writer.writeString( 205 3, 206 f 207 ); 208 } 209 f = message.getGenesishash_asU8(); 210 if (f.length > 0) { 211 writer.writeBytes( 212 4, 213 f 214 ); 215 } 216 f = message.getNodeinfo(); 217 if (f != null) { 218 writer.writeMessage( 219 5, 220 f, 221 tendermint_pb.NodeInfo.serializeBinaryToWriter 222 ); 223 } 224 f = message.getSyncinfo(); 225 if (f != null) { 226 writer.writeMessage( 227 6, 228 f, 229 bcm_pb.SyncInfo.serializeBinaryToWriter 230 ); 231 } 232 f = message.getCatchingup(); 233 if (f) { 234 writer.writeBool( 235 8, 236 f 237 ); 238 } 239 f = message.getValidatorinfo(); 240 if (f != null) { 241 writer.writeMessage( 242 7, 243 f, 244 validator_pb.Validator.serializeBinaryToWriter 245 ); 246 } 247 }; 248 249 250 /** 251 * optional string ChainID = 1; 252 * @return {string} 253 */ 254 proto.rpc.ResultStatus.prototype.getChainid = function() { 255 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); 256 }; 257 258 259 /** 260 * @param {string} value 261 * @return {!proto.rpc.ResultStatus} returns this 262 */ 263 proto.rpc.ResultStatus.prototype.setChainid = function(value) { 264 return jspb.Message.setProto3StringField(this, 1, value); 265 }; 266 267 268 /** 269 * optional string RunID = 2; 270 * @return {string} 271 */ 272 proto.rpc.ResultStatus.prototype.getRunid = function() { 273 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); 274 }; 275 276 277 /** 278 * @param {string} value 279 * @return {!proto.rpc.ResultStatus} returns this 280 */ 281 proto.rpc.ResultStatus.prototype.setRunid = function(value) { 282 return jspb.Message.setProto3StringField(this, 2, value); 283 }; 284 285 286 /** 287 * optional string BurrowVersion = 3; 288 * @return {string} 289 */ 290 proto.rpc.ResultStatus.prototype.getBurrowversion = function() { 291 return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); 292 }; 293 294 295 /** 296 * @param {string} value 297 * @return {!proto.rpc.ResultStatus} returns this 298 */ 299 proto.rpc.ResultStatus.prototype.setBurrowversion = function(value) { 300 return jspb.Message.setProto3StringField(this, 3, value); 301 }; 302 303 304 /** 305 * optional bytes GenesisHash = 4; 306 * @return {!(string|Uint8Array)} 307 */ 308 proto.rpc.ResultStatus.prototype.getGenesishash = function() { 309 return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, "")); 310 }; 311 312 313 /** 314 * optional bytes GenesisHash = 4; 315 * This is a type-conversion wrapper around `getGenesishash()` 316 * @return {string} 317 */ 318 proto.rpc.ResultStatus.prototype.getGenesishash_asB64 = function() { 319 return /** @type {string} */ (jspb.Message.bytesAsB64( 320 this.getGenesishash())); 321 }; 322 323 324 /** 325 * optional bytes GenesisHash = 4; 326 * Note that Uint8Array is not supported on all browsers. 327 * @see http://caniuse.com/Uint8Array 328 * This is a type-conversion wrapper around `getGenesishash()` 329 * @return {!Uint8Array} 330 */ 331 proto.rpc.ResultStatus.prototype.getGenesishash_asU8 = function() { 332 return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( 333 this.getGenesishash())); 334 }; 335 336 337 /** 338 * @param {!(string|Uint8Array)} value 339 * @return {!proto.rpc.ResultStatus} returns this 340 */ 341 proto.rpc.ResultStatus.prototype.setGenesishash = function(value) { 342 return jspb.Message.setProto3BytesField(this, 4, value); 343 }; 344 345 346 /** 347 * optional tendermint.NodeInfo NodeInfo = 5; 348 * @return {?proto.tendermint.NodeInfo} 349 */ 350 proto.rpc.ResultStatus.prototype.getNodeinfo = function() { 351 return /** @type{?proto.tendermint.NodeInfo} */ ( 352 jspb.Message.getWrapperField(this, tendermint_pb.NodeInfo, 5)); 353 }; 354 355 356 /** 357 * @param {?proto.tendermint.NodeInfo|undefined} value 358 * @return {!proto.rpc.ResultStatus} returns this 359 */ 360 proto.rpc.ResultStatus.prototype.setNodeinfo = function(value) { 361 return jspb.Message.setWrapperField(this, 5, value); 362 }; 363 364 365 /** 366 * Clears the message field making it undefined. 367 * @return {!proto.rpc.ResultStatus} returns this 368 */ 369 proto.rpc.ResultStatus.prototype.clearNodeinfo = function() { 370 return this.setNodeinfo(undefined); 371 }; 372 373 374 /** 375 * Returns whether this field is set. 376 * @return {boolean} 377 */ 378 proto.rpc.ResultStatus.prototype.hasNodeinfo = function() { 379 return jspb.Message.getField(this, 5) != null; 380 }; 381 382 383 /** 384 * optional bcm.SyncInfo SyncInfo = 6; 385 * @return {?proto.bcm.SyncInfo} 386 */ 387 proto.rpc.ResultStatus.prototype.getSyncinfo = function() { 388 return /** @type{?proto.bcm.SyncInfo} */ ( 389 jspb.Message.getWrapperField(this, bcm_pb.SyncInfo, 6)); 390 }; 391 392 393 /** 394 * @param {?proto.bcm.SyncInfo|undefined} value 395 * @return {!proto.rpc.ResultStatus} returns this 396 */ 397 proto.rpc.ResultStatus.prototype.setSyncinfo = function(value) { 398 return jspb.Message.setWrapperField(this, 6, value); 399 }; 400 401 402 /** 403 * Clears the message field making it undefined. 404 * @return {!proto.rpc.ResultStatus} returns this 405 */ 406 proto.rpc.ResultStatus.prototype.clearSyncinfo = function() { 407 return this.setSyncinfo(undefined); 408 }; 409 410 411 /** 412 * Returns whether this field is set. 413 * @return {boolean} 414 */ 415 proto.rpc.ResultStatus.prototype.hasSyncinfo = function() { 416 return jspb.Message.getField(this, 6) != null; 417 }; 418 419 420 /** 421 * optional bool CatchingUp = 8; 422 * @return {boolean} 423 */ 424 proto.rpc.ResultStatus.prototype.getCatchingup = function() { 425 return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); 426 }; 427 428 429 /** 430 * @param {boolean} value 431 * @return {!proto.rpc.ResultStatus} returns this 432 */ 433 proto.rpc.ResultStatus.prototype.setCatchingup = function(value) { 434 return jspb.Message.setProto3BooleanField(this, 8, value); 435 }; 436 437 438 /** 439 * optional validator.Validator ValidatorInfo = 7; 440 * @return {?proto.validator.Validator} 441 */ 442 proto.rpc.ResultStatus.prototype.getValidatorinfo = function() { 443 return /** @type{?proto.validator.Validator} */ ( 444 jspb.Message.getWrapperField(this, validator_pb.Validator, 7)); 445 }; 446 447 448 /** 449 * @param {?proto.validator.Validator|undefined} value 450 * @return {!proto.rpc.ResultStatus} returns this 451 */ 452 proto.rpc.ResultStatus.prototype.setValidatorinfo = function(value) { 453 return jspb.Message.setWrapperField(this, 7, value); 454 }; 455 456 457 /** 458 * Clears the message field making it undefined. 459 * @return {!proto.rpc.ResultStatus} returns this 460 */ 461 proto.rpc.ResultStatus.prototype.clearValidatorinfo = function() { 462 return this.setValidatorinfo(undefined); 463 }; 464 465 466 /** 467 * Returns whether this field is set. 468 * @return {boolean} 469 */ 470 proto.rpc.ResultStatus.prototype.hasValidatorinfo = function() { 471 return jspb.Message.getField(this, 7) != null; 472 }; 473 474 475 goog.object.extend(exports, proto.rpc);