mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-10-10 11:58:32 +00:00
864 lines
25 KiB
JavaScript
864 lines
25 KiB
JavaScript
// source: commands/common.proto
|
|
/**
|
|
* @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.cc.arduino.cli.commands.DownloadProgress', null, global);
|
|
goog.exportSymbol('proto.cc.arduino.cli.commands.Instance', null, global);
|
|
goog.exportSymbol('proto.cc.arduino.cli.commands.Programmer', null, global);
|
|
goog.exportSymbol('proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.Instance = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.cc.arduino.cli.commands.Instance, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.cc.arduino.cli.commands.Instance.displayName = 'proto.cc.arduino.cli.commands.Instance';
|
|
}
|
|
/**
|
|
* 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.cc.arduino.cli.commands.DownloadProgress = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.cc.arduino.cli.commands.DownloadProgress, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.cc.arduino.cli.commands.DownloadProgress.displayName = 'proto.cc.arduino.cli.commands.DownloadProgress';
|
|
}
|
|
/**
|
|
* 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.cc.arduino.cli.commands.TaskProgress = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.cc.arduino.cli.commands.TaskProgress, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.cc.arduino.cli.commands.TaskProgress.displayName = 'proto.cc.arduino.cli.commands.TaskProgress';
|
|
}
|
|
/**
|
|
* 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.cc.arduino.cli.commands.Programmer = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.cc.arduino.cli.commands.Programmer, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.cc.arduino.cli.commands.Programmer.displayName = 'proto.cc.arduino.cli.commands.Programmer';
|
|
}
|
|
|
|
|
|
|
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
/**
|
|
* Creates an object representation of this proto.
|
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
* Optional fields that are not set will be set to undefined.
|
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
* For the list of reserved names please see:
|
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
* JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @return {!Object}
|
|
*/
|
|
proto.cc.arduino.cli.commands.Instance.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.cc.arduino.cli.commands.Instance.toObject(opt_includeInstance, this);
|
|
};
|
|
|
|
|
|
/**
|
|
* Static version of the {@see toObject} method.
|
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
* the JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @param {!proto.cc.arduino.cli.commands.Instance} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.Instance}
|
|
*/
|
|
proto.cc.arduino.cli.commands.Instance.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.cc.arduino.cli.commands.Instance;
|
|
return proto.cc.arduino.cli.commands.Instance.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.cc.arduino.cli.commands.Instance} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.cc.arduino.cli.commands.Instance}
|
|
*/
|
|
proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.Instance.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.Instance} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.Instance.prototype.getId = function() {
|
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {number} value
|
|
* @return {!proto.cc.arduino.cli.commands.Instance} returns this
|
|
*/
|
|
proto.cc.arduino.cli.commands.Instance.prototype.setId = function(value) {
|
|
return jspb.Message.setProto3IntField(this, 1, value);
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
/**
|
|
* Creates an object representation of this proto.
|
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
* Optional fields that are not set will be set to undefined.
|
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
* For the list of reserved names please see:
|
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
* JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @return {!Object}
|
|
*/
|
|
proto.cc.arduino.cli.commands.DownloadProgress.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.cc.arduino.cli.commands.DownloadProgress.toObject(opt_includeInstance, this);
|
|
};
|
|
|
|
|
|
/**
|
|
* Static version of the {@see toObject} method.
|
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
* the JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @param {!proto.cc.arduino.cli.commands.DownloadProgress} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cc.arduino.cli.commands.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.getBooleanFieldWithDefault(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.cc.arduino.cli.commands.DownloadProgress}
|
|
*/
|
|
proto.cc.arduino.cli.commands.DownloadProgress.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.cc.arduino.cli.commands.DownloadProgress;
|
|
return proto.cc.arduino.cli.commands.DownloadProgress.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.cc.arduino.cli.commands.DownloadProgress} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.cc.arduino.cli.commands.DownloadProgress}
|
|
*/
|
|
proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.DownloadProgress.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.DownloadProgress} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.DownloadProgress.prototype.getUrl = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.cc.arduino.cli.commands.DownloadProgress} returns this
|
|
*/
|
|
proto.cc.arduino.cli.commands.DownloadProgress.prototype.setUrl = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string file = 2;
|
|
* @return {string}
|
|
*/
|
|
proto.cc.arduino.cli.commands.DownloadProgress.prototype.getFile = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.cc.arduino.cli.commands.DownloadProgress} returns this
|
|
*/
|
|
proto.cc.arduino.cli.commands.DownloadProgress.prototype.setFile = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional int64 total_size = 3;
|
|
* @return {number}
|
|
*/
|
|
proto.cc.arduino.cli.commands.DownloadProgress.prototype.getTotalSize = function() {
|
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {number} value
|
|
* @return {!proto.cc.arduino.cli.commands.DownloadProgress} returns this
|
|
*/
|
|
proto.cc.arduino.cli.commands.DownloadProgress.prototype.setTotalSize = function(value) {
|
|
return jspb.Message.setProto3IntField(this, 3, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional int64 downloaded = 4;
|
|
* @return {number}
|
|
*/
|
|
proto.cc.arduino.cli.commands.DownloadProgress.prototype.getDownloaded = function() {
|
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {number} value
|
|
* @return {!proto.cc.arduino.cli.commands.DownloadProgress} returns this
|
|
*/
|
|
proto.cc.arduino.cli.commands.DownloadProgress.prototype.setDownloaded = function(value) {
|
|
return jspb.Message.setProto3IntField(this, 4, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bool completed = 5;
|
|
* @return {boolean}
|
|
*/
|
|
proto.cc.arduino.cli.commands.DownloadProgress.prototype.getCompleted = function() {
|
|
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {boolean} value
|
|
* @return {!proto.cc.arduino.cli.commands.DownloadProgress} returns this
|
|
*/
|
|
proto.cc.arduino.cli.commands.DownloadProgress.prototype.setCompleted = function(value) {
|
|
return jspb.Message.setProto3BooleanField(this, 5, value);
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
/**
|
|
* Creates an object representation of this proto.
|
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
* Optional fields that are not set will be set to undefined.
|
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
* For the list of reserved names please see:
|
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
* JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @return {!Object}
|
|
*/
|
|
proto.cc.arduino.cli.commands.TaskProgress.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.cc.arduino.cli.commands.TaskProgress.toObject(opt_includeInstance, this);
|
|
};
|
|
|
|
|
|
/**
|
|
* Static version of the {@see toObject} method.
|
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
* the JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @param {!proto.cc.arduino.cli.commands.TaskProgress} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cc.arduino.cli.commands.TaskProgress.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
name: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
message: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
completed: jspb.Message.getBooleanFieldWithDefault(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.cc.arduino.cli.commands.TaskProgress}
|
|
*/
|
|
proto.cc.arduino.cli.commands.TaskProgress.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.cc.arduino.cli.commands.TaskProgress;
|
|
return proto.cc.arduino.cli.commands.TaskProgress.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.cc.arduino.cli.commands.TaskProgress} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.cc.arduino.cli.commands.TaskProgress}
|
|
*/
|
|
proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.TaskProgress.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.TaskProgress} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cc.arduino.cli.commands.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.cc.arduino.cli.commands.TaskProgress.prototype.getName = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.cc.arduino.cli.commands.TaskProgress} returns this
|
|
*/
|
|
proto.cc.arduino.cli.commands.TaskProgress.prototype.setName = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string message = 2;
|
|
* @return {string}
|
|
*/
|
|
proto.cc.arduino.cli.commands.TaskProgress.prototype.getMessage = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.cc.arduino.cli.commands.TaskProgress} returns this
|
|
*/
|
|
proto.cc.arduino.cli.commands.TaskProgress.prototype.setMessage = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bool completed = 3;
|
|
* @return {boolean}
|
|
*/
|
|
proto.cc.arduino.cli.commands.TaskProgress.prototype.getCompleted = function() {
|
|
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {boolean} value
|
|
* @return {!proto.cc.arduino.cli.commands.TaskProgress} returns this
|
|
*/
|
|
proto.cc.arduino.cli.commands.TaskProgress.prototype.setCompleted = function(value) {
|
|
return jspb.Message.setProto3BooleanField(this, 3, value);
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
if (jspb.Message.GENERATE_TO_OBJECT) {
|
|
/**
|
|
* Creates an object representation of this proto.
|
|
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
|
* Optional fields that are not set will be set to undefined.
|
|
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
|
* For the list of reserved names please see:
|
|
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
|
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
|
* JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @return {!Object}
|
|
*/
|
|
proto.cc.arduino.cli.commands.Programmer.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.cc.arduino.cli.commands.Programmer.toObject(opt_includeInstance, this);
|
|
};
|
|
|
|
|
|
/**
|
|
* Static version of the {@see toObject} method.
|
|
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
|
* the JSPB instance for transitional soy proto support:
|
|
* http://goto/soy-param-migration
|
|
* @param {!proto.cc.arduino.cli.commands.Programmer} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cc.arduino.cli.commands.Programmer.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
platform: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
id: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
name: jspb.Message.getFieldWithDefault(msg, 3, "")
|
|
};
|
|
|
|
if (includeInstance) {
|
|
obj.$jspbMessageInstance = msg;
|
|
}
|
|
return obj;
|
|
};
|
|
}
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format).
|
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
* @return {!proto.cc.arduino.cli.commands.Programmer}
|
|
*/
|
|
proto.cc.arduino.cli.commands.Programmer.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.cc.arduino.cli.commands.Programmer;
|
|
return proto.cc.arduino.cli.commands.Programmer.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.cc.arduino.cli.commands.Programmer} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.cc.arduino.cli.commands.Programmer}
|
|
*/
|
|
proto.cc.arduino.cli.commands.Programmer.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.setPlatform(value);
|
|
break;
|
|
case 2:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setId(value);
|
|
break;
|
|
case 3:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setName(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.cc.arduino.cli.commands.Programmer.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.cc.arduino.cli.commands.Programmer.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.cc.arduino.cli.commands.Programmer} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.cc.arduino.cli.commands.Programmer.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getPlatform();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getId();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
f = message.getName();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
3,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string platform = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.cc.arduino.cli.commands.Programmer.prototype.getPlatform = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.cc.arduino.cli.commands.Programmer} returns this
|
|
*/
|
|
proto.cc.arduino.cli.commands.Programmer.prototype.setPlatform = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string id = 2;
|
|
* @return {string}
|
|
*/
|
|
proto.cc.arduino.cli.commands.Programmer.prototype.getId = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.cc.arduino.cli.commands.Programmer} returns this
|
|
*/
|
|
proto.cc.arduino.cli.commands.Programmer.prototype.setId = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string name = 3;
|
|
* @return {string}
|
|
*/
|
|
proto.cc.arduino.cli.commands.Programmer.prototype.getName = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.cc.arduino.cli.commands.Programmer} returns this
|
|
*/
|
|
proto.cc.arduino.cli.commands.Programmer.prototype.setName = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 3, value);
|
|
};
|
|
|
|
|
|
goog.object.extend(exports, proto.cc.arduino.cli.commands);
|