github.com/hyperledger/burrow@v0.34.5-0.20220512172541-77f09336001d/js/proto/tendermint_pb.js (about)

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