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

     1  // source: registry.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.registry.NodeIdentity', 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.registry.NodeIdentity = function(opt_data) {
    32    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
    33  };
    34  goog.inherits(proto.registry.NodeIdentity, jspb.Message);
    35  if (goog.DEBUG && !COMPILED) {
    36    /**
    37     * @public
    38     * @override
    39     */
    40    proto.registry.NodeIdentity.displayName = 'proto.registry.NodeIdentity';
    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.registry.NodeIdentity.prototype.toObject = function(opt_includeInstance) {
    59    return proto.registry.NodeIdentity.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.registry.NodeIdentity} msg The msg instance to transform.
    69   * @return {!Object}
    70   * @suppress {unusedLocalVariables} f is only used for nested messages
    71   */
    72  proto.registry.NodeIdentity.toObject = function(includeInstance, msg) {
    73    var f, obj = {
    74      moniker: jspb.Message.getFieldWithDefault(msg, 1, ""),
    75      networkaddress: jspb.Message.getFieldWithDefault(msg, 2, ""),
    76      tendermintnodeid: msg.getTendermintnodeid_asB64(),
    77      validatorpublickey: msg.getValidatorpublickey_asB64()
    78    };
    79  
    80    if (includeInstance) {
    81      obj.$jspbMessageInstance = msg;
    82    }
    83    return obj;
    84  };
    85  }
    86  
    87  
    88  /**
    89   * Deserializes binary data (in protobuf wire format).
    90   * @param {jspb.ByteSource} bytes The bytes to deserialize.
    91   * @return {!proto.registry.NodeIdentity}
    92   */
    93  proto.registry.NodeIdentity.deserializeBinary = function(bytes) {
    94    var reader = new jspb.BinaryReader(bytes);
    95    var msg = new proto.registry.NodeIdentity;
    96    return proto.registry.NodeIdentity.deserializeBinaryFromReader(msg, reader);
    97  };
    98  
    99  
   100  /**
   101   * Deserializes binary data (in protobuf wire format) from the
   102   * given reader into the given message object.
   103   * @param {!proto.registry.NodeIdentity} msg The message object to deserialize into.
   104   * @param {!jspb.BinaryReader} reader The BinaryReader to use.
   105   * @return {!proto.registry.NodeIdentity}
   106   */
   107  proto.registry.NodeIdentity.deserializeBinaryFromReader = function(msg, reader) {
   108    while (reader.nextField()) {
   109      if (reader.isEndGroup()) {
   110        break;
   111      }
   112      var field = reader.getFieldNumber();
   113      switch (field) {
   114      case 1:
   115        var value = /** @type {string} */ (reader.readString());
   116        msg.setMoniker(value);
   117        break;
   118      case 2:
   119        var value = /** @type {string} */ (reader.readString());
   120        msg.setNetworkaddress(value);
   121        break;
   122      case 3:
   123        var value = /** @type {!Uint8Array} */ (reader.readBytes());
   124        msg.setTendermintnodeid(value);
   125        break;
   126      case 4:
   127        var value = /** @type {!Uint8Array} */ (reader.readBytes());
   128        msg.setValidatorpublickey(value);
   129        break;
   130      default:
   131        reader.skipField();
   132        break;
   133      }
   134    }
   135    return msg;
   136  };
   137  
   138  
   139  /**
   140   * Serializes the message to binary data (in protobuf wire format).
   141   * @return {!Uint8Array}
   142   */
   143  proto.registry.NodeIdentity.prototype.serializeBinary = function() {
   144    var writer = new jspb.BinaryWriter();
   145    proto.registry.NodeIdentity.serializeBinaryToWriter(this, writer);
   146    return writer.getResultBuffer();
   147  };
   148  
   149  
   150  /**
   151   * Serializes the given message to binary data (in protobuf wire
   152   * format), writing to the given BinaryWriter.
   153   * @param {!proto.registry.NodeIdentity} message
   154   * @param {!jspb.BinaryWriter} writer
   155   * @suppress {unusedLocalVariables} f is only used for nested messages
   156   */
   157  proto.registry.NodeIdentity.serializeBinaryToWriter = function(message, writer) {
   158    var f = undefined;
   159    f = message.getMoniker();
   160    if (f.length > 0) {
   161      writer.writeString(
   162        1,
   163        f
   164      );
   165    }
   166    f = message.getNetworkaddress();
   167    if (f.length > 0) {
   168      writer.writeString(
   169        2,
   170        f
   171      );
   172    }
   173    f = message.getTendermintnodeid_asU8();
   174    if (f.length > 0) {
   175      writer.writeBytes(
   176        3,
   177        f
   178      );
   179    }
   180    f = message.getValidatorpublickey_asU8();
   181    if (f.length > 0) {
   182      writer.writeBytes(
   183        4,
   184        f
   185      );
   186    }
   187  };
   188  
   189  
   190  /**
   191   * optional string Moniker = 1;
   192   * @return {string}
   193   */
   194  proto.registry.NodeIdentity.prototype.getMoniker = function() {
   195    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
   196  };
   197  
   198  
   199  /**
   200   * @param {string} value
   201   * @return {!proto.registry.NodeIdentity} returns this
   202   */
   203  proto.registry.NodeIdentity.prototype.setMoniker = function(value) {
   204    return jspb.Message.setProto3StringField(this, 1, value);
   205  };
   206  
   207  
   208  /**
   209   * optional string NetworkAddress = 2;
   210   * @return {string}
   211   */
   212  proto.registry.NodeIdentity.prototype.getNetworkaddress = function() {
   213    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
   214  };
   215  
   216  
   217  /**
   218   * @param {string} value
   219   * @return {!proto.registry.NodeIdentity} returns this
   220   */
   221  proto.registry.NodeIdentity.prototype.setNetworkaddress = function(value) {
   222    return jspb.Message.setProto3StringField(this, 2, value);
   223  };
   224  
   225  
   226  /**
   227   * optional bytes TendermintNodeID = 3;
   228   * @return {!(string|Uint8Array)}
   229   */
   230  proto.registry.NodeIdentity.prototype.getTendermintnodeid = function() {
   231    return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
   232  };
   233  
   234  
   235  /**
   236   * optional bytes TendermintNodeID = 3;
   237   * This is a type-conversion wrapper around `getTendermintnodeid()`
   238   * @return {string}
   239   */
   240  proto.registry.NodeIdentity.prototype.getTendermintnodeid_asB64 = function() {
   241    return /** @type {string} */ (jspb.Message.bytesAsB64(
   242        this.getTendermintnodeid()));
   243  };
   244  
   245  
   246  /**
   247   * optional bytes TendermintNodeID = 3;
   248   * Note that Uint8Array is not supported on all browsers.
   249   * @see http://caniuse.com/Uint8Array
   250   * This is a type-conversion wrapper around `getTendermintnodeid()`
   251   * @return {!Uint8Array}
   252   */
   253  proto.registry.NodeIdentity.prototype.getTendermintnodeid_asU8 = function() {
   254    return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
   255        this.getTendermintnodeid()));
   256  };
   257  
   258  
   259  /**
   260   * @param {!(string|Uint8Array)} value
   261   * @return {!proto.registry.NodeIdentity} returns this
   262   */
   263  proto.registry.NodeIdentity.prototype.setTendermintnodeid = function(value) {
   264    return jspb.Message.setProto3BytesField(this, 3, value);
   265  };
   266  
   267  
   268  /**
   269   * optional bytes ValidatorPublicKey = 4;
   270   * @return {!(string|Uint8Array)}
   271   */
   272  proto.registry.NodeIdentity.prototype.getValidatorpublickey = function() {
   273    return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
   274  };
   275  
   276  
   277  /**
   278   * optional bytes ValidatorPublicKey = 4;
   279   * This is a type-conversion wrapper around `getValidatorpublickey()`
   280   * @return {string}
   281   */
   282  proto.registry.NodeIdentity.prototype.getValidatorpublickey_asB64 = function() {
   283    return /** @type {string} */ (jspb.Message.bytesAsB64(
   284        this.getValidatorpublickey()));
   285  };
   286  
   287  
   288  /**
   289   * optional bytes ValidatorPublicKey = 4;
   290   * Note that Uint8Array is not supported on all browsers.
   291   * @see http://caniuse.com/Uint8Array
   292   * This is a type-conversion wrapper around `getValidatorpublickey()`
   293   * @return {!Uint8Array}
   294   */
   295  proto.registry.NodeIdentity.prototype.getValidatorpublickey_asU8 = function() {
   296    return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
   297        this.getValidatorpublickey()));
   298  };
   299  
   300  
   301  /**
   302   * @param {!(string|Uint8Array)} value
   303   * @return {!proto.registry.NodeIdentity} returns this
   304   */
   305  proto.registry.NodeIdentity.prototype.setValidatorpublickey = function(value) {
   306    return jspb.Message.setProto3BytesField(this, 4, value);
   307  };
   308  
   309  
   310  goog.object.extend(exports, proto.registry);