UNPKG

hyperdrive-daemon-client

Version:

A client library and CLI tool for interacting with the Hyperdrive daemon.

1,564 lines (1,343 loc) 328 kB
/** * @fileoverview * @enhanceable * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); var daemon_common_pb = require('../daemon/common_pb.js'); goog.object.extend(proto, daemon_common_pb); var hyperdrive_pb = require('../hyperdrive_pb.js'); goog.object.extend(proto, hyperdrive_pb); goog.exportSymbol('proto.ActiveRequest', null, global); goog.exportSymbol('proto.ActiveResponse', null, global); goog.exportSymbol('proto.CloseRequest', null, global); goog.exportSymbol('proto.CloseResponse', null, global); goog.exportSymbol('proto.CloseSessionRequest', null, global); goog.exportSymbol('proto.CloseSessionResponse', null, global); goog.exportSymbol('proto.ConfigureNetworkRequest', null, global); goog.exportSymbol('proto.ConfigureNetworkResponse', null, global); goog.exportSymbol('proto.DeleteMetadataRequest', null, global); goog.exportSymbol('proto.DeleteMetadataResponse', null, global); goog.exportSymbol('proto.DiffStreamRequest', null, global); goog.exportSymbol('proto.DiffStreamResponse', null, global); goog.exportSymbol('proto.DownloadRequest', null, global); goog.exportSymbol('proto.DownloadResponse', null, global); goog.exportSymbol('proto.DriveMountsRequest', null, global); goog.exportSymbol('proto.DriveMountsResponse', null, global); goog.exportSymbol('proto.DriveStatsRequest', null, global); goog.exportSymbol('proto.DriveStatsResponse', null, global); goog.exportSymbol('proto.DriveVersionRequest', null, global); goog.exportSymbol('proto.DriveVersionResponse', null, global); goog.exportSymbol('proto.FileStatsRequest', null, global); goog.exportSymbol('proto.FileStatsResponse', null, global); goog.exportSymbol('proto.GetDriveRequest', null, global); goog.exportSymbol('proto.GetDriveResponse', null, global); goog.exportSymbol('proto.MkdirRequest', null, global); goog.exportSymbol('proto.MkdirResponse', null, global); goog.exportSymbol('proto.MountDriveRequest', null, global); goog.exportSymbol('proto.MountDriveResponse', null, global); goog.exportSymbol('proto.NetworkConfigurationsRequest', null, global); goog.exportSymbol('proto.NetworkConfigurationsResponse', null, global); goog.exportSymbol('proto.OpenRequest', null, global); goog.exportSymbol('proto.OpenResponse', null, global); goog.exportSymbol('proto.PeerCountsRequest', null, global); goog.exportSymbol('proto.PeerCountsResponse', null, global); goog.exportSymbol('proto.ReadDirectoryRequest', null, global); goog.exportSymbol('proto.ReadDirectoryResponse', null, global); goog.exportSymbol('proto.ReadFileRequest', null, global); goog.exportSymbol('proto.ReadFileResponse', null, global); goog.exportSymbol('proto.ReadRequest', null, global); goog.exportSymbol('proto.ReadResponse', null, global); goog.exportSymbol('proto.ReadStreamRequest', null, global); goog.exportSymbol('proto.ReadStreamResponse', null, global); goog.exportSymbol('proto.RmdirRequest', null, global); goog.exportSymbol('proto.RmdirResponse', null, global); goog.exportSymbol('proto.StatRequest', null, global); goog.exportSymbol('proto.StatResponse', null, global); goog.exportSymbol('proto.StatsRequest', null, global); goog.exportSymbol('proto.StatsResponse', null, global); goog.exportSymbol('proto.SymlinkRequest', null, global); goog.exportSymbol('proto.SymlinkResponse', null, global); goog.exportSymbol('proto.UndownloadRequest', null, global); goog.exportSymbol('proto.UndownloadResponse', null, global); goog.exportSymbol('proto.UnlinkRequest', null, global); goog.exportSymbol('proto.UnlinkResponse', null, global); goog.exportSymbol('proto.UnmountDriveRequest', null, global); goog.exportSymbol('proto.UnmountDriveResponse', null, global); goog.exportSymbol('proto.UpdateMetadataRequest', null, global); goog.exportSymbol('proto.UpdateMetadataResponse', null, global); goog.exportSymbol('proto.WatchRequest', null, global); goog.exportSymbol('proto.WatchResponse', null, global); goog.exportSymbol('proto.WriteFileRequest', null, global); goog.exportSymbol('proto.WriteFileResponse', null, global); goog.exportSymbol('proto.WriteRequest', null, global); goog.exportSymbol('proto.WriteResponse', null, global); goog.exportSymbol('proto.WriteStreamRequest', null, global); goog.exportSymbol('proto.WriteStreamResponse', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.GetDriveRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.GetDriveRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.GetDriveRequest.displayName = 'proto.GetDriveRequest'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.GetDriveRequest.prototype.toObject = function(opt_includeInstance) { return proto.GetDriveRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.GetDriveRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.GetDriveRequest.toObject = function(includeInstance, msg) { var f, obj = { opts: (f = msg.getOpts()) && daemon_common_pb.HyperdriveOptions.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.GetDriveRequest} */ proto.GetDriveRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.GetDriveRequest; return proto.GetDriveRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.GetDriveRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.GetDriveRequest} */ proto.GetDriveRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new daemon_common_pb.HyperdriveOptions; reader.readMessage(value,daemon_common_pb.HyperdriveOptions.deserializeBinaryFromReader); msg.setOpts(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.GetDriveRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.GetDriveRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.GetDriveRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.GetDriveRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getOpts(); if (f != null) { writer.writeMessage( 1, f, daemon_common_pb.HyperdriveOptions.serializeBinaryToWriter ); } }; /** * optional HyperdriveOptions opts = 1; * @return {?proto.HyperdriveOptions} */ proto.GetDriveRequest.prototype.getOpts = function() { return /** @type{?proto.HyperdriveOptions} */ ( jspb.Message.getWrapperField(this, daemon_common_pb.HyperdriveOptions, 1)); }; /** @param {?proto.HyperdriveOptions|undefined} value */ proto.GetDriveRequest.prototype.setOpts = function(value) { jspb.Message.setWrapperField(this, 1, value); }; proto.GetDriveRequest.prototype.clearOpts = function() { this.setOpts(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.GetDriveRequest.prototype.hasOpts = function() { return jspb.Message.getField(this, 1) != null; }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.GetDriveResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.GetDriveResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.GetDriveResponse.displayName = 'proto.GetDriveResponse'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.GetDriveResponse.prototype.toObject = function(opt_includeInstance) { return proto.GetDriveResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.GetDriveResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.GetDriveResponse.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, 0), opts: (f = msg.getOpts()) && daemon_common_pb.HyperdriveOptions.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.GetDriveResponse} */ proto.GetDriveResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.GetDriveResponse; return proto.GetDriveResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.GetDriveResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.GetDriveResponse} */ proto.GetDriveResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); msg.setId(value); break; case 2: var value = new daemon_common_pb.HyperdriveOptions; reader.readMessage(value,daemon_common_pb.HyperdriveOptions.deserializeBinaryFromReader); msg.setOpts(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.GetDriveResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.GetDriveResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.GetDriveResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.GetDriveResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f !== 0) { writer.writeUint64( 1, f ); } f = message.getOpts(); if (f != null) { writer.writeMessage( 2, f, daemon_common_pb.HyperdriveOptions.serializeBinaryToWriter ); } }; /** * optional uint64 id = 1; * @return {number} */ proto.GetDriveResponse.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ proto.GetDriveResponse.prototype.setId = function(value) { jspb.Message.setProto3IntField(this, 1, value); }; /** * optional HyperdriveOptions opts = 2; * @return {?proto.HyperdriveOptions} */ proto.GetDriveResponse.prototype.getOpts = function() { return /** @type{?proto.HyperdriveOptions} */ ( jspb.Message.getWrapperField(this, daemon_common_pb.HyperdriveOptions, 2)); }; /** @param {?proto.HyperdriveOptions|undefined} value */ proto.GetDriveResponse.prototype.setOpts = function(value) { jspb.Message.setWrapperField(this, 2, value); }; proto.GetDriveResponse.prototype.clearOpts = function() { this.setOpts(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.GetDriveResponse.prototype.hasOpts = function() { return jspb.Message.getField(this, 2) != null; }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.StatsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.StatsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.StatsRequest.displayName = 'proto.StatsRequest'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.StatsRequest.prototype.toObject = function(opt_includeInstance) { return proto.StatsRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.StatsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.StatsRequest.toObject = function(includeInstance, msg) { var f, obj = { networkingonly: jspb.Message.getFieldWithDefault(msg, 1, false) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.StatsRequest} */ proto.StatsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.StatsRequest; return proto.StatsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.StatsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.StatsRequest} */ proto.StatsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {boolean} */ (reader.readBool()); msg.setNetworkingonly(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.StatsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.StatsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.StatsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.StatsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getNetworkingonly(); if (f) { writer.writeBool( 1, f ); } }; /** * optional bool networkingOnly = 1; * Note that Boolean fields may be set to 0/1 when serialized from a Java server. * You should avoid comparisons like {@code val === true/false} in those cases. * @return {boolean} */ proto.StatsRequest.prototype.getNetworkingonly = function() { return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; /** @param {boolean} value */ proto.StatsRequest.prototype.setNetworkingonly = function(value) { jspb.Message.setProto3BooleanField(this, 1, value); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.StatsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.StatsResponse.repeatedFields_, null); }; goog.inherits(proto.StatsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.StatsResponse.displayName = 'proto.StatsResponse'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.StatsResponse.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.StatsResponse.prototype.toObject = function(opt_includeInstance) { return proto.StatsResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.StatsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.StatsResponse.toObject = function(includeInstance, msg) { var f, obj = { statsList: jspb.Message.toObjectList(msg.getStatsList(), daemon_common_pb.DriveStats.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.StatsResponse} */ proto.StatsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.StatsResponse; return proto.StatsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.StatsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.StatsResponse} */ proto.StatsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new daemon_common_pb.DriveStats; reader.readMessage(value,daemon_common_pb.DriveStats.deserializeBinaryFromReader); msg.addStats(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.StatsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.StatsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.StatsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.StatsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getStatsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, daemon_common_pb.DriveStats.serializeBinaryToWriter ); } }; /** * repeated DriveStats stats = 1; * @return {!Array<!proto.DriveStats>} */ proto.StatsResponse.prototype.getStatsList = function() { return /** @type{!Array<!proto.DriveStats>} */ ( jspb.Message.getRepeatedWrapperField(this, daemon_common_pb.DriveStats, 1)); }; /** @param {!Array<!proto.DriveStats>} value */ proto.StatsResponse.prototype.setStatsList = function(value) { jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.DriveStats=} opt_value * @param {number=} opt_index * @return {!proto.DriveStats} */ proto.StatsResponse.prototype.addStats = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.DriveStats, opt_index); }; proto.StatsResponse.prototype.clearStatsList = function() { this.setStatsList([]); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.NetworkConfigurationsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.NetworkConfigurationsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.NetworkConfigurationsRequest.displayName = 'proto.NetworkConfigurationsRequest'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.NetworkConfigurationsRequest.prototype.toObject = function(opt_includeInstance) { return proto.NetworkConfigurationsRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.NetworkConfigurationsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.NetworkConfigurationsRequest.toObject = function(includeInstance, msg) { var f, obj = { }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.NetworkConfigurationsRequest} */ proto.NetworkConfigurationsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.NetworkConfigurationsRequest; return proto.NetworkConfigurationsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.NetworkConfigurationsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.NetworkConfigurationsRequest} */ proto.NetworkConfigurationsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.NetworkConfigurationsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.NetworkConfigurationsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.NetworkConfigurationsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.NetworkConfigurationsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.NetworkConfigurationsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.NetworkConfigurationsResponse.repeatedFields_, null); }; goog.inherits(proto.NetworkConfigurationsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.NetworkConfigurationsResponse.displayName = 'proto.NetworkConfigurationsResponse'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.NetworkConfigurationsResponse.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.NetworkConfigurationsResponse.prototype.toObject = function(opt_includeInstance) { return proto.NetworkConfigurationsResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.NetworkConfigurationsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.NetworkConfigurationsResponse.toObject = function(includeInstance, msg) { var f, obj = { configurationsList: jspb.Message.toObjectList(msg.getConfigurationsList(), daemon_common_pb.NetworkConfiguration.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.NetworkConfigurationsResponse} */ proto.NetworkConfigurationsResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.NetworkConfigurationsResponse; return proto.NetworkConfigurationsResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.NetworkConfigurationsResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.NetworkConfigurationsResponse} */ proto.NetworkConfigurationsResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 2: var value = new daemon_common_pb.NetworkConfiguration; reader.readMessage(value,daemon_common_pb.NetworkConfiguration.deserializeBinaryFromReader); msg.addConfigurations(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.NetworkConfigurationsResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.NetworkConfigurationsResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.NetworkConfigurationsResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.NetworkConfigurationsResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getConfigurationsList(); if (f.length > 0) { writer.writeRepeatedMessage( 2, f, daemon_common_pb.NetworkConfiguration.serializeBinaryToWriter ); } }; /** * repeated NetworkConfiguration configurations = 2; * @return {!Array<!proto.NetworkConfiguration>} */ proto.NetworkConfigurationsResponse.prototype.getConfigurationsList = function() { return /** @type{!Array<!proto.NetworkConfiguration>} */ ( jspb.Message.getRepeatedWrapperField(this, daemon_common_pb.NetworkConfiguration, 2)); }; /** @param {!Array<!proto.NetworkConfiguration>} value */ proto.NetworkConfigurationsResponse.prototype.setConfigurationsList = function(value) { jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** * @param {!proto.NetworkConfiguration=} opt_value * @param {number=} opt_index * @return {!proto.NetworkConfiguration} */ proto.NetworkConfigurationsResponse.prototype.addConfigurations = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.NetworkConfiguration, opt_index); }; proto.NetworkConfigurationsResponse.prototype.clearConfigurationsList = function() { this.setConfigurationsList([]); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.ActiveRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.ActiveRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.ActiveRequest.displayName = 'proto.ActiveRequest'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.ActiveRequest.prototype.toObject = function(opt_includeInstance) { return proto.ActiveRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.ActiveRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ActiveRequest.toObject = function(includeInstance, msg) { var f, obj = { }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.ActiveRequest} */ proto.ActiveRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.ActiveRequest; return proto.ActiveRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ActiveRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ActiveRequest} */ proto.ActiveRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ActiveRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.ActiveRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.ActiveRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ActiveRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.ActiveResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.ActiveResponse.repeatedFields_, null); }; goog.inherits(proto.ActiveResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.ActiveResponse.displayName = 'proto.ActiveResponse'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.ActiveResponse.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.ActiveResponse.prototype.toObject = function(opt_includeInstance) { return proto.ActiveResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.ActiveResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ActiveResponse.toObject = function(includeInstance, msg) { var f, obj = { drivesList: jspb.Message.toObjectList(msg.getDrivesList(), daemon_common_pb.HyperdriveOptions.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.ActiveResponse} */ proto.ActiveResponse.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.ActiveResponse; return proto.ActiveResponse.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ActiveResponse} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ActiveResponse} */ proto.ActiveResponse.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new daemon_common_pb.HyperdriveOptions; reader.readMessage(value,daemon_common_pb.HyperdriveOptions.deserializeBinaryFromReader); msg.addDrives(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ActiveResponse.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.ActiveResponse.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.ActiveResponse} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.ActiveResponse.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getDrivesList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, daemon_common_pb.HyperdriveOptions.serializeBinaryToWriter ); } }; /** * repeated HyperdriveOptions drives = 1; * @return {!Array<!proto.HyperdriveOptions>} */ proto.ActiveResponse.prototype.getDrivesList = function() { return /** @type{!Array<!proto.HyperdriveOptions>} */ ( jspb.Message.getRepeatedWrapperField(this, daemon_common_pb.HyperdriveOptions, 1)); }; /** @param {!Array<!proto.HyperdriveOptions>} value */ proto.ActiveResponse.prototype.setDrivesList = function(value) { jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.HyperdriveOptions=} opt_value * @param {number=} opt_index * @return {!proto.HyperdriveOptions} */ proto.ActiveResponse.prototype.addDrives = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.HyperdriveOptions, opt_index); }; proto.ActiveResponse.prototype.clearDrivesList = function() { this.setDrivesList([]); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.PeerCountsRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.PeerCountsRequest.repeatedFields_, null); }; goog.inherits(proto.PeerCountsRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.PeerCountsRequest.displayName = 'proto.PeerCountsRequest'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.PeerCountsRequest.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.PeerCountsRequest.prototype.toObject = function(opt_includeInstance) { return proto.PeerCountsRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.PeerCountsRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PeerCountsRequest.toObject = function(includeInstance, msg) { var f, obj = { keysList: msg.getKeysList_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.PeerCountsRequest} */ proto.PeerCountsRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.PeerCountsRequest; return proto.PeerCountsRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.PeerCountsRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.PeerCountsRequest} */ proto.PeerCountsRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.addKeys(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.PeerCountsRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.PeerCountsRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.PeerCountsRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PeerCountsRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getKeysList_asU8(); if (f.length > 0) { writer.writeRepeatedBytes( 1, f ); } }; /** * repeated bytes keys = 1; * @return {!(Array<!Uint8Array>|Array<string>)} */ proto.PeerCountsRequest.prototype.getKeysList = function() { return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getRepeatedField(this, 1)); }; /** * repeated bytes keys = 1; * This is a type-conversion wrapper around `getKeysList()` * @return {!Array<string>} */ proto.PeerCountsRequest.prototype.getKeysList_asB64 = function() { return /** @type {!Array<string>} */ (jspb.Message.bytesListAsB64( this.getKeysList())); }; /** * repeated bytes keys = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getKeysList()` * @return {!Array<!Uint8Array>} */ proto.PeerCountsRequest.prototype.getKeysList_asU8 = function() { return /** @type {!Array<!Uint8Array>} */ (jspb.Message.bytesListAsU8( this.getKeysList())); }; /** @param {!(Array<!Uint8Array>|Array<string>)} value */ proto.PeerCountsRequest.prototype.setKeysList = function(value) { jspb.Message.setField(this, 1, value || []); }; /** * @param {!(string|Uint8Array)} value * @param {number=} opt_index */ proto.PeerCountsRequest.prototype.addKeys = function(value, opt_index) { jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; proto.PeerCountsRequest.prototype.clearKeysList = function() { this.setKeysList([]); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.PeerCountsResponse = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.PeerCountsResponse.repeatedFields_, null); }; goog.inherits(proto.PeerCountsResponse, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.PeerCountsResponse.displayName = 'proto.PeerCountsResponse'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.PeerCountsResponse.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.PeerCountsResponse.prototype.toObject = function(opt_includeInstance) { return proto.PeerCountsResponse.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Whether to include the JSPB * instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.PeerCountsResponse} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.PeerCountsResponse.toObject = function(includeInstance, msg) { var f, obj = { peercountsList: jspb.Message.getRepeatedField(msg, 1) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.Peer