diff --git a/arduino-ide-extension/.gitignore b/arduino-ide-extension/.gitignore deleted file mode 100644 index 5b112509..00000000 --- a/arduino-ide-extension/.gitignore +++ /dev/null @@ -1 +0,0 @@ -src/node/cli-protocol \ No newline at end of file diff --git a/arduino-ide-extension/build/arduino-cli.darwin b/arduino-ide-extension/build/arduino-cli.darwin index 7817e4fb..c7161bb6 100755 Binary files a/arduino-ide-extension/build/arduino-cli.darwin and b/arduino-ide-extension/build/arduino-cli.darwin differ diff --git a/arduino-ide-extension/build/arduino-cli.linux b/arduino-ide-extension/build/arduino-cli.linux index 52d9df24..2bf51664 100755 Binary files a/arduino-ide-extension/build/arduino-cli.linux and b/arduino-ide-extension/build/arduino-cli.linux differ diff --git a/arduino-ide-extension/build/arduino-cli.windows b/arduino-ide-extension/build/arduino-cli.windows index 39eaff82..12f93303 100755 Binary files a/arduino-ide-extension/build/arduino-cli.windows and b/arduino-ide-extension/build/arduino-cli.windows differ diff --git a/arduino-ide-extension/scripts/generate-protoc.sh b/arduino-ide-extension/scripts/generate-protoc.sh index ba491f1b..386f4422 100755 --- a/arduino-ide-extension/scripts/generate-protoc.sh +++ b/arduino-ide-extension/scripts/generate-protoc.sh @@ -1,7 +1,5 @@ #!/bin/bash -SCRIPT=`realpath -s $0` -SCRIPTPATH=`dirname $SCRIPT` WORKDIR=/tmp/arduino-cli-protoc echo "Working in $WORKDIR" @@ -9,7 +7,7 @@ echo "Working in $WORKDIR" mkdir -p $WORKDIR pushd $WORKDIR if [ ! -d arduino-cli ]; then - git clone https://github.com/cmaglie/arduino-cli + git clone https://github.com/typefox/arduino-cli cd arduino-cli git checkout daemon cd - diff --git a/arduino-ide-extension/src/browser/components/connected-boards.tsx b/arduino-ide-extension/src/browser/components/connected-boards.tsx index edad82fd..149701c9 100644 --- a/arduino-ide-extension/src/browser/components/connected-boards.tsx +++ b/arduino-ide-extension/src/browser/components/connected-boards.tsx @@ -1,7 +1,7 @@ import * as React from 'react'; // TODO: make this `async`. // import { Async } from 'react-select/lib/Async'; -import { BoardsService, Board } from '../../common/protocol/boards-service'; +import { BoardsService, AttachedBoard } from '../../common/protocol/boards-service'; export class ConnectedBoards extends React.Component { @@ -14,16 +14,13 @@ export class ConnectedBoards extends React.Component { - const { boards, current } = result; - this.setState({ - boards, - current - }) + this.props.boardsService.attachedBoards().then(result => { + const { boards } = result; + this.setState({ boards }); }); } - private select(boards: Board[] | undefined, current: Board | undefined): React.ReactNode { + private select(boards: AttachedBoard[] | undefined, current: AttachedBoard | undefined): React.ReactNode { // Initial pessimistic. const options = []; if (boards) { @@ -52,8 +49,8 @@ export namespace ConnectedBoards { } export interface State { - boards?: Board[]; - current?: Board; + boards?: AttachedBoard[]; + current?: AttachedBoard; } export namespace Styles { diff --git a/arduino-ide-extension/src/common/protocol/boards-service.ts b/arduino-ide-extension/src/common/protocol/boards-service.ts index 3f6db28c..795d71d0 100644 --- a/arduino-ide-extension/src/common/protocol/boards-service.ts +++ b/arduino-ide-extension/src/common/protocol/boards-service.ts @@ -3,7 +3,7 @@ import { ArduinoComponent } from "./arduino-component"; export const BoardsServicePath = '/services/boards-service'; export const BoardsService = Symbol('BoardsService'); export interface BoardsService { - connectedBoards(): Promise<{ boards: Board[], current?: Board }>; + attachedBoards(): Promise<{ boards: AttachedBoard[] }>; search(options: { query?: string }): Promise<{ items: Board[] }>; install(board: Board): Promise; } @@ -11,3 +11,39 @@ export interface BoardsService { export interface Board extends ArduinoComponent { id: string; } + +export interface AttachedBoard { + name: string + fqbn?: string +} + +export interface AttachedSerialBoard extends AttachedBoard { + port: string; + serialNumber: string; + productID: string; + vendorID: string; +} + +export namespace AttachedSerialBoard { + export function is(b: AttachedBoard): b is AttachedSerialBoard { + return 'port' in b + && 'serialNumber' in b + && 'productID' in b + && 'vendorID' in b; + } +} + +export interface AttachedNetworkBoard extends AttachedBoard { + info: string; + address: string; + port: number; +} + +export namespace AttachedNetworkBoard { + export function is(b: AttachedBoard): b is AttachedNetworkBoard { + return 'name' in b + && 'info' in b + && 'address' in b + && 'port' in b; + } +} diff --git a/arduino-ide-extension/src/node/boards-service-impl.ts b/arduino-ide-extension/src/node/boards-service-impl.ts index 65624b25..16f3f085 100644 --- a/arduino-ide-extension/src/node/boards-service-impl.ts +++ b/arduino-ide-extension/src/node/boards-service-impl.ts @@ -1,7 +1,8 @@ import { injectable, inject } from 'inversify'; -import { BoardsService, Board } from '../common/protocol/boards-service'; +import { BoardsService, Board, AttachedBoard, AttachedSerialBoard, AttachedNetworkBoard } from '../common/protocol/boards-service'; import { PlatformSearchReq, PlatformSearchResp, PlatformInstallReq, PlatformInstallResp, PlatformListReq, PlatformListResp } from './cli-protocol/core_pb'; import { CoreClientProvider } from './core-client-provider'; +import { BoardListReq, BoardListResp } from './cli-protocol/board_pb'; @injectable() export class BoardsServiceImpl implements BoardsService { @@ -9,8 +10,30 @@ export class BoardsServiceImpl implements BoardsService { @inject(CoreClientProvider) protected readonly coreClientProvider: CoreClientProvider; - async connectedBoards(): Promise<{ boards: Board[], current?: Board }> { - return { boards: [] }; + public async attachedBoards(): Promise<{ boards: AttachedBoard[] }> { + const { client, instance } = await this.coreClientProvider.getClient(); + + const req = new BoardListReq(); + req.setInstance(instance); + const resp = await new Promise((resolve, reject) => client.boardList(req, (err, resp) => (!!err ? reject : resolve)(!!err ? err : resp))); + + const serialBoards: AttachedBoard[] = resp.getSerialList().map(b => { + name: b.getName() || "unknown", + fqbn: b.getFqbn(), + port: b.getPort(), + serialNumber: b.getSerialnumber(), + productID: b.getProductid(), + vendorID: b.getVendorid() + }); + const networkBoards: AttachedBoard[] = resp.getNetworkList().map(b => { + name: b.getName(), + fqbn: b.getFqbn(), + address: b.getAddress(), + info: b.getInfo(), + port: b.getPort(), + }); + + return { boards: serialBoards.concat(networkBoards) }; } async search(options: { query?: string }): Promise<{ items: Board[] }> { diff --git a/arduino-ide-extension/src/node/cli-protocol/board_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/board_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/board_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/arduino-ide-extension/src/node/cli-protocol/board_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/board_pb.d.ts new file mode 100644 index 00000000..303a355a --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/board_pb.d.ts @@ -0,0 +1,288 @@ +// package: arduino +// file: board.proto + +/* tslint:disable */ + +import * as jspb from "google-protobuf"; +import * as common_pb from "./common_pb"; + +export class BoardDetailsReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + getFqbn(): string; + setFqbn(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BoardDetailsReq.AsObject; + static toObject(includeInstance: boolean, msg: BoardDetailsReq): BoardDetailsReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BoardDetailsReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BoardDetailsReq; + static deserializeBinaryFromReader(message: BoardDetailsReq, reader: jspb.BinaryReader): BoardDetailsReq; +} + +export namespace BoardDetailsReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + fqbn: string, + } +} + +export class BoardDetailsResp extends jspb.Message { + getName(): string; + setName(value: string): void; + + clearConfigOptionsList(): void; + getConfigOptionsList(): Array; + setConfigOptionsList(value: Array): void; + addConfigOptions(value?: ConfigOption, index?: number): ConfigOption; + + clearRequiredToolsList(): void; + getRequiredToolsList(): Array; + setRequiredToolsList(value: Array): void; + addRequiredTools(value?: RequiredTool, index?: number): RequiredTool; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BoardDetailsResp.AsObject; + static toObject(includeInstance: boolean, msg: BoardDetailsResp): BoardDetailsResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BoardDetailsResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BoardDetailsResp; + static deserializeBinaryFromReader(message: BoardDetailsResp, reader: jspb.BinaryReader): BoardDetailsResp; +} + +export namespace BoardDetailsResp { + export type AsObject = { + name: string, + configOptionsList: Array, + requiredToolsList: Array, + } +} + +export class ConfigOption extends jspb.Message { + getOption(): string; + setOption(value: string): void; + + getOptionLabel(): string; + setOptionLabel(value: string): void; + + clearValuesList(): void; + getValuesList(): Array; + setValuesList(value: Array): void; + addValues(value?: ConfigValue, index?: number): ConfigValue; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConfigOption.AsObject; + static toObject(includeInstance: boolean, msg: ConfigOption): ConfigOption.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConfigOption, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConfigOption; + static deserializeBinaryFromReader(message: ConfigOption, reader: jspb.BinaryReader): ConfigOption; +} + +export namespace ConfigOption { + export type AsObject = { + option: string, + optionLabel: string, + valuesList: Array, + } +} + +export class ConfigValue extends jspb.Message { + getValue(): string; + setValue(value: string): void; + + getValueLabel(): string; + setValueLabel(value: string): void; + + getSelected(): boolean; + setSelected(value: boolean): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ConfigValue.AsObject; + static toObject(includeInstance: boolean, msg: ConfigValue): ConfigValue.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ConfigValue, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ConfigValue; + static deserializeBinaryFromReader(message: ConfigValue, reader: jspb.BinaryReader): ConfigValue; +} + +export namespace ConfigValue { + export type AsObject = { + value: string, + valueLabel: string, + selected: boolean, + } +} + +export class RequiredTool extends jspb.Message { + getName(): string; + setName(value: string): void; + + getVersion(): string; + setVersion(value: string): void; + + getPackager(): string; + setPackager(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RequiredTool.AsObject; + static toObject(includeInstance: boolean, msg: RequiredTool): RequiredTool.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RequiredTool, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RequiredTool; + static deserializeBinaryFromReader(message: RequiredTool, reader: jspb.BinaryReader): RequiredTool; +} + +export namespace RequiredTool { + export type AsObject = { + name: string, + version: string, + packager: string, + } +} + +export class BoardListReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BoardListReq.AsObject; + static toObject(includeInstance: boolean, msg: BoardListReq): BoardListReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BoardListReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BoardListReq; + static deserializeBinaryFromReader(message: BoardListReq, reader: jspb.BinaryReader): BoardListReq; +} + +export namespace BoardListReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + } +} + +export class BoardListResp extends jspb.Message { + clearSerialList(): void; + getSerialList(): Array; + setSerialList(value: Array): void; + addSerial(value?: AttachedSerialBoard, index?: number): AttachedSerialBoard; + + clearNetworkList(): void; + getNetworkList(): Array; + setNetworkList(value: Array): void; + addNetwork(value?: AttachedNetworkBoard, index?: number): AttachedNetworkBoard; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BoardListResp.AsObject; + static toObject(includeInstance: boolean, msg: BoardListResp): BoardListResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BoardListResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BoardListResp; + static deserializeBinaryFromReader(message: BoardListResp, reader: jspb.BinaryReader): BoardListResp; +} + +export namespace BoardListResp { + export type AsObject = { + serialList: Array, + networkList: Array, + } +} + +export class AttachedNetworkBoard extends jspb.Message { + getName(): string; + setName(value: string): void; + + getFqbn(): string; + setFqbn(value: string): void; + + getInfo(): string; + setInfo(value: string): void; + + getAddress(): string; + setAddress(value: string): void; + + getPort(): number; + setPort(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AttachedNetworkBoard.AsObject; + static toObject(includeInstance: boolean, msg: AttachedNetworkBoard): AttachedNetworkBoard.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AttachedNetworkBoard, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AttachedNetworkBoard; + static deserializeBinaryFromReader(message: AttachedNetworkBoard, reader: jspb.BinaryReader): AttachedNetworkBoard; +} + +export namespace AttachedNetworkBoard { + export type AsObject = { + name: string, + fqbn: string, + info: string, + address: string, + port: number, + } +} + +export class AttachedSerialBoard extends jspb.Message { + getName(): string; + setName(value: string): void; + + getFqbn(): string; + setFqbn(value: string): void; + + getPort(): string; + setPort(value: string): void; + + getSerialnumber(): string; + setSerialnumber(value: string): void; + + getProductid(): string; + setProductid(value: string): void; + + getVendorid(): string; + setVendorid(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AttachedSerialBoard.AsObject; + static toObject(includeInstance: boolean, msg: AttachedSerialBoard): AttachedSerialBoard.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AttachedSerialBoard, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AttachedSerialBoard; + static deserializeBinaryFromReader(message: AttachedSerialBoard, reader: jspb.BinaryReader): AttachedSerialBoard; +} + +export namespace AttachedSerialBoard { + export type AsObject = { + name: string, + fqbn: string, + port: string, + serialnumber: string, + productid: string, + vendorid: string, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/board_pb.js b/arduino-ide-extension/src/node/cli-protocol/board_pb.js new file mode 100644 index 00000000..e69931f3 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/board_pb.js @@ -0,0 +1,1968 @@ +/** + * @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 common_pb = require('./common_pb.js'); +goog.object.extend(proto, common_pb); +goog.exportSymbol('proto.arduino.AttachedNetworkBoard', null, global); +goog.exportSymbol('proto.arduino.AttachedSerialBoard', null, global); +goog.exportSymbol('proto.arduino.BoardDetailsReq', null, global); +goog.exportSymbol('proto.arduino.BoardDetailsResp', null, global); +goog.exportSymbol('proto.arduino.BoardListReq', null, global); +goog.exportSymbol('proto.arduino.BoardListResp', null, global); +goog.exportSymbol('proto.arduino.ConfigOption', null, global); +goog.exportSymbol('proto.arduino.ConfigValue', null, global); +goog.exportSymbol('proto.arduino.RequiredTool', 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.BoardDetailsReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.BoardDetailsReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.BoardDetailsReq.displayName = 'proto.arduino.BoardDetailsReq'; +} + + +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_, 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.BoardDetailsReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.BoardDetailsReq.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.BoardDetailsReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.BoardDetailsReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f), + fqbn: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + 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.BoardDetailsReq} + */ +proto.arduino.BoardDetailsReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.BoardDetailsReq; + return proto.arduino.BoardDetailsReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.BoardDetailsReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.BoardDetailsReq} + */ +proto.arduino.BoardDetailsReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFqbn(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.BoardDetailsReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.BoardDetailsReq.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.BoardDetailsReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.BoardDetailsReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getFqbn(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.BoardDetailsReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.BoardDetailsReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.BoardDetailsReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.BoardDetailsReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string fqbn = 2; + * @return {string} + */ +proto.arduino.BoardDetailsReq.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.BoardDetailsReq.prototype.setFqbn = function(value) { + jspb.Message.setProto3StringField(this, 2, 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.BoardDetailsResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.arduino.BoardDetailsResp.repeatedFields_, null); +}; +goog.inherits(proto.arduino.BoardDetailsResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.BoardDetailsResp.displayName = 'proto.arduino.BoardDetailsResp'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.arduino.BoardDetailsResp.repeatedFields_ = [3,4]; + + + +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_, 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.BoardDetailsResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.BoardDetailsResp.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.BoardDetailsResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.BoardDetailsResp.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + configOptionsList: jspb.Message.toObjectList(msg.getConfigOptionsList(), + proto.arduino.ConfigOption.toObject, includeInstance), + requiredToolsList: jspb.Message.toObjectList(msg.getRequiredToolsList(), + proto.arduino.RequiredTool.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.arduino.BoardDetailsResp} + */ +proto.arduino.BoardDetailsResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.BoardDetailsResp; + return proto.arduino.BoardDetailsResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.BoardDetailsResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.BoardDetailsResp} + */ +proto.arduino.BoardDetailsResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = new proto.arduino.ConfigOption; + reader.readMessage(value,proto.arduino.ConfigOption.deserializeBinaryFromReader); + msg.addConfigOptions(value); + break; + case 4: + var value = new proto.arduino.RequiredTool; + reader.readMessage(value,proto.arduino.RequiredTool.deserializeBinaryFromReader); + msg.addRequiredTools(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.BoardDetailsResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.BoardDetailsResp.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.BoardDetailsResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.BoardDetailsResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getConfigOptionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.arduino.ConfigOption.serializeBinaryToWriter + ); + } + f = message.getRequiredToolsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 4, + f, + proto.arduino.RequiredTool.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.arduino.BoardDetailsResp.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.BoardDetailsResp.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated ConfigOption config_options = 3; + * @return {!Array} + */ +proto.arduino.BoardDetailsResp.prototype.getConfigOptionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.arduino.ConfigOption, 3)); +}; + + +/** @param {!Array} value */ +proto.arduino.BoardDetailsResp.prototype.setConfigOptionsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.arduino.ConfigOption=} opt_value + * @param {number=} opt_index + * @return {!proto.arduino.ConfigOption} + */ +proto.arduino.BoardDetailsResp.prototype.addConfigOptions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.arduino.ConfigOption, opt_index); +}; + + +proto.arduino.BoardDetailsResp.prototype.clearConfigOptionsList = function() { + this.setConfigOptionsList([]); +}; + + +/** + * repeated RequiredTool required_tools = 4; + * @return {!Array} + */ +proto.arduino.BoardDetailsResp.prototype.getRequiredToolsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.arduino.RequiredTool, 4)); +}; + + +/** @param {!Array} value */ +proto.arduino.BoardDetailsResp.prototype.setRequiredToolsList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 4, value); +}; + + +/** + * @param {!proto.arduino.RequiredTool=} opt_value + * @param {number=} opt_index + * @return {!proto.arduino.RequiredTool} + */ +proto.arduino.BoardDetailsResp.prototype.addRequiredTools = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.arduino.RequiredTool, opt_index); +}; + + +proto.arduino.BoardDetailsResp.prototype.clearRequiredToolsList = function() { + this.setRequiredToolsList([]); +}; + + + +/** + * 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.ConfigOption = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.arduino.ConfigOption.repeatedFields_, null); +}; +goog.inherits(proto.arduino.ConfigOption, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.ConfigOption.displayName = 'proto.arduino.ConfigOption'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.arduino.ConfigOption.repeatedFields_ = [3]; + + + +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_, 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.ConfigOption.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.ConfigOption.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.ConfigOption} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.ConfigOption.toObject = function(includeInstance, msg) { + var f, obj = { + option: jspb.Message.getFieldWithDefault(msg, 1, ""), + optionLabel: jspb.Message.getFieldWithDefault(msg, 2, ""), + valuesList: jspb.Message.toObjectList(msg.getValuesList(), + proto.arduino.ConfigValue.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.arduino.ConfigOption} + */ +proto.arduino.ConfigOption.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.ConfigOption; + return proto.arduino.ConfigOption.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.ConfigOption} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.ConfigOption} + */ +proto.arduino.ConfigOption.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.setOption(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOptionLabel(value); + break; + case 3: + var value = new proto.arduino.ConfigValue; + reader.readMessage(value,proto.arduino.ConfigValue.deserializeBinaryFromReader); + msg.addValues(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.ConfigOption.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.ConfigOption.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.ConfigOption} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.ConfigOption.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOption(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOptionLabel(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getValuesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.arduino.ConfigValue.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string option = 1; + * @return {string} + */ +proto.arduino.ConfigOption.prototype.getOption = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.arduino.ConfigOption.prototype.setOption = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string option_label = 2; + * @return {string} + */ +proto.arduino.ConfigOption.prototype.getOptionLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.ConfigOption.prototype.setOptionLabel = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * repeated ConfigValue values = 3; + * @return {!Array} + */ +proto.arduino.ConfigOption.prototype.getValuesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.arduino.ConfigValue, 3)); +}; + + +/** @param {!Array} value */ +proto.arduino.ConfigOption.prototype.setValuesList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.arduino.ConfigValue=} opt_value + * @param {number=} opt_index + * @return {!proto.arduino.ConfigValue} + */ +proto.arduino.ConfigOption.prototype.addValues = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.arduino.ConfigValue, opt_index); +}; + + +proto.arduino.ConfigOption.prototype.clearValuesList = function() { + this.setValuesList([]); +}; + + + +/** + * 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.ConfigValue = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.ConfigValue, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.ConfigValue.displayName = 'proto.arduino.ConfigValue'; +} + + +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_, 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.ConfigValue.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.ConfigValue.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.ConfigValue} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.ConfigValue.toObject = function(includeInstance, msg) { + var f, obj = { + value: jspb.Message.getFieldWithDefault(msg, 1, ""), + valueLabel: jspb.Message.getFieldWithDefault(msg, 2, ""), + selected: 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.ConfigValue} + */ +proto.arduino.ConfigValue.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.ConfigValue; + return proto.arduino.ConfigValue.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.ConfigValue} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.ConfigValue} + */ +proto.arduino.ConfigValue.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.setValue(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValueLabel(value); + break; + case 3: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSelected(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.ConfigValue.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.ConfigValue.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.ConfigValue} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.ConfigValue.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getValue(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getValueLabel(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSelected(); + if (f) { + writer.writeBool( + 3, + f + ); + } +}; + + +/** + * optional string value = 1; + * @return {string} + */ +proto.arduino.ConfigValue.prototype.getValue = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.arduino.ConfigValue.prototype.setValue = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string value_label = 2; + * @return {string} + */ +proto.arduino.ConfigValue.prototype.getValueLabel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.ConfigValue.prototype.setValueLabel = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional bool selected = 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.ConfigValue.prototype.getSelected = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 3, false)); +}; + + +/** @param {boolean} value */ +proto.arduino.ConfigValue.prototype.setSelected = function(value) { + jspb.Message.setProto3BooleanField(this, 3, 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.RequiredTool = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.RequiredTool, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.RequiredTool.displayName = 'proto.arduino.RequiredTool'; +} + + +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_, 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.RequiredTool.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.RequiredTool.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.RequiredTool} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.RequiredTool.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + version: jspb.Message.getFieldWithDefault(msg, 2, ""), + packager: 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.arduino.RequiredTool} + */ +proto.arduino.RequiredTool.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.RequiredTool; + return proto.arduino.RequiredTool.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.RequiredTool} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.RequiredTool} + */ +proto.arduino.RequiredTool.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.setVersion(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPackager(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.RequiredTool.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.RequiredTool.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.RequiredTool} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.RequiredTool.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPackager(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.arduino.RequiredTool.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.arduino.RequiredTool.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string version = 2; + * @return {string} + */ +proto.arduino.RequiredTool.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.RequiredTool.prototype.setVersion = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string packager = 3; + * @return {string} + */ +proto.arduino.RequiredTool.prototype.getPackager = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.RequiredTool.prototype.setPackager = function(value) { + jspb.Message.setProto3StringField(this, 3, 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.BoardListReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.BoardListReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.BoardListReq.displayName = 'proto.arduino.BoardListReq'; +} + + +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_, 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.BoardListReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.BoardListReq.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.BoardListReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.BoardListReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.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.arduino.BoardListReq} + */ +proto.arduino.BoardListReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.BoardListReq; + return proto.arduino.BoardListReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.BoardListReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.BoardListReq} + */ +proto.arduino.BoardListReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.BoardListReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.BoardListReq.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.BoardListReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.BoardListReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.BoardListReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.BoardListReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.BoardListReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.BoardListReq.prototype.hasInstance = 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.arduino.BoardListResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.arduino.BoardListResp.repeatedFields_, null); +}; +goog.inherits(proto.arduino.BoardListResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.BoardListResp.displayName = 'proto.arduino.BoardListResp'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.arduino.BoardListResp.repeatedFields_ = [1,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_, 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.BoardListResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.BoardListResp.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.BoardListResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.BoardListResp.toObject = function(includeInstance, msg) { + var f, obj = { + serialList: jspb.Message.toObjectList(msg.getSerialList(), + proto.arduino.AttachedSerialBoard.toObject, includeInstance), + networkList: jspb.Message.toObjectList(msg.getNetworkList(), + proto.arduino.AttachedNetworkBoard.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.arduino.BoardListResp} + */ +proto.arduino.BoardListResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.BoardListResp; + return proto.arduino.BoardListResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.BoardListResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.BoardListResp} + */ +proto.arduino.BoardListResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.arduino.AttachedSerialBoard; + reader.readMessage(value,proto.arduino.AttachedSerialBoard.deserializeBinaryFromReader); + msg.addSerial(value); + break; + case 2: + var value = new proto.arduino.AttachedNetworkBoard; + reader.readMessage(value,proto.arduino.AttachedNetworkBoard.deserializeBinaryFromReader); + msg.addNetwork(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.BoardListResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.BoardListResp.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.BoardListResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.BoardListResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSerialList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.arduino.AttachedSerialBoard.serializeBinaryToWriter + ); + } + f = message.getNetworkList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.arduino.AttachedNetworkBoard.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated AttachedSerialBoard serial = 1; + * @return {!Array} + */ +proto.arduino.BoardListResp.prototype.getSerialList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.arduino.AttachedSerialBoard, 1)); +}; + + +/** @param {!Array} value */ +proto.arduino.BoardListResp.prototype.setSerialList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.arduino.AttachedSerialBoard=} opt_value + * @param {number=} opt_index + * @return {!proto.arduino.AttachedSerialBoard} + */ +proto.arduino.BoardListResp.prototype.addSerial = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.arduino.AttachedSerialBoard, opt_index); +}; + + +proto.arduino.BoardListResp.prototype.clearSerialList = function() { + this.setSerialList([]); +}; + + +/** + * repeated AttachedNetworkBoard network = 2; + * @return {!Array} + */ +proto.arduino.BoardListResp.prototype.getNetworkList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.arduino.AttachedNetworkBoard, 2)); +}; + + +/** @param {!Array} value */ +proto.arduino.BoardListResp.prototype.setNetworkList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.arduino.AttachedNetworkBoard=} opt_value + * @param {number=} opt_index + * @return {!proto.arduino.AttachedNetworkBoard} + */ +proto.arduino.BoardListResp.prototype.addNetwork = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.arduino.AttachedNetworkBoard, opt_index); +}; + + +proto.arduino.BoardListResp.prototype.clearNetworkList = function() { + this.setNetworkList([]); +}; + + + +/** + * 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.AttachedNetworkBoard = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.AttachedNetworkBoard, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.AttachedNetworkBoard.displayName = 'proto.arduino.AttachedNetworkBoard'; +} + + +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_, 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.AttachedNetworkBoard.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.AttachedNetworkBoard.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.AttachedNetworkBoard} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.AttachedNetworkBoard.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""), + info: jspb.Message.getFieldWithDefault(msg, 3, ""), + address: jspb.Message.getFieldWithDefault(msg, 4, ""), + port: jspb.Message.getFieldWithDefault(msg, 5, 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.AttachedNetworkBoard} + */ +proto.arduino.AttachedNetworkBoard.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.AttachedNetworkBoard; + return proto.arduino.AttachedNetworkBoard.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.AttachedNetworkBoard} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.AttachedNetworkBoard} + */ +proto.arduino.AttachedNetworkBoard.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.setFqbn(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setInfo(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setPort(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.AttachedNetworkBoard.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.AttachedNetworkBoard.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.AttachedNetworkBoard} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.AttachedNetworkBoard.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFqbn(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getInfo(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getPort(); + if (f !== 0) { + writer.writeUint64( + 5, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.arduino.AttachedNetworkBoard.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.arduino.AttachedNetworkBoard.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string fqbn = 2; + * @return {string} + */ +proto.arduino.AttachedNetworkBoard.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.AttachedNetworkBoard.prototype.setFqbn = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string info = 3; + * @return {string} + */ +proto.arduino.AttachedNetworkBoard.prototype.getInfo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.AttachedNetworkBoard.prototype.setInfo = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string address = 4; + * @return {string} + */ +proto.arduino.AttachedNetworkBoard.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.arduino.AttachedNetworkBoard.prototype.setAddress = function(value) { + jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional uint64 port = 5; + * @return {number} + */ +proto.arduino.AttachedNetworkBoard.prototype.getPort = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** @param {number} value */ +proto.arduino.AttachedNetworkBoard.prototype.setPort = function(value) { + jspb.Message.setProto3IntField(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.AttachedSerialBoard = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.AttachedSerialBoard, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.AttachedSerialBoard.displayName = 'proto.arduino.AttachedSerialBoard'; +} + + +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_, 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.AttachedSerialBoard.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.AttachedSerialBoard.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.AttachedSerialBoard} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.AttachedSerialBoard.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""), + port: jspb.Message.getFieldWithDefault(msg, 3, ""), + serialnumber: jspb.Message.getFieldWithDefault(msg, 4, ""), + productid: jspb.Message.getFieldWithDefault(msg, 5, ""), + vendorid: jspb.Message.getFieldWithDefault(msg, 6, "") + }; + + 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.AttachedSerialBoard} + */ +proto.arduino.AttachedSerialBoard.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.AttachedSerialBoard; + return proto.arduino.AttachedSerialBoard.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.AttachedSerialBoard} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.AttachedSerialBoard} + */ +proto.arduino.AttachedSerialBoard.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.setFqbn(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setPort(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSerialnumber(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setProductid(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setVendorid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.AttachedSerialBoard.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.AttachedSerialBoard.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.AttachedSerialBoard} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.AttachedSerialBoard.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFqbn(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getPort(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSerialnumber(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getProductid(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getVendorid(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.arduino.AttachedSerialBoard.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.arduino.AttachedSerialBoard.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string fqbn = 2; + * @return {string} + */ +proto.arduino.AttachedSerialBoard.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.AttachedSerialBoard.prototype.setFqbn = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string port = 3; + * @return {string} + */ +proto.arduino.AttachedSerialBoard.prototype.getPort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.AttachedSerialBoard.prototype.setPort = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string serialNumber = 4; + * @return {string} + */ +proto.arduino.AttachedSerialBoard.prototype.getSerialnumber = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.arduino.AttachedSerialBoard.prototype.setSerialnumber = function(value) { + jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string productID = 5; + * @return {string} + */ +proto.arduino.AttachedSerialBoard.prototype.getProductid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** @param {string} value */ +proto.arduino.AttachedSerialBoard.prototype.setProductid = function(value) { + jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string vendorID = 6; + * @return {string} + */ +proto.arduino.AttachedSerialBoard.prototype.getVendorid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** @param {string} value */ +proto.arduino.AttachedSerialBoard.prototype.setVendorid = function(value) { + jspb.Message.setProto3StringField(this, 6, value); +}; + + +goog.object.extend(exports, proto.arduino); diff --git a/arduino-ide-extension/src/node/cli-protocol/commands_grpc_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands_grpc_pb.d.ts new file mode 100644 index 00000000..47effc5c --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands_grpc_pb.d.ts @@ -0,0 +1,330 @@ +// package: arduino +// file: commands.proto + +/* tslint:disable */ + +import * as grpc from "grpc"; +import * as commands_pb from "./commands_pb"; +import * as common_pb from "./common_pb"; +import * as board_pb from "./board_pb"; +import * as compile_pb from "./compile_pb"; +import * as core_pb from "./core_pb"; +import * as upload_pb from "./upload_pb"; +import * as lib_pb from "./lib_pb"; + +interface IArduinoCoreService extends grpc.ServiceDefinition { + init: IArduinoCoreService_IInit; + destroy: IArduinoCoreService_IDestroy; + rescan: IArduinoCoreService_IRescan; + updateIndex: IArduinoCoreService_IUpdateIndex; + boardList: IArduinoCoreService_IBoardList; + boardDetails: IArduinoCoreService_IBoardDetails; + compile: IArduinoCoreService_ICompile; + platformInstall: IArduinoCoreService_IPlatformInstall; + platformDownload: IArduinoCoreService_IPlatformDownload; + platformUninstall: IArduinoCoreService_IPlatformUninstall; + platformUpgrade: IArduinoCoreService_IPlatformUpgrade; + upload: IArduinoCoreService_IUpload; + platformSearch: IArduinoCoreService_IPlatformSearch; + platformList: IArduinoCoreService_IPlatformList; + libraryDownload: IArduinoCoreService_ILibraryDownload; + libraryInstall: IArduinoCoreService_ILibraryInstall; + libraryUninstall: IArduinoCoreService_ILibraryUninstall; + libraryUpgradeAll: IArduinoCoreService_ILibraryUpgradeAll; + librarySearch: IArduinoCoreService_ILibrarySearch; +} + +interface IArduinoCoreService_IInit extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/Init" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IDestroy extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/Destroy" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IRescan extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/Rescan" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IUpdateIndex extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/UpdateIndex" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IBoardList extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/BoardList" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IBoardDetails extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/BoardDetails" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_ICompile extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/Compile" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IPlatformInstall extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/PlatformInstall" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IPlatformDownload extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/PlatformDownload" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IPlatformUninstall extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/PlatformUninstall" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IPlatformUpgrade extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/PlatformUpgrade" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IUpload extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/Upload" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IPlatformSearch extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/PlatformSearch" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_IPlatformList extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/PlatformList" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_ILibraryDownload extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/LibraryDownload" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_ILibraryInstall extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/LibraryInstall" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_ILibraryUninstall extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/LibraryUninstall" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_ILibraryUpgradeAll extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/LibraryUpgradeAll" + requestStream: boolean; // false + responseStream: boolean; // true + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} +interface IArduinoCoreService_ILibrarySearch extends grpc.MethodDefinition { + path: string; // "/arduino.ArduinoCore/LibrarySearch" + requestStream: boolean; // false + responseStream: boolean; // false + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const ArduinoCoreService: IArduinoCoreService; + +export interface IArduinoCoreServer { + init: grpc.handleUnaryCall; + destroy: grpc.handleUnaryCall; + rescan: grpc.handleUnaryCall; + updateIndex: grpc.handleServerStreamingCall; + boardList: grpc.handleUnaryCall; + boardDetails: grpc.handleUnaryCall; + compile: grpc.handleServerStreamingCall; + platformInstall: grpc.handleServerStreamingCall; + platformDownload: grpc.handleServerStreamingCall; + platformUninstall: grpc.handleServerStreamingCall; + platformUpgrade: grpc.handleServerStreamingCall; + upload: grpc.handleServerStreamingCall; + platformSearch: grpc.handleUnaryCall; + platformList: grpc.handleUnaryCall; + libraryDownload: grpc.handleServerStreamingCall; + libraryInstall: grpc.handleServerStreamingCall; + libraryUninstall: grpc.handleServerStreamingCall; + libraryUpgradeAll: grpc.handleServerStreamingCall; + librarySearch: grpc.handleUnaryCall; +} + +export interface IArduinoCoreClient { + init(request: commands_pb.InitReq, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall; + init(request: commands_pb.InitReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall; + init(request: commands_pb.InitReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall; + destroy(request: commands_pb.DestroyReq, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; + destroy(request: commands_pb.DestroyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; + destroy(request: commands_pb.DestroyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; + rescan(request: commands_pb.RescanReq, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall; + rescan(request: commands_pb.RescanReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall; + rescan(request: commands_pb.RescanReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall; + updateIndex(request: commands_pb.UpdateIndexReq, options?: Partial): grpc.ClientReadableStream; + updateIndex(request: commands_pb.UpdateIndexReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + boardList(request: board_pb.BoardListReq, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall; + boardList(request: board_pb.BoardListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall; + boardList(request: board_pb.BoardListReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall; + boardDetails(request: board_pb.BoardDetailsReq, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; + boardDetails(request: board_pb.BoardDetailsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; + boardDetails(request: board_pb.BoardDetailsReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; + compile(request: compile_pb.CompileReq, options?: Partial): grpc.ClientReadableStream; + compile(request: compile_pb.CompileReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + platformInstall(request: core_pb.PlatformInstallReq, options?: Partial): grpc.ClientReadableStream; + platformInstall(request: core_pb.PlatformInstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + platformDownload(request: core_pb.PlatformDownloadReq, options?: Partial): grpc.ClientReadableStream; + platformDownload(request: core_pb.PlatformDownloadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + platformUninstall(request: core_pb.PlatformUninstallReq, options?: Partial): grpc.ClientReadableStream; + platformUninstall(request: core_pb.PlatformUninstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + platformUpgrade(request: core_pb.PlatformUpgradeReq, options?: Partial): grpc.ClientReadableStream; + platformUpgrade(request: core_pb.PlatformUpgradeReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + upload(request: upload_pb.UploadReq, options?: Partial): grpc.ClientReadableStream; + upload(request: upload_pb.UploadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + platformSearch(request: core_pb.PlatformSearchReq, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; + platformSearch(request: core_pb.PlatformSearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; + platformSearch(request: core_pb.PlatformSearchReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; + platformList(request: core_pb.PlatformListReq, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; + platformList(request: core_pb.PlatformListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; + platformList(request: core_pb.PlatformListReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; + libraryDownload(request: lib_pb.LibraryDownloadReq, options?: Partial): grpc.ClientReadableStream; + libraryDownload(request: lib_pb.LibraryDownloadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + libraryInstall(request: lib_pb.LibraryInstallReq, options?: Partial): grpc.ClientReadableStream; + libraryInstall(request: lib_pb.LibraryInstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + libraryUninstall(request: lib_pb.LibraryUninstallReq, options?: Partial): grpc.ClientReadableStream; + libraryUninstall(request: lib_pb.LibraryUninstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + libraryUpgradeAll(request: lib_pb.LibraryUpgradeAllReq, options?: Partial): grpc.ClientReadableStream; + libraryUpgradeAll(request: lib_pb.LibraryUpgradeAllReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + librarySearch(request: lib_pb.LibrarySearchReq, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; + librarySearch(request: lib_pb.LibrarySearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; + librarySearch(request: lib_pb.LibrarySearchReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; +} + +export class ArduinoCoreClient extends grpc.Client implements IArduinoCoreClient { + constructor(address: string, credentials: grpc.ChannelCredentials, options?: object); + public init(request: commands_pb.InitReq, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall; + public init(request: commands_pb.InitReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall; + public init(request: commands_pb.InitReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_pb.InitResp) => void): grpc.ClientUnaryCall; + public destroy(request: commands_pb.DestroyReq, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; + public destroy(request: commands_pb.DestroyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; + public destroy(request: commands_pb.DestroyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_pb.DestroyResp) => void): grpc.ClientUnaryCall; + public rescan(request: commands_pb.RescanReq, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall; + public rescan(request: commands_pb.RescanReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall; + public rescan(request: commands_pb.RescanReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: commands_pb.RescanResp) => void): grpc.ClientUnaryCall; + public updateIndex(request: commands_pb.UpdateIndexReq, options?: Partial): grpc.ClientReadableStream; + public updateIndex(request: commands_pb.UpdateIndexReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public boardList(request: board_pb.BoardListReq, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall; + public boardList(request: board_pb.BoardListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall; + public boardList(request: board_pb.BoardListReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: board_pb.BoardListResp) => void): grpc.ClientUnaryCall; + public boardDetails(request: board_pb.BoardDetailsReq, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; + public boardDetails(request: board_pb.BoardDetailsReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; + public boardDetails(request: board_pb.BoardDetailsReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: board_pb.BoardDetailsResp) => void): grpc.ClientUnaryCall; + public compile(request: compile_pb.CompileReq, options?: Partial): grpc.ClientReadableStream; + public compile(request: compile_pb.CompileReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public platformInstall(request: core_pb.PlatformInstallReq, options?: Partial): grpc.ClientReadableStream; + public platformInstall(request: core_pb.PlatformInstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public platformDownload(request: core_pb.PlatformDownloadReq, options?: Partial): grpc.ClientReadableStream; + public platformDownload(request: core_pb.PlatformDownloadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public platformUninstall(request: core_pb.PlatformUninstallReq, options?: Partial): grpc.ClientReadableStream; + public platformUninstall(request: core_pb.PlatformUninstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public platformUpgrade(request: core_pb.PlatformUpgradeReq, options?: Partial): grpc.ClientReadableStream; + public platformUpgrade(request: core_pb.PlatformUpgradeReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public upload(request: upload_pb.UploadReq, options?: Partial): grpc.ClientReadableStream; + public upload(request: upload_pb.UploadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public platformSearch(request: core_pb.PlatformSearchReq, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; + public platformSearch(request: core_pb.PlatformSearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; + public platformSearch(request: core_pb.PlatformSearchReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformSearchResp) => void): grpc.ClientUnaryCall; + public platformList(request: core_pb.PlatformListReq, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; + public platformList(request: core_pb.PlatformListReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; + public platformList(request: core_pb.PlatformListReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: core_pb.PlatformListResp) => void): grpc.ClientUnaryCall; + public libraryDownload(request: lib_pb.LibraryDownloadReq, options?: Partial): grpc.ClientReadableStream; + public libraryDownload(request: lib_pb.LibraryDownloadReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public libraryInstall(request: lib_pb.LibraryInstallReq, options?: Partial): grpc.ClientReadableStream; + public libraryInstall(request: lib_pb.LibraryInstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public libraryUninstall(request: lib_pb.LibraryUninstallReq, options?: Partial): grpc.ClientReadableStream; + public libraryUninstall(request: lib_pb.LibraryUninstallReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public libraryUpgradeAll(request: lib_pb.LibraryUpgradeAllReq, options?: Partial): grpc.ClientReadableStream; + public libraryUpgradeAll(request: lib_pb.LibraryUpgradeAllReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public librarySearch(request: lib_pb.LibrarySearchReq, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; + public librarySearch(request: lib_pb.LibrarySearchReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; + public librarySearch(request: lib_pb.LibrarySearchReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: lib_pb.LibrarySearchResp) => void): grpc.ClientUnaryCall; +} diff --git a/arduino-ide-extension/src/node/cli-protocol/commands_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands_grpc_pb.js new file mode 100644 index 00000000..114b663c --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands_grpc_pb.js @@ -0,0 +1,673 @@ +// GENERATED CODE -- DO NOT EDIT! + +// Original file comments: +// +// This file is part of arduino-cli. +// +// Copyright 2018 ARDUINO SA (http://www.arduino.cc/) +// +// This software is released under the GNU General Public License version 3, +// which covers the main part of arduino-cli. +// The terms of this license can be found at: +// https://www.gnu.org/licenses/gpl-3.0.en.html +// +// You can be released from the requirements of the above licenses by purchasing +// a commercial license. Buying such a license is mandatory if you want to modify or +// otherwise use the software for commercial activities involving the Arduino +// software without disclosing the source code of your own applications. To purchase +// a commercial license, send an email to license@arduino.cc. +// +// +'use strict'; +var grpc = require('grpc'); +var commands_pb = require('./commands_pb.js'); +var common_pb = require('./common_pb.js'); +var board_pb = require('./board_pb.js'); +var compile_pb = require('./compile_pb.js'); +var core_pb = require('./core_pb.js'); +var upload_pb = require('./upload_pb.js'); +var lib_pb = require('./lib_pb.js'); + +function serialize_arduino_BoardDetailsReq(arg) { + if (!(arg instanceof board_pb.BoardDetailsReq)) { + throw new Error('Expected argument of type arduino.BoardDetailsReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_BoardDetailsReq(buffer_arg) { + return board_pb.BoardDetailsReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_BoardDetailsResp(arg) { + if (!(arg instanceof board_pb.BoardDetailsResp)) { + throw new Error('Expected argument of type arduino.BoardDetailsResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_BoardDetailsResp(buffer_arg) { + return board_pb.BoardDetailsResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_BoardListReq(arg) { + if (!(arg instanceof board_pb.BoardListReq)) { + throw new Error('Expected argument of type arduino.BoardListReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_BoardListReq(buffer_arg) { + return board_pb.BoardListReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_BoardListResp(arg) { + if (!(arg instanceof board_pb.BoardListResp)) { + throw new Error('Expected argument of type arduino.BoardListResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_BoardListResp(buffer_arg) { + return board_pb.BoardListResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_CompileReq(arg) { + if (!(arg instanceof compile_pb.CompileReq)) { + throw new Error('Expected argument of type arduino.CompileReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_CompileReq(buffer_arg) { + return compile_pb.CompileReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_CompileResp(arg) { + if (!(arg instanceof compile_pb.CompileResp)) { + throw new Error('Expected argument of type arduino.CompileResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_CompileResp(buffer_arg) { + return compile_pb.CompileResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_DestroyReq(arg) { + if (!(arg instanceof commands_pb.DestroyReq)) { + throw new Error('Expected argument of type arduino.DestroyReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_DestroyReq(buffer_arg) { + return commands_pb.DestroyReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_DestroyResp(arg) { + if (!(arg instanceof commands_pb.DestroyResp)) { + throw new Error('Expected argument of type arduino.DestroyResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_DestroyResp(buffer_arg) { + return commands_pb.DestroyResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_InitReq(arg) { + if (!(arg instanceof commands_pb.InitReq)) { + throw new Error('Expected argument of type arduino.InitReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_InitReq(buffer_arg) { + return commands_pb.InitReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_InitResp(arg) { + if (!(arg instanceof commands_pb.InitResp)) { + throw new Error('Expected argument of type arduino.InitResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_InitResp(buffer_arg) { + return commands_pb.InitResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_LibraryDownloadReq(arg) { + if (!(arg instanceof lib_pb.LibraryDownloadReq)) { + throw new Error('Expected argument of type arduino.LibraryDownloadReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_LibraryDownloadReq(buffer_arg) { + return lib_pb.LibraryDownloadReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_LibraryDownloadResp(arg) { + if (!(arg instanceof lib_pb.LibraryDownloadResp)) { + throw new Error('Expected argument of type arduino.LibraryDownloadResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_LibraryDownloadResp(buffer_arg) { + return lib_pb.LibraryDownloadResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_LibraryInstallReq(arg) { + if (!(arg instanceof lib_pb.LibraryInstallReq)) { + throw new Error('Expected argument of type arduino.LibraryInstallReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_LibraryInstallReq(buffer_arg) { + return lib_pb.LibraryInstallReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_LibraryInstallResp(arg) { + if (!(arg instanceof lib_pb.LibraryInstallResp)) { + throw new Error('Expected argument of type arduino.LibraryInstallResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_LibraryInstallResp(buffer_arg) { + return lib_pb.LibraryInstallResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_LibrarySearchReq(arg) { + if (!(arg instanceof lib_pb.LibrarySearchReq)) { + throw new Error('Expected argument of type arduino.LibrarySearchReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_LibrarySearchReq(buffer_arg) { + return lib_pb.LibrarySearchReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_LibrarySearchResp(arg) { + if (!(arg instanceof lib_pb.LibrarySearchResp)) { + throw new Error('Expected argument of type arduino.LibrarySearchResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_LibrarySearchResp(buffer_arg) { + return lib_pb.LibrarySearchResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_LibraryUninstallReq(arg) { + if (!(arg instanceof lib_pb.LibraryUninstallReq)) { + throw new Error('Expected argument of type arduino.LibraryUninstallReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_LibraryUninstallReq(buffer_arg) { + return lib_pb.LibraryUninstallReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_LibraryUninstallResp(arg) { + if (!(arg instanceof lib_pb.LibraryUninstallResp)) { + throw new Error('Expected argument of type arduino.LibraryUninstallResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_LibraryUninstallResp(buffer_arg) { + return lib_pb.LibraryUninstallResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_LibraryUpgradeAllReq(arg) { + if (!(arg instanceof lib_pb.LibraryUpgradeAllReq)) { + throw new Error('Expected argument of type arduino.LibraryUpgradeAllReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_LibraryUpgradeAllReq(buffer_arg) { + return lib_pb.LibraryUpgradeAllReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_LibraryUpgradeAllResp(arg) { + if (!(arg instanceof lib_pb.LibraryUpgradeAllResp)) { + throw new Error('Expected argument of type arduino.LibraryUpgradeAllResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_LibraryUpgradeAllResp(buffer_arg) { + return lib_pb.LibraryUpgradeAllResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_PlatformDownloadReq(arg) { + if (!(arg instanceof core_pb.PlatformDownloadReq)) { + throw new Error('Expected argument of type arduino.PlatformDownloadReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_PlatformDownloadReq(buffer_arg) { + return core_pb.PlatformDownloadReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_PlatformDownloadResp(arg) { + if (!(arg instanceof core_pb.PlatformDownloadResp)) { + throw new Error('Expected argument of type arduino.PlatformDownloadResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_PlatformDownloadResp(buffer_arg) { + return core_pb.PlatformDownloadResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_PlatformInstallReq(arg) { + if (!(arg instanceof core_pb.PlatformInstallReq)) { + throw new Error('Expected argument of type arduino.PlatformInstallReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_PlatformInstallReq(buffer_arg) { + return core_pb.PlatformInstallReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_PlatformInstallResp(arg) { + if (!(arg instanceof core_pb.PlatformInstallResp)) { + throw new Error('Expected argument of type arduino.PlatformInstallResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_PlatformInstallResp(buffer_arg) { + return core_pb.PlatformInstallResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_PlatformListReq(arg) { + if (!(arg instanceof core_pb.PlatformListReq)) { + throw new Error('Expected argument of type arduino.PlatformListReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_PlatformListReq(buffer_arg) { + return core_pb.PlatformListReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_PlatformListResp(arg) { + if (!(arg instanceof core_pb.PlatformListResp)) { + throw new Error('Expected argument of type arduino.PlatformListResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_PlatformListResp(buffer_arg) { + return core_pb.PlatformListResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_PlatformSearchReq(arg) { + if (!(arg instanceof core_pb.PlatformSearchReq)) { + throw new Error('Expected argument of type arduino.PlatformSearchReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_PlatformSearchReq(buffer_arg) { + return core_pb.PlatformSearchReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_PlatformSearchResp(arg) { + if (!(arg instanceof core_pb.PlatformSearchResp)) { + throw new Error('Expected argument of type arduino.PlatformSearchResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_PlatformSearchResp(buffer_arg) { + return core_pb.PlatformSearchResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_PlatformUninstallReq(arg) { + if (!(arg instanceof core_pb.PlatformUninstallReq)) { + throw new Error('Expected argument of type arduino.PlatformUninstallReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_PlatformUninstallReq(buffer_arg) { + return core_pb.PlatformUninstallReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_PlatformUninstallResp(arg) { + if (!(arg instanceof core_pb.PlatformUninstallResp)) { + throw new Error('Expected argument of type arduino.PlatformUninstallResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_PlatformUninstallResp(buffer_arg) { + return core_pb.PlatformUninstallResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_PlatformUpgradeReq(arg) { + if (!(arg instanceof core_pb.PlatformUpgradeReq)) { + throw new Error('Expected argument of type arduino.PlatformUpgradeReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_PlatformUpgradeReq(buffer_arg) { + return core_pb.PlatformUpgradeReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_PlatformUpgradeResp(arg) { + if (!(arg instanceof core_pb.PlatformUpgradeResp)) { + throw new Error('Expected argument of type arduino.PlatformUpgradeResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_PlatformUpgradeResp(buffer_arg) { + return core_pb.PlatformUpgradeResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_RescanReq(arg) { + if (!(arg instanceof commands_pb.RescanReq)) { + throw new Error('Expected argument of type arduino.RescanReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_RescanReq(buffer_arg) { + return commands_pb.RescanReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_RescanResp(arg) { + if (!(arg instanceof commands_pb.RescanResp)) { + throw new Error('Expected argument of type arduino.RescanResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_RescanResp(buffer_arg) { + return commands_pb.RescanResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_UpdateIndexReq(arg) { + if (!(arg instanceof commands_pb.UpdateIndexReq)) { + throw new Error('Expected argument of type arduino.UpdateIndexReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_UpdateIndexReq(buffer_arg) { + return commands_pb.UpdateIndexReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_UpdateIndexResp(arg) { + if (!(arg instanceof commands_pb.UpdateIndexResp)) { + throw new Error('Expected argument of type arduino.UpdateIndexResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_UpdateIndexResp(buffer_arg) { + return commands_pb.UpdateIndexResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_UploadReq(arg) { + if (!(arg instanceof upload_pb.UploadReq)) { + throw new Error('Expected argument of type arduino.UploadReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_UploadReq(buffer_arg) { + return upload_pb.UploadReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_arduino_UploadResp(arg) { + if (!(arg instanceof upload_pb.UploadResp)) { + throw new Error('Expected argument of type arduino.UploadResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_arduino_UploadResp(buffer_arg) { + return upload_pb.UploadResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +// The main Arduino Platform Service +var ArduinoCoreService = exports.ArduinoCoreService = { + // Start a new instance of the Arduino Core Service + init: { + path: '/arduino.ArduinoCore/Init', + requestStream: false, + responseStream: false, + requestType: commands_pb.InitReq, + responseType: commands_pb.InitResp, + requestSerialize: serialize_arduino_InitReq, + requestDeserialize: deserialize_arduino_InitReq, + responseSerialize: serialize_arduino_InitResp, + responseDeserialize: deserialize_arduino_InitResp, + }, + // Destroy an instance of the Arduino Core Service + destroy: { + path: '/arduino.ArduinoCore/Destroy', + requestStream: false, + responseStream: false, + requestType: commands_pb.DestroyReq, + responseType: commands_pb.DestroyResp, + requestSerialize: serialize_arduino_DestroyReq, + requestDeserialize: deserialize_arduino_DestroyReq, + responseSerialize: serialize_arduino_DestroyResp, + responseDeserialize: deserialize_arduino_DestroyResp, + }, + // Rescan instance of the Arduino Core Service + rescan: { + path: '/arduino.ArduinoCore/Rescan', + requestStream: false, + responseStream: false, + requestType: commands_pb.RescanReq, + responseType: commands_pb.RescanResp, + requestSerialize: serialize_arduino_RescanReq, + requestDeserialize: deserialize_arduino_RescanReq, + responseSerialize: serialize_arduino_RescanResp, + responseDeserialize: deserialize_arduino_RescanResp, + }, + // Update package index of the Arduino Core Service + updateIndex: { + path: '/arduino.ArduinoCore/UpdateIndex', + requestStream: false, + responseStream: true, + requestType: commands_pb.UpdateIndexReq, + responseType: commands_pb.UpdateIndexResp, + requestSerialize: serialize_arduino_UpdateIndexReq, + requestDeserialize: deserialize_arduino_UpdateIndexReq, + responseSerialize: serialize_arduino_UpdateIndexResp, + responseDeserialize: deserialize_arduino_UpdateIndexResp, + }, + // BOARD COMMANDS + // -------------- + // + boardList: { + path: '/arduino.ArduinoCore/BoardList', + requestStream: false, + responseStream: false, + requestType: board_pb.BoardListReq, + responseType: board_pb.BoardListResp, + requestSerialize: serialize_arduino_BoardListReq, + requestDeserialize: deserialize_arduino_BoardListReq, + responseSerialize: serialize_arduino_BoardListResp, + responseDeserialize: deserialize_arduino_BoardListResp, + }, + // Requests details about a board + boardDetails: { + path: '/arduino.ArduinoCore/BoardDetails', + requestStream: false, + responseStream: false, + requestType: board_pb.BoardDetailsReq, + responseType: board_pb.BoardDetailsResp, + requestSerialize: serialize_arduino_BoardDetailsReq, + requestDeserialize: deserialize_arduino_BoardDetailsReq, + responseSerialize: serialize_arduino_BoardDetailsResp, + responseDeserialize: deserialize_arduino_BoardDetailsResp, + }, + compile: { + path: '/arduino.ArduinoCore/Compile', + requestStream: false, + responseStream: true, + requestType: compile_pb.CompileReq, + responseType: compile_pb.CompileResp, + requestSerialize: serialize_arduino_CompileReq, + requestDeserialize: deserialize_arduino_CompileReq, + responseSerialize: serialize_arduino_CompileResp, + responseDeserialize: deserialize_arduino_CompileResp, + }, + platformInstall: { + path: '/arduino.ArduinoCore/PlatformInstall', + requestStream: false, + responseStream: true, + requestType: core_pb.PlatformInstallReq, + responseType: core_pb.PlatformInstallResp, + requestSerialize: serialize_arduino_PlatformInstallReq, + requestDeserialize: deserialize_arduino_PlatformInstallReq, + responseSerialize: serialize_arduino_PlatformInstallResp, + responseDeserialize: deserialize_arduino_PlatformInstallResp, + }, + platformDownload: { + path: '/arduino.ArduinoCore/PlatformDownload', + requestStream: false, + responseStream: true, + requestType: core_pb.PlatformDownloadReq, + responseType: core_pb.PlatformDownloadResp, + requestSerialize: serialize_arduino_PlatformDownloadReq, + requestDeserialize: deserialize_arduino_PlatformDownloadReq, + responseSerialize: serialize_arduino_PlatformDownloadResp, + responseDeserialize: deserialize_arduino_PlatformDownloadResp, + }, + platformUninstall: { + path: '/arduino.ArduinoCore/PlatformUninstall', + requestStream: false, + responseStream: true, + requestType: core_pb.PlatformUninstallReq, + responseType: core_pb.PlatformUninstallResp, + requestSerialize: serialize_arduino_PlatformUninstallReq, + requestDeserialize: deserialize_arduino_PlatformUninstallReq, + responseSerialize: serialize_arduino_PlatformUninstallResp, + responseDeserialize: deserialize_arduino_PlatformUninstallResp, + }, + platformUpgrade: { + path: '/arduino.ArduinoCore/PlatformUpgrade', + requestStream: false, + responseStream: true, + requestType: core_pb.PlatformUpgradeReq, + responseType: core_pb.PlatformUpgradeResp, + requestSerialize: serialize_arduino_PlatformUpgradeReq, + requestDeserialize: deserialize_arduino_PlatformUpgradeReq, + responseSerialize: serialize_arduino_PlatformUpgradeResp, + responseDeserialize: deserialize_arduino_PlatformUpgradeResp, + }, + upload: { + path: '/arduino.ArduinoCore/Upload', + requestStream: false, + responseStream: true, + requestType: upload_pb.UploadReq, + responseType: upload_pb.UploadResp, + requestSerialize: serialize_arduino_UploadReq, + requestDeserialize: deserialize_arduino_UploadReq, + responseSerialize: serialize_arduino_UploadResp, + responseDeserialize: deserialize_arduino_UploadResp, + }, + platformSearch: { + path: '/arduino.ArduinoCore/PlatformSearch', + requestStream: false, + responseStream: false, + requestType: core_pb.PlatformSearchReq, + responseType: core_pb.PlatformSearchResp, + requestSerialize: serialize_arduino_PlatformSearchReq, + requestDeserialize: deserialize_arduino_PlatformSearchReq, + responseSerialize: serialize_arduino_PlatformSearchResp, + responseDeserialize: deserialize_arduino_PlatformSearchResp, + }, + platformList: { + path: '/arduino.ArduinoCore/PlatformList', + requestStream: false, + responseStream: false, + requestType: core_pb.PlatformListReq, + responseType: core_pb.PlatformListResp, + requestSerialize: serialize_arduino_PlatformListReq, + requestDeserialize: deserialize_arduino_PlatformListReq, + responseSerialize: serialize_arduino_PlatformListResp, + responseDeserialize: deserialize_arduino_PlatformListResp, + }, + libraryDownload: { + path: '/arduino.ArduinoCore/LibraryDownload', + requestStream: false, + responseStream: true, + requestType: lib_pb.LibraryDownloadReq, + responseType: lib_pb.LibraryDownloadResp, + requestSerialize: serialize_arduino_LibraryDownloadReq, + requestDeserialize: deserialize_arduino_LibraryDownloadReq, + responseSerialize: serialize_arduino_LibraryDownloadResp, + responseDeserialize: deserialize_arduino_LibraryDownloadResp, + }, + libraryInstall: { + path: '/arduino.ArduinoCore/LibraryInstall', + requestStream: false, + responseStream: true, + requestType: lib_pb.LibraryInstallReq, + responseType: lib_pb.LibraryInstallResp, + requestSerialize: serialize_arduino_LibraryInstallReq, + requestDeserialize: deserialize_arduino_LibraryInstallReq, + responseSerialize: serialize_arduino_LibraryInstallResp, + responseDeserialize: deserialize_arduino_LibraryInstallResp, + }, + libraryUninstall: { + path: '/arduino.ArduinoCore/LibraryUninstall', + requestStream: false, + responseStream: true, + requestType: lib_pb.LibraryUninstallReq, + responseType: lib_pb.LibraryUninstallResp, + requestSerialize: serialize_arduino_LibraryUninstallReq, + requestDeserialize: deserialize_arduino_LibraryUninstallReq, + responseSerialize: serialize_arduino_LibraryUninstallResp, + responseDeserialize: deserialize_arduino_LibraryUninstallResp, + }, + libraryUpgradeAll: { + path: '/arduino.ArduinoCore/LibraryUpgradeAll', + requestStream: false, + responseStream: true, + requestType: lib_pb.LibraryUpgradeAllReq, + responseType: lib_pb.LibraryUpgradeAllResp, + requestSerialize: serialize_arduino_LibraryUpgradeAllReq, + requestDeserialize: deserialize_arduino_LibraryUpgradeAllReq, + responseSerialize: serialize_arduino_LibraryUpgradeAllResp, + responseDeserialize: deserialize_arduino_LibraryUpgradeAllResp, + }, + librarySearch: { + path: '/arduino.ArduinoCore/LibrarySearch', + requestStream: false, + responseStream: false, + requestType: lib_pb.LibrarySearchReq, + responseType: lib_pb.LibrarySearchResp, + requestSerialize: serialize_arduino_LibrarySearchReq, + requestDeserialize: deserialize_arduino_LibrarySearchReq, + responseSerialize: serialize_arduino_LibrarySearchResp, + responseDeserialize: deserialize_arduino_LibrarySearchResp, + }, +}; + +exports.ArduinoCoreClient = grpc.makeGenericClientConstructor(ArduinoCoreService); +// BOOTSTRAP COMMANDS +// ------------------- diff --git a/arduino-ide-extension/src/node/cli-protocol/commands_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/commands_pb.d.ts new file mode 100644 index 00000000..75f54f2d --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands_pb.d.ts @@ -0,0 +1,249 @@ +// package: arduino +// file: commands.proto + +/* tslint:disable */ + +import * as jspb from "google-protobuf"; +import * as common_pb from "./common_pb"; +import * as board_pb from "./board_pb"; +import * as compile_pb from "./compile_pb"; +import * as core_pb from "./core_pb"; +import * as upload_pb from "./upload_pb"; +import * as lib_pb from "./lib_pb"; + +export class Configuration extends jspb.Message { + getDatadir(): string; + setDatadir(value: string): void; + + getSketchbookdir(): string; + setSketchbookdir(value: string): void; + + getDownloadsdir(): string; + setDownloadsdir(value: string): void; + + clearBoardmanageradditionalurlsList(): void; + getBoardmanageradditionalurlsList(): Array; + setBoardmanageradditionalurlsList(value: Array): void; + addBoardmanageradditionalurls(value: string, index?: number): string; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Configuration.AsObject; + static toObject(includeInstance: boolean, msg: Configuration): Configuration.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Configuration, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Configuration; + static deserializeBinaryFromReader(message: Configuration, reader: jspb.BinaryReader): Configuration; +} + +export namespace Configuration { + export type AsObject = { + datadir: string, + sketchbookdir: string, + downloadsdir: string, + boardmanageradditionalurlsList: Array, + } +} + +export class InitReq extends jspb.Message { + + hasConfiguration(): boolean; + clearConfiguration(): void; + getConfiguration(): Configuration | undefined; + setConfiguration(value?: Configuration): void; + + getLibraryManagerOnly(): boolean; + setLibraryManagerOnly(value: boolean): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InitReq.AsObject; + static toObject(includeInstance: boolean, msg: InitReq): InitReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InitReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InitReq; + static deserializeBinaryFromReader(message: InitReq, reader: jspb.BinaryReader): InitReq; +} + +export namespace InitReq { + export type AsObject = { + configuration?: Configuration.AsObject, + libraryManagerOnly: boolean, + } +} + +export class InitResp extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + clearPlatformsIndexErrorsList(): void; + getPlatformsIndexErrorsList(): Array; + setPlatformsIndexErrorsList(value: Array): void; + addPlatformsIndexErrors(value: string, index?: number): string; + + getLibrariesIndexError(): string; + setLibrariesIndexError(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InitResp.AsObject; + static toObject(includeInstance: boolean, msg: InitResp): InitResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InitResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InitResp; + static deserializeBinaryFromReader(message: InitResp, reader: jspb.BinaryReader): InitResp; +} + +export namespace InitResp { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + platformsIndexErrorsList: Array, + librariesIndexError: string, + } +} + +export class DestroyReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DestroyReq.AsObject; + static toObject(includeInstance: boolean, msg: DestroyReq): DestroyReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DestroyReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DestroyReq; + static deserializeBinaryFromReader(message: DestroyReq, reader: jspb.BinaryReader): DestroyReq; +} + +export namespace DestroyReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + } +} + +export class DestroyResp extends jspb.Message { + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DestroyResp.AsObject; + static toObject(includeInstance: boolean, msg: DestroyResp): DestroyResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DestroyResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DestroyResp; + static deserializeBinaryFromReader(message: DestroyResp, reader: jspb.BinaryReader): DestroyResp; +} + +export namespace DestroyResp { + export type AsObject = { + } +} + +export class RescanReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RescanReq.AsObject; + static toObject(includeInstance: boolean, msg: RescanReq): RescanReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RescanReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RescanReq; + static deserializeBinaryFromReader(message: RescanReq, reader: jspb.BinaryReader): RescanReq; +} + +export namespace RescanReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + } +} + +export class RescanResp extends jspb.Message { + clearPlatformsIndexErrorsList(): void; + getPlatformsIndexErrorsList(): Array; + setPlatformsIndexErrorsList(value: Array): void; + addPlatformsIndexErrors(value: string, index?: number): string; + + getLibrariesIndexError(): string; + setLibrariesIndexError(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): RescanResp.AsObject; + static toObject(includeInstance: boolean, msg: RescanResp): RescanResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: RescanResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RescanResp; + static deserializeBinaryFromReader(message: RescanResp, reader: jspb.BinaryReader): RescanResp; +} + +export namespace RescanResp { + export type AsObject = { + platformsIndexErrorsList: Array, + librariesIndexError: string, + } +} + +export class UpdateIndexReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateIndexReq.AsObject; + static toObject(includeInstance: boolean, msg: UpdateIndexReq): UpdateIndexReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateIndexReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateIndexReq; + static deserializeBinaryFromReader(message: UpdateIndexReq, reader: jspb.BinaryReader): UpdateIndexReq; +} + +export namespace UpdateIndexReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + } +} + +export class UpdateIndexResp extends jspb.Message { + + hasDownloadProgress(): boolean; + clearDownloadProgress(): void; + getDownloadProgress(): common_pb.DownloadProgress | undefined; + setDownloadProgress(value?: common_pb.DownloadProgress): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UpdateIndexResp.AsObject; + static toObject(includeInstance: boolean, msg: UpdateIndexResp): UpdateIndexResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UpdateIndexResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UpdateIndexResp; + static deserializeBinaryFromReader(message: UpdateIndexResp, reader: jspb.BinaryReader): UpdateIndexResp; +} + +export namespace UpdateIndexResp { + export type AsObject = { + downloadProgress?: common_pb.DownloadProgress.AsObject, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/commands_pb.js b/arduino-ide-extension/src/node/cli-protocol/commands_pb.js new file mode 100644 index 00000000..d0c299ba --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/commands_pb.js @@ -0,0 +1,1643 @@ +/** + * @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 common_pb = require('./common_pb.js'); +goog.object.extend(proto, common_pb); +var board_pb = require('./board_pb.js'); +goog.object.extend(proto, board_pb); +var compile_pb = require('./compile_pb.js'); +goog.object.extend(proto, compile_pb); +var core_pb = require('./core_pb.js'); +goog.object.extend(proto, core_pb); +var upload_pb = require('./upload_pb.js'); +goog.object.extend(proto, upload_pb); +var lib_pb = require('./lib_pb.js'); +goog.object.extend(proto, lib_pb); +goog.exportSymbol('proto.arduino.Configuration', null, global); +goog.exportSymbol('proto.arduino.DestroyReq', null, global); +goog.exportSymbol('proto.arduino.DestroyResp', null, global); +goog.exportSymbol('proto.arduino.InitReq', null, global); +goog.exportSymbol('proto.arduino.InitResp', null, global); +goog.exportSymbol('proto.arduino.RescanReq', null, global); +goog.exportSymbol('proto.arduino.RescanResp', null, global); +goog.exportSymbol('proto.arduino.UpdateIndexReq', null, global); +goog.exportSymbol('proto.arduino.UpdateIndexResp', 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.Configuration = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.arduino.Configuration.repeatedFields_, null); +}; +goog.inherits(proto.arduino.Configuration, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.Configuration.displayName = 'proto.arduino.Configuration'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.arduino.Configuration.repeatedFields_ = [4]; + + + +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_, 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.Configuration.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.Configuration.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.Configuration} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.Configuration.toObject = function(includeInstance, msg) { + var f, obj = { + datadir: jspb.Message.getFieldWithDefault(msg, 1, ""), + sketchbookdir: jspb.Message.getFieldWithDefault(msg, 2, ""), + downloadsdir: jspb.Message.getFieldWithDefault(msg, 3, ""), + boardmanageradditionalurlsList: jspb.Message.getRepeatedField(msg, 4) + }; + + 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.Configuration} + */ +proto.arduino.Configuration.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.Configuration; + return proto.arduino.Configuration.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.Configuration} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.Configuration} + */ +proto.arduino.Configuration.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.setDatadir(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSketchbookdir(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setDownloadsdir(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.addBoardmanageradditionalurls(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.Configuration.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.Configuration.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.Configuration} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.Configuration.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDatadir(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSketchbookdir(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getDownloadsdir(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getBoardmanageradditionalurlsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 4, + f + ); + } +}; + + +/** + * optional string dataDir = 1; + * @return {string} + */ +proto.arduino.Configuration.prototype.getDatadir = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.arduino.Configuration.prototype.setDatadir = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string sketchbookDir = 2; + * @return {string} + */ +proto.arduino.Configuration.prototype.getSketchbookdir = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.Configuration.prototype.setSketchbookdir = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string downloadsDir = 3; + * @return {string} + */ +proto.arduino.Configuration.prototype.getDownloadsdir = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.Configuration.prototype.setDownloadsdir = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * repeated string boardManagerAdditionalUrls = 4; + * @return {!Array} + */ +proto.arduino.Configuration.prototype.getBoardmanageradditionalurlsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** @param {!Array} value */ +proto.arduino.Configuration.prototype.setBoardmanageradditionalurlsList = function(value) { + jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.arduino.Configuration.prototype.addBoardmanageradditionalurls = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +proto.arduino.Configuration.prototype.clearBoardmanageradditionalurlsList = function() { + this.setBoardmanageradditionalurlsList([]); +}; + + + +/** + * 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.InitReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.InitReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.InitReq.displayName = 'proto.arduino.InitReq'; +} + + +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_, 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.InitReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.InitReq.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.InitReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.InitReq.toObject = function(includeInstance, msg) { + var f, obj = { + configuration: (f = msg.getConfiguration()) && proto.arduino.Configuration.toObject(includeInstance, f), + libraryManagerOnly: jspb.Message.getFieldWithDefault(msg, 2, 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.InitReq} + */ +proto.arduino.InitReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.InitReq; + return proto.arduino.InitReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.InitReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.InitReq} + */ +proto.arduino.InitReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.arduino.Configuration; + reader.readMessage(value,proto.arduino.Configuration.deserializeBinaryFromReader); + msg.setConfiguration(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setLibraryManagerOnly(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.InitReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.InitReq.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.InitReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.InitReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getConfiguration(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.arduino.Configuration.serializeBinaryToWriter + ); + } + f = message.getLibraryManagerOnly(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional Configuration configuration = 1; + * @return {?proto.arduino.Configuration} + */ +proto.arduino.InitReq.prototype.getConfiguration = function() { + return /** @type{?proto.arduino.Configuration} */ ( + jspb.Message.getWrapperField(this, proto.arduino.Configuration, 1)); +}; + + +/** @param {?proto.arduino.Configuration|undefined} value */ +proto.arduino.InitReq.prototype.setConfiguration = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.InitReq.prototype.clearConfiguration = function() { + this.setConfiguration(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.InitReq.prototype.hasConfiguration = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool library_manager_only = 2; + * 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.InitReq.prototype.getLibraryManagerOnly = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.arduino.InitReq.prototype.setLibraryManagerOnly = function(value) { + jspb.Message.setProto3BooleanField(this, 2, 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.InitResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.arduino.InitResp.repeatedFields_, null); +}; +goog.inherits(proto.arduino.InitResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.InitResp.displayName = 'proto.arduino.InitResp'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.arduino.InitResp.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_, 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.InitResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.InitResp.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.InitResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.InitResp.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f), + platformsIndexErrorsList: jspb.Message.getRepeatedField(msg, 2), + librariesIndexError: 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.arduino.InitResp} + */ +proto.arduino.InitResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.InitResp; + return proto.arduino.InitResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.InitResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.InitResp} + */ +proto.arduino.InitResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.addPlatformsIndexErrors(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLibrariesIndexError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.InitResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.InitResp.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.InitResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.InitResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getPlatformsIndexErrorsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 2, + f + ); + } + f = message.getLibrariesIndexError(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.InitResp.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.InitResp.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.InitResp.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.InitResp.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated string platforms_index_errors = 2; + * @return {!Array} + */ +proto.arduino.InitResp.prototype.getPlatformsIndexErrorsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** @param {!Array} value */ +proto.arduino.InitResp.prototype.setPlatformsIndexErrorsList = function(value) { + jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.arduino.InitResp.prototype.addPlatformsIndexErrors = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +proto.arduino.InitResp.prototype.clearPlatformsIndexErrorsList = function() { + this.setPlatformsIndexErrorsList([]); +}; + + +/** + * optional string libraries_index_error = 3; + * @return {string} + */ +proto.arduino.InitResp.prototype.getLibrariesIndexError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.InitResp.prototype.setLibrariesIndexError = function(value) { + jspb.Message.setProto3StringField(this, 3, 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.DestroyReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.DestroyReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.DestroyReq.displayName = 'proto.arduino.DestroyReq'; +} + + +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_, 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.DestroyReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.DestroyReq.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.DestroyReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.DestroyReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.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.arduino.DestroyReq} + */ +proto.arduino.DestroyReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.DestroyReq; + return proto.arduino.DestroyReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.DestroyReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.DestroyReq} + */ +proto.arduino.DestroyReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.DestroyReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.DestroyReq.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.DestroyReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.DestroyReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.DestroyReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.DestroyReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.DestroyReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.DestroyReq.prototype.hasInstance = 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.arduino.DestroyResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.DestroyResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.DestroyResp.displayName = 'proto.arduino.DestroyResp'; +} + + +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_, 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.DestroyResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.DestroyResp.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.DestroyResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.DestroyResp.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.arduino.DestroyResp} + */ +proto.arduino.DestroyResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.DestroyResp; + return proto.arduino.DestroyResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.DestroyResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.DestroyResp} + */ +proto.arduino.DestroyResp.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.arduino.DestroyResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.DestroyResp.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.DestroyResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.DestroyResp.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.arduino.RescanReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.RescanReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.RescanReq.displayName = 'proto.arduino.RescanReq'; +} + + +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_, 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.RescanReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.RescanReq.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.RescanReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.RescanReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.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.arduino.RescanReq} + */ +proto.arduino.RescanReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.RescanReq; + return proto.arduino.RescanReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.RescanReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.RescanReq} + */ +proto.arduino.RescanReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.RescanReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.RescanReq.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.RescanReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.RescanReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.RescanReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.RescanReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.RescanReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.RescanReq.prototype.hasInstance = 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.arduino.RescanResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.arduino.RescanResp.repeatedFields_, null); +}; +goog.inherits(proto.arduino.RescanResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.RescanResp.displayName = 'proto.arduino.RescanResp'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.arduino.RescanResp.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_, 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.RescanResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.RescanResp.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.RescanResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.RescanResp.toObject = function(includeInstance, msg) { + var f, obj = { + platformsIndexErrorsList: jspb.Message.getRepeatedField(msg, 1), + librariesIndexError: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + 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.RescanResp} + */ +proto.arduino.RescanResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.RescanResp; + return proto.arduino.RescanResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.RescanResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.RescanResp} + */ +proto.arduino.RescanResp.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.addPlatformsIndexErrors(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setLibrariesIndexError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.RescanResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.RescanResp.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.RescanResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.RescanResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPlatformsIndexErrorsList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } + f = message.getLibrariesIndexError(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * repeated string platforms_index_errors = 1; + * @return {!Array} + */ +proto.arduino.RescanResp.prototype.getPlatformsIndexErrorsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** @param {!Array} value */ +proto.arduino.RescanResp.prototype.setPlatformsIndexErrorsList = function(value) { + jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.arduino.RescanResp.prototype.addPlatformsIndexErrors = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +proto.arduino.RescanResp.prototype.clearPlatformsIndexErrorsList = function() { + this.setPlatformsIndexErrorsList([]); +}; + + +/** + * optional string libraries_index_error = 2; + * @return {string} + */ +proto.arduino.RescanResp.prototype.getLibrariesIndexError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.RescanResp.prototype.setLibrariesIndexError = function(value) { + jspb.Message.setProto3StringField(this, 2, 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.UpdateIndexReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.UpdateIndexReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.UpdateIndexReq.displayName = 'proto.arduino.UpdateIndexReq'; +} + + +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_, 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.UpdateIndexReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.UpdateIndexReq.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.UpdateIndexReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.UpdateIndexReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.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.arduino.UpdateIndexReq} + */ +proto.arduino.UpdateIndexReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.UpdateIndexReq; + return proto.arduino.UpdateIndexReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.UpdateIndexReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.UpdateIndexReq} + */ +proto.arduino.UpdateIndexReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.UpdateIndexReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.UpdateIndexReq.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.UpdateIndexReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.UpdateIndexReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.UpdateIndexReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.UpdateIndexReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.UpdateIndexReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.UpdateIndexReq.prototype.hasInstance = 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.arduino.UpdateIndexResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.UpdateIndexResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.UpdateIndexResp.displayName = 'proto.arduino.UpdateIndexResp'; +} + + +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_, 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.UpdateIndexResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.UpdateIndexResp.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.UpdateIndexResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.UpdateIndexResp.toObject = function(includeInstance, msg) { + var f, obj = { + downloadProgress: (f = msg.getDownloadProgress()) && common_pb.DownloadProgress.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.arduino.UpdateIndexResp} + */ +proto.arduino.UpdateIndexResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.UpdateIndexResp; + return proto.arduino.UpdateIndexResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.UpdateIndexResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.UpdateIndexResp} + */ +proto.arduino.UpdateIndexResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.DownloadProgress; + reader.readMessage(value,common_pb.DownloadProgress.deserializeBinaryFromReader); + msg.setDownloadProgress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.UpdateIndexResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.UpdateIndexResp.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.UpdateIndexResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.UpdateIndexResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDownloadProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.DownloadProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DownloadProgress download_progress = 1; + * @return {?proto.arduino.DownloadProgress} + */ +proto.arduino.UpdateIndexResp.prototype.getDownloadProgress = function() { + return /** @type{?proto.arduino.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, common_pb.DownloadProgress, 1)); +}; + + +/** @param {?proto.arduino.DownloadProgress|undefined} value */ +proto.arduino.UpdateIndexResp.prototype.setDownloadProgress = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.UpdateIndexResp.prototype.clearDownloadProgress = function() { + this.setDownloadProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.UpdateIndexResp.prototype.hasDownloadProgress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +goog.object.extend(exports, proto.arduino); diff --git a/arduino-ide-extension/src/node/cli-protocol/common_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/common_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/common_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/arduino-ide-extension/src/node/cli-protocol/common_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/common_pb.d.ts new file mode 100644 index 00000000..7a3efa50 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/common_pb.d.ts @@ -0,0 +1,93 @@ +// package: arduino +// file: common.proto + +/* tslint:disable */ + +import * as jspb from "google-protobuf"; + +export class Instance extends jspb.Message { + getId(): number; + setId(value: number): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Instance.AsObject; + static toObject(includeInstance: boolean, msg: Instance): Instance.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: Instance, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Instance; + static deserializeBinaryFromReader(message: Instance, reader: jspb.BinaryReader): Instance; +} + +export namespace Instance { + export type AsObject = { + id: number, + } +} + +export class DownloadProgress extends jspb.Message { + getUrl(): string; + setUrl(value: string): void; + + getFile(): string; + setFile(value: string): void; + + getTotalSize(): number; + setTotalSize(value: number): void; + + getDownloaded(): number; + setDownloaded(value: number): void; + + getCompleted(): boolean; + setCompleted(value: boolean): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DownloadProgress.AsObject; + static toObject(includeInstance: boolean, msg: DownloadProgress): DownloadProgress.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DownloadProgress, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DownloadProgress; + static deserializeBinaryFromReader(message: DownloadProgress, reader: jspb.BinaryReader): DownloadProgress; +} + +export namespace DownloadProgress { + export type AsObject = { + url: string, + file: string, + totalSize: number, + downloaded: number, + completed: boolean, + } +} + +export class TaskProgress extends jspb.Message { + getName(): string; + setName(value: string): void; + + getMessage(): string; + setMessage(value: string): void; + + getCompleted(): boolean; + setCompleted(value: boolean): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskProgress.AsObject; + static toObject(includeInstance: boolean, msg: TaskProgress): TaskProgress.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TaskProgress, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskProgress; + static deserializeBinaryFromReader(message: TaskProgress, reader: jspb.BinaryReader): TaskProgress; +} + +export namespace TaskProgress { + export type AsObject = { + name: string, + message: string, + completed: boolean, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/common_pb.js b/arduino-ide-extension/src/node/cli-protocol/common_pb.js new file mode 100644 index 00000000..c4c1c252 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/common_pb.js @@ -0,0 +1,609 @@ +/** + * @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_, 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_, 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_, 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); diff --git a/arduino-ide-extension/src/node/cli-protocol/compile_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/compile_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/compile_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/arduino-ide-extension/src/node/cli-protocol/compile_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/compile_pb.d.ts new file mode 100644 index 00000000..ef0885e3 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/compile_pb.d.ts @@ -0,0 +1,124 @@ +// package: arduino +// file: compile.proto + +/* tslint:disable */ + +import * as jspb from "google-protobuf"; +import * as common_pb from "./common_pb"; + +export class CompileReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + getFqbn(): string; + setFqbn(value: string): void; + + getSketchpath(): string; + setSketchpath(value: string): void; + + getShowproperties(): boolean; + setShowproperties(value: boolean): void; + + getPreprocess(): boolean; + setPreprocess(value: boolean): void; + + getBuildcachepath(): string; + setBuildcachepath(value: string): void; + + getBuildpath(): string; + setBuildpath(value: string): void; + + clearBuildpropertiesList(): void; + getBuildpropertiesList(): Array; + setBuildpropertiesList(value: Array): void; + addBuildproperties(value: string, index?: number): string; + + getWarnings(): string; + setWarnings(value: string): void; + + getVerbose(): boolean; + setVerbose(value: boolean): void; + + getQuiet(): boolean; + setQuiet(value: boolean): void; + + getVidpid(): string; + setVidpid(value: string): void; + + getExportfile(): string; + setExportfile(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CompileReq.AsObject; + static toObject(includeInstance: boolean, msg: CompileReq): CompileReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CompileReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CompileReq; + static deserializeBinaryFromReader(message: CompileReq, reader: jspb.BinaryReader): CompileReq; +} + +export namespace CompileReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + fqbn: string, + sketchpath: string, + showproperties: boolean, + preprocess: boolean, + buildcachepath: string, + buildpath: string, + buildpropertiesList: Array, + warnings: string, + verbose: boolean, + quiet: boolean, + vidpid: string, + exportfile: string, + } +} + +export class CompileResp extends jspb.Message { + getOutStream(): Uint8Array | string; + getOutStream_asU8(): Uint8Array; + getOutStream_asB64(): string; + setOutStream(value: Uint8Array | string): void; + + getErrStream(): Uint8Array | string; + getErrStream_asU8(): Uint8Array; + getErrStream_asB64(): string; + setErrStream(value: Uint8Array | string): void; + + + hasDownloadProgress(): boolean; + clearDownloadProgress(): void; + getDownloadProgress(): common_pb.DownloadProgress | undefined; + setDownloadProgress(value?: common_pb.DownloadProgress): void; + + + hasTaskProgress(): boolean; + clearTaskProgress(): void; + getTaskProgress(): common_pb.TaskProgress | undefined; + setTaskProgress(value?: common_pb.TaskProgress): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CompileResp.AsObject; + static toObject(includeInstance: boolean, msg: CompileResp): CompileResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CompileResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CompileResp; + static deserializeBinaryFromReader(message: CompileResp, reader: jspb.BinaryReader): CompileResp; +} + +export namespace CompileResp { + export type AsObject = { + outStream: Uint8Array | string, + errStream: Uint8Array | string, + downloadProgress?: common_pb.DownloadProgress.AsObject, + taskProgress?: common_pb.TaskProgress.AsObject, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/compile_pb.js b/arduino-ide-extension/src/node/cli-protocol/compile_pb.js new file mode 100644 index 00000000..e5a253de --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/compile_pb.js @@ -0,0 +1,835 @@ +/** + * @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 common_pb = require('./common_pb.js'); +goog.object.extend(proto, common_pb); +goog.exportSymbol('proto.arduino.CompileReq', null, global); +goog.exportSymbol('proto.arduino.CompileResp', 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.CompileReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.arduino.CompileReq.repeatedFields_, null); +}; +goog.inherits(proto.arduino.CompileReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.CompileReq.displayName = 'proto.arduino.CompileReq'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.arduino.CompileReq.repeatedFields_ = [8]; + + + +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_, 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.CompileReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.CompileReq.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.CompileReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.CompileReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f), + fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""), + sketchpath: jspb.Message.getFieldWithDefault(msg, 3, ""), + showproperties: jspb.Message.getFieldWithDefault(msg, 4, false), + preprocess: jspb.Message.getFieldWithDefault(msg, 5, false), + buildcachepath: jspb.Message.getFieldWithDefault(msg, 6, ""), + buildpath: jspb.Message.getFieldWithDefault(msg, 7, ""), + buildpropertiesList: jspb.Message.getRepeatedField(msg, 8), + warnings: jspb.Message.getFieldWithDefault(msg, 9, ""), + verbose: jspb.Message.getFieldWithDefault(msg, 10, false), + quiet: jspb.Message.getFieldWithDefault(msg, 11, false), + vidpid: jspb.Message.getFieldWithDefault(msg, 12, ""), + exportfile: jspb.Message.getFieldWithDefault(msg, 13, "") + }; + + 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.CompileReq} + */ +proto.arduino.CompileReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.CompileReq; + return proto.arduino.CompileReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.CompileReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.CompileReq} + */ +proto.arduino.CompileReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFqbn(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSketchpath(value); + break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setShowproperties(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setPreprocess(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setBuildcachepath(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setBuildpath(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.addBuildproperties(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setWarnings(value); + break; + case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setVerbose(value); + break; + case 11: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setQuiet(value); + break; + case 12: + var value = /** @type {string} */ (reader.readString()); + msg.setVidpid(value); + break; + case 13: + var value = /** @type {string} */ (reader.readString()); + msg.setExportfile(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.CompileReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.CompileReq.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.CompileReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.CompileReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getFqbn(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSketchpath(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getShowproperties(); + if (f) { + writer.writeBool( + 4, + f + ); + } + f = message.getPreprocess(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getBuildcachepath(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getBuildpath(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getBuildpropertiesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 8, + f + ); + } + f = message.getWarnings(); + if (f.length > 0) { + writer.writeString( + 9, + f + ); + } + f = message.getVerbose(); + if (f) { + writer.writeBool( + 10, + f + ); + } + f = message.getQuiet(); + if (f) { + writer.writeBool( + 11, + f + ); + } + f = message.getVidpid(); + if (f.length > 0) { + writer.writeString( + 12, + f + ); + } + f = message.getExportfile(); + if (f.length > 0) { + writer.writeString( + 13, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.CompileReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.CompileReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.CompileReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.CompileReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string fqbn = 2; + * @return {string} + */ +proto.arduino.CompileReq.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.CompileReq.prototype.setFqbn = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string sketchPath = 3; + * @return {string} + */ +proto.arduino.CompileReq.prototype.getSketchpath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.CompileReq.prototype.setSketchpath = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional bool showProperties = 4; + * 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.CompileReq.prototype.getShowproperties = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); +}; + + +/** @param {boolean} value */ +proto.arduino.CompileReq.prototype.setShowproperties = function(value) { + jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional bool preprocess = 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.CompileReq.prototype.getPreprocess = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); +}; + + +/** @param {boolean} value */ +proto.arduino.CompileReq.prototype.setPreprocess = function(value) { + jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional string buildCachePath = 6; + * @return {string} + */ +proto.arduino.CompileReq.prototype.getBuildcachepath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** @param {string} value */ +proto.arduino.CompileReq.prototype.setBuildcachepath = function(value) { + jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string buildPath = 7; + * @return {string} + */ +proto.arduino.CompileReq.prototype.getBuildpath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** @param {string} value */ +proto.arduino.CompileReq.prototype.setBuildpath = function(value) { + jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * repeated string buildProperties = 8; + * @return {!Array} + */ +proto.arduino.CompileReq.prototype.getBuildpropertiesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** @param {!Array} value */ +proto.arduino.CompileReq.prototype.setBuildpropertiesList = function(value) { + jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.arduino.CompileReq.prototype.addBuildproperties = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +proto.arduino.CompileReq.prototype.clearBuildpropertiesList = function() { + this.setBuildpropertiesList([]); +}; + + +/** + * optional string warnings = 9; + * @return {string} + */ +proto.arduino.CompileReq.prototype.getWarnings = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + + +/** @param {string} value */ +proto.arduino.CompileReq.prototype.setWarnings = function(value) { + jspb.Message.setProto3StringField(this, 9, value); +}; + + +/** + * optional bool verbose = 10; + * 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.CompileReq.prototype.getVerbose = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 10, false)); +}; + + +/** @param {boolean} value */ +proto.arduino.CompileReq.prototype.setVerbose = function(value) { + jspb.Message.setProto3BooleanField(this, 10, value); +}; + + +/** + * optional bool quiet = 11; + * 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.CompileReq.prototype.getQuiet = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 11, false)); +}; + + +/** @param {boolean} value */ +proto.arduino.CompileReq.prototype.setQuiet = function(value) { + jspb.Message.setProto3BooleanField(this, 11, value); +}; + + +/** + * optional string vidPid = 12; + * @return {string} + */ +proto.arduino.CompileReq.prototype.getVidpid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 12, "")); +}; + + +/** @param {string} value */ +proto.arduino.CompileReq.prototype.setVidpid = function(value) { + jspb.Message.setProto3StringField(this, 12, value); +}; + + +/** + * optional string exportFile = 13; + * @return {string} + */ +proto.arduino.CompileReq.prototype.getExportfile = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + + +/** @param {string} value */ +proto.arduino.CompileReq.prototype.setExportfile = function(value) { + jspb.Message.setProto3StringField(this, 13, 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.CompileResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.CompileResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.CompileResp.displayName = 'proto.arduino.CompileResp'; +} + + +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_, 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.CompileResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.CompileResp.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.CompileResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.CompileResp.toObject = function(includeInstance, msg) { + var f, obj = { + outStream: msg.getOutStream_asB64(), + errStream: msg.getErrStream_asB64(), + downloadProgress: (f = msg.getDownloadProgress()) && common_pb.DownloadProgress.toObject(includeInstance, f), + taskProgress: (f = msg.getTaskProgress()) && common_pb.TaskProgress.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.arduino.CompileResp} + */ +proto.arduino.CompileResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.CompileResp; + return proto.arduino.CompileResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.CompileResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.CompileResp} + */ +proto.arduino.CompileResp.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.setOutStream(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setErrStream(value); + break; + case 3: + var value = new common_pb.DownloadProgress; + reader.readMessage(value,common_pb.DownloadProgress.deserializeBinaryFromReader); + msg.setDownloadProgress(value); + break; + case 4: + var value = new common_pb.TaskProgress; + reader.readMessage(value,common_pb.TaskProgress.deserializeBinaryFromReader); + msg.setTaskProgress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.CompileResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.CompileResp.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.CompileResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.CompileResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOutStream_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getErrStream_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } + f = message.getDownloadProgress(); + if (f != null) { + writer.writeMessage( + 3, + f, + common_pb.DownloadProgress.serializeBinaryToWriter + ); + } + f = message.getTaskProgress(); + if (f != null) { + writer.writeMessage( + 4, + f, + common_pb.TaskProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional bytes out_stream = 1; + * @return {!(string|Uint8Array)} + */ +proto.arduino.CompileResp.prototype.getOutStream = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes out_stream = 1; + * This is a type-conversion wrapper around `getOutStream()` + * @return {string} + */ +proto.arduino.CompileResp.prototype.getOutStream_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOutStream())); +}; + + +/** + * optional bytes out_stream = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOutStream()` + * @return {!Uint8Array} + */ +proto.arduino.CompileResp.prototype.getOutStream_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOutStream())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.arduino.CompileResp.prototype.setOutStream = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes err_stream = 2; + * @return {!(string|Uint8Array)} + */ +proto.arduino.CompileResp.prototype.getErrStream = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes err_stream = 2; + * This is a type-conversion wrapper around `getErrStream()` + * @return {string} + */ +proto.arduino.CompileResp.prototype.getErrStream_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getErrStream())); +}; + + +/** + * optional bytes err_stream = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getErrStream()` + * @return {!Uint8Array} + */ +proto.arduino.CompileResp.prototype.getErrStream_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getErrStream())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.arduino.CompileResp.prototype.setErrStream = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional DownloadProgress download_progress = 3; + * @return {?proto.arduino.DownloadProgress} + */ +proto.arduino.CompileResp.prototype.getDownloadProgress = function() { + return /** @type{?proto.arduino.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, common_pb.DownloadProgress, 3)); +}; + + +/** @param {?proto.arduino.DownloadProgress|undefined} value */ +proto.arduino.CompileResp.prototype.setDownloadProgress = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +proto.arduino.CompileResp.prototype.clearDownloadProgress = function() { + this.setDownloadProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.CompileResp.prototype.hasDownloadProgress = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional TaskProgress task_progress = 4; + * @return {?proto.arduino.TaskProgress} + */ +proto.arduino.CompileResp.prototype.getTaskProgress = function() { + return /** @type{?proto.arduino.TaskProgress} */ ( + jspb.Message.getWrapperField(this, common_pb.TaskProgress, 4)); +}; + + +/** @param {?proto.arduino.TaskProgress|undefined} value */ +proto.arduino.CompileResp.prototype.setTaskProgress = function(value) { + jspb.Message.setWrapperField(this, 4, value); +}; + + +proto.arduino.CompileResp.prototype.clearTaskProgress = function() { + this.setTaskProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.CompileResp.prototype.hasTaskProgress = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +goog.object.extend(exports, proto.arduino); diff --git a/arduino-ide-extension/src/node/cli-protocol/core_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/core_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/core_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/arduino-ide-extension/src/node/cli-protocol/core_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/core_pb.d.ts new file mode 100644 index 00000000..febe72e5 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/core_pb.d.ts @@ -0,0 +1,421 @@ +// package: arduino +// file: core.proto + +/* tslint:disable */ + +import * as jspb from "google-protobuf"; +import * as common_pb from "./common_pb"; + +export class PlatformInstallReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + getPlatformPackage(): string; + setPlatformPackage(value: string): void; + + getArchitecture(): string; + setArchitecture(value: string): void; + + getVersion(): string; + setVersion(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlatformInstallReq.AsObject; + static toObject(includeInstance: boolean, msg: PlatformInstallReq): PlatformInstallReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlatformInstallReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlatformInstallReq; + static deserializeBinaryFromReader(message: PlatformInstallReq, reader: jspb.BinaryReader): PlatformInstallReq; +} + +export namespace PlatformInstallReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + platformPackage: string, + architecture: string, + version: string, + } +} + +export class PlatformInstallResp extends jspb.Message { + + hasProgress(): boolean; + clearProgress(): void; + getProgress(): common_pb.DownloadProgress | undefined; + setProgress(value?: common_pb.DownloadProgress): void; + + + hasTaskProgress(): boolean; + clearTaskProgress(): void; + getTaskProgress(): common_pb.TaskProgress | undefined; + setTaskProgress(value?: common_pb.TaskProgress): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlatformInstallResp.AsObject; + static toObject(includeInstance: boolean, msg: PlatformInstallResp): PlatformInstallResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlatformInstallResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlatformInstallResp; + static deserializeBinaryFromReader(message: PlatformInstallResp, reader: jspb.BinaryReader): PlatformInstallResp; +} + +export namespace PlatformInstallResp { + export type AsObject = { + progress?: common_pb.DownloadProgress.AsObject, + taskProgress?: common_pb.TaskProgress.AsObject, + } +} + +export class PlatformDownloadReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + getPlatformPackage(): string; + setPlatformPackage(value: string): void; + + getArchitecture(): string; + setArchitecture(value: string): void; + + getVersion(): string; + setVersion(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlatformDownloadReq.AsObject; + static toObject(includeInstance: boolean, msg: PlatformDownloadReq): PlatformDownloadReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlatformDownloadReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlatformDownloadReq; + static deserializeBinaryFromReader(message: PlatformDownloadReq, reader: jspb.BinaryReader): PlatformDownloadReq; +} + +export namespace PlatformDownloadReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + platformPackage: string, + architecture: string, + version: string, + } +} + +export class PlatformDownloadResp extends jspb.Message { + + hasProgress(): boolean; + clearProgress(): void; + getProgress(): common_pb.DownloadProgress | undefined; + setProgress(value?: common_pb.DownloadProgress): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlatformDownloadResp.AsObject; + static toObject(includeInstance: boolean, msg: PlatformDownloadResp): PlatformDownloadResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlatformDownloadResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlatformDownloadResp; + static deserializeBinaryFromReader(message: PlatformDownloadResp, reader: jspb.BinaryReader): PlatformDownloadResp; +} + +export namespace PlatformDownloadResp { + export type AsObject = { + progress?: common_pb.DownloadProgress.AsObject, + } +} + +export class PlatformUninstallReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + getPlatformPackage(): string; + setPlatformPackage(value: string): void; + + getArchitecture(): string; + setArchitecture(value: string): void; + + getVersion(): string; + setVersion(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlatformUninstallReq.AsObject; + static toObject(includeInstance: boolean, msg: PlatformUninstallReq): PlatformUninstallReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlatformUninstallReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlatformUninstallReq; + static deserializeBinaryFromReader(message: PlatformUninstallReq, reader: jspb.BinaryReader): PlatformUninstallReq; +} + +export namespace PlatformUninstallReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + platformPackage: string, + architecture: string, + version: string, + } +} + +export class PlatformUninstallResp extends jspb.Message { + + hasTaskProgress(): boolean; + clearTaskProgress(): void; + getTaskProgress(): common_pb.TaskProgress | undefined; + setTaskProgress(value?: common_pb.TaskProgress): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlatformUninstallResp.AsObject; + static toObject(includeInstance: boolean, msg: PlatformUninstallResp): PlatformUninstallResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlatformUninstallResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlatformUninstallResp; + static deserializeBinaryFromReader(message: PlatformUninstallResp, reader: jspb.BinaryReader): PlatformUninstallResp; +} + +export namespace PlatformUninstallResp { + export type AsObject = { + taskProgress?: common_pb.TaskProgress.AsObject, + } +} + +export class PlatformUpgradeReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + getPlatformPackage(): string; + setPlatformPackage(value: string): void; + + getArchitecture(): string; + setArchitecture(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlatformUpgradeReq.AsObject; + static toObject(includeInstance: boolean, msg: PlatformUpgradeReq): PlatformUpgradeReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlatformUpgradeReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlatformUpgradeReq; + static deserializeBinaryFromReader(message: PlatformUpgradeReq, reader: jspb.BinaryReader): PlatformUpgradeReq; +} + +export namespace PlatformUpgradeReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + platformPackage: string, + architecture: string, + } +} + +export class PlatformUpgradeResp extends jspb.Message { + + hasProgress(): boolean; + clearProgress(): void; + getProgress(): common_pb.DownloadProgress | undefined; + setProgress(value?: common_pb.DownloadProgress): void; + + + hasTaskProgress(): boolean; + clearTaskProgress(): void; + getTaskProgress(): common_pb.TaskProgress | undefined; + setTaskProgress(value?: common_pb.TaskProgress): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlatformUpgradeResp.AsObject; + static toObject(includeInstance: boolean, msg: PlatformUpgradeResp): PlatformUpgradeResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlatformUpgradeResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlatformUpgradeResp; + static deserializeBinaryFromReader(message: PlatformUpgradeResp, reader: jspb.BinaryReader): PlatformUpgradeResp; +} + +export namespace PlatformUpgradeResp { + export type AsObject = { + progress?: common_pb.DownloadProgress.AsObject, + taskProgress?: common_pb.TaskProgress.AsObject, + } +} + +export class PlatformSearchReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + getSearchArgs(): string; + setSearchArgs(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlatformSearchReq.AsObject; + static toObject(includeInstance: boolean, msg: PlatformSearchReq): PlatformSearchReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlatformSearchReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlatformSearchReq; + static deserializeBinaryFromReader(message: PlatformSearchReq, reader: jspb.BinaryReader): PlatformSearchReq; +} + +export namespace PlatformSearchReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + searchArgs: string, + } +} + +export class PlatformSearchResp extends jspb.Message { + clearSearchOutputList(): void; + getSearchOutputList(): Array; + setSearchOutputList(value: Array): void; + addSearchOutput(value?: SearchOutput, index?: number): SearchOutput; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlatformSearchResp.AsObject; + static toObject(includeInstance: boolean, msg: PlatformSearchResp): PlatformSearchResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlatformSearchResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlatformSearchResp; + static deserializeBinaryFromReader(message: PlatformSearchResp, reader: jspb.BinaryReader): PlatformSearchResp; +} + +export namespace PlatformSearchResp { + export type AsObject = { + searchOutputList: Array, + } +} + +export class SearchOutput extends jspb.Message { + getId(): string; + setId(value: string): void; + + getVersion(): string; + setVersion(value: string): void; + + getName(): string; + setName(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SearchOutput.AsObject; + static toObject(includeInstance: boolean, msg: SearchOutput): SearchOutput.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SearchOutput, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SearchOutput; + static deserializeBinaryFromReader(message: SearchOutput, reader: jspb.BinaryReader): SearchOutput; +} + +export namespace SearchOutput { + export type AsObject = { + id: string, + version: string, + name: string, + } +} + +export class PlatformListReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + getUpdatableOnly(): boolean; + setUpdatableOnly(value: boolean): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlatformListReq.AsObject; + static toObject(includeInstance: boolean, msg: PlatformListReq): PlatformListReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlatformListReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlatformListReq; + static deserializeBinaryFromReader(message: PlatformListReq, reader: jspb.BinaryReader): PlatformListReq; +} + +export namespace PlatformListReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + updatableOnly: boolean, + } +} + +export class PlatformListResp extends jspb.Message { + clearInstalledPlatformList(): void; + getInstalledPlatformList(): Array; + setInstalledPlatformList(value: Array): void; + addInstalledPlatform(value?: InstalledPlatform, index?: number): InstalledPlatform; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): PlatformListResp.AsObject; + static toObject(includeInstance: boolean, msg: PlatformListResp): PlatformListResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: PlatformListResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): PlatformListResp; + static deserializeBinaryFromReader(message: PlatformListResp, reader: jspb.BinaryReader): PlatformListResp; +} + +export namespace PlatformListResp { + export type AsObject = { + installedPlatformList: Array, + } +} + +export class InstalledPlatform extends jspb.Message { + getId(): string; + setId(value: string): void; + + getInstalled(): string; + setInstalled(value: string): void; + + getLatest(): string; + setLatest(value: string): void; + + getName(): string; + setName(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): InstalledPlatform.AsObject; + static toObject(includeInstance: boolean, msg: InstalledPlatform): InstalledPlatform.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: InstalledPlatform, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): InstalledPlatform; + static deserializeBinaryFromReader(message: InstalledPlatform, reader: jspb.BinaryReader): InstalledPlatform; +} + +export namespace InstalledPlatform { + export type AsObject = { + id: string, + installed: string, + latest: string, + name: string, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/core_pb.js b/arduino-ide-extension/src/node/cli-protocol/core_pb.js new file mode 100644 index 00000000..91af2cb1 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/core_pb.js @@ -0,0 +1,2816 @@ +/** + * @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 common_pb = require('./common_pb.js'); +goog.object.extend(proto, common_pb); +goog.exportSymbol('proto.arduino.InstalledPlatform', null, global); +goog.exportSymbol('proto.arduino.PlatformDownloadReq', null, global); +goog.exportSymbol('proto.arduino.PlatformDownloadResp', null, global); +goog.exportSymbol('proto.arduino.PlatformInstallReq', null, global); +goog.exportSymbol('proto.arduino.PlatformInstallResp', null, global); +goog.exportSymbol('proto.arduino.PlatformListReq', null, global); +goog.exportSymbol('proto.arduino.PlatformListResp', null, global); +goog.exportSymbol('proto.arduino.PlatformSearchReq', null, global); +goog.exportSymbol('proto.arduino.PlatformSearchResp', null, global); +goog.exportSymbol('proto.arduino.PlatformUninstallReq', null, global); +goog.exportSymbol('proto.arduino.PlatformUninstallResp', null, global); +goog.exportSymbol('proto.arduino.PlatformUpgradeReq', null, global); +goog.exportSymbol('proto.arduino.PlatformUpgradeResp', null, global); +goog.exportSymbol('proto.arduino.SearchOutput', 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.PlatformInstallReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.PlatformInstallReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.PlatformInstallReq.displayName = 'proto.arduino.PlatformInstallReq'; +} + + +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_, 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.PlatformInstallReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.PlatformInstallReq.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.PlatformInstallReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformInstallReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f), + platformPackage: jspb.Message.getFieldWithDefault(msg, 2, ""), + architecture: jspb.Message.getFieldWithDefault(msg, 3, ""), + version: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + 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.PlatformInstallReq} + */ +proto.arduino.PlatformInstallReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.PlatformInstallReq; + return proto.arduino.PlatformInstallReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.PlatformInstallReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.PlatformInstallReq} + */ +proto.arduino.PlatformInstallReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPlatformPackage(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setArchitecture(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.PlatformInstallReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.PlatformInstallReq.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.PlatformInstallReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformInstallReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getPlatformPackage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getArchitecture(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.PlatformInstallReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.PlatformInstallReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.PlatformInstallReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.PlatformInstallReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string platform_package = 2; + * @return {string} + */ +proto.arduino.PlatformInstallReq.prototype.getPlatformPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.PlatformInstallReq.prototype.setPlatformPackage = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string architecture = 3; + * @return {string} + */ +proto.arduino.PlatformInstallReq.prototype.getArchitecture = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.PlatformInstallReq.prototype.setArchitecture = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string version = 4; + * @return {string} + */ +proto.arduino.PlatformInstallReq.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.arduino.PlatformInstallReq.prototype.setVersion = function(value) { + jspb.Message.setProto3StringField(this, 4, 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.PlatformInstallResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.PlatformInstallResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.PlatformInstallResp.displayName = 'proto.arduino.PlatformInstallResp'; +} + + +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_, 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.PlatformInstallResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.PlatformInstallResp.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.PlatformInstallResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformInstallResp.toObject = function(includeInstance, msg) { + var f, obj = { + progress: (f = msg.getProgress()) && common_pb.DownloadProgress.toObject(includeInstance, f), + taskProgress: (f = msg.getTaskProgress()) && common_pb.TaskProgress.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.arduino.PlatformInstallResp} + */ +proto.arduino.PlatformInstallResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.PlatformInstallResp; + return proto.arduino.PlatformInstallResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.PlatformInstallResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.PlatformInstallResp} + */ +proto.arduino.PlatformInstallResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.DownloadProgress; + reader.readMessage(value,common_pb.DownloadProgress.deserializeBinaryFromReader); + msg.setProgress(value); + break; + case 2: + var value = new common_pb.TaskProgress; + reader.readMessage(value,common_pb.TaskProgress.deserializeBinaryFromReader); + msg.setTaskProgress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.PlatformInstallResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.PlatformInstallResp.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.PlatformInstallResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformInstallResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.DownloadProgress.serializeBinaryToWriter + ); + } + f = message.getTaskProgress(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_pb.TaskProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DownloadProgress progress = 1; + * @return {?proto.arduino.DownloadProgress} + */ +proto.arduino.PlatformInstallResp.prototype.getProgress = function() { + return /** @type{?proto.arduino.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, common_pb.DownloadProgress, 1)); +}; + + +/** @param {?proto.arduino.DownloadProgress|undefined} value */ +proto.arduino.PlatformInstallResp.prototype.setProgress = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.PlatformInstallResp.prototype.clearProgress = function() { + this.setProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.PlatformInstallResp.prototype.hasProgress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional TaskProgress task_progress = 2; + * @return {?proto.arduino.TaskProgress} + */ +proto.arduino.PlatformInstallResp.prototype.getTaskProgress = function() { + return /** @type{?proto.arduino.TaskProgress} */ ( + jspb.Message.getWrapperField(this, common_pb.TaskProgress, 2)); +}; + + +/** @param {?proto.arduino.TaskProgress|undefined} value */ +proto.arduino.PlatformInstallResp.prototype.setTaskProgress = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.arduino.PlatformInstallResp.prototype.clearTaskProgress = function() { + this.setTaskProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.PlatformInstallResp.prototype.hasTaskProgress = 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.arduino.PlatformDownloadReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.PlatformDownloadReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.PlatformDownloadReq.displayName = 'proto.arduino.PlatformDownloadReq'; +} + + +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_, 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.PlatformDownloadReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.PlatformDownloadReq.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.PlatformDownloadReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformDownloadReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f), + platformPackage: jspb.Message.getFieldWithDefault(msg, 2, ""), + architecture: jspb.Message.getFieldWithDefault(msg, 3, ""), + version: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + 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.PlatformDownloadReq} + */ +proto.arduino.PlatformDownloadReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.PlatformDownloadReq; + return proto.arduino.PlatformDownloadReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.PlatformDownloadReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.PlatformDownloadReq} + */ +proto.arduino.PlatformDownloadReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPlatformPackage(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setArchitecture(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.PlatformDownloadReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.PlatformDownloadReq.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.PlatformDownloadReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformDownloadReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getPlatformPackage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getArchitecture(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.PlatformDownloadReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.PlatformDownloadReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.PlatformDownloadReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.PlatformDownloadReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string platform_package = 2; + * @return {string} + */ +proto.arduino.PlatformDownloadReq.prototype.getPlatformPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.PlatformDownloadReq.prototype.setPlatformPackage = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string architecture = 3; + * @return {string} + */ +proto.arduino.PlatformDownloadReq.prototype.getArchitecture = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.PlatformDownloadReq.prototype.setArchitecture = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string version = 4; + * @return {string} + */ +proto.arduino.PlatformDownloadReq.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.arduino.PlatformDownloadReq.prototype.setVersion = function(value) { + jspb.Message.setProto3StringField(this, 4, 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.PlatformDownloadResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.PlatformDownloadResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.PlatformDownloadResp.displayName = 'proto.arduino.PlatformDownloadResp'; +} + + +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_, 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.PlatformDownloadResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.PlatformDownloadResp.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.PlatformDownloadResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformDownloadResp.toObject = function(includeInstance, msg) { + var f, obj = { + progress: (f = msg.getProgress()) && common_pb.DownloadProgress.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.arduino.PlatformDownloadResp} + */ +proto.arduino.PlatformDownloadResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.PlatformDownloadResp; + return proto.arduino.PlatformDownloadResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.PlatformDownloadResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.PlatformDownloadResp} + */ +proto.arduino.PlatformDownloadResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.DownloadProgress; + reader.readMessage(value,common_pb.DownloadProgress.deserializeBinaryFromReader); + msg.setProgress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.PlatformDownloadResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.PlatformDownloadResp.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.PlatformDownloadResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformDownloadResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.DownloadProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DownloadProgress progress = 1; + * @return {?proto.arduino.DownloadProgress} + */ +proto.arduino.PlatformDownloadResp.prototype.getProgress = function() { + return /** @type{?proto.arduino.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, common_pb.DownloadProgress, 1)); +}; + + +/** @param {?proto.arduino.DownloadProgress|undefined} value */ +proto.arduino.PlatformDownloadResp.prototype.setProgress = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.PlatformDownloadResp.prototype.clearProgress = function() { + this.setProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.PlatformDownloadResp.prototype.hasProgress = 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.arduino.PlatformUninstallReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.PlatformUninstallReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.PlatformUninstallReq.displayName = 'proto.arduino.PlatformUninstallReq'; +} + + +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_, 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.PlatformUninstallReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.PlatformUninstallReq.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.PlatformUninstallReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformUninstallReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f), + platformPackage: jspb.Message.getFieldWithDefault(msg, 2, ""), + architecture: jspb.Message.getFieldWithDefault(msg, 3, ""), + version: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + 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.PlatformUninstallReq} + */ +proto.arduino.PlatformUninstallReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.PlatformUninstallReq; + return proto.arduino.PlatformUninstallReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.PlatformUninstallReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.PlatformUninstallReq} + */ +proto.arduino.PlatformUninstallReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPlatformPackage(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setArchitecture(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.PlatformUninstallReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.PlatformUninstallReq.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.PlatformUninstallReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformUninstallReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getPlatformPackage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getArchitecture(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.PlatformUninstallReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.PlatformUninstallReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.PlatformUninstallReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.PlatformUninstallReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string platform_package = 2; + * @return {string} + */ +proto.arduino.PlatformUninstallReq.prototype.getPlatformPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.PlatformUninstallReq.prototype.setPlatformPackage = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string architecture = 3; + * @return {string} + */ +proto.arduino.PlatformUninstallReq.prototype.getArchitecture = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.PlatformUninstallReq.prototype.setArchitecture = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string version = 4; + * @return {string} + */ +proto.arduino.PlatformUninstallReq.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.arduino.PlatformUninstallReq.prototype.setVersion = function(value) { + jspb.Message.setProto3StringField(this, 4, 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.PlatformUninstallResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.PlatformUninstallResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.PlatformUninstallResp.displayName = 'proto.arduino.PlatformUninstallResp'; +} + + +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_, 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.PlatformUninstallResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.PlatformUninstallResp.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.PlatformUninstallResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformUninstallResp.toObject = function(includeInstance, msg) { + var f, obj = { + taskProgress: (f = msg.getTaskProgress()) && common_pb.TaskProgress.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.arduino.PlatformUninstallResp} + */ +proto.arduino.PlatformUninstallResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.PlatformUninstallResp; + return proto.arduino.PlatformUninstallResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.PlatformUninstallResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.PlatformUninstallResp} + */ +proto.arduino.PlatformUninstallResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.TaskProgress; + reader.readMessage(value,common_pb.TaskProgress.deserializeBinaryFromReader); + msg.setTaskProgress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.PlatformUninstallResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.PlatformUninstallResp.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.PlatformUninstallResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformUninstallResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTaskProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.TaskProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TaskProgress task_progress = 1; + * @return {?proto.arduino.TaskProgress} + */ +proto.arduino.PlatformUninstallResp.prototype.getTaskProgress = function() { + return /** @type{?proto.arduino.TaskProgress} */ ( + jspb.Message.getWrapperField(this, common_pb.TaskProgress, 1)); +}; + + +/** @param {?proto.arduino.TaskProgress|undefined} value */ +proto.arduino.PlatformUninstallResp.prototype.setTaskProgress = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.PlatformUninstallResp.prototype.clearTaskProgress = function() { + this.setTaskProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.PlatformUninstallResp.prototype.hasTaskProgress = 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.arduino.PlatformUpgradeReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.PlatformUpgradeReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.PlatformUpgradeReq.displayName = 'proto.arduino.PlatformUpgradeReq'; +} + + +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_, 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.PlatformUpgradeReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.PlatformUpgradeReq.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.PlatformUpgradeReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformUpgradeReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f), + platformPackage: jspb.Message.getFieldWithDefault(msg, 2, ""), + architecture: 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.arduino.PlatformUpgradeReq} + */ +proto.arduino.PlatformUpgradeReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.PlatformUpgradeReq; + return proto.arduino.PlatformUpgradeReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.PlatformUpgradeReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.PlatformUpgradeReq} + */ +proto.arduino.PlatformUpgradeReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPlatformPackage(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setArchitecture(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.PlatformUpgradeReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.PlatformUpgradeReq.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.PlatformUpgradeReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformUpgradeReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getPlatformPackage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getArchitecture(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.PlatformUpgradeReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.PlatformUpgradeReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.PlatformUpgradeReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.PlatformUpgradeReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string platform_package = 2; + * @return {string} + */ +proto.arduino.PlatformUpgradeReq.prototype.getPlatformPackage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.PlatformUpgradeReq.prototype.setPlatformPackage = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string architecture = 3; + * @return {string} + */ +proto.arduino.PlatformUpgradeReq.prototype.getArchitecture = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.PlatformUpgradeReq.prototype.setArchitecture = function(value) { + jspb.Message.setProto3StringField(this, 3, 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.PlatformUpgradeResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.PlatformUpgradeResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.PlatformUpgradeResp.displayName = 'proto.arduino.PlatformUpgradeResp'; +} + + +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_, 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.PlatformUpgradeResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.PlatformUpgradeResp.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.PlatformUpgradeResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformUpgradeResp.toObject = function(includeInstance, msg) { + var f, obj = { + progress: (f = msg.getProgress()) && common_pb.DownloadProgress.toObject(includeInstance, f), + taskProgress: (f = msg.getTaskProgress()) && common_pb.TaskProgress.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.arduino.PlatformUpgradeResp} + */ +proto.arduino.PlatformUpgradeResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.PlatformUpgradeResp; + return proto.arduino.PlatformUpgradeResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.PlatformUpgradeResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.PlatformUpgradeResp} + */ +proto.arduino.PlatformUpgradeResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.DownloadProgress; + reader.readMessage(value,common_pb.DownloadProgress.deserializeBinaryFromReader); + msg.setProgress(value); + break; + case 2: + var value = new common_pb.TaskProgress; + reader.readMessage(value,common_pb.TaskProgress.deserializeBinaryFromReader); + msg.setTaskProgress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.PlatformUpgradeResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.PlatformUpgradeResp.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.PlatformUpgradeResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformUpgradeResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.DownloadProgress.serializeBinaryToWriter + ); + } + f = message.getTaskProgress(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_pb.TaskProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DownloadProgress progress = 1; + * @return {?proto.arduino.DownloadProgress} + */ +proto.arduino.PlatformUpgradeResp.prototype.getProgress = function() { + return /** @type{?proto.arduino.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, common_pb.DownloadProgress, 1)); +}; + + +/** @param {?proto.arduino.DownloadProgress|undefined} value */ +proto.arduino.PlatformUpgradeResp.prototype.setProgress = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.PlatformUpgradeResp.prototype.clearProgress = function() { + this.setProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.PlatformUpgradeResp.prototype.hasProgress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional TaskProgress task_progress = 2; + * @return {?proto.arduino.TaskProgress} + */ +proto.arduino.PlatformUpgradeResp.prototype.getTaskProgress = function() { + return /** @type{?proto.arduino.TaskProgress} */ ( + jspb.Message.getWrapperField(this, common_pb.TaskProgress, 2)); +}; + + +/** @param {?proto.arduino.TaskProgress|undefined} value */ +proto.arduino.PlatformUpgradeResp.prototype.setTaskProgress = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.arduino.PlatformUpgradeResp.prototype.clearTaskProgress = function() { + this.setTaskProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.PlatformUpgradeResp.prototype.hasTaskProgress = 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.arduino.PlatformSearchReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.PlatformSearchReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.PlatformSearchReq.displayName = 'proto.arduino.PlatformSearchReq'; +} + + +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_, 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.PlatformSearchReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.PlatformSearchReq.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.PlatformSearchReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformSearchReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f), + searchArgs: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + 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.PlatformSearchReq} + */ +proto.arduino.PlatformSearchReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.PlatformSearchReq; + return proto.arduino.PlatformSearchReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.PlatformSearchReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.PlatformSearchReq} + */ +proto.arduino.PlatformSearchReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSearchArgs(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.PlatformSearchReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.PlatformSearchReq.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.PlatformSearchReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformSearchReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getSearchArgs(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.PlatformSearchReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.PlatformSearchReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.PlatformSearchReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.PlatformSearchReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string search_args = 2; + * @return {string} + */ +proto.arduino.PlatformSearchReq.prototype.getSearchArgs = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.PlatformSearchReq.prototype.setSearchArgs = function(value) { + jspb.Message.setProto3StringField(this, 2, 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.PlatformSearchResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.arduino.PlatformSearchResp.repeatedFields_, null); +}; +goog.inherits(proto.arduino.PlatformSearchResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.PlatformSearchResp.displayName = 'proto.arduino.PlatformSearchResp'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.arduino.PlatformSearchResp.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_, 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.PlatformSearchResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.PlatformSearchResp.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.PlatformSearchResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformSearchResp.toObject = function(includeInstance, msg) { + var f, obj = { + searchOutputList: jspb.Message.toObjectList(msg.getSearchOutputList(), + proto.arduino.SearchOutput.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.arduino.PlatformSearchResp} + */ +proto.arduino.PlatformSearchResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.PlatformSearchResp; + return proto.arduino.PlatformSearchResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.PlatformSearchResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.PlatformSearchResp} + */ +proto.arduino.PlatformSearchResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.arduino.SearchOutput; + reader.readMessage(value,proto.arduino.SearchOutput.deserializeBinaryFromReader); + msg.addSearchOutput(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.PlatformSearchResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.PlatformSearchResp.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.PlatformSearchResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformSearchResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSearchOutputList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.arduino.SearchOutput.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated SearchOutput search_output = 1; + * @return {!Array} + */ +proto.arduino.PlatformSearchResp.prototype.getSearchOutputList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.arduino.SearchOutput, 1)); +}; + + +/** @param {!Array} value */ +proto.arduino.PlatformSearchResp.prototype.setSearchOutputList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.arduino.SearchOutput=} opt_value + * @param {number=} opt_index + * @return {!proto.arduino.SearchOutput} + */ +proto.arduino.PlatformSearchResp.prototype.addSearchOutput = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.arduino.SearchOutput, opt_index); +}; + + +proto.arduino.PlatformSearchResp.prototype.clearSearchOutputList = function() { + this.setSearchOutputList([]); +}; + + + +/** + * 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.SearchOutput = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.SearchOutput, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.SearchOutput.displayName = 'proto.arduino.SearchOutput'; +} + + +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_, 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.SearchOutput.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.SearchOutput.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.SearchOutput} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.SearchOutput.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + version: 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.arduino.SearchOutput} + */ +proto.arduino.SearchOutput.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.SearchOutput; + return proto.arduino.SearchOutput.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.SearchOutput} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.SearchOutput} + */ +proto.arduino.SearchOutput.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(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.arduino.SearchOutput.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.SearchOutput.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.SearchOutput} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.SearchOutput.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string ID = 1; + * @return {string} + */ +proto.arduino.SearchOutput.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.arduino.SearchOutput.prototype.setId = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string Version = 2; + * @return {string} + */ +proto.arduino.SearchOutput.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.SearchOutput.prototype.setVersion = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string Name = 3; + * @return {string} + */ +proto.arduino.SearchOutput.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.SearchOutput.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 3, 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.PlatformListReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.PlatformListReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.PlatformListReq.displayName = 'proto.arduino.PlatformListReq'; +} + + +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_, 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.PlatformListReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.PlatformListReq.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.PlatformListReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformListReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f), + updatableOnly: jspb.Message.getFieldWithDefault(msg, 2, 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.PlatformListReq} + */ +proto.arduino.PlatformListReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.PlatformListReq; + return proto.arduino.PlatformListReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.PlatformListReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.PlatformListReq} + */ +proto.arduino.PlatformListReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setUpdatableOnly(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.PlatformListReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.PlatformListReq.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.PlatformListReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformListReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getUpdatableOnly(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.PlatformListReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.PlatformListReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.PlatformListReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.PlatformListReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool updatable_only = 2; + * 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.PlatformListReq.prototype.getUpdatableOnly = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.arduino.PlatformListReq.prototype.setUpdatableOnly = function(value) { + jspb.Message.setProto3BooleanField(this, 2, 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.PlatformListResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.arduino.PlatformListResp.repeatedFields_, null); +}; +goog.inherits(proto.arduino.PlatformListResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.PlatformListResp.displayName = 'proto.arduino.PlatformListResp'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.arduino.PlatformListResp.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_, 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.PlatformListResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.PlatformListResp.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.PlatformListResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformListResp.toObject = function(includeInstance, msg) { + var f, obj = { + installedPlatformList: jspb.Message.toObjectList(msg.getInstalledPlatformList(), + proto.arduino.InstalledPlatform.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.arduino.PlatformListResp} + */ +proto.arduino.PlatformListResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.PlatformListResp; + return proto.arduino.PlatformListResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.PlatformListResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.PlatformListResp} + */ +proto.arduino.PlatformListResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.arduino.InstalledPlatform; + reader.readMessage(value,proto.arduino.InstalledPlatform.deserializeBinaryFromReader); + msg.addInstalledPlatform(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.PlatformListResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.PlatformListResp.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.PlatformListResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.PlatformListResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstalledPlatformList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.arduino.InstalledPlatform.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated InstalledPlatform installed_platform = 1; + * @return {!Array} + */ +proto.arduino.PlatformListResp.prototype.getInstalledPlatformList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.arduino.InstalledPlatform, 1)); +}; + + +/** @param {!Array} value */ +proto.arduino.PlatformListResp.prototype.setInstalledPlatformList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.arduino.InstalledPlatform=} opt_value + * @param {number=} opt_index + * @return {!proto.arduino.InstalledPlatform} + */ +proto.arduino.PlatformListResp.prototype.addInstalledPlatform = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.arduino.InstalledPlatform, opt_index); +}; + + +proto.arduino.PlatformListResp.prototype.clearInstalledPlatformList = function() { + this.setInstalledPlatformList([]); +}; + + + +/** + * 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.InstalledPlatform = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.InstalledPlatform, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.InstalledPlatform.displayName = 'proto.arduino.InstalledPlatform'; +} + + +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_, 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.InstalledPlatform.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.InstalledPlatform.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.InstalledPlatform} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.InstalledPlatform.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + installed: jspb.Message.getFieldWithDefault(msg, 2, ""), + latest: jspb.Message.getFieldWithDefault(msg, 3, ""), + name: jspb.Message.getFieldWithDefault(msg, 4, "") + }; + + 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.InstalledPlatform} + */ +proto.arduino.InstalledPlatform.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.InstalledPlatform; + return proto.arduino.InstalledPlatform.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.InstalledPlatform} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.InstalledPlatform} + */ +proto.arduino.InstalledPlatform.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.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setInstalled(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setLatest(value); + break; + case 4: + 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.arduino.InstalledPlatform.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.InstalledPlatform.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.InstalledPlatform} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.InstalledPlatform.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getInstalled(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getLatest(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } +}; + + +/** + * optional string ID = 1; + * @return {string} + */ +proto.arduino.InstalledPlatform.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.arduino.InstalledPlatform.prototype.setId = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string Installed = 2; + * @return {string} + */ +proto.arduino.InstalledPlatform.prototype.getInstalled = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.InstalledPlatform.prototype.setInstalled = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string Latest = 3; + * @return {string} + */ +proto.arduino.InstalledPlatform.prototype.getLatest = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.InstalledPlatform.prototype.setLatest = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string Name = 4; + * @return {string} + */ +proto.arduino.InstalledPlatform.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.arduino.InstalledPlatform.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 4, value); +}; + + +goog.object.extend(exports, proto.arduino); diff --git a/arduino-ide-extension/src/node/cli-protocol/lib_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/lib_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/lib_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/arduino-ide-extension/src/node/cli-protocol/lib_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/lib_pb.d.ts new file mode 100644 index 00000000..ee86ba36 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/lib_pb.d.ts @@ -0,0 +1,427 @@ +// package: arduino +// file: lib.proto + +/* tslint:disable */ + +import * as jspb from "google-protobuf"; +import * as common_pb from "./common_pb"; + +export class LibraryDownloadReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + getName(): string; + setName(value: string): void; + + getVersion(): string; + setVersion(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibraryDownloadReq.AsObject; + static toObject(includeInstance: boolean, msg: LibraryDownloadReq): LibraryDownloadReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibraryDownloadReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibraryDownloadReq; + static deserializeBinaryFromReader(message: LibraryDownloadReq, reader: jspb.BinaryReader): LibraryDownloadReq; +} + +export namespace LibraryDownloadReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + name: string, + version: string, + } +} + +export class LibraryDownloadResp extends jspb.Message { + + hasProgress(): boolean; + clearProgress(): void; + getProgress(): common_pb.DownloadProgress | undefined; + setProgress(value?: common_pb.DownloadProgress): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibraryDownloadResp.AsObject; + static toObject(includeInstance: boolean, msg: LibraryDownloadResp): LibraryDownloadResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibraryDownloadResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibraryDownloadResp; + static deserializeBinaryFromReader(message: LibraryDownloadResp, reader: jspb.BinaryReader): LibraryDownloadResp; +} + +export namespace LibraryDownloadResp { + export type AsObject = { + progress?: common_pb.DownloadProgress.AsObject, + } +} + +export class LibraryInstallReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + getName(): string; + setName(value: string): void; + + getVersion(): string; + setVersion(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibraryInstallReq.AsObject; + static toObject(includeInstance: boolean, msg: LibraryInstallReq): LibraryInstallReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibraryInstallReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibraryInstallReq; + static deserializeBinaryFromReader(message: LibraryInstallReq, reader: jspb.BinaryReader): LibraryInstallReq; +} + +export namespace LibraryInstallReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + name: string, + version: string, + } +} + +export class LibraryInstallResp extends jspb.Message { + + hasProgress(): boolean; + clearProgress(): void; + getProgress(): common_pb.DownloadProgress | undefined; + setProgress(value?: common_pb.DownloadProgress): void; + + + hasTaskProgress(): boolean; + clearTaskProgress(): void; + getTaskProgress(): common_pb.TaskProgress | undefined; + setTaskProgress(value?: common_pb.TaskProgress): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibraryInstallResp.AsObject; + static toObject(includeInstance: boolean, msg: LibraryInstallResp): LibraryInstallResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibraryInstallResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibraryInstallResp; + static deserializeBinaryFromReader(message: LibraryInstallResp, reader: jspb.BinaryReader): LibraryInstallResp; +} + +export namespace LibraryInstallResp { + export type AsObject = { + progress?: common_pb.DownloadProgress.AsObject, + taskProgress?: common_pb.TaskProgress.AsObject, + } +} + +export class LibraryUninstallReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + getName(): string; + setName(value: string): void; + + getVersion(): string; + setVersion(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibraryUninstallReq.AsObject; + static toObject(includeInstance: boolean, msg: LibraryUninstallReq): LibraryUninstallReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibraryUninstallReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibraryUninstallReq; + static deserializeBinaryFromReader(message: LibraryUninstallReq, reader: jspb.BinaryReader): LibraryUninstallReq; +} + +export namespace LibraryUninstallReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + name: string, + version: string, + } +} + +export class LibraryUninstallResp extends jspb.Message { + + hasTaskProgress(): boolean; + clearTaskProgress(): void; + getTaskProgress(): common_pb.TaskProgress | undefined; + setTaskProgress(value?: common_pb.TaskProgress): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibraryUninstallResp.AsObject; + static toObject(includeInstance: boolean, msg: LibraryUninstallResp): LibraryUninstallResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibraryUninstallResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibraryUninstallResp; + static deserializeBinaryFromReader(message: LibraryUninstallResp, reader: jspb.BinaryReader): LibraryUninstallResp; +} + +export namespace LibraryUninstallResp { + export type AsObject = { + taskProgress?: common_pb.TaskProgress.AsObject, + } +} + +export class LibraryUpgradeAllReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibraryUpgradeAllReq.AsObject; + static toObject(includeInstance: boolean, msg: LibraryUpgradeAllReq): LibraryUpgradeAllReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibraryUpgradeAllReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibraryUpgradeAllReq; + static deserializeBinaryFromReader(message: LibraryUpgradeAllReq, reader: jspb.BinaryReader): LibraryUpgradeAllReq; +} + +export namespace LibraryUpgradeAllReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + } +} + +export class LibraryUpgradeAllResp extends jspb.Message { + + hasProgress(): boolean; + clearProgress(): void; + getProgress(): common_pb.DownloadProgress | undefined; + setProgress(value?: common_pb.DownloadProgress): void; + + + hasTaskProgress(): boolean; + clearTaskProgress(): void; + getTaskProgress(): common_pb.TaskProgress | undefined; + setTaskProgress(value?: common_pb.TaskProgress): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibraryUpgradeAllResp.AsObject; + static toObject(includeInstance: boolean, msg: LibraryUpgradeAllResp): LibraryUpgradeAllResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibraryUpgradeAllResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibraryUpgradeAllResp; + static deserializeBinaryFromReader(message: LibraryUpgradeAllResp, reader: jspb.BinaryReader): LibraryUpgradeAllResp; +} + +export namespace LibraryUpgradeAllResp { + export type AsObject = { + progress?: common_pb.DownloadProgress.AsObject, + taskProgress?: common_pb.TaskProgress.AsObject, + } +} + +export class LibrarySearchReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + getNames(): boolean; + setNames(value: boolean): void; + + getQuery(): string; + setQuery(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibrarySearchReq.AsObject; + static toObject(includeInstance: boolean, msg: LibrarySearchReq): LibrarySearchReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibrarySearchReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibrarySearchReq; + static deserializeBinaryFromReader(message: LibrarySearchReq, reader: jspb.BinaryReader): LibrarySearchReq; +} + +export namespace LibrarySearchReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + names: boolean, + query: string, + } +} + +export class LibrarySearchResp extends jspb.Message { + clearSearchOutputList(): void; + getSearchOutputList(): Array; + setSearchOutputList(value: Array): void; + addSearchOutput(value?: SearchLibraryOutput, index?: number): SearchLibraryOutput; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibrarySearchResp.AsObject; + static toObject(includeInstance: boolean, msg: LibrarySearchResp): LibrarySearchResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibrarySearchResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibrarySearchResp; + static deserializeBinaryFromReader(message: LibrarySearchResp, reader: jspb.BinaryReader): LibrarySearchResp; +} + +export namespace LibrarySearchResp { + export type AsObject = { + searchOutputList: Array, + } +} + +export class SearchLibraryOutput extends jspb.Message { + getName(): string; + setName(value: string): void; + + + getReleasesMap(): jspb.Map; + clearReleasesMap(): void; + + + hasLatest(): boolean; + clearLatest(): void; + getLatest(): LibraryRelease | undefined; + setLatest(value?: LibraryRelease): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SearchLibraryOutput.AsObject; + static toObject(includeInstance: boolean, msg: SearchLibraryOutput): SearchLibraryOutput.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: SearchLibraryOutput, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SearchLibraryOutput; + static deserializeBinaryFromReader(message: SearchLibraryOutput, reader: jspb.BinaryReader): SearchLibraryOutput; +} + +export namespace SearchLibraryOutput { + export type AsObject = { + name: string, + + releasesMap: Array<[string, LibraryRelease.AsObject]>, + latest?: LibraryRelease.AsObject, + } +} + +export class LibraryRelease extends jspb.Message { + getAuthor(): string; + setAuthor(value: string): void; + + getVersion(): string; + setVersion(value: string): void; + + getMaintainer(): string; + setMaintainer(value: string): void; + + getSentence(): string; + setSentence(value: string): void; + + getParagraph(): string; + setParagraph(value: string): void; + + getWebsite(): string; + setWebsite(value: string): void; + + getCategory(): string; + setCategory(value: string): void; + + clearArchitecturesList(): void; + getArchitecturesList(): Array; + setArchitecturesList(value: Array): void; + addArchitectures(value: string, index?: number): string; + + clearTypesList(): void; + getTypesList(): Array; + setTypesList(value: Array): void; + addTypes(value: string, index?: number): string; + + + hasResources(): boolean; + clearResources(): void; + getResources(): DownloadResource | undefined; + setResources(value?: DownloadResource): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LibraryRelease.AsObject; + static toObject(includeInstance: boolean, msg: LibraryRelease): LibraryRelease.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LibraryRelease, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LibraryRelease; + static deserializeBinaryFromReader(message: LibraryRelease, reader: jspb.BinaryReader): LibraryRelease; +} + +export namespace LibraryRelease { + export type AsObject = { + author: string, + version: string, + maintainer: string, + sentence: string, + paragraph: string, + website: string, + category: string, + architecturesList: Array, + typesList: Array, + resources?: DownloadResource.AsObject, + } +} + +export class DownloadResource extends jspb.Message { + getUrl(): string; + setUrl(value: string): void; + + getArchivefilename(): string; + setArchivefilename(value: string): void; + + getChecksum(): string; + setChecksum(value: string): void; + + getSize(): number; + setSize(value: number): void; + + getCachepath(): string; + setCachepath(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): DownloadResource.AsObject; + static toObject(includeInstance: boolean, msg: DownloadResource): DownloadResource.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: DownloadResource, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): DownloadResource; + static deserializeBinaryFromReader(message: DownloadResource, reader: jspb.BinaryReader): DownloadResource; +} + +export namespace DownloadResource { + export type AsObject = { + url: string, + archivefilename: string, + checksum: string, + size: number, + cachepath: string, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/lib_pb.js b/arduino-ide-extension/src/node/cli-protocol/lib_pb.js new file mode 100644 index 00000000..4ca1cf90 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/lib_pb.js @@ -0,0 +1,2836 @@ +/** + * @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 common_pb = require('./common_pb.js'); +goog.object.extend(proto, common_pb); +goog.exportSymbol('proto.arduino.DownloadResource', null, global); +goog.exportSymbol('proto.arduino.LibraryDownloadReq', null, global); +goog.exportSymbol('proto.arduino.LibraryDownloadResp', null, global); +goog.exportSymbol('proto.arduino.LibraryInstallReq', null, global); +goog.exportSymbol('proto.arduino.LibraryInstallResp', null, global); +goog.exportSymbol('proto.arduino.LibraryRelease', null, global); +goog.exportSymbol('proto.arduino.LibrarySearchReq', null, global); +goog.exportSymbol('proto.arduino.LibrarySearchResp', null, global); +goog.exportSymbol('proto.arduino.LibraryUninstallReq', null, global); +goog.exportSymbol('proto.arduino.LibraryUninstallResp', null, global); +goog.exportSymbol('proto.arduino.LibraryUpgradeAllReq', null, global); +goog.exportSymbol('proto.arduino.LibraryUpgradeAllResp', null, global); +goog.exportSymbol('proto.arduino.SearchLibraryOutput', 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.LibraryDownloadReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.LibraryDownloadReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.LibraryDownloadReq.displayName = 'proto.arduino.LibraryDownloadReq'; +} + + +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_, 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.LibraryDownloadReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.LibraryDownloadReq.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.LibraryDownloadReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryDownloadReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + version: 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.arduino.LibraryDownloadReq} + */ +proto.arduino.LibraryDownloadReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.LibraryDownloadReq; + return proto.arduino.LibraryDownloadReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.LibraryDownloadReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.LibraryDownloadReq} + */ +proto.arduino.LibraryDownloadReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.LibraryDownloadReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.LibraryDownloadReq.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.LibraryDownloadReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryDownloadReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.LibraryDownloadReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.LibraryDownloadReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.LibraryDownloadReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.LibraryDownloadReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.arduino.LibraryDownloadReq.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.LibraryDownloadReq.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string version = 3; + * @return {string} + */ +proto.arduino.LibraryDownloadReq.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.LibraryDownloadReq.prototype.setVersion = function(value) { + jspb.Message.setProto3StringField(this, 3, 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.LibraryDownloadResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.LibraryDownloadResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.LibraryDownloadResp.displayName = 'proto.arduino.LibraryDownloadResp'; +} + + +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_, 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.LibraryDownloadResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.LibraryDownloadResp.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.LibraryDownloadResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryDownloadResp.toObject = function(includeInstance, msg) { + var f, obj = { + progress: (f = msg.getProgress()) && common_pb.DownloadProgress.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.arduino.LibraryDownloadResp} + */ +proto.arduino.LibraryDownloadResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.LibraryDownloadResp; + return proto.arduino.LibraryDownloadResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.LibraryDownloadResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.LibraryDownloadResp} + */ +proto.arduino.LibraryDownloadResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.DownloadProgress; + reader.readMessage(value,common_pb.DownloadProgress.deserializeBinaryFromReader); + msg.setProgress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.LibraryDownloadResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.LibraryDownloadResp.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.LibraryDownloadResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryDownloadResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.DownloadProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DownloadProgress progress = 1; + * @return {?proto.arduino.DownloadProgress} + */ +proto.arduino.LibraryDownloadResp.prototype.getProgress = function() { + return /** @type{?proto.arduino.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, common_pb.DownloadProgress, 1)); +}; + + +/** @param {?proto.arduino.DownloadProgress|undefined} value */ +proto.arduino.LibraryDownloadResp.prototype.setProgress = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.LibraryDownloadResp.prototype.clearProgress = function() { + this.setProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.LibraryDownloadResp.prototype.hasProgress = 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.arduino.LibraryInstallReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.LibraryInstallReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.LibraryInstallReq.displayName = 'proto.arduino.LibraryInstallReq'; +} + + +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_, 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.LibraryInstallReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.LibraryInstallReq.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.LibraryInstallReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryInstallReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + version: 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.arduino.LibraryInstallReq} + */ +proto.arduino.LibraryInstallReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.LibraryInstallReq; + return proto.arduino.LibraryInstallReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.LibraryInstallReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.LibraryInstallReq} + */ +proto.arduino.LibraryInstallReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.LibraryInstallReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.LibraryInstallReq.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.LibraryInstallReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryInstallReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.LibraryInstallReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.LibraryInstallReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.LibraryInstallReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.LibraryInstallReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.arduino.LibraryInstallReq.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.LibraryInstallReq.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string version = 3; + * @return {string} + */ +proto.arduino.LibraryInstallReq.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.LibraryInstallReq.prototype.setVersion = function(value) { + jspb.Message.setProto3StringField(this, 3, 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.LibraryInstallResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.LibraryInstallResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.LibraryInstallResp.displayName = 'proto.arduino.LibraryInstallResp'; +} + + +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_, 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.LibraryInstallResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.LibraryInstallResp.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.LibraryInstallResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryInstallResp.toObject = function(includeInstance, msg) { + var f, obj = { + progress: (f = msg.getProgress()) && common_pb.DownloadProgress.toObject(includeInstance, f), + taskProgress: (f = msg.getTaskProgress()) && common_pb.TaskProgress.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.arduino.LibraryInstallResp} + */ +proto.arduino.LibraryInstallResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.LibraryInstallResp; + return proto.arduino.LibraryInstallResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.LibraryInstallResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.LibraryInstallResp} + */ +proto.arduino.LibraryInstallResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.DownloadProgress; + reader.readMessage(value,common_pb.DownloadProgress.deserializeBinaryFromReader); + msg.setProgress(value); + break; + case 2: + var value = new common_pb.TaskProgress; + reader.readMessage(value,common_pb.TaskProgress.deserializeBinaryFromReader); + msg.setTaskProgress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.LibraryInstallResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.LibraryInstallResp.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.LibraryInstallResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryInstallResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.DownloadProgress.serializeBinaryToWriter + ); + } + f = message.getTaskProgress(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_pb.TaskProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DownloadProgress progress = 1; + * @return {?proto.arduino.DownloadProgress} + */ +proto.arduino.LibraryInstallResp.prototype.getProgress = function() { + return /** @type{?proto.arduino.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, common_pb.DownloadProgress, 1)); +}; + + +/** @param {?proto.arduino.DownloadProgress|undefined} value */ +proto.arduino.LibraryInstallResp.prototype.setProgress = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.LibraryInstallResp.prototype.clearProgress = function() { + this.setProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.LibraryInstallResp.prototype.hasProgress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional TaskProgress task_progress = 2; + * @return {?proto.arduino.TaskProgress} + */ +proto.arduino.LibraryInstallResp.prototype.getTaskProgress = function() { + return /** @type{?proto.arduino.TaskProgress} */ ( + jspb.Message.getWrapperField(this, common_pb.TaskProgress, 2)); +}; + + +/** @param {?proto.arduino.TaskProgress|undefined} value */ +proto.arduino.LibraryInstallResp.prototype.setTaskProgress = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.arduino.LibraryInstallResp.prototype.clearTaskProgress = function() { + this.setTaskProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.LibraryInstallResp.prototype.hasTaskProgress = 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.arduino.LibraryUninstallReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.LibraryUninstallReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.LibraryUninstallReq.displayName = 'proto.arduino.LibraryUninstallReq'; +} + + +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_, 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.LibraryUninstallReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.LibraryUninstallReq.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.LibraryUninstallReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryUninstallReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + version: 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.arduino.LibraryUninstallReq} + */ +proto.arduino.LibraryUninstallReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.LibraryUninstallReq; + return proto.arduino.LibraryUninstallReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.LibraryUninstallReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.LibraryUninstallReq} + */ +proto.arduino.LibraryUninstallReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.LibraryUninstallReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.LibraryUninstallReq.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.LibraryUninstallReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryUninstallReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.LibraryUninstallReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.LibraryUninstallReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.LibraryUninstallReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.LibraryUninstallReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string name = 2; + * @return {string} + */ +proto.arduino.LibraryUninstallReq.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.LibraryUninstallReq.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string version = 3; + * @return {string} + */ +proto.arduino.LibraryUninstallReq.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.LibraryUninstallReq.prototype.setVersion = function(value) { + jspb.Message.setProto3StringField(this, 3, 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.LibraryUninstallResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.LibraryUninstallResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.LibraryUninstallResp.displayName = 'proto.arduino.LibraryUninstallResp'; +} + + +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_, 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.LibraryUninstallResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.LibraryUninstallResp.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.LibraryUninstallResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryUninstallResp.toObject = function(includeInstance, msg) { + var f, obj = { + taskProgress: (f = msg.getTaskProgress()) && common_pb.TaskProgress.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.arduino.LibraryUninstallResp} + */ +proto.arduino.LibraryUninstallResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.LibraryUninstallResp; + return proto.arduino.LibraryUninstallResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.LibraryUninstallResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.LibraryUninstallResp} + */ +proto.arduino.LibraryUninstallResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.TaskProgress; + reader.readMessage(value,common_pb.TaskProgress.deserializeBinaryFromReader); + msg.setTaskProgress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.LibraryUninstallResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.LibraryUninstallResp.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.LibraryUninstallResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryUninstallResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTaskProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.TaskProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional TaskProgress task_progress = 1; + * @return {?proto.arduino.TaskProgress} + */ +proto.arduino.LibraryUninstallResp.prototype.getTaskProgress = function() { + return /** @type{?proto.arduino.TaskProgress} */ ( + jspb.Message.getWrapperField(this, common_pb.TaskProgress, 1)); +}; + + +/** @param {?proto.arduino.TaskProgress|undefined} value */ +proto.arduino.LibraryUninstallResp.prototype.setTaskProgress = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.LibraryUninstallResp.prototype.clearTaskProgress = function() { + this.setTaskProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.LibraryUninstallResp.prototype.hasTaskProgress = 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.arduino.LibraryUpgradeAllReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.LibraryUpgradeAllReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.LibraryUpgradeAllReq.displayName = 'proto.arduino.LibraryUpgradeAllReq'; +} + + +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_, 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.LibraryUpgradeAllReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.LibraryUpgradeAllReq.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.LibraryUpgradeAllReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryUpgradeAllReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.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.arduino.LibraryUpgradeAllReq} + */ +proto.arduino.LibraryUpgradeAllReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.LibraryUpgradeAllReq; + return proto.arduino.LibraryUpgradeAllReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.LibraryUpgradeAllReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.LibraryUpgradeAllReq} + */ +proto.arduino.LibraryUpgradeAllReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.LibraryUpgradeAllReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.LibraryUpgradeAllReq.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.LibraryUpgradeAllReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryUpgradeAllReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.LibraryUpgradeAllReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.LibraryUpgradeAllReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.LibraryUpgradeAllReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.LibraryUpgradeAllReq.prototype.hasInstance = 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.arduino.LibraryUpgradeAllResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.LibraryUpgradeAllResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.LibraryUpgradeAllResp.displayName = 'proto.arduino.LibraryUpgradeAllResp'; +} + + +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_, 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.LibraryUpgradeAllResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.LibraryUpgradeAllResp.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.LibraryUpgradeAllResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryUpgradeAllResp.toObject = function(includeInstance, msg) { + var f, obj = { + progress: (f = msg.getProgress()) && common_pb.DownloadProgress.toObject(includeInstance, f), + taskProgress: (f = msg.getTaskProgress()) && common_pb.TaskProgress.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.arduino.LibraryUpgradeAllResp} + */ +proto.arduino.LibraryUpgradeAllResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.LibraryUpgradeAllResp; + return proto.arduino.LibraryUpgradeAllResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.LibraryUpgradeAllResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.LibraryUpgradeAllResp} + */ +proto.arduino.LibraryUpgradeAllResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.DownloadProgress; + reader.readMessage(value,common_pb.DownloadProgress.deserializeBinaryFromReader); + msg.setProgress(value); + break; + case 2: + var value = new common_pb.TaskProgress; + reader.readMessage(value,common_pb.TaskProgress.deserializeBinaryFromReader); + msg.setTaskProgress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.LibraryUpgradeAllResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.LibraryUpgradeAllResp.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.LibraryUpgradeAllResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryUpgradeAllResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getProgress(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.DownloadProgress.serializeBinaryToWriter + ); + } + f = message.getTaskProgress(); + if (f != null) { + writer.writeMessage( + 2, + f, + common_pb.TaskProgress.serializeBinaryToWriter + ); + } +}; + + +/** + * optional DownloadProgress progress = 1; + * @return {?proto.arduino.DownloadProgress} + */ +proto.arduino.LibraryUpgradeAllResp.prototype.getProgress = function() { + return /** @type{?proto.arduino.DownloadProgress} */ ( + jspb.Message.getWrapperField(this, common_pb.DownloadProgress, 1)); +}; + + +/** @param {?proto.arduino.DownloadProgress|undefined} value */ +proto.arduino.LibraryUpgradeAllResp.prototype.setProgress = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.LibraryUpgradeAllResp.prototype.clearProgress = function() { + this.setProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.LibraryUpgradeAllResp.prototype.hasProgress = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional TaskProgress task_progress = 2; + * @return {?proto.arduino.TaskProgress} + */ +proto.arduino.LibraryUpgradeAllResp.prototype.getTaskProgress = function() { + return /** @type{?proto.arduino.TaskProgress} */ ( + jspb.Message.getWrapperField(this, common_pb.TaskProgress, 2)); +}; + + +/** @param {?proto.arduino.TaskProgress|undefined} value */ +proto.arduino.LibraryUpgradeAllResp.prototype.setTaskProgress = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.arduino.LibraryUpgradeAllResp.prototype.clearTaskProgress = function() { + this.setTaskProgress(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.LibraryUpgradeAllResp.prototype.hasTaskProgress = 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.arduino.LibrarySearchReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.LibrarySearchReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.LibrarySearchReq.displayName = 'proto.arduino.LibrarySearchReq'; +} + + +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_, 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.LibrarySearchReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.LibrarySearchReq.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.LibrarySearchReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibrarySearchReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f), + names: jspb.Message.getFieldWithDefault(msg, 2, false), + query: 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.arduino.LibrarySearchReq} + */ +proto.arduino.LibrarySearchReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.LibrarySearchReq; + return proto.arduino.LibrarySearchReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.LibrarySearchReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.LibrarySearchReq} + */ +proto.arduino.LibrarySearchReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setNames(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setQuery(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.LibrarySearchReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.LibrarySearchReq.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.LibrarySearchReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibrarySearchReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getNames(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getQuery(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.LibrarySearchReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.LibrarySearchReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.LibrarySearchReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.LibrarySearchReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional bool names = 2; + * 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.LibrarySearchReq.prototype.getNames = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 2, false)); +}; + + +/** @param {boolean} value */ +proto.arduino.LibrarySearchReq.prototype.setNames = function(value) { + jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional string query = 3; + * @return {string} + */ +proto.arduino.LibrarySearchReq.prototype.getQuery = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.LibrarySearchReq.prototype.setQuery = function(value) { + jspb.Message.setProto3StringField(this, 3, 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.LibrarySearchResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.arduino.LibrarySearchResp.repeatedFields_, null); +}; +goog.inherits(proto.arduino.LibrarySearchResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.LibrarySearchResp.displayName = 'proto.arduino.LibrarySearchResp'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.arduino.LibrarySearchResp.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_, 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.LibrarySearchResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.LibrarySearchResp.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.LibrarySearchResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibrarySearchResp.toObject = function(includeInstance, msg) { + var f, obj = { + searchOutputList: jspb.Message.toObjectList(msg.getSearchOutputList(), + proto.arduino.SearchLibraryOutput.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.arduino.LibrarySearchResp} + */ +proto.arduino.LibrarySearchResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.LibrarySearchResp; + return proto.arduino.LibrarySearchResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.LibrarySearchResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.LibrarySearchResp} + */ +proto.arduino.LibrarySearchResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.arduino.SearchLibraryOutput; + reader.readMessage(value,proto.arduino.SearchLibraryOutput.deserializeBinaryFromReader); + msg.addSearchOutput(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.LibrarySearchResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.LibrarySearchResp.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.LibrarySearchResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibrarySearchResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSearchOutputList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.arduino.SearchLibraryOutput.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated SearchLibraryOutput search_output = 1; + * @return {!Array} + */ +proto.arduino.LibrarySearchResp.prototype.getSearchOutputList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.arduino.SearchLibraryOutput, 1)); +}; + + +/** @param {!Array} value */ +proto.arduino.LibrarySearchResp.prototype.setSearchOutputList = function(value) { + jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.arduino.SearchLibraryOutput=} opt_value + * @param {number=} opt_index + * @return {!proto.arduino.SearchLibraryOutput} + */ +proto.arduino.LibrarySearchResp.prototype.addSearchOutput = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.arduino.SearchLibraryOutput, opt_index); +}; + + +proto.arduino.LibrarySearchResp.prototype.clearSearchOutputList = function() { + this.setSearchOutputList([]); +}; + + + +/** + * 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.SearchLibraryOutput = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.SearchLibraryOutput, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.SearchLibraryOutput.displayName = 'proto.arduino.SearchLibraryOutput'; +} + + +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_, 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.SearchLibraryOutput.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.SearchLibraryOutput.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.SearchLibraryOutput} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.SearchLibraryOutput.toObject = function(includeInstance, msg) { + var f, obj = { + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + releasesMap: (f = msg.getReleasesMap()) ? f.toObject(includeInstance, proto.arduino.LibraryRelease.toObject) : [], + latest: (f = msg.getLatest()) && proto.arduino.LibraryRelease.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.arduino.SearchLibraryOutput} + */ +proto.arduino.SearchLibraryOutput.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.SearchLibraryOutput; + return proto.arduino.SearchLibraryOutput.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.SearchLibraryOutput} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.SearchLibraryOutput} + */ +proto.arduino.SearchLibraryOutput.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 = msg.getReleasesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.arduino.LibraryRelease.deserializeBinaryFromReader, ""); + }); + break; + case 3: + var value = new proto.arduino.LibraryRelease; + reader.readMessage(value,proto.arduino.LibraryRelease.deserializeBinaryFromReader); + msg.setLatest(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.SearchLibraryOutput.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.SearchLibraryOutput.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.SearchLibraryOutput} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.SearchLibraryOutput.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getReleasesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.arduino.LibraryRelease.serializeBinaryToWriter); + } + f = message.getLatest(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.arduino.LibraryRelease.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string Name = 1; + * @return {string} + */ +proto.arduino.SearchLibraryOutput.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.arduino.SearchLibraryOutput.prototype.setName = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * map Releases = 2; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.arduino.SearchLibraryOutput.prototype.getReleasesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 2, opt_noLazyCreate, + proto.arduino.LibraryRelease)); +}; + + +proto.arduino.SearchLibraryOutput.prototype.clearReleasesMap = function() { + this.getReleasesMap().clear(); +}; + + +/** + * optional LibraryRelease latest = 3; + * @return {?proto.arduino.LibraryRelease} + */ +proto.arduino.SearchLibraryOutput.prototype.getLatest = function() { + return /** @type{?proto.arduino.LibraryRelease} */ ( + jspb.Message.getWrapperField(this, proto.arduino.LibraryRelease, 3)); +}; + + +/** @param {?proto.arduino.LibraryRelease|undefined} value */ +proto.arduino.SearchLibraryOutput.prototype.setLatest = function(value) { + jspb.Message.setWrapperField(this, 3, value); +}; + + +proto.arduino.SearchLibraryOutput.prototype.clearLatest = function() { + this.setLatest(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.SearchLibraryOutput.prototype.hasLatest = function() { + return jspb.Message.getField(this, 3) != 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.arduino.LibraryRelease = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.arduino.LibraryRelease.repeatedFields_, null); +}; +goog.inherits(proto.arduino.LibraryRelease, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.LibraryRelease.displayName = 'proto.arduino.LibraryRelease'; +} +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.arduino.LibraryRelease.repeatedFields_ = [8,9]; + + + +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_, 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.LibraryRelease.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.LibraryRelease.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.LibraryRelease} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryRelease.toObject = function(includeInstance, msg) { + var f, obj = { + author: jspb.Message.getFieldWithDefault(msg, 1, ""), + version: jspb.Message.getFieldWithDefault(msg, 2, ""), + maintainer: jspb.Message.getFieldWithDefault(msg, 3, ""), + sentence: jspb.Message.getFieldWithDefault(msg, 4, ""), + paragraph: jspb.Message.getFieldWithDefault(msg, 5, ""), + website: jspb.Message.getFieldWithDefault(msg, 6, ""), + category: jspb.Message.getFieldWithDefault(msg, 7, ""), + architecturesList: jspb.Message.getRepeatedField(msg, 8), + typesList: jspb.Message.getRepeatedField(msg, 9), + resources: (f = msg.getResources()) && proto.arduino.DownloadResource.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.arduino.LibraryRelease} + */ +proto.arduino.LibraryRelease.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.LibraryRelease; + return proto.arduino.LibraryRelease.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.LibraryRelease} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.LibraryRelease} + */ +proto.arduino.LibraryRelease.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.setAuthor(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setMaintainer(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSentence(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setParagraph(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setWebsite(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setCategory(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.addArchitectures(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.addTypes(value); + break; + case 10: + var value = new proto.arduino.DownloadResource; + reader.readMessage(value,proto.arduino.DownloadResource.deserializeBinaryFromReader); + msg.setResources(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.LibraryRelease.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.LibraryRelease.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.LibraryRelease} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.LibraryRelease.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAuthor(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getMaintainer(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSentence(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getParagraph(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getWebsite(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getCategory(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getArchitecturesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 8, + f + ); + } + f = message.getTypesList(); + if (f.length > 0) { + writer.writeRepeatedString( + 9, + f + ); + } + f = message.getResources(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.arduino.DownloadResource.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string author = 1; + * @return {string} + */ +proto.arduino.LibraryRelease.prototype.getAuthor = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.arduino.LibraryRelease.prototype.setAuthor = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string version = 2; + * @return {string} + */ +proto.arduino.LibraryRelease.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.LibraryRelease.prototype.setVersion = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string maintainer = 3; + * @return {string} + */ +proto.arduino.LibraryRelease.prototype.getMaintainer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.LibraryRelease.prototype.setMaintainer = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string sentence = 4; + * @return {string} + */ +proto.arduino.LibraryRelease.prototype.getSentence = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.arduino.LibraryRelease.prototype.setSentence = function(value) { + jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string paragraph = 5; + * @return {string} + */ +proto.arduino.LibraryRelease.prototype.getParagraph = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** @param {string} value */ +proto.arduino.LibraryRelease.prototype.setParagraph = function(value) { + jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string website = 6; + * @return {string} + */ +proto.arduino.LibraryRelease.prototype.getWebsite = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** @param {string} value */ +proto.arduino.LibraryRelease.prototype.setWebsite = function(value) { + jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional string category = 7; + * @return {string} + */ +proto.arduino.LibraryRelease.prototype.getCategory = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** @param {string} value */ +proto.arduino.LibraryRelease.prototype.setCategory = function(value) { + jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * repeated string architectures = 8; + * @return {!Array} + */ +proto.arduino.LibraryRelease.prototype.getArchitecturesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 8)); +}; + + +/** @param {!Array} value */ +proto.arduino.LibraryRelease.prototype.setArchitecturesList = function(value) { + jspb.Message.setField(this, 8, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.arduino.LibraryRelease.prototype.addArchitectures = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 8, value, opt_index); +}; + + +proto.arduino.LibraryRelease.prototype.clearArchitecturesList = function() { + this.setArchitecturesList([]); +}; + + +/** + * repeated string types = 9; + * @return {!Array} + */ +proto.arduino.LibraryRelease.prototype.getTypesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 9)); +}; + + +/** @param {!Array} value */ +proto.arduino.LibraryRelease.prototype.setTypesList = function(value) { + jspb.Message.setField(this, 9, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + */ +proto.arduino.LibraryRelease.prototype.addTypes = function(value, opt_index) { + jspb.Message.addToRepeatedField(this, 9, value, opt_index); +}; + + +proto.arduino.LibraryRelease.prototype.clearTypesList = function() { + this.setTypesList([]); +}; + + +/** + * optional DownloadResource resources = 10; + * @return {?proto.arduino.DownloadResource} + */ +proto.arduino.LibraryRelease.prototype.getResources = function() { + return /** @type{?proto.arduino.DownloadResource} */ ( + jspb.Message.getWrapperField(this, proto.arduino.DownloadResource, 10)); +}; + + +/** @param {?proto.arduino.DownloadResource|undefined} value */ +proto.arduino.LibraryRelease.prototype.setResources = function(value) { + jspb.Message.setWrapperField(this, 10, value); +}; + + +proto.arduino.LibraryRelease.prototype.clearResources = function() { + this.setResources(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.LibraryRelease.prototype.hasResources = function() { + return jspb.Message.getField(this, 10) != 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.arduino.DownloadResource = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.DownloadResource, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.DownloadResource.displayName = 'proto.arduino.DownloadResource'; +} + + +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_, 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.DownloadResource.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.DownloadResource.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.DownloadResource} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.DownloadResource.toObject = function(includeInstance, msg) { + var f, obj = { + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + archivefilename: jspb.Message.getFieldWithDefault(msg, 2, ""), + checksum: jspb.Message.getFieldWithDefault(msg, 3, ""), + size: jspb.Message.getFieldWithDefault(msg, 4, 0), + cachepath: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + 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.DownloadResource} + */ +proto.arduino.DownloadResource.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.DownloadResource; + return proto.arduino.DownloadResource.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.DownloadResource} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.DownloadResource} + */ +proto.arduino.DownloadResource.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.setArchivefilename(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setChecksum(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSize(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setCachepath(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.DownloadResource.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.DownloadResource.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.DownloadResource} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.DownloadResource.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getArchivefilename(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getChecksum(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getSize(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getCachepath(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional string url = 1; + * @return {string} + */ +proto.arduino.DownloadResource.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** @param {string} value */ +proto.arduino.DownloadResource.prototype.setUrl = function(value) { + jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string archivefilename = 2; + * @return {string} + */ +proto.arduino.DownloadResource.prototype.getArchivefilename = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.DownloadResource.prototype.setArchivefilename = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string checksum = 3; + * @return {string} + */ +proto.arduino.DownloadResource.prototype.getChecksum = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.DownloadResource.prototype.setChecksum = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int64 size = 4; + * @return {number} + */ +proto.arduino.DownloadResource.prototype.getSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.arduino.DownloadResource.prototype.setSize = function(value) { + jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string cachepath = 5; + * @return {string} + */ +proto.arduino.DownloadResource.prototype.getCachepath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** @param {string} value */ +proto.arduino.DownloadResource.prototype.setCachepath = function(value) { + jspb.Message.setProto3StringField(this, 5, value); +}; + + +goog.object.extend(exports, proto.arduino); diff --git a/arduino-ide-extension/src/node/cli-protocol/upload_grpc_pb.js b/arduino-ide-extension/src/node/cli-protocol/upload_grpc_pb.js new file mode 100644 index 00000000..97b3a246 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/upload_grpc_pb.js @@ -0,0 +1 @@ +// GENERATED CODE -- NO SERVICES IN PROTO \ No newline at end of file diff --git a/arduino-ide-extension/src/node/cli-protocol/upload_pb.d.ts b/arduino-ide-extension/src/node/cli-protocol/upload_pb.d.ts new file mode 100644 index 00000000..05d308f6 --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/upload_pb.d.ts @@ -0,0 +1,84 @@ +// package: arduino +// file: upload.proto + +/* tslint:disable */ + +import * as jspb from "google-protobuf"; +import * as common_pb from "./common_pb"; + +export class UploadReq extends jspb.Message { + + hasInstance(): boolean; + clearInstance(): void; + getInstance(): common_pb.Instance | undefined; + setInstance(value?: common_pb.Instance): void; + + getFqbn(): string; + setFqbn(value: string): void; + + getSketchPath(): string; + setSketchPath(value: string): void; + + getPort(): string; + setPort(value: string): void; + + getVerbose(): boolean; + setVerbose(value: boolean): void; + + getVerify(): boolean; + setVerify(value: boolean): void; + + getImportFile(): string; + setImportFile(value: string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UploadReq.AsObject; + static toObject(includeInstance: boolean, msg: UploadReq): UploadReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UploadReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UploadReq; + static deserializeBinaryFromReader(message: UploadReq, reader: jspb.BinaryReader): UploadReq; +} + +export namespace UploadReq { + export type AsObject = { + instance?: common_pb.Instance.AsObject, + fqbn: string, + sketchPath: string, + port: string, + verbose: boolean, + verify: boolean, + importFile: string, + } +} + +export class UploadResp extends jspb.Message { + getOutStream(): Uint8Array | string; + getOutStream_asU8(): Uint8Array; + getOutStream_asB64(): string; + setOutStream(value: Uint8Array | string): void; + + getErrStream(): Uint8Array | string; + getErrStream_asU8(): Uint8Array; + getErrStream_asB64(): string; + setErrStream(value: Uint8Array | string): void; + + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): UploadResp.AsObject; + static toObject(includeInstance: boolean, msg: UploadResp): UploadResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: UploadResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): UploadResp; + static deserializeBinaryFromReader(message: UploadResp, reader: jspb.BinaryReader): UploadResp; +} + +export namespace UploadResp { + export type AsObject = { + outStream: Uint8Array | string, + errStream: Uint8Array | string, + } +} diff --git a/arduino-ide-extension/src/node/cli-protocol/upload_pb.js b/arduino-ide-extension/src/node/cli-protocol/upload_pb.js new file mode 100644 index 00000000..c856035e --- /dev/null +++ b/arduino-ide-extension/src/node/cli-protocol/upload_pb.js @@ -0,0 +1,560 @@ +/** + * @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 common_pb = require('./common_pb.js'); +goog.object.extend(proto, common_pb); +goog.exportSymbol('proto.arduino.UploadReq', null, global); +goog.exportSymbol('proto.arduino.UploadResp', 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.UploadReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.UploadReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.UploadReq.displayName = 'proto.arduino.UploadReq'; +} + + +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_, 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.UploadReq.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.UploadReq.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.UploadReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.UploadReq.toObject = function(includeInstance, msg) { + var f, obj = { + instance: (f = msg.getInstance()) && common_pb.Instance.toObject(includeInstance, f), + fqbn: jspb.Message.getFieldWithDefault(msg, 2, ""), + sketchPath: jspb.Message.getFieldWithDefault(msg, 3, ""), + port: jspb.Message.getFieldWithDefault(msg, 4, ""), + verbose: jspb.Message.getFieldWithDefault(msg, 5, false), + verify: jspb.Message.getFieldWithDefault(msg, 6, false), + importFile: jspb.Message.getFieldWithDefault(msg, 7, "") + }; + + 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.UploadReq} + */ +proto.arduino.UploadReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.UploadReq; + return proto.arduino.UploadReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.UploadReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.UploadReq} + */ +proto.arduino.UploadReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new common_pb.Instance; + reader.readMessage(value,common_pb.Instance.deserializeBinaryFromReader); + msg.setInstance(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFqbn(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSketchPath(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPort(value); + break; + case 5: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setVerbose(value); + break; + case 6: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setVerify(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setImportFile(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.UploadReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.UploadReq.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.UploadReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.UploadReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInstance(); + if (f != null) { + writer.writeMessage( + 1, + f, + common_pb.Instance.serializeBinaryToWriter + ); + } + f = message.getFqbn(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSketchPath(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getPort(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getVerbose(); + if (f) { + writer.writeBool( + 5, + f + ); + } + f = message.getVerify(); + if (f) { + writer.writeBool( + 6, + f + ); + } + f = message.getImportFile(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } +}; + + +/** + * optional Instance instance = 1; + * @return {?proto.arduino.Instance} + */ +proto.arduino.UploadReq.prototype.getInstance = function() { + return /** @type{?proto.arduino.Instance} */ ( + jspb.Message.getWrapperField(this, common_pb.Instance, 1)); +}; + + +/** @param {?proto.arduino.Instance|undefined} value */ +proto.arduino.UploadReq.prototype.setInstance = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.arduino.UploadReq.prototype.clearInstance = function() { + this.setInstance(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.arduino.UploadReq.prototype.hasInstance = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string fqbn = 2; + * @return {string} + */ +proto.arduino.UploadReq.prototype.getFqbn = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** @param {string} value */ +proto.arduino.UploadReq.prototype.setFqbn = function(value) { + jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string sketch_path = 3; + * @return {string} + */ +proto.arduino.UploadReq.prototype.getSketchPath = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** @param {string} value */ +proto.arduino.UploadReq.prototype.setSketchPath = function(value) { + jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string port = 4; + * @return {string} + */ +proto.arduino.UploadReq.prototype.getPort = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** @param {string} value */ +proto.arduino.UploadReq.prototype.setPort = function(value) { + jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional bool verbose = 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.UploadReq.prototype.getVerbose = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); +}; + + +/** @param {boolean} value */ +proto.arduino.UploadReq.prototype.setVerbose = function(value) { + jspb.Message.setProto3BooleanField(this, 5, value); +}; + + +/** + * optional bool verify = 6; + * 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.UploadReq.prototype.getVerify = function() { + return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 6, false)); +}; + + +/** @param {boolean} value */ +proto.arduino.UploadReq.prototype.setVerify = function(value) { + jspb.Message.setProto3BooleanField(this, 6, value); +}; + + +/** + * optional string import_file = 7; + * @return {string} + */ +proto.arduino.UploadReq.prototype.getImportFile = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** @param {string} value */ +proto.arduino.UploadReq.prototype.setImportFile = function(value) { + jspb.Message.setProto3StringField(this, 7, 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.UploadResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.arduino.UploadResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.arduino.UploadResp.displayName = 'proto.arduino.UploadResp'; +} + + +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_, 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.UploadResp.prototype.toObject = function(opt_includeInstance) { + return proto.arduino.UploadResp.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.UploadResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.UploadResp.toObject = function(includeInstance, msg) { + var f, obj = { + outStream: msg.getOutStream_asB64(), + errStream: msg.getErrStream_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.arduino.UploadResp} + */ +proto.arduino.UploadResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.arduino.UploadResp; + return proto.arduino.UploadResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.arduino.UploadResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.arduino.UploadResp} + */ +proto.arduino.UploadResp.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.setOutStream(value); + break; + case 2: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setErrStream(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.arduino.UploadResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.arduino.UploadResp.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.UploadResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.arduino.UploadResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOutStream_asU8(); + if (f.length > 0) { + writer.writeBytes( + 1, + f + ); + } + f = message.getErrStream_asU8(); + if (f.length > 0) { + writer.writeBytes( + 2, + f + ); + } +}; + + +/** + * optional bytes out_stream = 1; + * @return {!(string|Uint8Array)} + */ +proto.arduino.UploadResp.prototype.getOutStream = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * optional bytes out_stream = 1; + * This is a type-conversion wrapper around `getOutStream()` + * @return {string} + */ +proto.arduino.UploadResp.prototype.getOutStream_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getOutStream())); +}; + + +/** + * optional bytes out_stream = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getOutStream()` + * @return {!Uint8Array} + */ +proto.arduino.UploadResp.prototype.getOutStream_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getOutStream())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.arduino.UploadResp.prototype.setOutStream = function(value) { + jspb.Message.setProto3BytesField(this, 1, value); +}; + + +/** + * optional bytes err_stream = 2; + * @return {!(string|Uint8Array)} + */ +proto.arduino.UploadResp.prototype.getErrStream = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * optional bytes err_stream = 2; + * This is a type-conversion wrapper around `getErrStream()` + * @return {string} + */ +proto.arduino.UploadResp.prototype.getErrStream_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getErrStream())); +}; + + +/** + * optional bytes err_stream = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getErrStream()` + * @return {!Uint8Array} + */ +proto.arduino.UploadResp.prototype.getErrStream_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getErrStream())); +}; + + +/** @param {!(string|Uint8Array)} value */ +proto.arduino.UploadResp.prototype.setErrStream = function(value) { + jspb.Message.setProto3BytesField(this, 2, value); +}; + + +goog.object.extend(exports, proto.arduino); diff --git a/arduino-ide-extension/src/node/core-service-impl.ts b/arduino-ide-extension/src/node/core-service-impl.ts index 538cd74d..4c56895e 100644 --- a/arduino-ide-extension/src/node/core-service-impl.ts +++ b/arduino-ide-extension/src/node/core-service-impl.ts @@ -42,17 +42,9 @@ export class CoreServiceImpl implements CoreService { compilerReq.setInstance(instance); compilerReq.setSketchpath(sketchpath); compilerReq.setFqbn('arduino:avr:uno'/*boards.current.name*/); - // request.setShowproperties(false); compilerReq.setPreprocess(false); - // request.setBuildcachepath(''); - // compilerReq.setBuildpath('/tmp/build'); - // compilerReq.setShowproperties(true); - // request.setBuildpropertiesList([]); - // request.setWarnings('none'); compilerReq.setVerbose(true); compilerReq.setQuiet(false); - // request.setVidpid(''); - // request.setExportfile(''); const result = client.compile(compilerReq); return new Promise((resolve, reject) => {