github.com/simpleiot/simpleiot@v0.18.3/frontend/lib/protobuf/node_pb.js (about)

     1  // source: node.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 =
    17      (typeof globalThis !== 'undefined' && globalThis) ||
    18      (typeof window !== 'undefined' && window) ||
    19      (typeof global !== 'undefined' && global) ||
    20      (typeof self !== 'undefined' && self) ||
    21      (function () { return this; }).call(null) ||
    22      Function('return this')();
    23  
    24  var point_pb = require('./point_pb.js');
    25  goog.object.extend(proto, point_pb);
    26  goog.exportSymbol('proto.pb.Node', null, global);
    27  goog.exportSymbol('proto.pb.NodeRequest', null, global);
    28  goog.exportSymbol('proto.pb.Nodes', null, global);
    29  goog.exportSymbol('proto.pb.NodesRequest', null, global);
    30  /**
    31   * Generated by JsPbCodeGenerator.
    32   * @param {Array=} opt_data Optional initial data array, typically from a
    33   * server response, or constructed directly in Javascript. The array is used
    34   * in place and becomes part of the constructed object. It is not cloned.
    35   * If no data is provided, the constructed object will be empty, but still
    36   * valid.
    37   * @extends {jspb.Message}
    38   * @constructor
    39   */
    40  proto.pb.Node = function(opt_data) {
    41    jspb.Message.initialize(this, opt_data, 0, -1, proto.pb.Node.repeatedFields_, null);
    42  };
    43  goog.inherits(proto.pb.Node, jspb.Message);
    44  if (goog.DEBUG && !COMPILED) {
    45    /**
    46     * @public
    47     * @override
    48     */
    49    proto.pb.Node.displayName = 'proto.pb.Node';
    50  }
    51  /**
    52   * Generated by JsPbCodeGenerator.
    53   * @param {Array=} opt_data Optional initial data array, typically from a
    54   * server response, or constructed directly in Javascript. The array is used
    55   * in place and becomes part of the constructed object. It is not cloned.
    56   * If no data is provided, the constructed object will be empty, but still
    57   * valid.
    58   * @extends {jspb.Message}
    59   * @constructor
    60   */
    61  proto.pb.NodeRequest = function(opt_data) {
    62    jspb.Message.initialize(this, opt_data, 0, -1, null, null);
    63  };
    64  goog.inherits(proto.pb.NodeRequest, jspb.Message);
    65  if (goog.DEBUG && !COMPILED) {
    66    /**
    67     * @public
    68     * @override
    69     */
    70    proto.pb.NodeRequest.displayName = 'proto.pb.NodeRequest';
    71  }
    72  /**
    73   * Generated by JsPbCodeGenerator.
    74   * @param {Array=} opt_data Optional initial data array, typically from a
    75   * server response, or constructed directly in Javascript. The array is used
    76   * in place and becomes part of the constructed object. It is not cloned.
    77   * If no data is provided, the constructed object will be empty, but still
    78   * valid.
    79   * @extends {jspb.Message}
    80   * @constructor
    81   */
    82  proto.pb.Nodes = function(opt_data) {
    83    jspb.Message.initialize(this, opt_data, 0, -1, proto.pb.Nodes.repeatedFields_, null);
    84  };
    85  goog.inherits(proto.pb.Nodes, jspb.Message);
    86  if (goog.DEBUG && !COMPILED) {
    87    /**
    88     * @public
    89     * @override
    90     */
    91    proto.pb.Nodes.displayName = 'proto.pb.Nodes';
    92  }
    93  /**
    94   * Generated by JsPbCodeGenerator.
    95   * @param {Array=} opt_data Optional initial data array, typically from a
    96   * server response, or constructed directly in Javascript. The array is used
    97   * in place and becomes part of the constructed object. It is not cloned.
    98   * If no data is provided, the constructed object will be empty, but still
    99   * valid.
   100   * @extends {jspb.Message}
   101   * @constructor
   102   */
   103  proto.pb.NodesRequest = function(opt_data) {
   104    jspb.Message.initialize(this, opt_data, 0, -1, proto.pb.NodesRequest.repeatedFields_, null);
   105  };
   106  goog.inherits(proto.pb.NodesRequest, jspb.Message);
   107  if (goog.DEBUG && !COMPILED) {
   108    /**
   109     * @public
   110     * @override
   111     */
   112    proto.pb.NodesRequest.displayName = 'proto.pb.NodesRequest';
   113  }
   114  
   115  /**
   116   * List of repeated fields within this message type.
   117   * @private {!Array<number>}
   118   * @const
   119   */
   120  proto.pb.Node.repeatedFields_ = [3,7];
   121  
   122  
   123  
   124  if (jspb.Message.GENERATE_TO_OBJECT) {
   125  /**
   126   * Creates an object representation of this proto.
   127   * Field names that are reserved in JavaScript and will be renamed to pb_name.
   128   * Optional fields that are not set will be set to undefined.
   129   * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
   130   * For the list of reserved names please see:
   131   *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
   132   * @param {boolean=} opt_includeInstance Deprecated. whether to include the
   133   *     JSPB instance for transitional soy proto support:
   134   *     http://goto/soy-param-migration
   135   * @return {!Object}
   136   */
   137  proto.pb.Node.prototype.toObject = function(opt_includeInstance) {
   138    return proto.pb.Node.toObject(opt_includeInstance, this);
   139  };
   140  
   141  
   142  /**
   143   * Static version of the {@see toObject} method.
   144   * @param {boolean|undefined} includeInstance Deprecated. Whether to include
   145   *     the JSPB instance for transitional soy proto support:
   146   *     http://goto/soy-param-migration
   147   * @param {!proto.pb.Node} msg The msg instance to transform.
   148   * @return {!Object}
   149   * @suppress {unusedLocalVariables} f is only used for nested messages
   150   */
   151  proto.pb.Node.toObject = function(includeInstance, msg) {
   152    var f, obj = {
   153      id: jspb.Message.getFieldWithDefault(msg, 1, ""),
   154      type: jspb.Message.getFieldWithDefault(msg, 2, ""),
   155      hash: jspb.Message.getFieldWithDefault(msg, 4, 0),
   156      parent: jspb.Message.getFieldWithDefault(msg, 6, ""),
   157      pointsList: jspb.Message.toObjectList(msg.getPointsList(),
   158      point_pb.Point.toObject, includeInstance),
   159      edgepointsList: jspb.Message.toObjectList(msg.getEdgepointsList(),
   160      point_pb.Point.toObject, includeInstance)
   161    };
   162  
   163    if (includeInstance) {
   164      obj.$jspbMessageInstance = msg;
   165    }
   166    return obj;
   167  };
   168  }
   169  
   170  
   171  /**
   172   * Deserializes binary data (in protobuf wire format).
   173   * @param {jspb.ByteSource} bytes The bytes to deserialize.
   174   * @return {!proto.pb.Node}
   175   */
   176  proto.pb.Node.deserializeBinary = function(bytes) {
   177    var reader = new jspb.BinaryReader(bytes);
   178    var msg = new proto.pb.Node;
   179    return proto.pb.Node.deserializeBinaryFromReader(msg, reader);
   180  };
   181  
   182  
   183  /**
   184   * Deserializes binary data (in protobuf wire format) from the
   185   * given reader into the given message object.
   186   * @param {!proto.pb.Node} msg The message object to deserialize into.
   187   * @param {!jspb.BinaryReader} reader The BinaryReader to use.
   188   * @return {!proto.pb.Node}
   189   */
   190  proto.pb.Node.deserializeBinaryFromReader = function(msg, reader) {
   191    while (reader.nextField()) {
   192      if (reader.isEndGroup()) {
   193        break;
   194      }
   195      var field = reader.getFieldNumber();
   196      switch (field) {
   197      case 1:
   198        var value = /** @type {string} */ (reader.readString());
   199        msg.setId(value);
   200        break;
   201      case 2:
   202        var value = /** @type {string} */ (reader.readString());
   203        msg.setType(value);
   204        break;
   205      case 4:
   206        var value = /** @type {number} */ (reader.readInt32());
   207        msg.setHash(value);
   208        break;
   209      case 6:
   210        var value = /** @type {string} */ (reader.readString());
   211        msg.setParent(value);
   212        break;
   213      case 3:
   214        var value = new point_pb.Point;
   215        reader.readMessage(value,point_pb.Point.deserializeBinaryFromReader);
   216        msg.addPoints(value);
   217        break;
   218      case 7:
   219        var value = new point_pb.Point;
   220        reader.readMessage(value,point_pb.Point.deserializeBinaryFromReader);
   221        msg.addEdgepoints(value);
   222        break;
   223      default:
   224        reader.skipField();
   225        break;
   226      }
   227    }
   228    return msg;
   229  };
   230  
   231  
   232  /**
   233   * Serializes the message to binary data (in protobuf wire format).
   234   * @return {!Uint8Array}
   235   */
   236  proto.pb.Node.prototype.serializeBinary = function() {
   237    var writer = new jspb.BinaryWriter();
   238    proto.pb.Node.serializeBinaryToWriter(this, writer);
   239    return writer.getResultBuffer();
   240  };
   241  
   242  
   243  /**
   244   * Serializes the given message to binary data (in protobuf wire
   245   * format), writing to the given BinaryWriter.
   246   * @param {!proto.pb.Node} message
   247   * @param {!jspb.BinaryWriter} writer
   248   * @suppress {unusedLocalVariables} f is only used for nested messages
   249   */
   250  proto.pb.Node.serializeBinaryToWriter = function(message, writer) {
   251    var f = undefined;
   252    f = message.getId();
   253    if (f.length > 0) {
   254      writer.writeString(
   255        1,
   256        f
   257      );
   258    }
   259    f = message.getType();
   260    if (f.length > 0) {
   261      writer.writeString(
   262        2,
   263        f
   264      );
   265    }
   266    f = message.getHash();
   267    if (f !== 0) {
   268      writer.writeInt32(
   269        4,
   270        f
   271      );
   272    }
   273    f = message.getParent();
   274    if (f.length > 0) {
   275      writer.writeString(
   276        6,
   277        f
   278      );
   279    }
   280    f = message.getPointsList();
   281    if (f.length > 0) {
   282      writer.writeRepeatedMessage(
   283        3,
   284        f,
   285        point_pb.Point.serializeBinaryToWriter
   286      );
   287    }
   288    f = message.getEdgepointsList();
   289    if (f.length > 0) {
   290      writer.writeRepeatedMessage(
   291        7,
   292        f,
   293        point_pb.Point.serializeBinaryToWriter
   294      );
   295    }
   296  };
   297  
   298  
   299  /**
   300   * optional string id = 1;
   301   * @return {string}
   302   */
   303  proto.pb.Node.prototype.getId = function() {
   304    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
   305  };
   306  
   307  
   308  /**
   309   * @param {string} value
   310   * @return {!proto.pb.Node} returns this
   311   */
   312  proto.pb.Node.prototype.setId = function(value) {
   313    return jspb.Message.setProto3StringField(this, 1, value);
   314  };
   315  
   316  
   317  /**
   318   * optional string type = 2;
   319   * @return {string}
   320   */
   321  proto.pb.Node.prototype.getType = function() {
   322    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
   323  };
   324  
   325  
   326  /**
   327   * @param {string} value
   328   * @return {!proto.pb.Node} returns this
   329   */
   330  proto.pb.Node.prototype.setType = function(value) {
   331    return jspb.Message.setProto3StringField(this, 2, value);
   332  };
   333  
   334  
   335  /**
   336   * optional int32 hash = 4;
   337   * @return {number}
   338   */
   339  proto.pb.Node.prototype.getHash = function() {
   340    return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
   341  };
   342  
   343  
   344  /**
   345   * @param {number} value
   346   * @return {!proto.pb.Node} returns this
   347   */
   348  proto.pb.Node.prototype.setHash = function(value) {
   349    return jspb.Message.setProto3IntField(this, 4, value);
   350  };
   351  
   352  
   353  /**
   354   * optional string parent = 6;
   355   * @return {string}
   356   */
   357  proto.pb.Node.prototype.getParent = function() {
   358    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, ""));
   359  };
   360  
   361  
   362  /**
   363   * @param {string} value
   364   * @return {!proto.pb.Node} returns this
   365   */
   366  proto.pb.Node.prototype.setParent = function(value) {
   367    return jspb.Message.setProto3StringField(this, 6, value);
   368  };
   369  
   370  
   371  /**
   372   * repeated Point points = 3;
   373   * @return {!Array<!proto.pb.Point>}
   374   */
   375  proto.pb.Node.prototype.getPointsList = function() {
   376    return /** @type{!Array<!proto.pb.Point>} */ (
   377      jspb.Message.getRepeatedWrapperField(this, point_pb.Point, 3));
   378  };
   379  
   380  
   381  /**
   382   * @param {!Array<!proto.pb.Point>} value
   383   * @return {!proto.pb.Node} returns this
   384  */
   385  proto.pb.Node.prototype.setPointsList = function(value) {
   386    return jspb.Message.setRepeatedWrapperField(this, 3, value);
   387  };
   388  
   389  
   390  /**
   391   * @param {!proto.pb.Point=} opt_value
   392   * @param {number=} opt_index
   393   * @return {!proto.pb.Point}
   394   */
   395  proto.pb.Node.prototype.addPoints = function(opt_value, opt_index) {
   396    return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.pb.Point, opt_index);
   397  };
   398  
   399  
   400  /**
   401   * Clears the list making it empty but non-null.
   402   * @return {!proto.pb.Node} returns this
   403   */
   404  proto.pb.Node.prototype.clearPointsList = function() {
   405    return this.setPointsList([]);
   406  };
   407  
   408  
   409  /**
   410   * repeated Point edgePoints = 7;
   411   * @return {!Array<!proto.pb.Point>}
   412   */
   413  proto.pb.Node.prototype.getEdgepointsList = function() {
   414    return /** @type{!Array<!proto.pb.Point>} */ (
   415      jspb.Message.getRepeatedWrapperField(this, point_pb.Point, 7));
   416  };
   417  
   418  
   419  /**
   420   * @param {!Array<!proto.pb.Point>} value
   421   * @return {!proto.pb.Node} returns this
   422  */
   423  proto.pb.Node.prototype.setEdgepointsList = function(value) {
   424    return jspb.Message.setRepeatedWrapperField(this, 7, value);
   425  };
   426  
   427  
   428  /**
   429   * @param {!proto.pb.Point=} opt_value
   430   * @param {number=} opt_index
   431   * @return {!proto.pb.Point}
   432   */
   433  proto.pb.Node.prototype.addEdgepoints = function(opt_value, opt_index) {
   434    return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.pb.Point, opt_index);
   435  };
   436  
   437  
   438  /**
   439   * Clears the list making it empty but non-null.
   440   * @return {!proto.pb.Node} returns this
   441   */
   442  proto.pb.Node.prototype.clearEdgepointsList = function() {
   443    return this.setEdgepointsList([]);
   444  };
   445  
   446  
   447  
   448  
   449  
   450  if (jspb.Message.GENERATE_TO_OBJECT) {
   451  /**
   452   * Creates an object representation of this proto.
   453   * Field names that are reserved in JavaScript and will be renamed to pb_name.
   454   * Optional fields that are not set will be set to undefined.
   455   * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
   456   * For the list of reserved names please see:
   457   *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
   458   * @param {boolean=} opt_includeInstance Deprecated. whether to include the
   459   *     JSPB instance for transitional soy proto support:
   460   *     http://goto/soy-param-migration
   461   * @return {!Object}
   462   */
   463  proto.pb.NodeRequest.prototype.toObject = function(opt_includeInstance) {
   464    return proto.pb.NodeRequest.toObject(opt_includeInstance, this);
   465  };
   466  
   467  
   468  /**
   469   * Static version of the {@see toObject} method.
   470   * @param {boolean|undefined} includeInstance Deprecated. Whether to include
   471   *     the JSPB instance for transitional soy proto support:
   472   *     http://goto/soy-param-migration
   473   * @param {!proto.pb.NodeRequest} msg The msg instance to transform.
   474   * @return {!Object}
   475   * @suppress {unusedLocalVariables} f is only used for nested messages
   476   */
   477  proto.pb.NodeRequest.toObject = function(includeInstance, msg) {
   478    var f, obj = {
   479      node: (f = msg.getNode()) && proto.pb.Node.toObject(includeInstance, f),
   480      error: jspb.Message.getFieldWithDefault(msg, 2, "")
   481    };
   482  
   483    if (includeInstance) {
   484      obj.$jspbMessageInstance = msg;
   485    }
   486    return obj;
   487  };
   488  }
   489  
   490  
   491  /**
   492   * Deserializes binary data (in protobuf wire format).
   493   * @param {jspb.ByteSource} bytes The bytes to deserialize.
   494   * @return {!proto.pb.NodeRequest}
   495   */
   496  proto.pb.NodeRequest.deserializeBinary = function(bytes) {
   497    var reader = new jspb.BinaryReader(bytes);
   498    var msg = new proto.pb.NodeRequest;
   499    return proto.pb.NodeRequest.deserializeBinaryFromReader(msg, reader);
   500  };
   501  
   502  
   503  /**
   504   * Deserializes binary data (in protobuf wire format) from the
   505   * given reader into the given message object.
   506   * @param {!proto.pb.NodeRequest} msg The message object to deserialize into.
   507   * @param {!jspb.BinaryReader} reader The BinaryReader to use.
   508   * @return {!proto.pb.NodeRequest}
   509   */
   510  proto.pb.NodeRequest.deserializeBinaryFromReader = function(msg, reader) {
   511    while (reader.nextField()) {
   512      if (reader.isEndGroup()) {
   513        break;
   514      }
   515      var field = reader.getFieldNumber();
   516      switch (field) {
   517      case 1:
   518        var value = new proto.pb.Node;
   519        reader.readMessage(value,proto.pb.Node.deserializeBinaryFromReader);
   520        msg.setNode(value);
   521        break;
   522      case 2:
   523        var value = /** @type {string} */ (reader.readString());
   524        msg.setError(value);
   525        break;
   526      default:
   527        reader.skipField();
   528        break;
   529      }
   530    }
   531    return msg;
   532  };
   533  
   534  
   535  /**
   536   * Serializes the message to binary data (in protobuf wire format).
   537   * @return {!Uint8Array}
   538   */
   539  proto.pb.NodeRequest.prototype.serializeBinary = function() {
   540    var writer = new jspb.BinaryWriter();
   541    proto.pb.NodeRequest.serializeBinaryToWriter(this, writer);
   542    return writer.getResultBuffer();
   543  };
   544  
   545  
   546  /**
   547   * Serializes the given message to binary data (in protobuf wire
   548   * format), writing to the given BinaryWriter.
   549   * @param {!proto.pb.NodeRequest} message
   550   * @param {!jspb.BinaryWriter} writer
   551   * @suppress {unusedLocalVariables} f is only used for nested messages
   552   */
   553  proto.pb.NodeRequest.serializeBinaryToWriter = function(message, writer) {
   554    var f = undefined;
   555    f = message.getNode();
   556    if (f != null) {
   557      writer.writeMessage(
   558        1,
   559        f,
   560        proto.pb.Node.serializeBinaryToWriter
   561      );
   562    }
   563    f = message.getError();
   564    if (f.length > 0) {
   565      writer.writeString(
   566        2,
   567        f
   568      );
   569    }
   570  };
   571  
   572  
   573  /**
   574   * optional Node node = 1;
   575   * @return {?proto.pb.Node}
   576   */
   577  proto.pb.NodeRequest.prototype.getNode = function() {
   578    return /** @type{?proto.pb.Node} */ (
   579      jspb.Message.getWrapperField(this, proto.pb.Node, 1));
   580  };
   581  
   582  
   583  /**
   584   * @param {?proto.pb.Node|undefined} value
   585   * @return {!proto.pb.NodeRequest} returns this
   586  */
   587  proto.pb.NodeRequest.prototype.setNode = function(value) {
   588    return jspb.Message.setWrapperField(this, 1, value);
   589  };
   590  
   591  
   592  /**
   593   * Clears the message field making it undefined.
   594   * @return {!proto.pb.NodeRequest} returns this
   595   */
   596  proto.pb.NodeRequest.prototype.clearNode = function() {
   597    return this.setNode(undefined);
   598  };
   599  
   600  
   601  /**
   602   * Returns whether this field is set.
   603   * @return {boolean}
   604   */
   605  proto.pb.NodeRequest.prototype.hasNode = function() {
   606    return jspb.Message.getField(this, 1) != null;
   607  };
   608  
   609  
   610  /**
   611   * optional string error = 2;
   612   * @return {string}
   613   */
   614  proto.pb.NodeRequest.prototype.getError = function() {
   615    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
   616  };
   617  
   618  
   619  /**
   620   * @param {string} value
   621   * @return {!proto.pb.NodeRequest} returns this
   622   */
   623  proto.pb.NodeRequest.prototype.setError = function(value) {
   624    return jspb.Message.setProto3StringField(this, 2, value);
   625  };
   626  
   627  
   628  
   629  /**
   630   * List of repeated fields within this message type.
   631   * @private {!Array<number>}
   632   * @const
   633   */
   634  proto.pb.Nodes.repeatedFields_ = [1];
   635  
   636  
   637  
   638  if (jspb.Message.GENERATE_TO_OBJECT) {
   639  /**
   640   * Creates an object representation of this proto.
   641   * Field names that are reserved in JavaScript and will be renamed to pb_name.
   642   * Optional fields that are not set will be set to undefined.
   643   * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
   644   * For the list of reserved names please see:
   645   *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
   646   * @param {boolean=} opt_includeInstance Deprecated. whether to include the
   647   *     JSPB instance for transitional soy proto support:
   648   *     http://goto/soy-param-migration
   649   * @return {!Object}
   650   */
   651  proto.pb.Nodes.prototype.toObject = function(opt_includeInstance) {
   652    return proto.pb.Nodes.toObject(opt_includeInstance, this);
   653  };
   654  
   655  
   656  /**
   657   * Static version of the {@see toObject} method.
   658   * @param {boolean|undefined} includeInstance Deprecated. Whether to include
   659   *     the JSPB instance for transitional soy proto support:
   660   *     http://goto/soy-param-migration
   661   * @param {!proto.pb.Nodes} msg The msg instance to transform.
   662   * @return {!Object}
   663   * @suppress {unusedLocalVariables} f is only used for nested messages
   664   */
   665  proto.pb.Nodes.toObject = function(includeInstance, msg) {
   666    var f, obj = {
   667      nodesList: jspb.Message.toObjectList(msg.getNodesList(),
   668      proto.pb.Node.toObject, includeInstance)
   669    };
   670  
   671    if (includeInstance) {
   672      obj.$jspbMessageInstance = msg;
   673    }
   674    return obj;
   675  };
   676  }
   677  
   678  
   679  /**
   680   * Deserializes binary data (in protobuf wire format).
   681   * @param {jspb.ByteSource} bytes The bytes to deserialize.
   682   * @return {!proto.pb.Nodes}
   683   */
   684  proto.pb.Nodes.deserializeBinary = function(bytes) {
   685    var reader = new jspb.BinaryReader(bytes);
   686    var msg = new proto.pb.Nodes;
   687    return proto.pb.Nodes.deserializeBinaryFromReader(msg, reader);
   688  };
   689  
   690  
   691  /**
   692   * Deserializes binary data (in protobuf wire format) from the
   693   * given reader into the given message object.
   694   * @param {!proto.pb.Nodes} msg The message object to deserialize into.
   695   * @param {!jspb.BinaryReader} reader The BinaryReader to use.
   696   * @return {!proto.pb.Nodes}
   697   */
   698  proto.pb.Nodes.deserializeBinaryFromReader = function(msg, reader) {
   699    while (reader.nextField()) {
   700      if (reader.isEndGroup()) {
   701        break;
   702      }
   703      var field = reader.getFieldNumber();
   704      switch (field) {
   705      case 1:
   706        var value = new proto.pb.Node;
   707        reader.readMessage(value,proto.pb.Node.deserializeBinaryFromReader);
   708        msg.addNodes(value);
   709        break;
   710      default:
   711        reader.skipField();
   712        break;
   713      }
   714    }
   715    return msg;
   716  };
   717  
   718  
   719  /**
   720   * Serializes the message to binary data (in protobuf wire format).
   721   * @return {!Uint8Array}
   722   */
   723  proto.pb.Nodes.prototype.serializeBinary = function() {
   724    var writer = new jspb.BinaryWriter();
   725    proto.pb.Nodes.serializeBinaryToWriter(this, writer);
   726    return writer.getResultBuffer();
   727  };
   728  
   729  
   730  /**
   731   * Serializes the given message to binary data (in protobuf wire
   732   * format), writing to the given BinaryWriter.
   733   * @param {!proto.pb.Nodes} message
   734   * @param {!jspb.BinaryWriter} writer
   735   * @suppress {unusedLocalVariables} f is only used for nested messages
   736   */
   737  proto.pb.Nodes.serializeBinaryToWriter = function(message, writer) {
   738    var f = undefined;
   739    f = message.getNodesList();
   740    if (f.length > 0) {
   741      writer.writeRepeatedMessage(
   742        1,
   743        f,
   744        proto.pb.Node.serializeBinaryToWriter
   745      );
   746    }
   747  };
   748  
   749  
   750  /**
   751   * repeated Node nodes = 1;
   752   * @return {!Array<!proto.pb.Node>}
   753   */
   754  proto.pb.Nodes.prototype.getNodesList = function() {
   755    return /** @type{!Array<!proto.pb.Node>} */ (
   756      jspb.Message.getRepeatedWrapperField(this, proto.pb.Node, 1));
   757  };
   758  
   759  
   760  /**
   761   * @param {!Array<!proto.pb.Node>} value
   762   * @return {!proto.pb.Nodes} returns this
   763  */
   764  proto.pb.Nodes.prototype.setNodesList = function(value) {
   765    return jspb.Message.setRepeatedWrapperField(this, 1, value);
   766  };
   767  
   768  
   769  /**
   770   * @param {!proto.pb.Node=} opt_value
   771   * @param {number=} opt_index
   772   * @return {!proto.pb.Node}
   773   */
   774  proto.pb.Nodes.prototype.addNodes = function(opt_value, opt_index) {
   775    return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pb.Node, opt_index);
   776  };
   777  
   778  
   779  /**
   780   * Clears the list making it empty but non-null.
   781   * @return {!proto.pb.Nodes} returns this
   782   */
   783  proto.pb.Nodes.prototype.clearNodesList = function() {
   784    return this.setNodesList([]);
   785  };
   786  
   787  
   788  
   789  /**
   790   * List of repeated fields within this message type.
   791   * @private {!Array<number>}
   792   * @const
   793   */
   794  proto.pb.NodesRequest.repeatedFields_ = [1];
   795  
   796  
   797  
   798  if (jspb.Message.GENERATE_TO_OBJECT) {
   799  /**
   800   * Creates an object representation of this proto.
   801   * Field names that are reserved in JavaScript and will be renamed to pb_name.
   802   * Optional fields that are not set will be set to undefined.
   803   * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
   804   * For the list of reserved names please see:
   805   *     net/proto2/compiler/js/internal/generator.cc#kKeyword.
   806   * @param {boolean=} opt_includeInstance Deprecated. whether to include the
   807   *     JSPB instance for transitional soy proto support:
   808   *     http://goto/soy-param-migration
   809   * @return {!Object}
   810   */
   811  proto.pb.NodesRequest.prototype.toObject = function(opt_includeInstance) {
   812    return proto.pb.NodesRequest.toObject(opt_includeInstance, this);
   813  };
   814  
   815  
   816  /**
   817   * Static version of the {@see toObject} method.
   818   * @param {boolean|undefined} includeInstance Deprecated. Whether to include
   819   *     the JSPB instance for transitional soy proto support:
   820   *     http://goto/soy-param-migration
   821   * @param {!proto.pb.NodesRequest} msg The msg instance to transform.
   822   * @return {!Object}
   823   * @suppress {unusedLocalVariables} f is only used for nested messages
   824   */
   825  proto.pb.NodesRequest.toObject = function(includeInstance, msg) {
   826    var f, obj = {
   827      nodesList: jspb.Message.toObjectList(msg.getNodesList(),
   828      proto.pb.Node.toObject, includeInstance),
   829      error: jspb.Message.getFieldWithDefault(msg, 2, "")
   830    };
   831  
   832    if (includeInstance) {
   833      obj.$jspbMessageInstance = msg;
   834    }
   835    return obj;
   836  };
   837  }
   838  
   839  
   840  /**
   841   * Deserializes binary data (in protobuf wire format).
   842   * @param {jspb.ByteSource} bytes The bytes to deserialize.
   843   * @return {!proto.pb.NodesRequest}
   844   */
   845  proto.pb.NodesRequest.deserializeBinary = function(bytes) {
   846    var reader = new jspb.BinaryReader(bytes);
   847    var msg = new proto.pb.NodesRequest;
   848    return proto.pb.NodesRequest.deserializeBinaryFromReader(msg, reader);
   849  };
   850  
   851  
   852  /**
   853   * Deserializes binary data (in protobuf wire format) from the
   854   * given reader into the given message object.
   855   * @param {!proto.pb.NodesRequest} msg The message object to deserialize into.
   856   * @param {!jspb.BinaryReader} reader The BinaryReader to use.
   857   * @return {!proto.pb.NodesRequest}
   858   */
   859  proto.pb.NodesRequest.deserializeBinaryFromReader = function(msg, reader) {
   860    while (reader.nextField()) {
   861      if (reader.isEndGroup()) {
   862        break;
   863      }
   864      var field = reader.getFieldNumber();
   865      switch (field) {
   866      case 1:
   867        var value = new proto.pb.Node;
   868        reader.readMessage(value,proto.pb.Node.deserializeBinaryFromReader);
   869        msg.addNodes(value);
   870        break;
   871      case 2:
   872        var value = /** @type {string} */ (reader.readString());
   873        msg.setError(value);
   874        break;
   875      default:
   876        reader.skipField();
   877        break;
   878      }
   879    }
   880    return msg;
   881  };
   882  
   883  
   884  /**
   885   * Serializes the message to binary data (in protobuf wire format).
   886   * @return {!Uint8Array}
   887   */
   888  proto.pb.NodesRequest.prototype.serializeBinary = function() {
   889    var writer = new jspb.BinaryWriter();
   890    proto.pb.NodesRequest.serializeBinaryToWriter(this, writer);
   891    return writer.getResultBuffer();
   892  };
   893  
   894  
   895  /**
   896   * Serializes the given message to binary data (in protobuf wire
   897   * format), writing to the given BinaryWriter.
   898   * @param {!proto.pb.NodesRequest} message
   899   * @param {!jspb.BinaryWriter} writer
   900   * @suppress {unusedLocalVariables} f is only used for nested messages
   901   */
   902  proto.pb.NodesRequest.serializeBinaryToWriter = function(message, writer) {
   903    var f = undefined;
   904    f = message.getNodesList();
   905    if (f.length > 0) {
   906      writer.writeRepeatedMessage(
   907        1,
   908        f,
   909        proto.pb.Node.serializeBinaryToWriter
   910      );
   911    }
   912    f = message.getError();
   913    if (f.length > 0) {
   914      writer.writeString(
   915        2,
   916        f
   917      );
   918    }
   919  };
   920  
   921  
   922  /**
   923   * repeated Node nodes = 1;
   924   * @return {!Array<!proto.pb.Node>}
   925   */
   926  proto.pb.NodesRequest.prototype.getNodesList = function() {
   927    return /** @type{!Array<!proto.pb.Node>} */ (
   928      jspb.Message.getRepeatedWrapperField(this, proto.pb.Node, 1));
   929  };
   930  
   931  
   932  /**
   933   * @param {!Array<!proto.pb.Node>} value
   934   * @return {!proto.pb.NodesRequest} returns this
   935  */
   936  proto.pb.NodesRequest.prototype.setNodesList = function(value) {
   937    return jspb.Message.setRepeatedWrapperField(this, 1, value);
   938  };
   939  
   940  
   941  /**
   942   * @param {!proto.pb.Node=} opt_value
   943   * @param {number=} opt_index
   944   * @return {!proto.pb.Node}
   945   */
   946  proto.pb.NodesRequest.prototype.addNodes = function(opt_value, opt_index) {
   947    return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pb.Node, opt_index);
   948  };
   949  
   950  
   951  /**
   952   * Clears the list making it empty but non-null.
   953   * @return {!proto.pb.NodesRequest} returns this
   954   */
   955  proto.pb.NodesRequest.prototype.clearNodesList = function() {
   956    return this.setNodesList([]);
   957  };
   958  
   959  
   960  /**
   961   * optional string error = 2;
   962   * @return {string}
   963   */
   964  proto.pb.NodesRequest.prototype.getError = function() {
   965    return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
   966  };
   967  
   968  
   969  /**
   970   * @param {string} value
   971   * @return {!proto.pb.NodesRequest} returns this
   972   */
   973  proto.pb.NodesRequest.prototype.setError = function(value) {
   974    return jspb.Message.setProto3StringField(this, 2, value);
   975  };
   976  
   977  
   978  goog.object.extend(exports, proto.pb);