mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-05-20 11:58:44 +00:00
610 lines
17 KiB
JavaScript
610 lines
17 KiB
JavaScript
/**
|
|
* @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')();
|
|
|
|
goog.exportSymbol('proto.arduino.DownloadProgress', null, global);
|
|
goog.exportSymbol('proto.arduino.Instance', null, global);
|
|
goog.exportSymbol('proto.arduino.TaskProgress', 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.arduino.Instance = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.arduino.Instance, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
proto.arduino.Instance.displayName = 'proto.arduino.Instance';
|
|
}
|
|
|
|
|
|
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.arduino.Instance.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.arduino.Instance.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.arduino.Instance} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.arduino.Instance.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
id: jspb.Message.getFieldWithDefault(msg, 1, 0)
|
|
};
|
|
|
|
if (includeInstance) {
|
|
obj.$jspbMessageInstance = msg;
|
|
}
|
|
return obj;
|
|
};
|
|
}
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format).
|
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
* @return {!proto.arduino.Instance}
|
|
*/
|
|
proto.arduino.Instance.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.arduino.Instance;
|
|
return proto.arduino.Instance.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.arduino.Instance} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.arduino.Instance}
|
|
*/
|
|
proto.arduino.Instance.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
case 1:
|
|
var value = /** @type {number} */ (reader.readInt32());
|
|
msg.setId(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.arduino.Instance.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.arduino.Instance.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.arduino.Instance} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.arduino.Instance.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getId();
|
|
if (f !== 0) {
|
|
writer.writeInt32(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional int32 id = 1;
|
|
* @return {number}
|
|
*/
|
|
proto.arduino.Instance.prototype.getId = function() {
|
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
|
};
|
|
|
|
|
|
/** @param {number} value */
|
|
proto.arduino.Instance.prototype.setId = function(value) {
|
|
jspb.Message.setProto3IntField(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.arduino.DownloadProgress = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.arduino.DownloadProgress, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
proto.arduino.DownloadProgress.displayName = 'proto.arduino.DownloadProgress';
|
|
}
|
|
|
|
|
|
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.arduino.DownloadProgress.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.arduino.DownloadProgress.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.arduino.DownloadProgress} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.arduino.DownloadProgress.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
url: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
file: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
totalSize: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
|
downloaded: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
|
completed: jspb.Message.getFieldWithDefault(msg, 5, 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.arduino.DownloadProgress}
|
|
*/
|
|
proto.arduino.DownloadProgress.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.arduino.DownloadProgress;
|
|
return proto.arduino.DownloadProgress.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.arduino.DownloadProgress} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.arduino.DownloadProgress}
|
|
*/
|
|
proto.arduino.DownloadProgress.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
case 1:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setUrl(value);
|
|
break;
|
|
case 2:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setFile(value);
|
|
break;
|
|
case 3:
|
|
var value = /** @type {number} */ (reader.readInt64());
|
|
msg.setTotalSize(value);
|
|
break;
|
|
case 4:
|
|
var value = /** @type {number} */ (reader.readInt64());
|
|
msg.setDownloaded(value);
|
|
break;
|
|
case 5:
|
|
var value = /** @type {boolean} */ (reader.readBool());
|
|
msg.setCompleted(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.arduino.DownloadProgress.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.arduino.DownloadProgress.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.arduino.DownloadProgress} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.arduino.DownloadProgress.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getUrl();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getFile();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
f = message.getTotalSize();
|
|
if (f !== 0) {
|
|
writer.writeInt64(
|
|
3,
|
|
f
|
|
);
|
|
}
|
|
f = message.getDownloaded();
|
|
if (f !== 0) {
|
|
writer.writeInt64(
|
|
4,
|
|
f
|
|
);
|
|
}
|
|
f = message.getCompleted();
|
|
if (f) {
|
|
writer.writeBool(
|
|
5,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string url = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.arduino.DownloadProgress.prototype.getUrl = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.arduino.DownloadProgress.prototype.setUrl = function(value) {
|
|
jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string file = 2;
|
|
* @return {string}
|
|
*/
|
|
proto.arduino.DownloadProgress.prototype.getFile = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.arduino.DownloadProgress.prototype.setFile = function(value) {
|
|
jspb.Message.setProto3StringField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional int64 total_size = 3;
|
|
* @return {number}
|
|
*/
|
|
proto.arduino.DownloadProgress.prototype.getTotalSize = function() {
|
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
|
};
|
|
|
|
|
|
/** @param {number} value */
|
|
proto.arduino.DownloadProgress.prototype.setTotalSize = function(value) {
|
|
jspb.Message.setProto3IntField(this, 3, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional int64 downloaded = 4;
|
|
* @return {number}
|
|
*/
|
|
proto.arduino.DownloadProgress.prototype.getDownloaded = function() {
|
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
|
|
};
|
|
|
|
|
|
/** @param {number} value */
|
|
proto.arduino.DownloadProgress.prototype.setDownloaded = function(value) {
|
|
jspb.Message.setProto3IntField(this, 4, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bool completed = 5;
|
|
* 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.arduino.DownloadProgress.prototype.getCompleted = function() {
|
|
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false));
|
|
};
|
|
|
|
|
|
/** @param {boolean} value */
|
|
proto.arduino.DownloadProgress.prototype.setCompleted = function(value) {
|
|
jspb.Message.setProto3BooleanField(this, 5, 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.arduino.TaskProgress = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.arduino.TaskProgress, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
proto.arduino.TaskProgress.displayName = 'proto.arduino.TaskProgress';
|
|
}
|
|
|
|
|
|
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.arduino.TaskProgress.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.arduino.TaskProgress.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.arduino.TaskProgress} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.arduino.TaskProgress.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
message: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
completed: jspb.Message.getFieldWithDefault(msg, 3, 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.arduino.TaskProgress}
|
|
*/
|
|
proto.arduino.TaskProgress.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.arduino.TaskProgress;
|
|
return proto.arduino.TaskProgress.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.arduino.TaskProgress} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.arduino.TaskProgress}
|
|
*/
|
|
proto.arduino.TaskProgress.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
case 1:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setName(value);
|
|
break;
|
|
case 2:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setMessage(value);
|
|
break;
|
|
case 3:
|
|
var value = /** @type {boolean} */ (reader.readBool());
|
|
msg.setCompleted(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.arduino.TaskProgress.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.arduino.TaskProgress.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.arduino.TaskProgress} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.arduino.TaskProgress.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getName();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getMessage();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
f = message.getCompleted();
|
|
if (f) {
|
|
writer.writeBool(
|
|
3,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string name = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.arduino.TaskProgress.prototype.getName = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.arduino.TaskProgress.prototype.setName = function(value) {
|
|
jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string message = 2;
|
|
* @return {string}
|
|
*/
|
|
proto.arduino.TaskProgress.prototype.getMessage = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
};
|
|
|
|
|
|
/** @param {string} value */
|
|
proto.arduino.TaskProgress.prototype.setMessage = function(value) {
|
|
jspb.Message.setProto3StringField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bool completed = 3;
|
|
* 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.arduino.TaskProgress.prototype.getCompleted = function() {
|
|
return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false));
|
|
};
|
|
|
|
|
|
/** @param {boolean} value */
|
|
proto.arduino.TaskProgress.prototype.setCompleted = function(value) {
|
|
jspb.Message.setProto3BooleanField(this, 3, value);
|
|
};
|
|
|
|
|
|
goog.object.extend(exports, proto.arduino);
|